File tree Expand file tree Collapse file tree 1 file changed +17
-6
lines changed
src/main/java/com/sendgrid Expand file tree Collapse file tree 1 file changed +17
-6
lines changed Original file line number Diff line number Diff line change @@ -53,19 +53,17 @@ public class Client {
5353 * Constructor for using the default CloseableHttpClient.
5454 */
5555 public Client () {
56- this .httpClient = HttpClients .createDefault ();
57- this .test = false ;
56+ this (false );
5857 }
5958
6059 /**
61- * Constructor for passing in an httpClient for mocking .
60+ * Constructor for passing in an httpClient.
6261 *
6362 * @param httpClient
6463 * an Apache CloseableHttpClient
6564 */
6665 public Client (CloseableHttpClient httpClient ) {
67- this .httpClient = httpClient ;
68- this .test = false ;
66+ this (httpClient , false );
6967 }
7068
7169 /**
@@ -75,10 +73,23 @@ public Client(CloseableHttpClient httpClient) {
7573 * is a Bool
7674 */
7775 public Client (Boolean test ) {
78- this .httpClient = HttpClients .createDefault ();
76+ this (HttpClients .createDefault (), test );
77+ }
78+
79+ /**
80+ * Constructor for passing in a an httpClient and test parameter to allow for http calls
81+ *
82+ * @param httpClient
83+ * an Apache CloseableHttpClient
84+ * @param test
85+ * is a Bool
86+ */
87+ public Client (CloseableHttpClient httpClient , Boolean test ) {
88+ this .httpClient = httpClient ;
7989 this .test = test ;
8090 }
8191
92+
8293 /**
8394 * Add query parameters to a URL.
8495 *
You can’t perform that action at this time.
0 commit comments