[99s-extend] How to use the PUT verb with Cowboy_Rest ?
Daniel Goertzen
daniel.goertzen at gmail.com
Sun Aug 24 02:16:02 CEST 2014
You should implement the resource_exists() callback; this will let the rest
module pick a 200 vs 201. If the db name was incorrect, I think you are
just supposed to return false from the put callback. I can't remember the
http code for that case.
Regards,
Dan.
On Sat, Aug 23, 2014 at 6:58 PM, Stéphane Wirtel <stephane at wirtel.be> wrote:
> Hi all,
>
> 1. I would like to use the cowboy_rest protocol with cowboy 1.0 but I have
> a small crash.
>
> Here is my code:
>
> https://www.friendpaste.com/7O3X4fG4u31gBg9MgW5xg4
>
> Could you tell me if I correctly use cowboy_rest for the PUT verb? I have
> seen is_conflict/2, but I don't know how to use it.
>
> 2. I would like to change the response code, but I get the error. Is it
> possible?
>
> Thank you.
>
> Regards,
>
> Stephane
>
> --
> Stéphane Wirtel - http://wirtel.be - @matrixise
> _______________________________________________
> Extend mailing list
> Extend at lists.ninenines.eu
> https://lists.ninenines.eu/listinfo/extend
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ninenines.eu/archives/extend/attachments/20140823/51e1d345/attachment.html>
More information about the Extend
mailing list