Skip to content

Commit

Permalink
Add static factory methods to Http1Client
Browse files Browse the repository at this point in the history
  • Loading branch information
romain-grecourt committed Jun 27, 2023
1 parent 8c5aff0 commit 0a5d693
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@

import io.helidon.common.HelidonServiceLoader;
import io.helidon.common.LazyValue;
import io.helidon.common.config.Config;
import io.helidon.common.media.type.ParserMode;
import io.helidon.common.socket.SocketOptions;
import io.helidon.nima.common.tls.Tls;
Expand Down Expand Up @@ -52,6 +53,25 @@ static Http1ClientBuilder builder() {
return new Http1ClientBuilder();
}

/**
* Create a new instance.
*
* @return client
*/
static Http1Client create() {
return builder().build();
}

/**
* Create a new instance based on {@link Config}.
*
* @param config client config
* @return client
*/
static Http1Client create(Config config) {
return builder().config(config).build();
}

/**
* Builder for {@link io.helidon.nima.webclient.http1.Http1Client}.
*/
Expand Down
1 change: 1 addition & 0 deletions nima/webclient/webclient/src/main/java/module-info.java
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
requires transitive io.helidon.nima.http.encoding;
requires transitive io.helidon.nima.http.media;
requires transitive io.helidon.common.context;
requires transitive io.helidon.common.config;

exports io.helidon.nima.webclient;
exports io.helidon.nima.webclient.spi;
Expand Down

0 comments on commit 0a5d693

Please sign in to comment.