Logo Paket

NetUtils Module

Types and nested modules

Type/Module Description

AuthProvider (Module)

SafeWebResult

Auth

AuthProvider (Type)

Credentials Provider, the paramter indicates whether we need to retry, because some previous request failed

AuthType

RequestFailedException

Exception for request errors

RequestFailedInfo

SafeWebResult<'a>

UserPassword

Functions and values

Function or value Description

calcEnvProxies

Full Usage: calcEnvProxies

Returns: Lazy<Map<string, WebProxy>>
Returns: Lazy<Map<string, WebProxy>>

createHttpClient (url, auth)

Full Usage: createHttpClient (url, auth)

Parameters:
    url : string
    auth : Auth option

Returns: HttpClient
url : string
auth : Auth option
Returns: HttpClient

createHttpHandler

Full Usage: createHttpHandler

Returns: string * Auth option -> HttpMessageHandler
Returns: string * Auth option -> HttpMessageHandler

createHttpHandlerRaw (url, auth)

Full Usage: createHttpHandlerRaw (url, auth)

Parameters:
    url : string
    auth : Auth option

Returns: HttpMessageHandler
url : string
auth : Auth option
Returns: HttpMessageHandler

downloadFileSync url fileName client

Full Usage: downloadFileSync url fileName client

Parameters:
    url : string
    fileName : string
    client : HttpClient

Returns: Result<unit, DomainMessage>
url : string
fileName : string
client : HttpClient
Returns: Result<unit, DomainMessage>

downloadStringSync url client

Full Usage: downloadStringSync url client

Parameters:
Returns: Result<string, DomainMessage>
url : string
client : HttpClient
Returns: Result<string, DomainMessage>

envProxies ()

Full Usage: envProxies ()

Parameters:
    () : unit

Returns: Map<string, WebProxy>
() : unit
Returns: Map<string, WebProxy>

failIfNoSuccess resp

Full Usage: failIfNoSuccess resp

Parameters:
Returns: Async<unit>
resp : HttpResponseMessage
Returns: Async<unit>

getDefaultProxyFor

Full Usage: getDefaultProxyFor

Returns: string -> IWebProxy
Returns: string -> IWebProxy

getXmlFromUrl (auth, url)

Full Usage: getXmlFromUrl (auth, url)

Parameters:
Returns: Async<string>
auth : AuthProvider
url : string
Returns: Async<string>

normalizeFeedUrl source

Full Usage: normalizeFeedUrl source

Parameters:
    source : string

Returns: string
source : string
Returns: string

proxyFor envProxies systemProxy uri

Full Usage: proxyFor envProxies systemProxy uri

Parameters:
Returns: IWebProxy

The proxy for this url: the one of the env vars, whose bypass list sends the no_proxy hosts direct, or else the system one, with the default credentials when it has none of its own

envProxies : Map<string, WebProxy>
systemProxy : IWebProxy
uri : Uri
Returns: IWebProxy

requestStatus ex

Full Usage: requestStatus ex

Parameters:
Returns: HttpStatusCode option
ex : Exception
Returns: HttpStatusCode option

useDefaultHandler

Full Usage: useDefaultHandler

Returns: bool
Returns: bool

Type extensions

Type extension Description

this.DownloadData

Full Usage: this.DownloadData

Parameters:
    uri : string

Returns: byte[]

Extended Type: HttpClient

uri : string
Returns: byte[]

this.DownloadData

Full Usage: this.DownloadData

Parameters:
Returns: byte[]

Extended Type: HttpClient

uri : Uri
Returns: byte[]

this.DownloadDataTaskAsync

Full Usage: this.DownloadDataTaskAsync

Parameters:
Returns: Task<byte[]>

Extended Type: HttpClient

uri : Uri
tok : CancellationToken
Returns: Task<byte[]>

this.DownloadDataTaskAsync

Full Usage: this.DownloadDataTaskAsync

Parameters:
Returns: Task<byte[]>

Extended Type: HttpClient

uri : string
tok : CancellationToken
Returns: Task<byte[]>

this.DownloadFile

Full Usage: this.DownloadFile

Parameters:
    uri : string
    filePath : string

Extended Type: HttpClient

uri : string
filePath : string

this.DownloadFile

Full Usage: this.DownloadFile

Parameters:
    uri : Uri
    filePath : string

Extended Type: HttpClient

uri : Uri
filePath : string

this.DownloadFileTaskAsync

Full Usage: this.DownloadFileTaskAsync

Parameters:
Returns: Task<unit>

Extended Type: HttpClient

uri : Uri
tok : CancellationToken
filePath : string
Returns: Task<unit>

this.DownloadFileTaskAsync

Full Usage: this.DownloadFileTaskAsync

Parameters:
Returns: Task<unit>

Extended Type: HttpClient

uri : string
tok : CancellationToken
filePath : string
Returns: Task<unit>

this.DownloadString

Full Usage: this.DownloadString

Parameters:
    uri : string

Returns: string

Extended Type: HttpClient

uri : string
Returns: string

this.DownloadString

Full Usage: this.DownloadString

Parameters:
Returns: string

Extended Type: HttpClient

uri : Uri
Returns: string

this.DownloadStringTaskAsync

Full Usage: this.DownloadStringTaskAsync

Parameters:
Returns: Task<string>

Extended Type: HttpClient

uri : Uri
tok : CancellationToken
Returns: Task<string>

this.DownloadStringTaskAsync

Full Usage: this.DownloadStringTaskAsync

Parameters:
Returns: Task<string>

Extended Type: HttpClient

uri : string
tok : CancellationToken
Returns: Task<string>

this.UploadFileAsMultipart

Full Usage: this.UploadFileAsMultipart

Parameters:
    url : Uri
    filename : string

Returns: HttpResponseMessage

Extended Type: HttpClient

url : Uri
filename : string
Returns: HttpResponseMessage

Active patterns

Active pattern Description

(|RequestStatus|_|) ex

Full Usage: (|RequestStatus|_|) ex

Parameters:
Returns: HttpStatusCode option
ex : Object
Returns: HttpStatusCode option

Type something to start searching.