I am trying to call a API in my Windows App .Net 4.6.1
HttpClient client = new HttpClient();
Uri baseAddress = new Uri("https://smsmisr.com/");
client.BaseAddress = baseAddress;
var sendtime = DateTime.Now.ToString("yyyy-MM-dd-HH-mm");
HttpResponseMessage response = client.PostAsJsonAsync(
"api/webapi/?" +
"username=XXXxx" +
"&password=XXXXXX" +
"&language= 3 Or 2 Or 1" +
"&sender=Your Sender " +
"&mobile=2012XXXXXX, 2011XXXX" +
"&message=Encoded Message" +
"&DelayUntil=" + sendtime
).Result;
and while writing the code I am getting the error
Error CS1501 No overload for method 'PostAsJsonAsync' takes 1 arguments
after searching i added this references :
using System.Net.Http;
using System.Net.Http.Headers;
using System.Net.Http.Formatting.dll;
but this error appear: Error CS0234 The type or namespace name 'dll' does not exist in the namespace 'System.Net.Http.Formatting' (are you missing an assembly reference?)