A simple library for composing HTTP clients, and creating services to make HTTP requests. Uses the package:http's Client.
This can be used as an alternative to http client generator libraries like retrofit, and chopper.
Handle has number of features to make HTTP requests flexible, and easy to use:
- Combine different client to create the perfect HTTP client for your needs.
- Compatibility with package:http's Client - You can wrap with existing http Clients, like RetryClient
- Very minimum boilerplate for creating REST requests, and services with no code generation.
- Extensive test suite and benchmarks to ensure reliability, and high performance.
See the API documentation for details on the following topics:
For comparing client performance from this package, I've included benchmarks for this library's clients, and package:http's Client with no external dependency in benchmarks/
directory.
HttpClientListSerializationBenchmark(RunTime): 1788231.5 us.
RestClientListSerializationBenchmark(RunTime): 1745168.5 us.
RestClientListAsyncSerializationBenchmark(RunTime): 1832672.0 us.
HttpClientSingleSerializationBenchmark(RunTime): 1257598.0 us.
RestClientSingleSerializationBenchmark(RunTime): 1257561.0 us.
RestClientSingleAsyncSerializationBenchmark(RunTime): 1262549.0 us.
Benchmarks last updated on 20 June, 2023.