Pregunta

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

¿Fue útil?

Solución

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

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

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top