Skip to content
master
Switch branches/tags
Code

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
Sep 9, 2021
Nov 22, 2021
src
Nov 23, 2021
Aug 29, 2021
Oct 5, 2018
Sep 9, 2021
Aug 29, 2021
Nov 22, 2021
Apr 6, 2021
Nov 6, 2021

FsHttp

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

NuGet Badge build status

NOTE: The NuGet package SchlenkR.FsHttp is deprecated. Please use the package FsHttp for releases >= 6.x

Documentation

Please visit the FsHttp Documentation site.

You can also have a the Integration Tests that show various use cases.

A Simple Example

#r "nuget: FsHttp"

open FsHttp
open FsHttp.DslCE

http {
    POST "https://reqres.in/api/users"
    CacheControl "no-cache"
    body
    json """
    {
        "name": "morpheus",
        "job": "leader"
    }
    """
}

Building

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

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

dotnet fsi .\build.fsx [task]

Common tasks are:

  • build
  • test
  • docu
  • publish

Building Readme.md

The Readme.md and the content in ./docs is auto-generated from the files in ./src/Docu. In order to build them, run the command dotnet fsi .\build.fsx docu.

Credits

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