Legend

Class
Struct
Enum
Interface
Delegate
Constructor
Method
Property
Event
Field

Class: RT.Util.HClient

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. (see also remarks)
HResponse
Post(string url, byte[] bytes, string contentType)
Performs a POST request with the body of the request specified as raw data.
HResponse
PostFormdata(string url, params HArg[] args)
Performs a POST request with the body consisting of a series of key-value arguments, encoded in the multipart/form-data format. (see also remarks)
HResponse
PostUrlencoded(string url, params HArg[] args)
Performs a POST request with the body consisting of a series of key-value arguments, encoded in the application/x-www-form-urlencoded format. (see also remarks)

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.
boolSpecifies 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. (see also remarks)
stringA 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

CookieContainerContains the cookies to be sent to the server and received from the server.
LoggerBaseSpecifies 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

LoggerBaseSpecifies the default logger. See HClient.Log for more information.
stringSpecifies the default root URL. See HClient.RootUrl for more information.