Skip to content

Commit 83ae518

Browse files
committed
build v3.2.0
1 parent 19e7247 commit 83ae518

File tree

6 files changed

+9
-3
lines changed

6 files changed

+9
-3
lines changed

dist/appbase.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/appbase.js.br

-338 Bytes
Binary file not shown.

dist/appbase.js.gz

-388 Bytes
Binary file not shown.

lib/fetch_request.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,12 @@ var fetchRequest = function () {
7575
requestOptions.body = this.body;
7676
}
7777

78-
(0, _crossFetch2.default)(this.client.protocol + "://" + this.client.url + "/" + this.client.appname + "/" + this.path + "?" + _querystring2.default.stringify(this.params), requestOptions).then(function (res) {
78+
var finalRequest = requestOptions;
79+
if (this.client.beforeSend) {
80+
finalRequest = this.client.beforeSend(requestOptions);
81+
}
82+
83+
(0, _crossFetch2.default)(this.client.protocol + "://" + this.client.url + "/" + this.client.appname + "/" + this.path + "?" + _querystring2.default.stringify(this.params), finalRequest).then(function (res) {
7984
if (res.status >= 500) {
8085
_this.resultStream.emit("error", res);
8186
return;

lib/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ var AppbaseClient = function () {
103103
this.credentials = auth || null;
104104
this.appname = args.appname || args.app;
105105
this.headers = {};
106+
this.beforeSend = args.beforeSend;
106107

107108
if (typeof this.appname !== "string" || this.appname === "") {
108109
throw new Error("App name is not present in options.");

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "appbase-js",
3-
"version": "3.1.0",
3+
"version": "3.2.0",
44
"description": "Appbase.io streaming client lib for Javascript",
55
"main": "lib/index.js",
66
"scripts": {

0 commit comments

Comments
 (0)