Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Current PR is only meant for discussion. It's purpose is not to be merged.
The main goals of this are the following:
How:
The biggest change here is that we extract
applyOptions
function into a separate function. By extracting the applyOptions to a separate function developers are able to create classes like in the following example:in order to support this we need to merge #1890
After merging this it will allow us to remove these three lines of codes: https://github.com/guzzle/guzzle/pull/2525/files#diff-ff73e042e738204c6da009e2ed19f783L161
These options are re-applied twice and they might have a performance impact since we are initializing two Streams, when user passes body as an option.
Related mentions before:
#1914
#1886
#2186 (comment)