-
Notifications
You must be signed in to change notification settings - Fork 14
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
Conversation
…st method to requestInternal
@@ -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' ); |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
Looks good, but unfortunately the interoperability test is not doing enough. See ably/docs#146 as well |
Nice work @bladeSk, that looks great :) |
No description provided.