FsHttp 10.0.0

.NET 6.0 .NET Standard 2.0
There is a newer prerelease version of this package available.
See the version list below for details.
dotnet add package FsHttp --version 10.0.0
NuGet\Install-Package FsHttp -Version 10.0.0
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="FsHttp" Version="10.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add FsHttp --version 10.0.0
#r "nuget: FsHttp, 10.0.0"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install FsHttp as a Cake Addin
#addin nuget:?package=FsHttp&version=10.0.0

// Install FsHttp as a Cake Tool
#tool nuget:?package=FsHttp&version=10.0.0


FsHttp is a .Net HTTP client library for C# and F#. It aims for describing and executing HTTP requests in convenient ways that can be used in production and interactive environments.

FsHttp is authored by @ronaldschlenker. Feel free to leave a message.

NuGet Badge build status


Please see FsHttp Documentation site for a detailed documentation.

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.CSharp;

await "https://reqres.in/api/users".Post()
            name = "morpheus",
            job = "leader"

Migrating to new versions

For different upgrade paths, please read the Migrations section in the docu.


You need to have the latest .Net 5 SDK installed.

Building binaries, publish, and test

There is a F# script that can be used to perform several build tasks from command line. It can be executed in this way:

PS> dotnet fsi .\build.fsx [task]

Common tasks are:

  • build
  • test
  • publish

Building the documentation

The documentation in ./docs is auto-generated from the files in ./src/Docu. In order to build them, run:

PS> .\docu.ps1


Parts of the code is taken from the HTTP utilities of FSharp.Data.

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 is compatible.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 is compatible. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Additional computed target framework(s)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (9)

Showing the top 5 NuGet packages that depend on FsHttp:

Package Downloads

Package Description


FSharp.Data (JSON) integration package for FsHttp


JSON.Net (Newtonsoft.Json) integration package for FsHttp


Dotnet library for easy access to Swate API.


This project aims at providing an interface to use the (unofficial) GOG API from .NET.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
11.0.0-preview01 254 3/25/2023
10.0.0 39,905 11/25/2022
10.0.0-preview3 71 11/23/2022
10.0.0-preview2 214 11/12/2022
10.0.0-preview1 67 11/12/2022
9.1.2 19,502 6/5/2022
9.1.1 2,587 4/24/2022
9.1.0 813 4/19/2022
9.0.6 814 4/19/2022
9.0.5 862 4/14/2022
9.0.4 651 4/8/2022
9.0.3 572 4/8/2022
9.0.2 2,177 4/6/2022
9.0.1 504 4/5/2022
9.0.0 10,425 4/5/2022
8.0.1 6,771 3/6/2022
8.0.0 380 3/2/2022
7.0.0 29,781 12/13/2021
6.0.1 1,500 11/23/2021
6.0.0 240 11/22/2021
0.9.0 1,064 7/14/2019

     - #92: `expect` and `assert` pass through the original response instead of unit.

     - #93 (thanks @drhumlen): Changed content type 'text/json' to 'application/json'.
     - Http modules are always AutoOpen in both Dsl and DslCE.
     - No extra modules for builder methods.

     - #89: No more blocking requests using net5 with FSI.

     v9.0.0 / v9.0.1
     - Redefined builders (see README.md).
     - Many breaking changes (see "Migrations" sections in the docu).

     - Added JSON toArray functions
     - Fixed #99: Response.saveFile should create the directory if not present.

     - Supporting netstandard2.1 again.

     - Referenced lowest possible FSharp.Core and other referenced packages version.

     - Support for netstandard2.0.
     - New 'FsHttp.NewtonsoftJson' integration package.
     - More JSON functions and defaults config.

     - #100 - Removed FSI print messages.

     - Fixed naming inconsistency for 'Response.deserialize...' functions.
     - More C# JSON functions.

     - Fix: Using GlobalConfig.Json.defaultJsonSerializerOptions as default for jsonSerialize.

     - Fixed #103: FSI response printing and initialization doesn't work out of the box anymore.

     - .Net 7 support (thank you @Samuel-Dufour)
     - Breaking change: Corrected typo "guessMineTypeFromPath" -> "guessMimeTypeFromPath"
     - Breaking change: Module 'Helper', 'HelperInternal' and 'HelperAutos' refactored
     - #115: Remove print messages when downloading streams
     - Printing: Separate print functions for response and request via Request.print and Response.print
     - Printing: Default request (IToRequest) printing in FSI
     - Removed net5.0 targets in all projects
     - PrintHint.printDebugMessages: Moved to FsHttp.Helper.Fsi.logDebugMessages as a global switch
     - #113 - Config.timeoutInSeconds bug