FsHttp.FSharpData
                             
                            
                                11.0.0-preview01
                            
                        
                    See the version list below for details.
dotnet add package FsHttp.FSharpData --version 11.0.0-preview01
NuGet\Install-Package FsHttp.FSharpData -Version 11.0.0-preview01
<PackageReference Include="FsHttp.FSharpData" Version="11.0.0-preview01" />
<PackageVersion Include="FsHttp.FSharpData" Version="11.0.0-preview01" />
<PackageReference Include="FsHttp.FSharpData" />
paket add FsHttp.FSharpData --version 11.0.0-preview01
#r "nuget: FsHttp.FSharpData, 11.0.0-preview01"
#:package FsHttp.FSharpData@11.0.0-preview01
#addin nuget:?package=FsHttp.FSharpData&version=11.0.0-preview01&prerelease
#tool nuget:?package=FsHttp.FSharpData&version=11.0.0-preview01&prerelease
FsHttp
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.
Documentation
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"
    body
    jsonSerialize
        {|
            name = "morpheus"
            job = "leader"
        |}
}
|> Request.send
An example in C#:
#r "nuget: FsHttp"
using FsHttp.CSharp;
await "https://reqres.in/api/users".Post()
    .CacheControl("no-cache")
    .Body()
    .JsonSerialize(new
        {
            name = "morpheus",
            job = "leader"
        }
    )
    .SendAsync();
Migrating to new versions
For different upgrade paths, please read the Migrations section in the docu.
Building
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
Credits
Parts of the code is taken from the HTTP utilities of FSharp.Data.
| Product | Versions 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. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.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. | 
- 
                                                    .NETStandard 2.0- FSharp.Core (>= 5.0.0)
- FSharp.Data (>= 4.0.1)
- FsHttp (>= 11.0.0-preview01)
 
- 
                                                    .NETStandard 2.1- FSharp.Core (>= 5.0.0)
- FSharp.Data (>= 4.0.1)
- FsHttp (>= 11.0.0-preview01)
 
- 
                                                    net6.0- FSharp.Core (>= 5.0.0)
- FSharp.Data (>= 4.0.1)
- FsHttp (>= 11.0.0-preview01)
 
- 
                                                    net7.0- FSharp.Core (>= 5.0.0)
- FSharp.Data (>= 4.0.1)
- FsHttp (>= 11.0.0-preview01)
 
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated | 
|---|---|---|
| 15.0.3 | 128 | 10/3/2025 | 
| 15.0.2 | 158 | 9/13/2025 | 
| 15.0.1 | 28,558 | 12/3/2024 | 
| 14.5.2 | 177 | 12/3/2024 | 
| 14.5.1 | 3,113 | 8/9/2024 | 
| 14.5.0 | 1,574 | 3/5/2024 | 
| 14.4.2 | 194 | 3/5/2024 | 
| 14.4.1 | 2,471 | 2/5/2024 | 
| 14.4.0 | 411 | 1/7/2024 | 
| 14.2.0 | 217 | 1/5/2024 | 
| 14.1.0 | 221 | 1/3/2024 | 
| 14.0.0 | 230 | 1/2/2024 | 
| 13.3.0 | 222 | 12/28/2023 | 
| 13.2.0 | 228 | 12/28/2023 | 
| 12.2.0-preview01 | 190 | 12/24/2023 | 
| 12.1.0 | 286 | 11/27/2023 | 
| 12.0.0 | 260 | 10/31/2023 | 
| 11.0.0 | 799 | 8/5/2023 | 
| 11.0.0-preview01 | 265 | 3/25/2023 | 
| 10.0.0 | 4,729 | 11/25/2022 | 
| 10.0.0-preview3 | 240 | 11/23/2022 | 
| 10.0.0-preview2 | 268 | 11/12/2022 | 
| 10.0.0-preview1 | 291 | 11/12/2022 | 
| 9.1.2 | 2,238 | 6/5/2022 | 
| 9.1.1 | 823 | 4/24/2022 | 
| 9.1.0 | 548 | 4/19/2022 | 
| 9.0.6 | 592 | 4/19/2022 | 
| 9.0.5 | 552 | 4/14/2022 | 
| 9.0.4 | 588 | 4/8/2022 | 
| 9.0.3 | 593 | 4/8/2022 | 
| 9.0.2 | 557 | 4/6/2022 | 
| 9.0.1 | 538 | 4/5/2022 | 
| 9.0.0 | 575 | 4/5/2022 | 
v7.0.0
      - #92: `expect` and `assert` pass through the original response instead of unit.
      v8.0.0
      - #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.
      v8.0.1
      - #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).
      v9.0.2
      - Added JSON toArray functions
      - Fixed #99: Response.saveFile should create the directory if not present.
      v9.0.3
      - Supporting netstandard2.1 again.
      v9.0.4
      - Referenced lowest possible FSharp.Core and other referenced packages version.
      v9.0.5
      - Support for netstandard2.0.
      - New 'FsHttp.NewtonsoftJson' integration package.
      - More JSON functions and defaults config.
      v9.0.6
      - #100 - Removed FSI print messages.
      v9.1.0
      - Fixed naming inconsistency for 'Response.deserialize...' functions.
      - More C# JSON functions.
      v9.1.1
      - Fix: Using GlobalConfig.Json.defaultJsonSerializerOptions as default for jsonSerialize.
      v9.1.2
      - Fixed #103: FSI response printing and initialization doesn't work out of the box anymore.
      v10.0.0
      - .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
      v10.1.0
      - #117: Escape string for query params values (by @maciej-izak - thank you)
      (!!) This can be seen as breaking change.
      - #112: Allow to add (multiple) headers (by @Samuel-Dufour - thank you)
      v11.0.0
      - #121: Turning off debug logs in FSI