Skip to content
This repository was archived by the owner on Feb 13, 2024. It is now read-only.

Commit 0e19078

Browse files
committed
calling post method as its more testable
1 parent 84d646f commit 0e19078

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

index.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -273,20 +273,17 @@ class Analytics {
273273
}
274274

275275
const req = {
276-
method: 'POST',
277-
url: `${this.host}${this.path}`,
278276
auth: {
279277
username: this.writeKey
280278
},
281-
data,
282279
headers
283280
}
284281

285282
if (this.timeout) {
286283
req.timeout = typeof this.timeout === 'string' ? ms(this.timeout) : this.timeout
287284
}
288285

289-
this.axiosClient(req)
286+
this.axiosInstance.post(`${this.host}${this.path}`, data, req)
290287
.then(() => done())
291288
.catch(err => {
292289
if (err.response) {

0 commit comments

Comments
 (0)