A simple, functional HTTP client library for F# with an immutable, fluent API.
Http.fs is a functional HTTP client library for F# that provides a simple, immutable API for making HTTP requests. It abstracts the complexities of .NET's HttpClient into a fluent, composable interface, allowing developers to build and execute requests in a functional style. The library supports various request types, authentication, headers, cookies, and response handling, making it ideal for F# applications needing reliable HTTP communication.
F# developers building applications that require HTTP communication, such as web clients, API integrations, or data scraping tools, who prefer a functional programming approach.
Developers choose Http.fs for its clean, immutable API that aligns with F# functional paradigms, its comprehensive feature set covering common HTTP use cases, and its integration with Hopac for efficient asynchronous operations, offering a more idiomatic alternative to .NET's HttpClient.
A simple, functional HTTP client library for F#
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Uses immutable record types and a fluent builder pattern, allowing for safe and composable request construction without side effects, as demonstrated in the code examples for building requests step-by-step.
Supports a wide range of HTTP features including query strings, authentication, custom headers, cookies, and various body types like forms and multipart data, enabling complex scenarios without extra dependencies.
Built on Hopac, it enables parallel HTTP requests with Job.conCollect, making batch processing and concurrent downloads straightforward and performant, as shown in the example for downloading multiple sites.
Designed specifically for F#, it integrates seamlessly with functional programming idioms, providing a natural fit for F# developers who prefer immutable and abstract APIs over imperative styles.
Relies on Hopac for asynchronous operations, which requires developers to learn a new concurrency model if they are accustomed to standard .NET async/await, adding complexity for teams not already using Hopac.
Compared to more popular HTTP clients like HttpClient or RestSharp, Http.fs has a smaller community and fewer third-party resources, which can hinder troubleshooting and advanced usage beyond basic examples.
Response headers have 'Response' appended to avoid naming clashes with request headers, adding slight complexity and potential for confusion when accessing headers, as noted in the README.