Skip to content

Commit

Permalink
comments
Browse files Browse the repository at this point in the history
  • Loading branch information
idelpivnitskiy committed Sep 19, 2023
1 parent 4ee6048 commit 3f2be34
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,8 @@ public SingleAddressHttpClientBuilder<U, R> proxyAddress(final U proxyAddress) {

@Override
public SingleAddressHttpClientBuilder<U, R> proxyAddress(
final U proxyAddress, final Consumer<StreamingHttpRequest> requestInitializer) {
delegate = delegate.proxyAddress(proxyAddress, requestInitializer);
final U proxyAddress, final Consumer<StreamingHttpRequest> connectRequestInitializer) {
delegate = delegate.proxyAddress(proxyAddress, connectRequestInitializer);
return this;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,13 +73,13 @@ default SingleAddressHttpClientBuilder<U, R> proxyAddress(U proxyAddress) { // F
*
* @param proxyAddress Unresolved address of the proxy. When used with a builder created for a resolved address,
* {@code proxyAddress} should also be already resolved – otherwise runtime exceptions may occur.
* @param requestInitializer {@link Consumer} of {@link StreamingHttpRequest} that can be used to add additional
* info to <a href="https://datatracker.ietf.org/doc/html/rfc9110#section-9.3.6">HTTP/1.1 CONNECT</a> request.
* It can be used to add headers, like {@link HttpHeaderNames#PROXY_AUTHORIZATION}, debugging information, etc.
* @param connectRequestInitializer {@link Consumer} of {@link StreamingHttpRequest} that can be used to add
* additional info to <a href="https://datatracker.ietf.org/doc/html/rfc9110#section-9.3.6">HTTP/1.1 CONNECT</a>
* request. It can be used to add headers, like {@link HttpHeaderNames#PROXY_AUTHORIZATION}, debugging info, etc.
* @return {@code this}.
*/
default SingleAddressHttpClientBuilder<U, R> proxyAddress(U proxyAddress, // FIXME: 0.43 - remove default impl
Consumer<StreamingHttpRequest> requestInitializer) {
default SingleAddressHttpClientBuilder<U, R> proxyAddress( // FIXME: 0.43 - remove default impl
U proxyAddress, Consumer<StreamingHttpRequest> connectRequestInitializer) {
throw new UnsupportedOperationException(
"Setting proxy address with request initializer is not yet supported by " + getClass().getName());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -455,9 +455,9 @@ public DefaultSingleAddressHttpClientBuilder<U, R> proxyAddress(final U proxyAdd

@Override
public SingleAddressHttpClientBuilder<U, R> proxyAddress(
final U proxyAddress, final Consumer<StreamingHttpRequest> requestInitializer) {
final U proxyAddress, final Consumer<StreamingHttpRequest> connectRequestInitializer) {
this.proxyAddress(proxyAddress);
this.proxyConnectRequestInitializer = requireNonNull(requestInitializer);
this.proxyConnectRequestInitializer = requireNonNull(connectRequestInitializer);
return this;
}

Expand Down

0 comments on commit 3f2be34

Please sign in to comment.