Giter Site home page Giter Site logo

nhenneaux / jersey-httpclient-connector Goto Github PK

View Code? Open in Web Editor NEW
9.0 6.0 3.0 411 KB

Jersey java.net.http.HttpClient Connector

License: GNU Lesser General Public License v3.0

Java 100.00%
java jax-rs httpclient jersey jersey-connector jax-rs-client

jersey-httpclient-connector's Introduction

Jersey Connector with java.net.http.HttpClient

A Jersey connector using java.net.http.HttpClient and supporting HTTP/1.1 and HTTP/2.0 with the same client. The protocol is selected based on the server capabilities.

Usage

To build a JAX-RS client, you can use the following.

var client = ClientBuilder.newClient(new ClientConfig().connectorProvider(HttpClientConnector::new))

If you want to customise the Java HTTP client you are using, you can use the following.

var httpClient = HttpClient.newHttpClient();
var client = ClientBuilder.newClient(
                            new ClientConfig()
                              .connectorProvider(
                                 (jaxRsClient, config) ->  new HttpClientConnector(httpClient)))

Inspired from Stackoverflow question without answer Support HTTP/1.1 and HTTP/2 with a JAX-RS client.

Version 0.3 is compatible with Jersey 2 while version 1.1 uses Jersey 3.

Build Status Maven Central Quality Gate Status Coverage

jersey-httpclient-connector's People

Contributors

nhenneaux avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

jersey-httpclient-connector's Issues

GPL 3.0 License requires larger project to turn to GPL 3.0

I am unable to use this connector in a larger project with the MIT license because we can't change license, and GPL 3.0 requires any project it is in to use the same license - which very often is impossible. I imagine there are many others who face this issue. Would it be possible to change this to an MIT license? Or some other less restrictive license? I can't wait to actually use it!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.