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

0.9 compatibility - version HTTP headers, fallbackHosts, request() and decoding interop. test #37

Merged
merged 9 commits into from
Aug 12, 2016

Conversation

bladeSk
Copy link
Contributor

@bladeSk bladeSk commented Aug 9, 2016

No description provided.

@@ -117,7 +119,7 @@ public function request( $method, $url, $headers = array(), $params = array() )
$this->curl->setOpt( $ch, CURLOPT_POSTFIELDS, $params );

if ($this->postDataFormat == 'json') {
array_push( $headers, 'Accept: application/json', 'Content-Type: application/json' );
array_push( $headers, 'Content-Type: application/json' );
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Out of interest, why did you remove the Accept header. We default to JSON in our response, but isn't it better to be explicit?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The accept header was sent only when there were either GET parameters or POST body set. This was a wrong place to set the header. It should be probably sent in all the requests, I'll fix that.

@mattheworiordan
Copy link
Member

Looks good, but unfortunately the interoperability test is not doing enough. See ably/docs#146 as well

@mattheworiordan
Copy link
Member

Nice work @bladeSk, that looks great :)

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

Successfully merging this pull request may close these issues.

2 participants