strongloop / strong-remoting

Communicate between objects in servers, mobile apps, and other servers.
www.strongloop.com
Other
105 stars 93 forks source link

Last Update for Accept "application/vnd.api+json" Breaks Apps[Urgent] #251

Closed jaime-franco closed 8 years ago

jaime-franco commented 8 years ago

Responses now are default "application/vnd.api+json", in the case in the file lib/http-context.js is the returned when accepts is /.

https://github.com/strongloop/strong-remoting/commit/d7d9a73cc77f33c13f31d3c8e57af8277e33363c

jaime-franco commented 8 years ago

If some one has the same problem you can add in the config file

"rest": {
  "supportedTypes": [ "application/json"]
}

But it will be great if the default setting is json instead of vnd.api+json

voitau commented 8 years ago

Could someone from Strongloop confirm that the fix suggested by @jaime-franco is a proper fix/workaround? Thanks!

jaime-franco commented 8 years ago

Hi, @voitau i found the config information on this link :

https://docs.strongloop.com/display/public/LB/config.json#config.json-Remotingproperties

And i think this is a issue because in the documentation you can find a note in the rest.supportedTypes property : NOTE: 'application/vnd.api+json' is supported, but is not one of the default types.

And actually this las update change that.

raymondfeng commented 8 years ago

Can you submit a patch so that case '*/*': goes with case 'json':?

jaime-franco commented 8 years ago

Ok

voitau commented 8 years ago

Thanks for a quick fix! Is there a release with this fix planned?