I have got this HttpClient from Nuget.
When I want to get data I do it this way:
var response = await httpClient.GetAsync(url);
var data = await response.Content.ReadAsStringAsync();
But the problem is that I don't know how to post data?
I have to send a post request and send these values inside it: comment="hello world"
and questionId = 1
. these can be a class's properties, I don't know.
Update I don't know how to add those values to HttpContent
as post method needs it. httClient.Post(string, HttpContent);