Http Type
Utilities for working with network via HTTP. Includes methods for downloading resources with specified headers, query parameters and HTTP body
Static members
| Static member | Description |
Full Usage:
Http.AppendQueryToUrl(url, query)
Parameters:
string
query : (string * string) list
Returns: string
|
|
Full Usage:
Http.AsyncRequest(url, ?query, ?headers, ?httpMethod, ?body, ?cookies, ?cookieContainer, ?silentHttpErrors, ?silentCookieErrors, ?responseEncodingOverride, ?customizeHttpRequest, ?timeout)
Parameters:
string
?query : (string * string) list
?headers : (string * string) seq
?httpMethod : string
?body : HttpRequestBody
?cookies : (string * string) seq
?cookieContainer : CookieContainer
?silentHttpErrors : bool
?silentCookieErrors : bool
?responseEncodingOverride : string
?customizeHttpRequest : HttpWebRequest -> HttpWebRequest
?timeout : int
Returns: Async<HttpResponse>
|
Download an HTTP web resource from the specified URL asynchronously (allows specifying query string parameters and HTTP headers including headers that have to be handled specially - such as Accept, Content-Type & Referer) The body for POST request can be specified either as text or as a list of parameters that will be encoded, and the method will automatically be set if not specified
|
Full Usage:
Http.AsyncRequestStream(url, ?query, ?headers, ?httpMethod, ?body, ?cookies, ?cookieContainer, ?silentHttpErrors, ?silentCookieErrors, ?customizeHttpRequest, ?timeout)
Parameters:
string
?query : (string * string) list
?headers : (string * string) seq
?httpMethod : string
?body : HttpRequestBody
?cookies : (string * string) seq
?cookieContainer : CookieContainer
?silentHttpErrors : bool
?silentCookieErrors : bool
?customizeHttpRequest : HttpWebRequest -> HttpWebRequest
?timeout : int
Returns: Async<HttpResponseWithStream>
|
Download an HTTP web resource from the specified URL asynchronously (allows specifying query string parameters and HTTP headers including headers that have to be handled specially - such as Accept, Content-Type & Referer) The body for POST request can be specified either as text or as a list of parameters that will be encoded, and the method will automatically be set if not specified
|
Full Usage:
Http.AsyncRequestString(url, ?query, ?headers, ?httpMethod, ?body, ?cookies, ?cookieContainer, ?silentHttpErrors, ?silentCookieErrors, ?responseEncodingOverride, ?customizeHttpRequest, ?timeout)
Parameters:
string
?query : (string * string) list
?headers : (string * string) seq
?httpMethod : string
?body : HttpRequestBody
?cookies : (string * string) seq
?cookieContainer : CookieContainer
?silentHttpErrors : bool
?silentCookieErrors : bool
?responseEncodingOverride : string
?customizeHttpRequest : HttpWebRequest -> HttpWebRequest
?timeout : int
Returns: Async<string>
|
Download an HTTP web resource from the specified URL asynchronously (allows specifying query string parameters and HTTP headers including headers that have to be handled specially - such as Accept, Content-Type & Referer) The body for POST request can be specified either as text or as a list of parameters that will be encoded, and the method will automatically be set if not specified
|
Full Usage:
Http.ParseLinkHeader(linkHeader)
Parameters:
string
Returns: Map<string, string>
|
Parses an RFC 5988 Link header value (e.g. from a GitHub or other paginated API response) and returns a map from relation type to URL. For example, given the header value: <https://api.github.com/repos/.../releases?page=2>; rel="next", <...>; rel="last" this returns: Map [ "next", "https://..."; "last", "https://..." ]
|
Full Usage:
Http.Request(url, ?query, ?headers, ?httpMethod, ?body, ?cookies, ?cookieContainer, ?silentHttpErrors, ?silentCookieErrors, ?responseEncodingOverride, ?customizeHttpRequest, ?timeout)
Parameters:
string
?query : (string * string) list
?headers : (string * string) seq
?httpMethod : string
?body : HttpRequestBody
?cookies : (string * string) seq
?cookieContainer : CookieContainer
?silentHttpErrors : bool
?silentCookieErrors : bool
?responseEncodingOverride : string
?customizeHttpRequest : HttpWebRequest -> HttpWebRequest
?timeout : int
Returns: HttpResponse
|
Download an HTTP web resource from the specified URL synchronously (allows specifying query string parameters and HTTP headers including headers that have to be handled specially - such as Accept, Content-Type & Referer) The body for POST request can be specified either as text or as a list of parameters that will be encoded, and the method will automatically be set if not specified
|
Full Usage:
Http.RequestStream(url, ?query, ?headers, ?httpMethod, ?body, ?cookies, ?cookieContainer, ?silentHttpErrors, ?silentCookieErrors, ?customizeHttpRequest, ?timeout)
Parameters:
string
?query : (string * string) list
?headers : (string * string) seq
?httpMethod : string
?body : HttpRequestBody
?cookies : (string * string) seq
?cookieContainer : CookieContainer
?silentHttpErrors : bool
?silentCookieErrors : bool
?customizeHttpRequest : HttpWebRequest -> HttpWebRequest
?timeout : int
Returns: HttpResponseWithStream
|
Download an HTTP web resource from the specified URL synchronously (allows specifying query string parameters and HTTP headers including headers that have to be handled specially - such as Accept, Content-Type & Referer) The body for POST request can be specified either as text or as a list of parameters that will be encoded, and the method will automatically be set if not specified
|
Full Usage:
Http.RequestString(url, ?query, ?headers, ?httpMethod, ?body, ?cookies, ?cookieContainer, ?silentHttpErrors, ?silentCookieErrors, ?responseEncodingOverride, ?customizeHttpRequest, ?timeout)
Parameters:
string
?query : (string * string) list
?headers : (string * string) seq
?httpMethod : string
?body : HttpRequestBody
?cookies : (string * string) seq
?cookieContainer : CookieContainer
?silentHttpErrors : bool
?silentCookieErrors : bool
?responseEncodingOverride : string
?customizeHttpRequest : HttpWebRequest -> HttpWebRequest
?timeout : int
Returns: string
|
Download an HTTP web resource from the specified URL synchronously (allows specifying query string parameters and HTTP headers including headers that have to be handled specially - such as Accept, Content-Type & Referer) The body for POST request can be specified either as text or as a list of parameters that will be encoded, and the method will automatically be set if not specified
|
FSharp.Data