DripEmail / drip-nodejs

The complete Nodejs wrapper for the Drip REST API
http://developer.drip.com/
MIT License
21 stars 17 forks source link

Batch Subscriber update still trying to use request over axios? #48

Open andrewfulton opened 1 month ago

andrewfulton commented 1 month ago

UpdateBatchSubscribers still looks like it's trying to use request over axios, and throwing an error about malformed URLs:

UnhandledPromiseRejectionWarning: TypeError [ERR_INVALID_URL]: Invalid URL: [object Object]

andrewfulton commented 1 month ago

Given the other ways the drip API is called, it seems like changing to something like this might be enough, but I'm not sure if I'm missing something

 this.post(
        `${helpers.baseUrl}v2/${this.accountId}/subscribers/batches`,
        this.generateResource('batches', { subscribers: batch }),
        (error, response, body) => {

Looks like the test mocks request.post entirely so this would have passed?