Skip to content

Conversation

dnlgrv
Copy link

@dnlgrv dnlgrv commented Nov 29, 2022

🌈

Sometimes we want to use get to make requests to an API or endpoint that requires certain headers to be present (such as auth).

OpenURI supports providing headers for the request, we just need to have a way of providing them.

This PR adds :http_headers as a config option to get, and is essentially just passed directly to URI.open.

Hopefully the test coverage and documentation is sufficient.

❤️💜💚💙💛

@dnlgrv dnlgrv force-pushed the add-headers-to-get branch from f363a9f to 58ecd7a Compare November 29, 2022 22:15
@rafaelfranca rafaelfranca merged commit 50ac139 into rails:main May 11, 2023
@dnlgrv dnlgrv deleted the add-headers-to-get branch May 19, 2023 13:54
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