File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
src/main/java/api_assured Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change 3737@ SuppressWarnings ({"unused" , "UnusedReturnValue" })
3838public 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" ));
You can’t perform that action at this time.
0 commit comments