I am currently achieving this by initializing the request then modifying the method before sending. Something like this:
const request = chai.request(app)
.get(url)
.set('Authorization', bearerToken);
request.method = newMethod;
const response = await request.send(data);
I am wondering if there is a better way to go about this.
Thank you
I am currently achieving this by initializing the request then modifying the method before sending. Something like this:
I am wondering if there is a better way to go about this.
Thank you