@Test public void testMultiHeaders() { HttpResponse response = HttpResponse.ofCode(200); HttpHeader header1 = of("header1"); HttpHeader HEADER1 = of("HEADER1"); response.addHeader(header1, "value1"); response.addHeader(HEADER1, "VALUE1"); assertHttpMessageEquals("HTTP/1.1 200 OK\r\nheader1: value1\r\nHEADER1: VALUE1\r\nContent-Length: 0\r\n\r\n", response); }
public void addHeader(@NotNull HttpHeader header, @NotNull String string) { if (CHECK) checkState(!isRecycled()); addHeader(header, HttpHeaderValue.of(string)); }
HttpMessage { public void addHeader(@NotNull HttpHeader header, @NotNull String string) { if (CHECK) checkState(!isRecycled()); addHeader(header, HttpHeaderValue.of(string)); } }
HttpMessage { public void addHeader(@NotNull HttpHeader header, @NotNull String string) { if (CHECK) checkState(!isRecycled()); addHeader(header, HttpHeaderValue.of(string)); } protected  HttpMessage(); }
HttpMessage { public void addHeader(@NotNull HttpHeader header, @NotNull String string) { if (CHECK) checkState(!isRecycled()); addHeader(header, HttpHeaderValue.of(string)); } protected  HttpMessage(); void addHeader(@NotNull HttpHeader header, @NotNull String string); void addHeader(@NotNull HttpHeader header, @NotNull byte[] value); void addHeader(@NotNull HttpHeader header, @NotNull byte[] array, int off, int len); void addHeader(@NotNull HttpHeader header, @NotNull HttpHeaderValue value); final Collection<Map.Entry<HttpHeader, HttpHeaderValue>> getHeaders(); @NotNull final List<T> getHeader(@NotNull HttpHeader header, @NotNull ParserIntoList<T> parser); @Nullable T getHeader(HttpHeader header, ParserFunction<ByteBuf, T> parser); @Nullable final String getHeader(@NotNull HttpHeader header); @Nullable final ByteBuf getHeaderBuf(@NotNull HttpHeader header); void addCookies(@NotNull HttpCookie... cookies); abstract void addCookies(@NotNull List<HttpCookie> cookies); abstract void addCookie(@NotNull HttpCookie cookie); void setBodyStream(@NotNull ChannelSupplier<ByteBuf> bodySupplier); ChannelSupplier<ByteBuf> getBodyStream(); void setBody(@NotNull ByteBuf body); void setBody(@NotNull byte[] body); final ByteBuf getBody(); final ByteBuf takeBody(); final boolean isBodyLoaded(); void setMaxBodySize(MemSize maxBodySize); void setMaxBodySize(int maxBodySize); Promise<ByteBuf> loadBody(); Promise<ByteBuf> loadBody(@NotNull MemSize maxBodySize); Promise<ByteBuf> loadBody(int maxBodySize); void attach(Type type, T extra); void attach(Class<T> type, T extra); void attach(Object extra); void attach(String key, T extra); @SuppressWarnings("unchecked") T getAttachment(Class<T> type); @SuppressWarnings("unchecked") T getAttachment(Type type); @SuppressWarnings("unchecked") T getAttachment(String key); Set<Object> getAttachmentKeys(); void setBodyGzipCompression(); }
HttpMessage { public void addHeader(@NotNull HttpHeader header, @NotNull String string) { if (CHECK) checkState(!isRecycled()); addHeader(header, HttpHeaderValue.of(string)); } protected  HttpMessage(); void addHeader(@NotNull HttpHeader header, @NotNull String string); void addHeader(@NotNull HttpHeader header, @NotNull byte[] value); void addHeader(@NotNull HttpHeader header, @NotNull byte[] array, int off, int len); void addHeader(@NotNull HttpHeader header, @NotNull HttpHeaderValue value); final Collection<Map.Entry<HttpHeader, HttpHeaderValue>> getHeaders(); @NotNull final List<T> getHeader(@NotNull HttpHeader header, @NotNull ParserIntoList<T> parser); @Nullable T getHeader(HttpHeader header, ParserFunction<ByteBuf, T> parser); @Nullable final String getHeader(@NotNull HttpHeader header); @Nullable final ByteBuf getHeaderBuf(@NotNull HttpHeader header); void addCookies(@NotNull HttpCookie... cookies); abstract void addCookies(@NotNull List<HttpCookie> cookies); abstract void addCookie(@NotNull HttpCookie cookie); void setBodyStream(@NotNull ChannelSupplier<ByteBuf> bodySupplier); ChannelSupplier<ByteBuf> getBodyStream(); void setBody(@NotNull ByteBuf body); void setBody(@NotNull byte[] body); final ByteBuf getBody(); final ByteBuf takeBody(); final boolean isBodyLoaded(); void setMaxBodySize(MemSize maxBodySize); void setMaxBodySize(int maxBodySize); Promise<ByteBuf> loadBody(); Promise<ByteBuf> loadBody(@NotNull MemSize maxBodySize); Promise<ByteBuf> loadBody(int maxBodySize); void attach(Type type, T extra); void attach(Class<T> type, T extra); void attach(Object extra); void attach(String key, T extra); @SuppressWarnings("unchecked") T getAttachment(Class<T> type); @SuppressWarnings("unchecked") T getAttachment(Type type); @SuppressWarnings("unchecked") T getAttachment(String key); Set<Object> getAttachmentKeys(); void setBodyGzipCompression();  }