Skip to content

Add support for providing http headers to get #801

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
merged 1 commit into from
May 11, 2023

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.

❤️💜💚💙💛

Unverified

No user is associated with the committer email.
@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.

None yet

2 participants