-
Notifications
You must be signed in to change notification settings - Fork 3
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
Query Strings not sending? #3
Comments
Hi @kubacode, thanks for opening the issue. I have not had the time to actually test the code yet and I'm busy with another project right now which I need to finish before working on this. The issue may come from the fourth parameter in $request = new Request('PUT', 'lights/' . $selector . '/power', [], [
'state' => $state,
'duration' => $duration,
]); As you can see, an associative array is being uploaded. However, Guzzle's documentation shows: $response = $client->post('http://httpbin.org/post', [
'form_params' => [
'field_name' => 'abc',
'other_field' => '123',
'nested_field' => [
'nested' => 'hello'
]
]
]); Therefore, it might fix it should you pass the associative array as a value for the key 'form_params' as shown above. This might work, although I am unsure, as this comes for the documentation for the Client class instead of the Request class. I won't be able to work on this anytime soon since I really want to make progress with Panel for LIFX (mainly to learn AngularJS by the end of this week). I appreciate the time you have invested in this package and my lack of maintenance of this package will be over soon! |
I've got a fix for this already - I'll pop through a PR after work this evening. No problem at all with lack of maintenance - good luck with Panel for LIFX! |
PR submitted! |
Thank you! |
@kz are the Query Strings for setLights, setColor, breatheLights & pulseLights methods sending the query string correctly for you? I've had to refactor the sendRequest method to accept an additional parameter with the query string, rather than the third parameter in a new Request.
I may have a different version of Guzzle installed compared to the version used to develop, so this could be the case of the issue - I'm currently running 6.0.1.
I'll pop through a PR with a fix if they aren't set correctly!
The text was updated successfully, but these errors were encountered: