Skip to content

feat: Add Twilio::HTTP::Client#configure_connection #559

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

darwinShopify
Copy link
Contributor

Add the configure_connection method to the Twilio::HTTP::Client class to allow consumers to apply custom configuration to the Faraday connection.

The motivation for this change is to allow consumers to register custom middleware.

Checklist

  • I acknowledge that all my contributions will be made under the project's license
  • I have made a material change to the repo (functionality, testing, spelling, grammar)
  • I have read the Contribution Guidelines and my PR follows them
  • I have titled the PR appropriately
  • I have updated my branch with the main branch
  • I have added tests that prove my fix is effective or that my feature works
  • I have added the necessary documentation about the functionality in the appropriate .md file
  • I have added inline documentation to the code I modified

If you have questions, please file a support ticket, or create a GitHub Issue in this repository.

@darwinShopify darwinShopify force-pushed the enable-connection-configuration-blocks branch from c976151 to d1fa5b8 Compare June 16, 2021 12:40
@darwinShopify darwinShopify marked this pull request as ready for review June 23, 2021 19:58
Copy link
Contributor

@JenniferMah JenniferMah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your contribution @darwinShopify! Could you rebase your branch with the latest updates from main so we can get this change merged in?

darwinShopify and others added 3 commits June 25, 2021 10:22
Faraday recommends that adapters be the last configuration to be set.
https://lostisland.github.io/faraday/middleware/#how-it-works

Co-authored-by: Darwin Carrillo <[email protected]>
Co-authored-by: Adam Archibald <[email protected]>
Co-authored-by: Sam Bostock <[email protected]>
This allows consumers to configure things such as middlewares.

Co-authored-by: Darwin Carrillo <[email protected]>
Co-authored-by: Adam Archibald <[email protected]>
Co-authored-by: Sam Bostock <[email protected]>
Update the README to include an example on how to use the
configure_connection method.

Co-authored-by: Sam Bostock <[email protected]>
Co-authored-by: Darwin Carrillo <[email protected]>
Co-authored-by: Adam Archibald <[email protected]>
@darwinShopify darwinShopify force-pushed the enable-connection-configuration-blocks branch from d1fa5b8 to 58a3a96 Compare June 25, 2021 14:23
@darwinShopify
Copy link
Contributor Author

@JenniferMah updated and ready to go!

@JenniferMah JenniferMah merged commit ccc5965 into twilio:main Jun 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants