@Test public void testValuesToStrings() throws ParseException { HttpRequest request = HttpRequest.post("http: .withHeader(CONTENT_TYPE, ofContentType(JSON_UTF_8)) .withHeader(ACCEPT, ofAcceptMediaTypes(AcceptMediaType.of(ANY_IMAGE, 50), AcceptMediaType.of(MediaTypes.HTML))) .withHeader(ACCEPT_CHARSET, ofAcceptCharsets(AcceptCharset.of(UTF_8), AcceptCharset.of(ISO_8859_1))) .withCookies(HttpCookie.of("key1", "value1"), HttpCookie.of("key2"), HttpCookie.of("key3", "value2")); assertEquals("application/json; charset=utf-8", request.getHeader(CONTENT_TYPE)); assertEquals("image/*; q=0.5, text/html", request.getHeader(ACCEPT)); assertEquals("utf-8, iso-8859-1", request.getHeader(ACCEPT_CHARSET)); assertEquals("key1=value1; key2; key3=value2", request.getHeader(COOKIE)); HttpResponse response = HttpResponse.ofCode(200) .withHeader(DATE, HttpHeaderValue.ofTimestamp(1486944000021L)); assertEquals("Mon, 13 Feb 2017 00:00:00 GMT", response.getHeader(DATE)); }
public static HttpHeader of(byte[] array, int offset, int length, int lowerCaseHashCode) { return headers.getOrCreate(array, offset, length, lowerCaseHashCode); }
HttpHeaders { public static HttpHeader of(byte[] array, int offset, int length, int lowerCaseHashCode) { return headers.getOrCreate(array, offset, length, lowerCaseHashCode); } }
HttpHeaders { public static HttpHeader of(byte[] array, int offset, int length, int lowerCaseHashCode) { return headers.getOrCreate(array, offset, length, lowerCaseHashCode); }  }
HttpHeaders { public static HttpHeader of(byte[] array, int offset, int length, int lowerCaseHashCode) { return headers.getOrCreate(array, offset, length, lowerCaseHashCode); }  static HttpHeader of(byte[] array, int offset, int length, int lowerCaseHashCode); static HttpHeader of(String string); }
HttpHeaders { public static HttpHeader of(byte[] array, int offset, int length, int lowerCaseHashCode) { return headers.getOrCreate(array, offset, length, lowerCaseHashCode); }  static HttpHeader of(byte[] array, int offset, int length, int lowerCaseHashCode); static HttpHeader of(String string); static final HttpHeader CACHE_CONTROL; static final HttpHeader CONTENT_LENGTH; static final HttpHeader CONTENT_TYPE; static final HttpHeader DATE; static final HttpHeader PRAGMA; static final HttpHeader VIA; static final HttpHeader WARNING; static final HttpHeader ACCEPT; static final HttpHeader ACCEPT_CHARSET; static final HttpHeader ACCEPT_ENCODING; static final HttpHeader ACCEPT_LANGUAGE; static final HttpHeader ACCESS_CONTROL_REQUEST_HEADERS; static final HttpHeader ACCESS_CONTROL_REQUEST_METHOD; static final HttpHeader AUTHORIZATION; static final HttpHeader CONNECTION; static final HttpHeader COOKIE; static final HttpHeader EXPECT; static final HttpHeader FROM; static final HttpHeader FOLLOW_ONLY_WHEN_PRERENDER_SHOWN; static final HttpHeader HOST; static final HttpHeader IF_MATCH; static final HttpHeader IF_MODIFIED_SINCE; static final HttpHeader IF_NONE_MATCH; static final HttpHeader IF_RANGE; static final HttpHeader IF_UNMODIFIED_SINCE; static final HttpHeader LAST_EVENT_ID; static final HttpHeader MAX_FORWARDS; static final HttpHeader ORIGIN; static final HttpHeader PROXY_AUTHORIZATION; static final HttpHeader RANGE; static final HttpHeader REFERER; static final HttpHeader TE; static final HttpHeader UPGRADE; static final HttpHeader USER_AGENT; static final HttpHeader ACCEPT_RANGES; static final HttpHeader ACCESS_CONTROL_ALLOW_HEADERS; static final HttpHeader ACCESS_CONTROL_ALLOW_METHODS; static final HttpHeader ACCESS_CONTROL_ALLOW_ORIGIN; static final HttpHeader ACCESS_CONTROL_ALLOW_CREDENTIALS; static final HttpHeader ACCESS_CONTROL_EXPOSE_HEADERS; static final HttpHeader ACCESS_CONTROL_MAX_AGE; static final HttpHeader AGE; static final HttpHeader ALLOW; static final HttpHeader CONTENT_DISPOSITION; static final HttpHeader CONTENT_ENCODING; static final HttpHeader CONTENT_LANGUAGE; static final HttpHeader CONTENT_LOCATION; static final HttpHeader CONTENT_MD5; static final HttpHeader CONTENT_RANGE; static final HttpHeader CONTENT_SECURITY_POLICY; static final HttpHeader CONTENT_SECURITY_POLICY_REPORT_ONLY; static final HttpHeader ETAG; static final HttpHeader EXPIRES; static final HttpHeader LAST_MODIFIED; static final HttpHeader LINK; static final HttpHeader LOCATION; static final HttpHeader P3P; static final HttpHeader PROXY_AUTHENTICATE; static final HttpHeader REFRESH; static final HttpHeader RETRY_AFTER; static final HttpHeader SERVER; static final HttpHeader SET_COOKIE; @Deprecated
	static final HttpHeader SET_COOKIE2; static final HttpHeader STRICT_TRANSPORT_SECURITY; static final HttpHeader TIMING_ALLOW_ORIGIN; static final HttpHeader TRAILER; static final HttpHeader TRANSFER_ENCODING; static final HttpHeader VARY; static final HttpHeader WWW_AUTHENTICATE; static final HttpHeader DNT; static final HttpHeader X_CONTENT_TYPE_OPTIONS; static final HttpHeader X_DO_NOT_TRACK; static final HttpHeader X_FORWARDED_FOR; static final HttpHeader X_FORWARDED_PROTO; static final HttpHeader X_FRAME_OPTIONS; static final HttpHeader X_POWERED_BY; static final HttpHeader PUBLIC_KEY_PINS; static final HttpHeader PUBLIC_KEY_PINS_REPORT_ONLY; static final HttpHeader X_REQUESTED_WITH; static final HttpHeader X_USER_IP; static final HttpHeader X_XSS_PROTECTION; static final HttpHeader X_REAL_IP; static final HttpHeader X_AUTH_TOKEN; }