HttpWebRequest.GetRequestStream Method
Submits a request with HTTP headers to the server, and returns a Stream object to use to write request data.
Namespace: System.Net
Assembly: System (in system.dll)
Syntax
public override Stream GetRequestStream ()
Return Value
A Stream to use to write request data.
Remarks
Used for POST of PUT requests.
Exceptions
Exception type | Condition |
---|---|
InvalidOperationException | This method is called more than once. -or- The transfer encoding is non-null and the SendChunked property is false. |
ProtocolViolationException | The HTTP verb is GET or HEAD. -or- Content length is missing for this request. |
Version Information
Available in the .NET Micro Framework versions 4.0 and 4.1.
See Also
Reference
HttpWebRequest Class
HttpWebRequest Members
System.Net Namespace