enter code herei’m a bit newbie, so sorry for this question.
i have a ruby service which created the entire scuffold, and it also supports JSON request.
when i’m running the view which is auto generated through the ruby webserivce (i.e.: http://localhost:3000/mypage.html) which has a json request, everything works perfect.
however, when i try to test this service some some page that i created on a separate project, the JSON response always comes back with “error” and that it.
i used fiddler to see what the difference between the requests and i noticed that there are couple things missing from my own project request header that the standard ruby view has:
- cookie
- origin/referrer/X-Requested
my question: am i trying to do something that is illegal? does ruby by default support JSON request only if they are local? how do we change it for testing purposes?
any advise would be helpful.
How did you enable JSON? Modify the controller as following and try again: