Skip to content

feat: Add support for optional follow_redirects #526

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

srlynch1
Copy link

@srlynch1 srlynch1 commented Apr 27, 2025

This feature implements an optional attribute follow_redirects, the default behaviour today is to directly follow the Location header.

Some APIs expect data is read from the Location header, rather than directly followed. A common example of this is Red Hat OpenShift oauth authentication flow.

This feature allows for an optional attribute follow_redirects = false, in this scenario the Location header redirect will not be followed and returned headers will be available in the the headers map.

If optional follow_redirects is either true or not supplied the behaviour is as it is today.

srlynch1 and others added 2 commits April 23, 2025 18:16
- Added a new optional attribute `follow_redirects` to control HTTP redirect behavior.
- Updated the `Read` method to handle the no-follow behavior when `follow_redirects` is set to false.
- Introduced a new test `TestDataSource_FollowRedirects` to verify the functionality of the redirect handling.
@srlynch1 srlynch1 requested a review from a team as a code owner April 27, 2025 23:18
@github-actions github-actions bot added size/M and removed size/S labels Apr 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant