Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

c# HttpResponseMessage postResponse = client.PostAsync

async Task<string> GetResponseString(string text)
{
    var httpClient = new HttpClient();

    var parameters = new Dictionary<string, string>();
    parameters["text"] = text;

    var response = await httpClient.PostAsync(BaseUri, new FormUrlEncodedContent(parameters));
    var contents = await response.Content.ReadAsStringAsync();

    return contents;
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #HttpResponseMessage #postResponse
ADD COMMENT
Topic
Name
2+8 =