Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

c# .net 3.5 post json httpclient

 System.Net.WebClient client = new System.Net.WebClient();
 client.Headers.Add("content-type", "application/json");//set your header here, you can add multiple headers
 string s = Encoding.ASCII.GetString(client.UploadData("http://localhost:1111/Service.svc/SignIn", "POST", Encoding.Default.GetBytes("{"EmailId": "admin@admin.com","Password": "pass#123"}")));
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #post #json #httpclient
ADD COMMENT
Topic
Name
9+9 =