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 {
53
53
* Constructor for using the default CloseableHttpClient.
54
54
*/
55
55
public Client () {
56
- this .httpClient = HttpClients .createDefault ();
57
- this .test = false ;
56
+ this (false );
58
57
}
59
58
60
59
/**
61
- * Constructor for passing in an httpClient for mocking .
60
+ * Constructor for passing in an httpClient.
62
61
*
63
62
* @param httpClient
64
63
* an Apache CloseableHttpClient
65
64
*/
66
65
public Client (CloseableHttpClient httpClient ) {
67
- this .httpClient = httpClient ;
68
- this .test = false ;
66
+ this (httpClient , false );
69
67
}
70
68
71
69
/**
@@ -75,10 +73,23 @@ public Client(CloseableHttpClient httpClient) {
75
73
* is a Bool
76
74
*/
77
75
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 ;
79
89
this .test = test ;
80
90
}
81
91
92
+
82
93
/**
83
94
* Add query parameters to a URL.
84
95
*
You can’t perform that action at this time.
0 commit comments