Skip to content

Commit

Permalink
adds read timeout (#14)
Browse files Browse the repository at this point in the history
  • Loading branch information
Berkay authored Feb 13, 2021
1 parent fb28d1a commit 5dc081e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/lib/HttpClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ export class HttpClient {
constructor({apiKey, secretKey, baseUrl = 'https://sandbox-api.craftgate.io'}: ClientCreationOptions = {}) {
this._options = {apiKey, secretKey, baseUrl};
this._client = axios.create({baseURL: baseUrl});
this._client.defaults.timeout = 150000;

this._client.interceptors.request.use(this._injectHeaders.bind(this));
}
Expand Down

0 comments on commit 5dc081e

Please sign in to comment.