/** * Sets the headers. * * @param headers headers * @return {@code this} */ public Builder headers(HttpHeaders headers) { this.headers = headers.newBuilder(); return this; }
/** * Removes all headers on this builder and adds {@code headers}. * * @param headers headers * @return {@code this} */ public SELF headers(HttpHeaders headers) { this.headers = headers.newBuilder(); return (SELF) this; }
/** * Sets the headers. * * @param headers headers * @return {@code this} */ public Builder headers(HttpHeaders headers) { this.headers = headers.newBuilder(); return this; }
/** * Sets the headers. * * @param headers headers * @return {@code this} */ public Builder headers(HttpHeaders headers) { this.headers = headers.newBuilder(); return this; }
/** * Sets the headers. * * @param headers headers * @return {@code this} */ public Builder headers(HttpHeaders headers) { this.headers = headers.newBuilder(); return this; }
/** * Sets the headers. * * @param headers headers * @return {@code this} */ public Builder headers(HttpHeaders headers) { this.headers = headers.newBuilder(); return this; }
/** * Sets the headers. * * @param headers headers * @return {@code this} */ public Builder headers(HttpHeaders headers) { this.headers = headers.newBuilder(); return this; }
/** * Sets the headers. * * @param headers headers * @return {@code this} */ @Override public Builder headers(HttpHeaders headers) { this.headers = headers.newBuilder(); return this; }
private Builder(HttpResponse response) { this.request = response.request; this.status = response.status; headers(response.headers.newBuilder()); this.cookies = new ArrayList<>(response.cookies); version(response.version); body(response.body); }
public Builder(StreamingHttpResponse response, byte[] decoded) { this.status = response.status(); this.version = response.version(); this.headers = response.headers().newBuilder(); this.body = decoded; this.cookies = new ArrayList<>(response.cookies()); }
/** * Creates a new {@link Builder} object from a response code and a content byte array. * * @param response a streaming HTTP response instance * @param body a HTTP message body */ public Builder(LiveHttpResponse response, byte[] body) { this.status = response.status(); this.version = response.version(); this.headers = response.headers().newBuilder(); this.body = body; }
/** * Creates a new {@link Builder} object from an existing {@link LiveHttpResponse} object. * Similar to {@link this.newBuilder} method. * * @param response a response object for which the builder is based on */ public Builder(LiveHttpResponse response) { this.status = response.status(); this.version = response.version(); this.headers = response.headers().newBuilder(); this.body = response.body(); }
public Builder(HttpResponse response, byte[] encodedBody) { this.status = statusWithCode(response.status().code()); this.version = httpVersion(response.version().toString()); this.headers = response.headers().newBuilder(); this.body = encodedBody; this.cookies = new ArrayList<>(response.cookies()); }
/** * Creates a new {@link Builder} object from an existing {@link LiveHttpResponse} object. * Similar to {@link this.newBuilder} method. * * @param response a full HTTP response instance */ public Builder(HttpResponse response) { this.status = response.status(); this.version = response.version(); this.headers = response.headers().newBuilder(); this.body = response.body(); }
public Builder(StreamingHttpRequest request, byte[] body) { this.id = request.id(); this.method = request.method(); this.clientAddress = request.clientAddress(); this.url = request.url(); this.secure = request.isSecure(); this.version = request.version(); this.headers = request.headers().newBuilder(); this.body = body; this.cookies = new ArrayList<>(request.cookies()); }
Builder(HttpRequest request) { this.id = request.id(); this.method = request.method(); this.url = request.url(); this.version = request.version(); this.headers = request.headers().newBuilder(); this.body = request.body(); }
Builder(HttpRequest request) { this.id = request.id(); this.method = request.method(); this.url = request.url(); this.version = request.version(); this.headers = request.headers().newBuilder(); this.body = new ByteStream(Flux.just(new Buffer(copiedBuffer(request.body())))); }
public Builder(FullHttpResponse response, Observable<ByteBuf> body) { this.status = HttpResponseStatus.valueOf(response.status().code()); headers(response.headers().newBuilder()); this.cookies = new ArrayList<>(response.cookies()); version(HttpVersion.valueOf(response.version().toString())); body(body); }
public Builder(com.hotels.styx.api.messages.FullHttpRequest request) { this.id = request.id(); this.secure = request.isSecure(); this.url = request.url(); this.method = HttpMethod.valueOf(request.method().name()); this.cookies = new ArrayList<>(request.cookies()); headers(request.headers().newBuilder()); version(HttpVersion.valueOf(request.version().toString())); }
Builder(HttpRequest request) { this.id = request.id(); this.method = httpMethod(request.method().name()); this.clientAddress = request.clientAddress(); this.url = request.url(); this.secure = request.isSecure(); this.version = httpVersion(request.version().toString()); this.headers = request.headers().newBuilder(); this.body = request.body().content(); this.cookies = new ArrayList<>(request.cookies()); }