Posting the below gives a MultiJson::ParseError - 795: unexpected token at '{"investor": {"name": "Theresa Enyedi"}'

curl http://localhost:3000/api/v1/investors -i -H "Accept: application/json" -H "Content-Type: application/json" -d '{"investor": {"name": "Theresa Enyedi"}}'

Help would be appreciated.

Mahalo Don

有帮助吗?

解决方案

-d '{json_data": should be -d '{"json_data":

by the way, -XPOST is not necessary, since you offer -d argument

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top