GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - fsprojects/FsHttp: HTTP library for F#

BranchesTags
Open more actions menu

Latest commit

 

History

864 Commits
864 Commits

Folders and files

NameName
Last commit message
Last commit date
.config
.config
 
 
.github
.github
 
 
.vscode
.vscode
 
 
artwork/RestInPeace
artwork/RestInPeace
 
 
docs
docs
 
 
fiddle
fiddle
 
 
src
src
 
 
.editorconfig
.editorconfig
 
 
.fantomasignore
.fantomasignore
 
 
.gitattributes
.gitattributes
 
 
.gitignore
.gitignore
 
 
Directory.Build.props
Directory.Build.props
 
 
FsHttp.sln
FsHttp.sln
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
build.fsx
build.fsx
 
 
build.sh
build.sh
 
 
docu-TODOs.md
docu-TODOs.md
 
 
docu-watch.sh
docu-watch.sh
 
 
docu.sh
docu.sh
 
 
global.json
global.json
 
 
publish.sh
publish.sh
 
 
test.sh
test.sh
 
 

Repository files navigation

Support my Work

Buy a PXL Clock and help me create more videos like this! Use code RONALD for a 25€ discount:

https://www.pxlclock.com/?ref=RONALD

PXL Clock is a fun device, made with ❤️ - and it's programmable in an easy and quick way.

468354531-9b92c9d7-b20b-4316-8104-ac980fa449d5

Find out more:

  • On the PXL Clock Discord Server
  • check out the PXL Clock Repo on GitHub
  • Visit the official PXL Clock Store

Join the PXL Clock Community on Discord

Join Our Discord


FsHttp

Build & Tests NuGet NuGet Downloads

logo

FsHttp is a "hackable HTTP client" that offers a legible style for the basics while still affording full access to the underlying HTTP representations for covering unusual cases. It's the best of both worlds: Convenience and Flexibility.

  • Use it as a replacement for .http files, VSCode's REST client, Postman, and other tools as an interactive and programmable playground for HTTP requests.
  • Usable as a production-ready HTTP client for applications powered by .NET (C#, VB, F#).

👍 Postman? ❤️ FsHttp! https://youtu.be/F508wQu7ET0


FsHttp Studio - A VS Code Extension for FsHttp

👍 Postman? ❤️ FsHttp Studio!

Check out FsHttp.Studio by @tw0po1nt - a wonderful VS Code extension that takes the "FsHttp as a Postman alternative" idea to the next level:

  • A "Run request" button right above every http { } block in your F# scripts
  • Rich response rendering directly in the editor: JSON as collapsible trees, images inline, HTML as rendered pages
  • Status code, timing and response size at a glance

FsHttp.Studio demo

It's available on the VS Code Marketplace. A big thank you to @tw0po1nt for putting love and effort into making F# and FsHttp even more accessible and fun to use :)


Documentation

  • 📖 Please see FsHttp Documentation site for detailed documentation.
  • 🧪 In addition, have a look at the Integration Tests that show various library details.

F# syntax example

#r "nuget: FsHttp"

open FsHttp

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

C# syntax example

#r "nuget: FsHttp"

using FsHttp;

await Http
    .Post("https://reqres.in/api/users")
    .CacheControl("no-cache")
    .Body()
    .JsonSerialize(new
        {
            name = "morpheus",
            job = "leader"
        }
    )
    .SendAsync();

FSI / Non-FSI Scenarios

As this is a recurring issue:

FsHttp emits console logs per default. They can be disabled by putting this line before any request is made:

FsHttp.Fsi.disableDebugLogs ()

Release Notes / Migrating to new versions

  • See https://www.nuget.org/packages/FsHttp#release-body-tab
  • For different upgrade paths, please read the Migrations docs section.

Building

.Net SDK:

You need to have a recent .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 bash scripts located in the repo root:

  • ./test.sh: Runs all tests (sources in ./src/Tests).
    • You can pass args to this task. E.g. for executing only some tests: ./test.sh --filter Name~'Response Decompression'
  • ./docu.sh: Rebuilds the FsHttp documentation site (sources in ./src/docs).
  • ./docu-watch.sh: Run it if you are working on the documentation sources, and want to see the result in a browser.
  • ./publish.sh: Publishes all packages (FsHttp and it's integration packages for Newtonsoft and FSharp.Data) to NuGet.
    • Always have a look at ./src/Directory.Build.props and keep the file up-to-date.

Credits

  • Parts of the code were taken from the HTTP utilities of FSharp.Data.
  • Credits to all critics, supporters, contributors, promoters, users, and friends.

About

HTTP library for F#

fsprojects.github.io/FsHttp/

Topics

fsharphttphttp-clientrestrest-client

Resources

Readme
Apache-2.0 license
Activity
Custom properties

Stars

498 stars

Watchers

13 watching

Forks

41 forks
Report repository

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.