pyeve / eve-demo

A fully functional REST Web API. Powered by Eve.
Other
256 stars 78 forks source link

Adding multiple items to the people collection errors #7

Closed StyxOfDynamite closed 10 years ago

StyxOfDynamite commented 10 years ago

Trying to get to grips with eve by using eve-demo and I've run into an issue with adding multiple items.

~/dev
$ curl -d 'item1={"firstname": "bill", "lastname": "clinton"}' -d 'item2={"firstname": "mitt", "lastname": "romney"}' http://127.0.0.1:5000/people

results in

{"_status": "ERR", "_issues": {"item2": "unknown field", "lastname": "required field", "item1": "unknown field"}}
nicolaiarocci commented 10 years ago

With the latest versions you should try the following:

$ curl -d '[{"firstname": "barack", "lastname": "obama"}, {"firstname": "mitt", "lastname": "romney"}]' -H 'Content-Type: application/json' http://eve-demo.herokuapp.com/people
nicolaiarocci commented 10 years ago

PS: I see where your issue comes from: the eve-demo README file has not been updated since 0.2. I will update it asap. In the meanwhile please refer to the official eve documentation, which is updated instead.

StyxOfDynamite commented 10 years ago

Nice speedy response, I'll work from the supported documentation instead. Thanks