Skip to content

Commit 0bf6c64

Browse files
committed
-- substituted defaulthttpclient with added getHttpsClient()
1 parent 0a3f6fe commit 0bf6c64

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

src/main/java/net/authorize/util/HttpCallTask.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,11 +63,11 @@ public ANetApiResponse call() throws Exception {
6363
ANetApiResponse response = null;
6464
StringBuilder buffer = new StringBuilder();
6565

66-
DefaultHttpClient httpCaller = null;
66+
org.apache.http.client.HttpClient httpCaller = null;
6767

6868
try {
6969
HttpPost httppost = HttpUtility.createPostRequest(this.env, this.request);
70-
httpCaller = new DefaultHttpClient();
70+
httpCaller = HttpClient.getHttpsClient();
7171
HttpClient.setProxyIfRequested(httpCaller);
7272
HttpResponse httpResponse = httpCaller.execute(httppost);
7373

src/main/java/net/authorize/util/HttpClient.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ public static Map<ResponseField, String> execute(Environment environment, Transa
153153

154154
if(environment != null && transaction != null) {
155155
try {
156-
DefaultHttpClient httpClient = new DefaultHttpClient();
156+
org.apache.http.client.HttpClient httpClient = getHttpsClient();
157157

158158
setProxyIfRequested(httpClient);
159159

@@ -243,7 +243,7 @@ public static BasicXmlDocument executeXML(Environment environment, Transaction t
243243

244244
if(environment != null && transaction != null) {
245245
try {
246-
DefaultHttpClient httpClient = new DefaultHttpClient();
246+
org.apache.http.client.HttpClient httpClient = getHttpsClient();
247247

248248
setProxyIfRequested(httpClient);
249249

@@ -311,7 +311,7 @@ public static BasicXmlDocument executeXML(Environment environment, Transaction t
311311
* if proxy use is requested, set http-client appropriately
312312
* @param httpClient the client to add proxy values to
313313
*/
314-
public static void setProxyIfRequested(DefaultHttpClient httpClient) {
314+
public static void setProxyIfRequested(org.apache.http.client.HttpClient httpClient) {
315315
if ( UseProxy)
316316
{
317317
if ( !proxySet) {

0 commit comments

Comments
 (0)