Uh oh!
There was an error while loading. Please reload this page.
Fix form urlencoded request bodies - #20
Conversation
Greptile SummaryThis PR fixes Confidence Score: 5/5Safe to merge — one-line logic fix with a targeted regression test and no side-effects on other content types. No P0 or P1 issues found. The change is minimal, correctly scoped, and the new test validates the exact wire format. Multipart handling is unchanged. No files require special attention. Important Files Changed
Reviews (2): Last reviewed commit: "Fix form urlencoded request bodies" | Re-trigger Greptile |
Uh oh!
There was an error while loading. Please reload this page.
9eb3afc to
b988865CompareUh oh!
There was an error while loading. Please reload this page.
Summary
application/x-www-form-urlencodedarray bodies withhttp_build_query()before sendingContext
CURLOPT_POSTFIELDStreats an array body differently from a URL-encoded string. OAuth-style endpoints that expectapplication/x-www-form-urlencodedpayloads require a raw query-string body, for examplegrant_type=client_credentials&client_id=....Test Plan
php -d error_reporting='E_ALL & ~E_DEPRECATED' vendor/bin/phpunit --filter testFormUrlencodedArrayBodyphp -d error_reporting='E_ALL & ~E_DEPRECATED' vendor/bin/phpunit tests/ClientTest.phpvendor/bin/pint --test --config pint.json src/Client.php tests/ClientTest.php