@Test public void rejectsMultipleContentLengthInSingleHeader() { assertThrows(IllegalArgumentException.class, () -> HttpResponse.response() .addHeader(CONTENT_LENGTH, "15, 16") .ensureContentLengthIsValid() .build()); }
public static Builder response() { return new Builder(); }
HttpResponse implements HttpMessage { public static Builder response() { return new Builder(); } }
HttpResponse implements HttpMessage { public static Builder response() { return new Builder(); } private  HttpResponse(Builder builder); }
HttpResponse implements HttpMessage { public static Builder response() { return new Builder(); } private  HttpResponse(Builder builder); static Builder response(); static Builder response(HttpResponseStatus status); @Override Optional<String> header(CharSequence name); @Override List<String> headers(CharSequence name); @Override HttpHeaders headers(); @Override byte[] body(); @Override String bodyAs(Charset charset); @Override HttpVersion version(); Builder newBuilder(); HttpResponseStatus status(); boolean isRedirect(); LiveHttpResponse stream(); Set<ResponseCookie> cookies(); Optional<ResponseCookie> cookie(String name); @Override String toString(); @Override int hashCode(); @Override boolean equals(Object obj); }
HttpResponse implements HttpMessage { public static Builder response() { return new Builder(); } private  HttpResponse(Builder builder); static Builder response(); static Builder response(HttpResponseStatus status); @Override Optional<String> header(CharSequence name); @Override List<String> headers(CharSequence name); @Override HttpHeaders headers(); @Override byte[] body(); @Override String bodyAs(Charset charset); @Override HttpVersion version(); Builder newBuilder(); HttpResponseStatus status(); boolean isRedirect(); LiveHttpResponse stream(); Set<ResponseCookie> cookies(); Optional<ResponseCookie> cookie(String name); @Override String toString(); @Override int hashCode(); @Override boolean equals(Object obj);  }