@ Big gray wolf: HttpWebRequestrequest (HttpWebRequest) WebRequest. Create (url); request. MethodPOST; then set other http headers to get header information such as contenttype through packet capture. YourClassobjnewYourClass (); serialize your YourClass to json format Json
@ Wolf: HttpWebRequest request = (HttpWebRequest) WebRequest. create (url); request. method = "POST"; // set other http headers. You can capture the contenttype and other header information. YourClass obj = new YourClass (); // serialize your YourClass to json format Json
@ WOLF:
HttpWebRequest request = (HttpWebRequest) WebRequest. Create (url );
Request. Method = "POST ";
// Set other http headers. You can capture the contenttype and other header information by capturing packets.
YourClass obj = new YourClass ();
// Serialize your YourClass to json format
JsonSerializer formater = new JsonSerializer ();
Formater. Serialize (MS, obj );
// Get the Stream through request. GetRequestStream (), and then Write the serialized content to the request through Stream. Write.