Summary
Provides very simple and easy-to-use methods to run an HTTP request and receive the response.
Constructors
| Constructor. Initializes the request to look like it came from a recent version of Firefox. |
Instance methods
HResponse | Get(string url, params HArg[] args) |
Performs a GET request to the specified URL and with the specified query parameters. |
HResponse | Post(string url, params HArg[] args) |
Performs a POST request with the body consisting of a series of key-value arguments. |
HResponse | Post(string url, byte[] bytes, string contentType) |
Performs a POST request with the body of the request specified as raw data. |
HResponse | |
Performs a POST request with the body consisting of a series of key-value arguments, encoded in the
multipart/form-data format. |
HResponse | |
Performs a POST request with the body consisting of a series of key-value arguments, encoded in the
application/x-www-form-urlencoded format. |
Instance properties
bool | |
Specifies whether the receipt of a redirect should automatically generate a new request for the new URL.
Defaults to false. |
DecompressionMethods | |
Specifies which compression methods are supported. This affects the Accept-Encoding header and automatically
decompresses the response if necessary. Defaults to gzip+deflate, as used by modern browsers. |
bool | |
Specifies whether to use Expect: 100 (continue) for post requests, thus querying the server for whether it
wants to accept the post request, before sending the request body. Defaults to false. If true, the entire
interaction is handled transparently. |
bool | | Specifies whether to use keep-alive for follow-up requests. Defaults to true. |
string | |
A shorthand for getting and setting ReqHeaders[HttpRequestHeader.Accept]. Defaults to what a recent version of
US Firefox might send. |
string | |
A shorthand for getting and setting ReqHeaders[HttpRequestHeader.AcceptLanguage]. Defaults to what a recent
version of US Firefox might send. |
WebHeaderCollection | |
Exposes a collection of request headers. See Remarks. |
string | | A shorthand for getting and setting ReqHeaders[HttpRequestHeader.Referer]. Defaults to null |
string | |
A shorthand for getting and setting ReqHeaders[HttpRequestHeader.UserAgent] Defaults to what a recent version
of US Firefox might send.. |
TimeSpan | |
Specifies how long to wait for the server to respond to the request before throwing an exception. Defaults to
10 seconds. |
Instance fields
CookieContainer | | Contains the cookies to be sent to the server and received from the server. |
LoggerBase | | Specifies a logger that logs all outgoing requests and responses. |
string | |
Specifies the root URL. If the request URL begins with http:// or https:// , this is ignored.
Otherwise the URL is prepended with this value. |
Static fields