dmfs / http-client-essentials-suite

A lightweight http-client suite.
Apache License 2.0
11 stars 5 forks source link

Build codecov

http-client-essentials-suite

A lightweight http client suite. All you need to implement an HTTP based protocol.

Purpose

This suite of libraries provides a lightweight HTTP framework. It's primary use case is for libraries that implement HTTP-based protocols or clients of HTTP-based APIs without having to pull in the dependencies of a specific HTTP client implementation but leaving the choice of the implementation to the project that uses the library.

Background

When developing a client library for an HTTP based protocol or library you often need to decide for an HTTP client implementation to carry out the actual requests. However, sometimes you may regret your choice later on and you want to or have to move on to another implementation (like when Android deprecated and finally removed the Apache HttpClient from its SDK).

On the other hand, when developing an application that makes use of several HTTP based protocols you usually want to use an existing library for that. In that case it's rather annoying when all the libraries you want to use pull in a different HTTP client as a dependency, or even worse, depend on different versions of the same HTTP client library.

Why should I use http-client-essentials for my library?

You should use this framework if

What makes it different from Apache's HttpClient, Volley, okhttp, HttpUrlConnection etc.?

http-client-essentials defines a set of interfaces that model HTTP requests and responses on a high abstract level. The model has certain similarities with Apache's HttpClient and with Google's Volley clients, though there are some essential differences.

The most important difference is: This is not a fully featured HTTP client implementation. It still relies on an actual HTTP client implementation like the ones in the title of this section. But: it doesn't matter which one is actually in use since the interfaces abstract from any implementation details and you can adapt this framework to all of those.

Other differences are:

Libraries that use http-client-essentials

License

Copyright (c) Marten Gajda 2017, licensed under Apache2.