File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
src/main/java/io/github/ModularEnigma Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change 66
77 <groupId >io.github.ModularEnigma</groupId >
88 <artifactId >Requests</artifactId >
9- <version >1.0.3 </version >
9+ <version >1.0.4 </version >
1010 <packaging >jar</packaging >
1111
1212 <name >ModularEnigma Requests API</name >
107107 </plugin >
108108 </plugins >
109109 </build >
110- </project >
110+ </project >
Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ public class Request {
1313 private final Method requestMethod ;
1414 private final String requestBody ;
1515 private final Map <String , String > headers ;
16+ private static final HttpClient client = HttpClient .newHttpClient ();
1617
1718 public enum Method {
1819 GET , POST // Add others if desired
@@ -67,7 +68,6 @@ public Response execute() {
6768
6869 // Send the request and listen for a response
6970 HttpRequest request = builder .build ();
70- HttpClient client = HttpClient .newHttpClient ();
7171 HttpResponse <String > httpResponse ;
7272 try {
7373 httpResponse = client .send (request , HttpResponse .BodyHandlers .ofString ());
You can’t perform that action at this time.
0 commit comments