@Test public void testSetAndGetCookies() throws Exception { assertTrue(builder.build().getCookies().isEmpty()); List<NewCookie> setCookies = new ArrayList<>(); setCookies.add(new NewCookie("cookie1", "cookie1_value")); setCookies.add(new NewCookie("cookie2", "cookie2_value&=?")); ParsecAsyncHttpRequest request = builder.setCookies(setCookies).build(); List<NewCookie> getCookies = new ArrayList<>(request.getCookies()); assertEquals(2, getCookies.size()); assertEquals("cookie1", getCookies.get(0).getName()); assertEquals("cookie1_value", getCookies.get(0).getValue()); }
public Collection<NewCookie> getCookies() { return Collections.unmodifiableCollection(cookies); }
ParsecAsyncHttpRequest { public Collection<NewCookie> getCookies() { return Collections.unmodifiableCollection(cookies); } }
ParsecAsyncHttpRequest { public Collection<NewCookie> getCookies() { return Collections.unmodifiableCollection(cookies); } @SuppressWarnings("unused")  ParsecAsyncHttpRequest(); private  ParsecAsyncHttpRequest(final Builder builder); }
ParsecAsyncHttpRequest { public Collection<NewCookie> getCookies() { return Collections.unmodifiableCollection(cookies); } @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 Collection<NewCookie> getCookies() { return Collections.unmodifiableCollection(cookies); } @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();  }