Skip to content

Commit

Permalink
refactor(HttpUtils): Apply PR feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
binh-dam-ibigroup committed Oct 10, 2023
1 parent d18377a commit 7fdc4ae
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
import java.io.IOException;
import java.net.URI;
import java.net.http.HttpTimeoutException;
import java.nio.charset.StandardCharsets;
import java.time.LocalDate;
import java.time.LocalTime;
import java.time.format.DateTimeParseException;
Expand Down Expand Up @@ -102,13 +103,13 @@ public static HttpResponseValues httpRequestRawResponse(URI uri, int timeoutInSe
break;
case PUT:
HttpPut putRequest = new HttpPut(uri);
putRequest.setEntity(new StringEntity(bodyContent, "UTF-8"));
putRequest.setEntity(new StringEntity(bodyContent, StandardCharsets.UTF_8));
putRequest.setConfig(timeoutConfig);
httpUriRequest = putRequest;
break;
case POST:
HttpPost postRequest = new HttpPost(uri);
postRequest.setEntity(new StringEntity(bodyContent, "UTF-8"));
postRequest.setEntity(new StringEntity(bodyContent, StandardCharsets.UTF_8));
postRequest.setConfig(timeoutConfig);
httpUriRequest = postRequest;
break;
Expand Down

0 comments on commit 7fdc4ae

Please sign in to comment.