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

Use application/json in request headers #145

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

p-schneider
Copy link

@p-schneider p-schneider commented May 13, 2022

Using Wireshark I realized the curl adapter sends the Content-Type: application/x-www-form-urlencoded header by default when sending a body/payload in the HTTP Request.

The Request body is json, so it should be marked as such, even if the Hue Bridge is "stupid enough" to accept the invalid combination of header and payload.

Also prevents this Deprecation Warning:

Deprecated: strlen(): Passing null to parameter #1 ($string) of type string is deprecated in
…\vendor\sqmk\phue\library\Phue\Transport\Adapter\Curl.php on line 63

@p-schneider p-schneider force-pushed the patch-http-request-headers branch from 1092840 to 36854ca Compare May 16, 2022 21:21
Chris53897 added a commit to Chris53897/Phue that referenced this pull request Aug 14, 2022
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.

1 participant