@Test public void testAddSetAndGetHeaderString() throws Exception { assertEquals(null, builder.build().getHeaderString("non-existing-header")); builder.addHeader("header1", "header1_value1") .addHeader("header1", "header1_value2"); assertEquals("header1_value1, header1_value2", builder.build().getHeaderString("header1")); builder.setHeader("header1", "header1_value3"); assertEquals("header1_value3", builder.build().getHeaderString("header1")); }
public String getHeaderString(String headerKey) { if (headers.containsKey(headerKey)) { String arrayString = headers.get(headerKey).toString(); return arrayString.substring(1, arrayString.length() - 1); } return null; }
ParsecAsyncHttpRequest { public String getHeaderString(String headerKey) { if (headers.containsKey(headerKey)) { String arrayString = headers.get(headerKey).toString(); return arrayString.substring(1, arrayString.length() - 1); } return null; } }
ParsecAsyncHttpRequest { public String getHeaderString(String headerKey) { if (headers.containsKey(headerKey)) { String arrayString = headers.get(headerKey).toString(); return arrayString.substring(1, arrayString.length() - 1); } return null; } @SuppressWarnings("unused")  ParsecAsyncHttpRequest(); private  ParsecAsyncHttpRequest(final Builder builder); }
ParsecAsyncHttpRequest { public String getHeaderString(String headerKey) { if (headers.containsKey(headerKey)) { String arrayString = headers.get(headerKey).toString(); return arrayString.substring(1, arrayString.length() - 1); } return null; } @SuppressWarnings("unused")  ParsecAsyncHttpRequest(); private  ParsecAsyncHttpRequest(final Builder builder); @Override boolean equals(Object object); @Override int hashCode(); String getBody(); byte[] getBodyByte(); String getBodyEncoding(); long getContentLength(); Collection<NewCookie> getCookies(); Map<String, List<String>> getFormParams(); String getHeaderString(String headerKey); Map<String, List<String>> getHeaders(); int getMaxRetries(); String getMethod(); String getProxyServer(); Map<String, List<String>> getQueryParams(); long getRangeOffset(); int getRequestTimeout(); List<Integer> getRetryStatusCodes(); List<Class<? extends Throwable>> getRetryExceptions(); URI getUri(); String getUrl(); String getVirtualHost(); boolean isCriticalGet(); boolean isFollowRedirect(); boolean isAcceptCompression(); ParsecNameResolver getNameResolver(); }
ParsecAsyncHttpRequest { public String getHeaderString(String headerKey) { if (headers.containsKey(headerKey)) { String arrayString = headers.get(headerKey).toString(); return arrayString.substring(1, arrayString.length() - 1); } return null; } @SuppressWarnings("unused")  ParsecAsyncHttpRequest(); private  ParsecAsyncHttpRequest(final Builder builder); @Override boolean equals(Object object); @Override int hashCode(); String getBody(); byte[] getBodyByte(); String getBodyEncoding(); long getContentLength(); Collection<NewCookie> getCookies(); Map<String, List<String>> getFormParams(); String getHeaderString(String headerKey); Map<String, List<String>> getHeaders(); int getMaxRetries(); String getMethod(); String getProxyServer(); Map<String, List<String>> getQueryParams(); long getRangeOffset(); int getRequestTimeout(); List<Integer> getRetryStatusCodes(); List<Class<? extends Throwable>> getRetryExceptions(); URI getUri(); String getUrl(); String getVirtualHost(); boolean isCriticalGet(); boolean isFollowRedirect(); boolean isAcceptCompression(); ParsecNameResolver getNameResolver();  }