Header menu logo FsHttp

Per request configuration

It's possible to configure requests per instance by the use of config_ methods in any stage of the request definition:

http {
    config_timeoutInSeconds 11.1
    GET "http://myService"
}

// or

get "http://myService"
|> Config.timeoutInSeconds 11.1

Global configuration

You can also set config values globally (inherited when requests are created):

GlobalConfig.defaults
|> Config.timeoutInSeconds 11.1
|> GlobalConfig.set
namespace FsHttp
Multiple items
static member HttpBuilder.http: HeaderContext

--------------------
property HttpBuilder.http: HeaderContext with get
custom operation: config_timeoutInSeconds (float) Calls IRequestContext.TimeoutInSeconds
custom operation: GET (string) Calls IRequestContext.Get
val get: url: string -> HeaderContext
Multiple items
module Config from FsHttp.Dsl

--------------------
type Config = { timeout: TimeSpan option defaultDecompressionMethods: DecompressionMethods list headerTransformers: (Header -> Header) list httpMessageTransformers: (HttpRequestMessage -> HttpRequestMessage) list httpClientHandlerTransformers: (SocketsHttpHandler -> SocketsHttpHandler) list httpClientTransformers: (HttpClient -> HttpClient) list httpCompletionOption: HttpCompletionOption proxy: Proxy option certErrorStrategy: CertErrorStrategy httpClientFactory: (Config -> HttpClient) ... }
val timeoutInSeconds: value: float -> context: IUpdateConfig<'a> -> 'a
module GlobalConfig from FsHttp
val defaults: GlobalConfig.GlobalConfigWrapper
val set: config: GlobalConfig.GlobalConfigWrapper -> unit

Type something to start searching.