Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Int header with invalid types #22

Closed
PNixx opened this issue Mar 9, 2023 · 1 comment
Closed

Int header with invalid types #22

PNixx opened this issue Mar 9, 2023 · 1 comment

Comments

@PNixx
Copy link
Contributor

PNixx commented Mar 9, 2023

$headers['Content-Length'] = strlen($body) - always set in int number. All libs! My code is die with v2.0.0-beta.1.

$request = new Request($endpoint, 'POST', $content);
$request->setHeaders($headers);
@trowski
Copy link
Member

trowski commented Mar 9, 2023

I've allowed int, float, and Stringable objects to be part of the header array. Other types will still throw TypeError.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants