Making Http Requests in F#

This page summarizes the projects mentioned and recommended in the original post on dev.to

InfluxDB - Power Real-Time Data Analytics at Scale
Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
www.influxdata.com
featured
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com
featured
  • ply

    High performance System.Threading.(Value)Task computation expressions for F# (by crowded)

  • DISCLAIMER: I'll be using Ply in most of the samples due to it's efficient task CE and the easy interoperability between C# tasks as well as F#'s async. Http operations are by nature async operations, that means using async/await in C#/JavaScript or using async {} in F# which can be a little annoying when you need to append |> Async.AwaitTask to every function/method that returns a Task.

  • FsHttp

    A lightweight F# HTTP library by @SchlenkR and @dawedawe

  • Why do I mention this? because today we'll see three ways to do Http Requests with different libraries, we'll first explore the BCL's (Base Class Library) System.Net.Http then we'll proceed to use Flurl and finally we'll check FsHttp, and depending on your taste or needs you may want to use one or the other.

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
  • ClosedXML.SimpleSheets

    Easily generate Excel sheets from F#

  • ClosedXML.SimpleSheets

  • Npgsql.FSharp

    Thin F# wrapper around Npgsql, the PostgreSQL database driver for .NET

  • Npgsql.FSharp

  • FSharp.CosmosDb

    An F# wrapper around Cosmos DB's .NET SDK to make it more friendly for F# developers (by aaronpowell)

  • FSharp.CosmosDb

  • FSharp.SystemTextJson

    System.Text.Json extensions for F# types

  • Let's move on to the Json requests. In F# Json Serialization/Deserialization is an interesting topic because we're used so much to use things like Option, Result, Discriminated Unions and other F# specific constructs that sometimes they don't translate well to plain json or from plain json and that's why often F# libraries leave the that aspect out of scope to other libraries like Thoth.Json or FSharp.SystemTextJson. For now we'll fall back to the BCL and use the System.Text.Json namespace since we are only using primitive types in our model

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts

  • Idiomatic way to interact with database

    2 projects | /r/fsharp | 9 Apr 2023
  • Best practices F# API?

    6 projects | /r/fsharp | 9 Mar 2022
  • Data Access in Fsharp

    8 projects | dev.to | 12 Nov 2021
  • Best resources for learning F# to write boring apps?

    2 projects | /r/fsharp | 1 Oct 2021
  • Recommended libraries / frameworks for web services

    6 projects | /r/fsharp | 29 Apr 2021