Skip to content

Commit e6f444f

Browse files
author
Chris Smith
committed
[master] Revert "[master] [WIP] Converted to fetch for GET methods"
This reverts commit a2eff3f.
1 parent a605228 commit e6f444f

File tree

1 file changed

+3
-13
lines changed

1 file changed

+3
-13
lines changed

lib/Client.js

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -99,19 +99,7 @@ class Client {
9999
* @return {Promise} API Progress
100100
*/
101101
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);
102+
return this.request('GET', path, data);
115103
}
116104

117105
/**
@@ -187,6 +175,8 @@ class Client {
187175
static setAuthorizationToken(token) {
188176
this.api_token = token;
189177

178+
axios.defaults.headers.common['Authorization'] = `Token token=${token}`;
179+
190180
return this;
191181
}
192182

0 commit comments

Comments
 (0)