Skip to content

Conversation

themsaid
Copy link
Member

@themsaid themsaid commented Mar 9, 2020

Using array_merge_recursive can lead to some configuration methods to set values to an array if called multiple times.

For example:

$client = Http::withToken('Token-A')->post();

// Do something which requires the original token

$client->withToken('Token-B')->post();

// Do something else that requires a different token.

Calling withToken multiple times will lead to having the token header value as an array.

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.

3 participants