We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a605228 commit e6f444fCopy full SHA for e6f444f
lib/Client.js
@@ -99,19 +99,7 @@ class Client {
99
* @return {Promise} API Progress
100
*/
101
get(path, data) {
102
- const url = this.prepareUrl(path);
103
- const headers = this.prepareRequestHeaders();
104
-
105
- const request = new Request(
106
- url,
107
- {
108
- method: 'GET',
109
- headers: headers,
110
- credentials: 'include',
111
- }
112
- );
113
114
- return fetch(request);
+ return this.request('GET', path, data);
115
}
116
117
/**
@@ -187,6 +175,8 @@ class Client {
187
175
static setAuthorizationToken(token) {
188
176
this.api_token = token;
189
177
178
+ axios.defaults.headers.common['Authorization'] = `Token token=${token}`;
179
+
190
180
return this;
191
181
192
182
0 commit comments