midtrans-client
Advanced tools
Comparing version 1.2.0 to 1.2.1
@@ -14,3 +14,3 @@ 'use strict' | ||
this.parent = parentObj; | ||
this.http_client = axios; | ||
this.http_client = axios.create(); | ||
} | ||
@@ -21,3 +21,3 @@ request(httpMethod,serverKey,requestUrl,firstParam={},secondParam={}){ | ||
'accept': 'application/json', | ||
'user-agent': 'midtransclient-nodejs/1.2.0' | ||
'user-agent': 'midtransclient-nodejs/1.2.1' | ||
}; | ||
@@ -24,0 +24,0 @@ |
{ | ||
"name": "midtrans-client", | ||
"version": "1.2.0", | ||
"version": "1.2.1", | ||
"description": "Official Midtrans Payment API Client for Node JS", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -470,3 +470,3 @@ Midtrans Client - Node JS | ||
// set custom HTTP header for every request from this instance | ||
snap.httpClient.http_client.headers.common['My-Header'] = 'my-custom-value'; | ||
snap.httpClient.http_client.defaults.headers.common['My-Header'] = 'my-custom-value'; | ||
``` | ||
@@ -501,3 +501,3 @@ ### Custom Http Client Interceptor | ||
// set custom HTTP header that will be used by Midtrans API to override notification url: | ||
snap.httpClient.http_client.headers.common['X-Override-Notification'] = 'https://mysite/midtrans-notification-handler'; | ||
snap.httpClient.http_client.defaults.headers.common['X-Override-Notification'] = 'https://mysite.com/midtrans-notification-handler'; | ||
``` | ||
@@ -507,3 +507,3 @@ | ||
```javascript | ||
snap.httpClient.http_client.headers.common['X-Append-Notification'] = 'https://mysite/midtrans-notification-handler'; | ||
snap.httpClient.http_client.defaults.headers.common['X-Append-Notification'] = 'https://mysite.com/midtrans-notification-handler'; | ||
``` | ||
@@ -510,0 +510,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
51113