RESTAdapter sends invalid requests to backend #478

Closed
svasva opened this Issue Nov 15, 2012 · 3 comments

Comments

Projects
None yet
4 participants
@svasva

svasva commented Nov 15, 2012

It sets request Content-type to application/json but sends no json for GET requests. That makes express to raise an exception. Here's an issue at express repo: visionmedia/express#1316

@eltoro

This comment has been minimized.

Show comment
Hide comment
@eltoro

eltoro Nov 16, 2012

As a work around I replaced application/json with application/x-www-form-urlencoded for GETs:

ln 5552:
hash.contentType = (type !== 'GET') ? 'application/json; charset=utf-8' : 'application/x-www-form-urlencoded; charset=utf-8';

eltoro commented Nov 16, 2012

As a work around I replaced application/json with application/x-www-form-urlencoded for GETs:

ln 5552:
hash.contentType = (type !== 'GET') ? 'application/json; charset=utf-8' : 'application/x-www-form-urlencoded; charset=utf-8';

@pivotal-medici

This comment has been minimized.

Show comment
Hide comment
@pivotal-medici

pivotal-medici Nov 16, 2012

Contributor

This looks like a duplicate of #402.

Contributor

pivotal-medici commented Nov 16, 2012

This looks like a duplicate of #402.

@wagenet

This comment has been minimized.

Show comment
Hide comment
@wagenet

wagenet Nov 26, 2012

Member

Closing as duplicate.

Member

wagenet commented Nov 26, 2012

Closing as duplicate.

@wagenet wagenet closed this Nov 26, 2012

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