[Feature Request]: Send data during POST request
Preflight Checklist
- [x] I have read the Contributing Guidelines for this project.
- [x] I agree to follow the Code of Conduct that this project adheres to.
- [x] I have searched the issue tracker for a feature request that matches the one I want to file, without success.
- [x] This is not a general Twilio feature request or bug report. It is a feature request for the twilio-node JavaScript package.
Problem Description
Currently when executing the following code:
const accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
const authToken = 'your_auth_token';
const client = require('twilio')(accountSid, authToken);
client.calls.create({
to: '+12025550194',
from: '+12025550194',
url: 'http://demo.twilio.com/docs/voice.xml'
})
I am unable to specify the data to send to the url despite the client making a post request to said url to retrieve the twiml. It would be really nice to be able to pass data this way.
Proposed Solution
It would almost be the equivalent to something like
client.calls.create({
to: '+12025550194',
from: '+12025550194',
url: 'http://demo.twilio.com/docs/voice.xml'
data: {
a: 1,
b: 2
}
})
Alternatives Considered
The alternative is pretty much to pass data in the url as a query param.
Additional Information
No response
This seems to be a feature request. I will relegate this to the respective backend team.
Hello! The right channel to put this request in would be via the support team. They'll help your request reach the specific product team where they can guide you with the plans and timelines. If you have any issue related to the use of existing APIs via the helper library, please let us know here. Thanks!