Repository navigation
Conversation
The overview documented "headers.Accept" dotted option keys, which a plain options array does not support, and its example never passed the options to the client. It claimed that redirects are followed without a limit, that there is no request object, and described POST in the PUT section. Several options were not documented at all. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
Author
|
Approved |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary of Changes
docs/overview.mdcontradicted the code in several places:'headers.Accept'keys.Httpreads$options['headers']as an array, so with a plain array that key is ignored; it only works with aRegistry, throughset('headers.Accept', …). The example also never passed$optionsto the client. Now it uses['headers' => ['Accept' => …]], creates the client with it, and explains theRegistrycase.CURLOPT_MAXREDIRSto 20 ("Maximum (20) redirects followed"), libcurl only follows redirects to HTTP/HTTPS/FTP/FTPS, and PHP's stream wrapper also stops after 20 redirects. The paragraph now says that and how to lower or disable it.sendRequest(RequestInterface); there is now an example with a PSR-7 request.Httpand the transports read (headers,timeout,userAgent,follow_location,protocolVersion,transport.curl/transport.stream/transport.socket,curl.certpath/stream.certpath) and links to the transport options inTransportInterface.md. Theproxy.*options are documented by [4.x] Use the same proxy options in the cURL and stream transports #87 together with their fix, and the default user agent by [4.x] Apply the default user agent in Http instead of the factory #94.Docs only, no code change.
Testing Instructions
Read
docs/overview.md. To check the redirect limit, fetch a redirect loop through the cURL transport: it fails with "Maximum (20) redirects followed".Documentation Changes Required
This is the documentation change. Several open PRs touch the same paragraphs of
docs/overview.md, and whichever is merged second needs a small rebase:🤖 Generated with Claude Code