I'm really stuck to send a POST request by HttpClient with Parameters:
private async Task<string> PostAsync(string parameterValue)
{
var ResponseMessage = await HttpClient.PostAsyncAsync(myUri, new FormUrlEncodedContent(
new[]
{
new KeyValuePair<string, string>("parameter", parameterValue)
Thanks - })); var httpResponse = await Deserialize(ResponseMessage);
return Response.Token;
}
What I get is POST https://URI with parameters in the content HTTP/1.1 and what I need is https://URI?parameter=PARAMETERVALUE HTTP/1.1
Can anybody help me?
EDIT:
Thanks - It's just like:
private async Task<string> PostAsync(string parameterValue)
{
var ResponseMessage = await HttpClient.PostAsyncAsync(string.Format(myUri?parameter={0}, parameterValue), null)