JEP 110: New HTTP Client

AuthorMichael McMahon
OrganizationOracle
Created2011/7/26
Updated2013/1/14
TypeFeature
StateCandidate
Componentcore/net
ScopeJDK
RFE7042990
Discussionnet dash dev at openjdk dot java dot net
Start2011/Q3
EffortS
DurationS
Endorsed-byBrian Goetz

Summary

We would like to define and implement a new HTTP client API to replace the legacy HttpURLConnection and which leverages the new features of NIO (non-blocking & asynchronous I/O).

Motivation

Requirements:

Other general requirements:

Description

Alternatives

A number of existing HTTP client API and implementations exist - two notable ones are Jetty (org.mortbay.jetty) and the Apache HTTP client.

Both of these were designed prior to NIO and are both rather heavy-weight in terms of numbers of packages and classes. However, some recent work has been done on an API which provides a similar asynchronous mode of operation (based on NIO). We should see what/if any part of this work we can adopt.

Testing

Will need new tests. The internal http server will provide a suitable test harness for regression tests and TCK tests. SQE tests could use it also, but may need to test against real http servers.

Impact