Skip to content

Commit 6f663aa

Browse files
HTMLCLOUD-1231: authorization doesn't work - fixed
1 parent 1b0a818 commit 6f663aa

27 files changed

+40
-34
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
Asposehtmlcloud - JavaScript client for asposehtmlcloud
44

5-
- API version: 19.6.1
6-
- Package version: 19.6.1
5+
- API version: 19.6.2
6+
- Package version: 19.6.2
77

88
## Installation
99

package-lock.json

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

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "asposehtmlcloud",
3-
"version": "19.6.1",
3+
"version": "19.6.2",
44
"description": "Aspose.HTML Cloud SDK for Javascript source code.",
55
"license": "MIT",
66
"main": "./src/index.js",

src/ApiClient.js

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444

4545
/**
4646
* @module ApiClient
47-
* @version 19.6.1
47+
* @version 19.6.2
4848
*/
4949

5050
/**
@@ -102,16 +102,6 @@
102102
this.basePath = conf.basePath.replace(/\/+$/, '');
103103
this.authPath = conf.authPath.replace(/\/+$/, '');
104104

105-
/**
106-
* The default HTTP headers to be included for all API calls.
107-
* @type {Array.<String>}
108-
* @default {}
109-
*/
110-
this.defaultHeaders = {
111-
"User-Agent":conf['defaultUserAgent'],
112-
"Authorization":"Bearer " + this.accessToken
113-
};
114-
115105
/** Get access token */
116106
var req = require('sync-request');
117107
var res = req('POST', this.authPath, {
@@ -124,6 +114,16 @@
124114

125115
var json = JSON.parse(res.getBody('utf-8'));
126116
this.accessToken = json.access_token;
117+
118+
/**
119+
* The default HTTP headers to be included for all API calls.
120+
* @type {Array.<String>}
121+
* @default {}
122+
*/
123+
this.defaultHeaders = {
124+
"User-Agent":conf['defaultUserAgent'],
125+
"Authorization":"Bearer " + this.accessToken
126+
};
127127
};
128128

129129
/**

src/api/ConversionApi.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
/**
4646
* Conversion service.
4747
* @module api/ConversionApi
48-
* @version 19.6.1
48+
* @version 19.6.2
4949
*/
5050

5151
/**

src/api/DocumentApi.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
/**
4646
* Document service.
4747
* @module api/DocumentApi
48-
* @version 19.6.1
48+
* @version 19.6.2
4949
*/
5050

5151
/**

src/api/ImportApi.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
/**
4646
* Conversion service.
4747
* @module api/ImportApi
48-
* @version 19.6.1
48+
* @version 19.6.2
4949
*/
5050

5151
/**

src/api/OcrApi.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
/**
4646
* Ocr service.
4747
* @module api/OcrApi
48-
* @version 19.6.1
48+
* @version 19.6.2
4949
*/
5050

5151
/**

src/api/StorageApi.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@
7676
/**
7777
* Storage service.
7878
* @module api/StorageApi
79-
* @version 19.6.1
79+
* @version 19.6.2
8080
*/
8181

8282
/**

src/api/SummarizationApi.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
/**
4646
* Summarization service.
4747
* @module api/SummarizationApi
48-
* @version 19.6.1
48+
* @version 19.6.2
4949
*/
5050

5151
/**

0 commit comments

Comments
 (0)