crisp-api 6.3.1 → 6.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +8 -1
- package/lib/crisp.js +7 -5
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
Changelog
|
|
2
2
|
=========
|
|
3
3
|
|
|
4
|
+
## v6.3.2
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* Prevent Got from throwing errors for non `2xx / 3xx` response codes.
|
|
9
|
+
* Fixed body payload type.
|
|
10
|
+
|
|
4
11
|
## v6.3.1
|
|
5
12
|
|
|
6
13
|
### Breaking Changes
|
|
@@ -9,7 +16,7 @@ Changelog
|
|
|
9
16
|
|
|
10
17
|
### Changes
|
|
11
18
|
|
|
12
|
-
* Upgraded dependencies (closes [#30](https://github.com/crisp-im/node-crisp-api/issues/30).
|
|
19
|
+
* Upgraded dependencies (closes [#30](https://github.com/crisp-im/node-crisp-api/issues/30)).
|
|
13
20
|
|
|
14
21
|
## v6.3.0
|
|
15
22
|
|
package/lib/crisp.js
CHANGED
|
@@ -667,13 +667,15 @@ Crisp.prototype = {
|
|
|
667
667
|
*/
|
|
668
668
|
_request : function(resource, method, query, body, resolve, reject) {
|
|
669
669
|
var requestParameters = {
|
|
670
|
-
responseType
|
|
671
|
-
timeout
|
|
670
|
+
responseType : "json",
|
|
671
|
+
timeout : Crisp.DEFAULT_REQUEST_TIMEOUT,
|
|
672
672
|
|
|
673
|
-
headers
|
|
673
|
+
headers : {
|
|
674
674
|
"User-Agent" : this._useragent,
|
|
675
675
|
"X-Crisp-Tier" : this._tier
|
|
676
|
-
}
|
|
676
|
+
},
|
|
677
|
+
|
|
678
|
+
throwHttpErrors : false
|
|
677
679
|
};
|
|
678
680
|
|
|
679
681
|
// Add authorization?
|
|
@@ -683,7 +685,7 @@ Crisp.prototype = {
|
|
|
683
685
|
|
|
684
686
|
// Add body?
|
|
685
687
|
if (body) {
|
|
686
|
-
requestParameters.
|
|
688
|
+
requestParameters.json = body;
|
|
687
689
|
}
|
|
688
690
|
|
|
689
691
|
// Add query?
|
package/package.json
CHANGED