GeezerVison is showing fsprojects.github.io — Http (FSharp.Data)
Http Type
-
Namespace:
FSharp.Data
-
Assembly: FSharp.Data.Http.dll
-
Base Type:
obj
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
|
|
|
Appends the query parameters to the url, taking care of proper escaping
-
url
:
string
-
query
:
(string * string) list
-
Returns:
string
|
Http.AsyncRequest(url, ?query, ?headers, ?httpMethod, ?body, ?cookies, ?cookieContainer, ?silentHttpErrors, ?silentCookieErrors, ?responseEncodingOverride, ?customizeHttpRequest, ?timeout)
Full Usage:
Http.AsyncRequest(url, ?query, ?headers, ?httpMethod, ?body, ?cookies, ?cookieContainer, ?silentHttpErrors, ?silentCookieErrors, ?responseEncodingOverride, ?customizeHttpRequest, ?timeout)
Parameters:
url
:
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
-
url
:
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>
|
Http.AsyncRequestStream(url, ?query, ?headers, ?httpMethod, ?body, ?cookies, ?cookieContainer, ?silentHttpErrors, ?silentCookieErrors, ?customizeHttpRequest, ?timeout)
Full Usage:
Http.AsyncRequestStream(url, ?query, ?headers, ?httpMethod, ?body, ?cookies, ?cookieContainer, ?silentHttpErrors, ?silentCookieErrors, ?customizeHttpRequest, ?timeout)
Parameters:
url
:
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
-
url
:
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>
|
Http.AsyncRequestString(url, ?query, ?headers, ?httpMethod, ?body, ?cookies, ?cookieContainer, ?silentHttpErrors, ?silentCookieErrors, ?responseEncodingOverride, ?customizeHttpRequest, ?timeout)
Full Usage:
Http.AsyncRequestString(url, ?query, ?headers, ?httpMethod, ?body, ?cookies, ?cookieContainer, ?silentHttpErrors, ?silentCookieErrors, ?responseEncodingOverride, ?customizeHttpRequest, ?timeout)
Parameters:
url
:
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
-
url
:
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>
|
|
|
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://..." ]
-
linkHeader
:
string
-
Returns:
Map<string, string>
|
Http.Request(url, ?query, ?headers, ?httpMethod, ?body, ?cookies, ?cookieContainer, ?silentHttpErrors, ?silentCookieErrors, ?responseEncodingOverride, ?customizeHttpRequest, ?timeout)
Full Usage:
Http.Request(url, ?query, ?headers, ?httpMethod, ?body, ?cookies, ?cookieContainer, ?silentHttpErrors, ?silentCookieErrors, ?responseEncodingOverride, ?customizeHttpRequest, ?timeout)
Parameters:
url
:
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
-
url
:
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
|
Http.RequestStream(url, ?query, ?headers, ?httpMethod, ?body, ?cookies, ?cookieContainer, ?silentHttpErrors, ?silentCookieErrors, ?customizeHttpRequest, ?timeout)
Full Usage:
Http.RequestStream(url, ?query, ?headers, ?httpMethod, ?body, ?cookies, ?cookieContainer, ?silentHttpErrors, ?silentCookieErrors, ?customizeHttpRequest, ?timeout)
Parameters:
url
:
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
-
url
:
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
|
Http.RequestString(url, ?query, ?headers, ?httpMethod, ?body, ?cookies, ?cookieContainer, ?silentHttpErrors, ?silentCookieErrors, ?responseEncodingOverride, ?customizeHttpRequest, ?timeout)
Full Usage:
Http.RequestString(url, ?query, ?headers, ?httpMethod, ?body, ?cookies, ?cookieContainer, ?silentHttpErrors, ?silentCookieErrors, ?responseEncodingOverride, ?customizeHttpRequest, ?timeout)
Parameters:
url
:
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
-
url
:
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
|
|