Skip to content

Commit

Permalink
feat: remove cache http client
Browse files Browse the repository at this point in the history
  • Loading branch information
1nb0und committed Jan 10, 2024
1 parent 2ba3359 commit d6028be
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import org.apache.hc.client5.http.classic.methods.HttpPost;
import org.apache.hc.client5.http.impl.classic.CloseableHttpClient;
import org.apache.hc.client5.http.impl.classic.CloseableHttpResponse;
import org.apache.hc.client5.http.impl.classic.HttpClients;
import org.apache.hc.core5.http.HttpStatus;
import org.apache.hc.core5.http.io.entity.EntityUtils;
import org.apache.hc.core5.http.io.entity.StringEntity;
Expand Down Expand Up @@ -81,7 +82,7 @@ public void resetToken(Product product) {
}

private String retrieveToken(Product product, JwtCredential jwtCredential) {
try(CloseableHttpClient client = HttpClient.getInstance()) {
try(CloseableHttpClient client = HttpClients.createDefault()) {
HttpPost request = buildRequest(jwtCredential);
TokenResponse tokenResponse =
client.execute(
Expand Down

0 comments on commit d6028be

Please sign in to comment.