A client request invocation builder.
The builder, obtained via a call to one of the
request(...)
methods on a
resource target
, provides methods for
preparing a client request invocation. Once the request is prepared
the invocation builder can be either used to build an
Invocation
with a generic execution interface:
Client client = ClientBuilder.newClient();
WebTarget resourceTarget = client.target("http://examples.jaxrs.com/");
// Build a HTTP GET request that accepts "text/plain" response type
// and contains a custom HTTP header entry "Foo: bar".
Invocation invocation = resourceTarget.request("text/plain")
.header("Foo", "bar").buildGet();
// Invoke the request using generic interface
String response = invocation.invoke(String.class);
Alternatively, one of the inherited