servant-http2-client alternatives and similar packages
Based on the "servant" category.
Alternatively, view servant-http2-client alternatives based on common mentions on social networks and blogs.
-
servant
Main repository for the servant libraries — DSL for describing, serving, querying, mocking, documenting web applications and more! -
servant-elm
Automatically derive Elm functions to query servant webservices -
servant-purescript
Translate servant API to purescript code, with the help of purescript-bridge. -
servant-swagger-ui
Provide embedded swagger UI for servant and swagger -
servant-response
Moved to http://github.com/haskell-servant -
servant-auth-cookie
Authentication via encrypted cookies -
servant-js
Automatically derive javascript functions to query servant webservices. -
servant-router
Servant router for non-server applications. -
servant-aeson-specs
Generically obtain tests for JSON serialization -
servant-cassava
Servant CSV content-type for cassava -
servant-github-webhook
Servant combinators for writing secure GitHub webhooks -
servant-pagination
Type-safe pagination for Servant APIs -
servant-exceptions
Extensible exceptions for servant -
servant-mock
Derive a mock server for free from your servant API types -
servant-cli
Generate a command line client from a servant API -
servant-pandoc
Render a servant API to Pandoc's native representation -
servant-matrix-param
Matrix parameter combinator for servant -
servant-auth-token-acid
Servant based API and server for token based authorisation -
servant-auth-token-leveldb
Servant based API and server for token based authorisation -
servant-github
servant types to access the GitHub API v3 -
servant-py
Servant client generators for the Python language -
servant-jsonrpc
Tools to build JSON-RPC clients and servers the Servant way -
servant-reason
Automatically derive bindings for Servant APIs in Reason -
servant-zeppelin-client
Server Side Loading JSON -
servant-match
Standalone implementation of servant’s dispatching mechanism -
servant-kotlin
Automatically derive Kotlin functions to query servant webservices -
servant-ruby
Create a Ruby client from a Servant API using Net::HTTP. -
servant-options
Provide responses to OPTIONS requests for Servant applications. -
servant-haxl-client
automatical derivation of querying functions for servant webservices -
servant-csharp
Generate servant client library for C# -
servant-generate
Generate default implementations for servers in a flexible way (a.k.a servant-mock on steroids) -
servant-wasm
Servant support for delivering WebAssembly -
servant-proto-lens
Servant Content-Type for proto-lens protobuf modules. -
servant-multipart
multipart/form-data (e.g file upload) support for servant -
servant-jsonrpc-client
Generate JSON-RPC servant clients
Learn any GitHub repo in 59 seconds
Do you think we are missing an alternative of servant-http2-client or a related project?
README
servant-http2-client
This package provides a way to generate HTTP2 client code from Servant API descriptions.
Please consider this package somewhat unstable. The author would appreciate feedbacks and benchmarks in real-world deployments.
Usage
The usage is pretty similar to servant-client
but uses an HTTP2Client rather
than a Manager. See also the section below to highlight differences between
servant-client
and servant-http2-client
.
HTTP2 uses a flow-control mechanism, which http2-client
exposes but
servant-http2-client
hides: as a client you have nothing to do and
DATA-credit is immediately sent to the server. This mechanism is easy for the
user but effectively disables flow control at the application level. Further,
this easy-to-use mechanism may have some slight overhead for sending many small
control frames. Future version of the library will expose more control points
(at an increased cost).
You can find a full example at ./test/Spec.hs
.
Differences with servant-client
The client leverages http2-client
and hence behave slightly differently from
servant-client
, which uses http-client
. Most notably, HTTP/2 uses a single
TCP connection for performing concurrent requests, whereas HTTP/1.x at best
pipelines request sequentially over a same connection.
The servant-client
library uses a connection Manager to create new TCP
connections or try re-using existing connections. This servant-http2-client
makes no use of such a Manager. This difference is mostly important for
load-balancing and unstable network environments. When targeting a
load-balanced server, a servant-http2-client
will always hit the same
TCP-endpoint whereas a servant-client
may hit different TCP-endpoint for each
request. Also, after handling a connection error, a servant-client
will open
a new TCP connection without any decision from the programmer. Conversely, a
broken servant-http2-client
will be of no practical use and the programmer
must create a new H2ClientEnv. A Manager abstraction may be added to
http2-client
later.
The servant-client
package offers Cookies handling, whereas
servant-http2-client
has no such feature. Please consider opening a
pull-request for adding the support.
Finally, it's always good to remember that HTTP2 allows concurrent queries, that is, many API calls may fail when a single TCP connection dies out.