Allow setting a default connection override
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 1.5k
- Forks
- 564
- Avg merge
- 14h 2m
- Merged PRs (30d)
- 3
Description
Issue Summary
We would like to use https://www.twilio.com/docs/usage/webhooks/webhooks-connection-overrides in all our code. We keep accidentally forgetting it. It would be great if we could set a default connection override and if we use the redirect twiml verb that it would automatically append it.
Code Snippet
Instead of writing
const response = new VoiceResponse();
response.redirect({
method: 'POST'
}, 'https://example.com/foo?query=123#rc=2&ct=1000');
we would like to write
const response = new VoiceResponse({ connectionOverride: 'rc=2&ct=1000' });
response.redirect({
method: 'POST'
}, 'https://example.com/foo?query=123');
The connection override should also be appended for other things like statusCallbacks in <Gather /> aswell.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the VoiceResponse constructor and the redirect and Gather statusCallback entry points named in the issue. Define how a default connection override is carried and appended, then verify the shown examples and the other Gather statusCallbacks cases.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- node.js, typescript
- Domain
- api, backend-api-design
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100