I need to send a post request that has content type "application/x-www-form-urlencoded"
Here is the top portion of my task with the PostAsync operation. I saw that the HttpStringContent has a mediatype that is a string but this setup isn't working. Do I have to format my Platform String differently or am I close? I am sending "grant_type=authorization_code"
as my string. Any help is appreciated. Thank you!
create_task(
httpClient->PostAsync(resourceAddress, ref new HttpStringContent(mystring, UnicodeEncoding::Utf8, "application/x-www-form-urlencoded")),
cancellationTokenSource.get_token()).then([this](HttpResponseMessage^ response)