MongoEngine / eve-mongoengine

An Eve extension for MongoEngine ODM support
Other
39 stars 28 forks source link

how to add put to a item or a resource. #26

Closed nikitph closed 7 years ago

nikitph commented 7 years ago

i have tried using the item_methods=['GET', 'PUT', 'DELETE', 'PATCH' ] approach at both the resource and item level. resource level doesnt even let me add a put. python compiler throws up.

ext.add_model(Item, item_methods=['GET', 'PUT', 'DELETE', 'PATCH' ])

this succeeds but i still get a 405. in the response i see "allow: OPTIONS, HEAD, DELETE, POST, GET" . so no put essentially.

i just want to update a record. i tried using post for it but it complains about the_id field being not present. suggestions?

nikitph commented 7 years ago

trying X-HTTP-Method-Override: put doesnt work on a post

nikitph commented 7 years ago

never mind... i needed to call /resource/