Skip to content

Commit 07128a1

Browse files
committed
Update ServiceGenerator.java
1 parent 5d3de5b commit 07128a1

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/main/java/api_assured/ServiceGenerator.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,10 @@
3737
@SuppressWarnings({"unused", "UnusedReturnValue"})
3838
public class ServiceGenerator {
3939

40-
OkHttpClient client = new OkHttpClient();
40+
/**
41+
* OkHttpClient instance used to execute HTTP requests.
42+
*/
43+
private OkHttpClient client;
4144

4245
/**
4346
* The header object containing the headers to be added to the requests.
@@ -102,7 +105,7 @@ public class ServiceGenerator {
102105
/**
103106
* The base URL for the service.
104107
*/
105-
private String BASE_URL = "";
108+
private String BASE_URL;
106109

107110
/**
108111
* The logger object for logging information.
@@ -138,6 +141,7 @@ public class ServiceGenerator {
138141
* Ensure the correct behavior is intended.
139142
*/
140143
public ServiceGenerator() {
144+
this.client = new OkHttpClient();
141145
this.BASE_URL = "";
142146
this.headers = new Headers.Builder().build();
143147
this.printHeaders = Boolean.parseBoolean(ContextStore.get("log-headers", "true"));

0 commit comments

Comments
 (0)