The HttpRequest type exposes the following members.
Constructors
Name | Description | |
---|---|---|
HttpRequest |
Create a HTTP request targeting specific URI.
|
Methods
Name | Description | |||||
---|---|---|---|---|---|---|
Abort |
Cancels request.
This will make the current (or subsequent) request fail with WebException error
with (Overrides WebRequest..::..Abort()()()().)
| |||||
AddRange(Int64) |
Adds HTTP Range header to the request with 'bytes' unit.
| |||||
AddRange(Int64, Int64) |
Adds HTTP Range header to the request with 'bytes' unit.
| |||||
AddRange(String, Int64) |
Adds HTTP Range header to the request.
| |||||
AddRange(String, Int64, Int64) |
Adds HTTP Range header to the request.
| |||||
BeginGetRequestStream |
Begins asynchronous GetRequestStream operation.
Returns request stream that the request data can be written to as an asynchronous operation. Returns writable stream.
(Overrides WebRequest..::..BeginGetRequestStream(AsyncCallback, Object).) | |||||
BeginGetResponse |
Begins asynchronous GetResponse operation.
Returns a response for this request as asynchronous operation. If the response was retrieved once, return that response.
(Overrides WebRequest..::..BeginGetResponse(AsyncCallback, Object).) | |||||
CreateObjRef | Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object. (Inherited from MarshalByRefObject.) | |||||
EndGetRequestStream |
Ends an asynchronous BeginGetRequestStream operation.
(Overrides WebRequest..::..EndGetRequestStream(IAsyncResult).) | |||||
EndGetResponse |
Ends an asynchronous BeginGetResponse operation.
(Overrides WebRequest..::..EndGetResponse(IAsyncResult).) | |||||
Equals | (Overrides Object..::..Equals(Object).) | |||||
Finalize | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.) | |||||
GetHashCode | (Overrides Object..::..GetHashCode()()()().) | |||||
GetLifetimeService | Retrieves the current lifetime service object that controls the lifetime policy for this instance. (Inherited from MarshalByRefObject.) | |||||
GetRequestStream |
Returns request stream that the request data can be written to.
(Overrides WebRequest..::..GetRequestStream()()()().) | |||||
GetResponse |
Returns a response for this request. If the response was retrieved once, return that response.
(Overrides WebRequest..::..GetResponse()()()().) | |||||
GetType | Gets the Type of the current instance. (Inherited from Object.) | |||||
InitializeLifetimeService | Obtains a lifetime service object to control the lifetime policy for this instance. (Inherited from MarshalByRefObject.) | |||||
MemberwiseClone()()()() | Creates a shallow copy of the current Object. (Inherited from Object.) | |||||
MemberwiseClone(Boolean) | Creates a shallow copy of the current MarshalByRefObject object. (Inherited from MarshalByRefObject.) | |||||
ToString | Returns a String that represents the current Object. (Inherited from Object.) |
Properties
Name | Description | |
---|---|---|
Accept |
Gets or sets HTTP Accept header.
| |
Address |
Gets target URI final request connects to. When redirected, this is the URI the final response is retrieved.
| |
AllowAutoRedirect |
Gets or sets a value indicating whether the request should handle redirects, if the response have sufficient information.
| |
AllowWriteStreamBuffering |
Gets or sets a value indicating whether to buffer the data sent to server.
| |
AutomaticDecompression |
Gets or sets the method(s) that can be used for automatic decompression of the response stream; Both GZip and Deflate by default.
| |
ClientCertificates |
Gets or sets a collection of client certificates for the request.
| |
Connection |
Gets or sets HTTP Connection header.
| |
ConnectionGroupName |
Gets or sets the name of the connection group for the request.
Not supported yet.
(Overrides WebRequest..::..ConnectionGroupName.) | |
ContentLength |
Gets or sets HTTP Content-Length header.
(Overrides WebRequest..::..ContentLength.) | |
ContentType |
Gets or sets HTTP Content-Type header.
(Overrides WebRequest..::..ContentType.) | |
ContinueTimeout |
Gets or sets a timeout in milliseconds, which determines how long to wait
for the '100 Continue' response from the server.
If the '100 Continue' response is not received within the timeout,
request body is send to the server.
Zero means no waiting. Default value is 350. | |
Credentials |
Get or sets network credentials to identify a user.
(Overrides WebRequest..::..Credentials.) | |
Expect |
Gets or sets HTTP Expect header.
| |
Expect100Continue |
Gets or sets a value indicating whether to automatically add 'Expect: 100-continue' header to the request.
Default value is true. | |
HaveResponse |
Gets a value whether the response was already received for this request.
| |
Headers |
Get or sets a collection of HTTP headers to send with a request.
(Overrides WebRequest..::..Headers.) | |
IfModifiedSince |
Gets or sets HTTP If-Modified-Since header.
| |
KeepAlive |
Gets or sets HTTP Connection header with proper values associated with keep alive mode.
| |
MaximumAutomaticRedirections |
Gets or sets maximum redirection attempts to complete the request.
| |
Method |
Gets or sets HTTP method that this request uses.
(Overrides WebRequest..::..Method.) | |
PreAuthenticate |
Indicates whether to pre-authenticate the request.
(Overrides WebRequest..::..PreAuthenticate.) | |
Proxy | Obsolete. | |
Referer |
Gets or sets HTTP Referer header.
| |
RequestUri |
Gets original URI of the request.
(Overrides WebRequest..::..RequestUri.) | |
SendChunked |
Gets or sets a value that indicates whether to send request content in 'chunked' mode.
| |
Timeout |
Gets or sets the length of time in milliseconds before the operation times out (specify -1 or 0 to indicate that the request does not time out).
(Overrides WebRequest..::..Timeout.) | |
TransferEncoding | ||
UserAgent |
Gets or sets HTTP User-Agent header.
|