Skip to content

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

Merged
taylorotwell merged 2 commits into
laravel:9.xfrom
denniseilander:patch-1
Jun 22, 2022
Merged

[9.x] Add new allowMaxRedirects method to PendingRequest#42902
taylorotwell merged 2 commits into
laravel:9.xfrom
denniseilander:patch-1

Conversation

@denniseilander

@denniseilander denniseilander commented Jun 21, 2022

Copy link
Copy Markdown
Contributor

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 <taylor@laravel.com>
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