HttpRequest Class
Namespace: Rebex.Net
Assembly: Rebex.Http.dll (version 7.0.9083)
This class represents HTTP and HTTPS requests.
Syntax
public class HttpRequest : WebRequest, ISerializable
Implements
Inherited Members
Constructors
Name | Description |
---|---|
HttpRequest(Uri, HttpRequestCreator) | Creates an HTTP request targeting specific URI. |
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. |
ContentLength | Gets or sets HTTP Content-Length header. |
ContentType | Gets or sets HTTP Content-Type header. |
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. |
CookieContainer | Gets or sets the cookie container for the request. |
Credentials | Get or sets network credentials to identify a user. |
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. |
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. |
PreAuthenticate | Indicates whether to pre-authenticate the request. |
Referer | Gets or sets HTTP Referer header. |
RequestUri | Gets original URI of the request. |
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). |
UserAgent | Gets or sets HTTP User-Agent header. |
Methods
Name | Description |
---|---|
Abort() | Cancels request. This will make the current (or subsequent) request fail with WebException error with of RequestCanceled.
|
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(AsyncCallback, Object) | Begins asynchronous GetRequestStream operation. Returns request stream that the request data can be written to as an asynchronous operation. Returns writable stream. |
BeginGetResponse(AsyncCallback, Object) | Begins asynchronous GetResponse operation. Returns a response for this request as asynchronous operation. If the response was retrieved once, return that response. |
EndGetRequestStream(IAsyncResult) | Ends an asynchronous BeginGetRequestStream operation. |
EndGetResponse(IAsyncResult) | Ends an asynchronous BeginGetResponse operation. |
Equals(Object) | Determines whether the specified |
GetHashCode() | Gets a hash code of this object. |
GetRequestStream() | Returns request stream that the request data can be written to. |
GetRequestStreamAsync() | Returns request stream that the request data can be written to as an asynchronous operation. Returns writable stream. |
GetResponse() | Returns a response for this request. If the response was retrieved once, return that response. |
GetResponseAsync() | Returns a response for this request as asynchronous operation. If the response was retrieved once, return that response. |