Question

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

Était-ce utile?

La solution

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

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

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top