Skip to content

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

Merged
bladeSk merged 9 commits intoably:masterfrom
bladeSk:master
Aug 12, 2016
Merged

0.9 compatibility - version HTTP headers, fallbackHosts, request() and decoding interop. test#37
bladeSk merged 9 commits intoably:masterfrom
bladeSk:master

Conversation

@bladeSk
Copy link
Copy Markdown
Contributor

@bladeSk bladeSk commented Aug 9, 2016

No description provided.


if ($this->postDataFormat == 'json') {
array_push( $headers, 'Accept: application/json', 'Content-Type: application/json' );
array_push( $headers, 'Content-Type: application/json' );
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Member

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

@mattheworiordan
Copy link
Copy Markdown
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