Send by value in Body with HttpClient class
Hi Guys, I'd like to know how can I send (post) data in body with bearer? I try to use HttpClient, but, I don't know how to load in body my informations.
When I use Postman, I can send, but when I need to send it through C# I don't know how to send it.
I try two ways:
and
2 Replies
in your code you use
StringContent
, but in postman you seem to be using form-data
have you tried using FormUrlEncodedContent
instead, maybe?I haven't tried with FormUrlEncodedContent yet
It worked, thanks friend!