Header menu logo FsHttp


FsHttp ("Full Stack HTTP") is a "hackable HTTP client". It's purposes are:

👍Postman? ❤️ FsHttp!


The design principle behind FsHttp is to specify HTTP requests in a most convenient and readable way, while still being able to access the underlying Http representations for covering unusual cases. It's the best of both worlds: Convenience and Flexibility.

FsHttp is developed and maintained by @SchlenkR and @dawedawe. Feel free to leave us a message.

NuGet Badge build status

A Simple Example

An example in F#:

#r "nuget: FsHttp"

open FsHttp

http {
    POST "https://reqres.in/api/users"
    CacheControl "no-cache"
            name = "morpheus"
            job = "leader"
|> Request.send

An example in C#:

#r "nuget: FsHttp"

using FsHttp;

await Http
            name = "morpheus",
            job = "leader"


Release Notes / Migrating to new versions


Please see FsHttp on GitHub.


*.Net SDK:*

You need to have the latest .Net SDK installed, which is specified in ./global.json.

Build Tasks

There is a F# build script (./build.fsx) that can be used to perform several build tasks from command line.

For common tasks, there are powershell files located in the repo root:


namespace FsHttp
Multiple items
static member HttpBuilder.http: HeaderContext

property HttpBuilder.http: HeaderContext with get
custom operation: POST (string) Calls IRequestContext.Post
custom operation: CacheControl (string) Calls IRequestContext.CacheControl
<summary> Used to specify directives that MUST be obeyed by all caching mechanisms along the request/response chain </summary>
custom operation: body Calls IRequestContext.Body
<summary> An explicit transformation from a previous context to allow for describing the request body. </summary>
custom operation: jsonSerialize ('a) Calls IRequestContext.JsonSerialize
Multiple items
module Request from FsHttp.Print

module Request from FsHttp

type Request = { header: Header content: BodyContent config: Config printHint: PrintHint }
val send: request: IToRequest -> Response
<summary> Sends a request synchronously. </summary>

Type something to start searching.