HTTPAcute.Services.IHttp

Allows communication with HTTP servers.

Methods

Task<HttpResponse> RequestAsync(HttpRequest request)

General method to perform an asynchronous HTTP request.

Parameters

Param Type Details
request HttpRequest Relative or absolute URL specifying the destination of the request
Task<HttpResponse> GetAsync(string url)

Shortcut method to perform GET request.

Parameters

Param Type Details
url string Relative or absolute URL specifying the destination of the request

Returns

Task<HttpResponse>
Task<HttpResponse> PostAsync(string url, object data)

Shortcut method to perform POST request.

Parameters

Param Type Details
url string Relative or absolute URL specifying the destination of the request
data object Request data
Task<HttpResponse> PutAsync(string url, object data)

Shortcut method to perform PUT request.

Parameters

Param Type Details
url string Relative or absolute URL specifying the destination of the request
data object Request data
Task<HttpResponse> HeadAsync(string url)

Shortcut method to perform HEAD request.

Parameters

Param Type Details
url string Relative or absolute URL specifying the destination of the request
Task<HttpResponse> DeleteAsync(string url)

Shortcut method to perform DELETE request.

Parameters

Param Type Details
url string Relative or absolute URL specifying the destination of the request

LocationAcute.Services.ILocation

Provides two-way binding to the browser's URL. Changes to the URL in the address bar are reflected in the Location service, and changes to Acute.Services.ILocation are reflected in the browser address bar.

Properties

string AbsoluteUrl { get; }

Gets the full URL representation with all segments encoded according to rules specified in RFC 3986.

string Host { get; }

Gets host portion of the current URL.

int Port { get; }

Gets the port of the current URL.

string Protocol { get; }

Gets the protocol of the current URL.

string Path { get; set; }

Gets or sets the path of the current URL.

Path will always begin with a forward-slash (/). It will be added if not present when setting.

string Hash { get; set; }

Gets or sets the hash fragment of the current URL.

JSDictionary<string, string> Search { get; set; }

Gets or sets the search (query string) keys and values.

CookiesAcute.Services.ICookies

Provides key-values storage backed by the browser's session cookies.

Properties

string this[string key] { get; set; }

Gets or sets the value of the cookie with the given name.

Methods

T Get(string key)

Gets the value of the cookie with the given name. The cookie value will be deserialized into an object of type T.

T Put(string key, T item)

Sets the value of the cookie with the given name. The object will be serialized as JSON into the cookie value.

void Remove(string key)

Removes the specified cookie.