Skip to content
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

[9.x] Add new allowMaxRedirects method to PendingRequest #42902

Merged
merged 2 commits into from
Jun 22, 2022

Conversation

denniseilander
Copy link
Contributor

@denniseilander denniseilander commented Jun 21, 2022

This PR adds a new allowMaxRedirects() method on the PendingRequest to easily set/change the max redirects value for the allow_redirects option.

Before

Http::withOptions([
    'allow_redirects' => ['max' => 10],
])->get('/endpoint');

After

Http::allowMaxRedirects(10)->get('/endpoint');

@taylorotwell taylorotwell merged commit 611c0f5 into laravel:9.x Jun 22, 2022
@denniseilander denniseilander deleted the patch-1 branch June 22, 2022 15:22
turanjanin pushed a commit to turanjanin/laravel-framework that referenced this pull request Jun 23, 2022
* Add new allowMaxRedirects method to PendingRequest

* formatting

Co-authored-by: Taylor Otwell <[email protected]>
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