Class HttpHeaders

java.lang.Object
org.apache.juneau.http.HttpHeaders

public final class HttpHeaders extends Object
Static factory methods for creating common HTTP headers.

This is a convenience class that provides shorthand access to all named header types in org.apache.juneau.http.header.

// Import statically for clean DSL-style usage import static HttpHeaders.*; RestRequest req = client.get("/api/resource") .header(accept("application/json")) .header(authorization("Bearer " + token));

See Also:
Since:
9.2.1