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

URI encode jsonGraph payload #722

Closed
ekosz opened this issue Jan 27, 2016 · 3 comments
Closed

URI encode jsonGraph payload #722

ekosz opened this issue Jan 27, 2016 · 3 comments

Comments

@ekosz
Copy link

ekosz commented Jan 27, 2016

Given I run the command:

falcor.setValue(['somethingById', 'abc123', 'name'], 'This & That').then(something);

The JSON payload that is set to the server looks like:

screen shot 2016-01-27 at 2 49 30 pm

And an error is caused on the backend:

 SyntaxError: Unexpected end of input
     at Object.parse (native)
     at /app/node_modules/falcor-express/src/requestToContext.js:21:37
     at Array.forEach (native)
     at requestToContext (/app/node_modules/falcor-express/src/requestToContext.js:18:31
     at /app/node_modules/falcor-express/src/index.js:14:23
     ...

It seems that falcor should URI encode its jsonGraph payload before posting.

@ThePrimeagen
Copy link
Contributor

hmmm.

This should be an easy fix. I am surprised by this. Could you move this to https://github.com/Netflix/falcor-http-datasource/issues? It does the actual HTTP requesting (DataSource is a contract in falcor, not an implementation).

@ekosz
Copy link
Author

ekosz commented Jan 28, 2016

Will do!

@ekosz
Copy link
Author

ekosz commented Jan 28, 2016

Moved to Netflix/falcor-http-datasource#31

@ekosz ekosz closed this as completed Jan 28, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants