@Test public void testAddHeaders() throws Exception { HttpRequest nettyRequest = new DefaultFullHttpRequest(HttpVersion.HTTP_1_0, HttpMethod.GET, "www.google.com"); nettyRequest.headers().add("key1", "value1"); nettyRequest.headers().add("key1", "value2"); nettyRequest.headers().add("key2", "value1"); RecordedHttpRequestBuilder recordedHttpRequestBuilder = new RecordedHttpRequestBuilder(nettyRequest); Multimap<String, String> headers = recordedHttpRequestBuilder.getHeaders(); Assert.assertEquals(headers.size(), 3); }
public void addHeaders(HttpMessage httpMessage) { if (httpMessage.headers() == null) { return; } for (String name : httpMessage.headers().names()) { _headers.putAll(name, httpMessage.headers().getAll(name)); } }
RecordedHttpMessageBuilder { public void addHeaders(HttpMessage httpMessage) { if (httpMessage.headers() == null) { return; } for (String name : httpMessage.headers().names()) { _headers.putAll(name, httpMessage.headers().getAll(name)); } } }
RecordedHttpMessageBuilder { public void addHeaders(HttpMessage httpMessage) { if (httpMessage.headers() == null) { return; } for (String name : httpMessage.headers().names()) { _headers.putAll(name, httpMessage.headers().getAll(name)); } } protected  RecordedHttpMessageBuilder(HttpMessage nettyHttpMessage); }
RecordedHttpMessageBuilder { public void addHeaders(HttpMessage httpMessage) { if (httpMessage.headers() == null) { return; } for (String name : httpMessage.headers().names()) { _headers.putAll(name, httpMessage.headers().getAll(name)); } } protected  RecordedHttpMessageBuilder(HttpMessage nettyHttpMessage); void appendHttpContent(HttpContent chunk); void addHeaders(HttpMessage httpMessage); }
RecordedHttpMessageBuilder { public void addHeaders(HttpMessage httpMessage) { if (httpMessage.headers() == null) { return; } for (String name : httpMessage.headers().names()) { _headers.putAll(name, httpMessage.headers().getAll(name)); } } protected  RecordedHttpMessageBuilder(HttpMessage nettyHttpMessage); void appendHttpContent(HttpContent chunk); void addHeaders(HttpMessage httpMessage);  }