Well, I know that HttpClient.SendAsync() can be used to send HttpRequestMessage and request Method can be set to POST and Content to StringContent for simple string... but in my case i want to send a more complex JSON string which looks like this
{
"requests": [
{
"image": {
"content": ""
},
"features": [
{
"type": "UNSPECIFIED",
"maxResults": 50
}
]
}
]
}
I tried to use JavaScriptSerializer but don't know how to create an object that reprsents such json.
await Browser.SendAsync(new HttpRequestMessage
{
RequestUri = new Uri("http://127.0.0.1/"),
Method = HttpMethod.Post,
Content = new StringContent(new JavaScriptSerializer().Serialize())
});
StringContent.