How to send a Post body in the HttpClient request in Windows Phone 8?
I have written the code below to send headers, post parameters. The problem is that I am using SendAsync since my request can be GET or POST. How can I add POST Body to this peice of code so that if there is any post body data it gets added in the request that I make and if its simple GET or POST without body it send the request that way. Please update the code below: HttpClient client = new HttpClient(); // Add a new Request Message HttpRequestMessage requestMessage = new HttpRequestMessage(RequestHTTPMethod, ToString()); // Add our custom headers if (RequestHeader != null) { foreach (var ite
0 upvotes
View original discussion ↗
Comments
Sign in or sign up to comment and upvote.
No comments yet.