Sys.Net.WebRequest body Property
Gets or sets the HTTP body of the Sys.Net.WebRequest instance.
var body = MyWebRequest.get_body();
MyWebRequest.set_body(value);
Parameters
Parameter |
Description |
---|---|
value |
The HTTP body to assign to the Web request. |
Return Value
The HTTP body of the Web request. If the body of the HTTP request has not been previously set or has been set to null, null is returned.
Remarks
Use this property to get or set the body of the HTTP request. The value parameter must be a string, null, or a reference to an XmlDocument object (such as XMLDOM). For more information, see XMLDocument Property on the MSDN Web site.
Example
The following example shows how to set the HTTP request body. This code is part of a complete example found in the Sys.Net.WebRequest class overview.
See Also
Reference
Sys.Net.WebRequestManager Class