summaryrefslogtreecommitdiffstats
path: root/_build/static/archives/extend/2014-August/000441.html
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2016-08-29 12:39:49 +0200
committerLoïc Hoguin <[email protected]>2016-08-29 12:40:03 +0200
commitc807880f7ac73f813b2660ea81a00f7712a4e793 (patch)
treeba1d09e9b177f230665a80513b33fbd532000ce4 /_build/static/archives/extend/2014-August/000441.html
parentb1df25a7d9cda697513650659b781b55b40898f8 (diff)
downloadninenines.eu-c807880f7ac73f813b2660ea81a00f7712a4e793.tar.gz
ninenines.eu-c807880f7ac73f813b2660ea81a00f7712a4e793.tar.bz2
ninenines.eu-c807880f7ac73f813b2660ea81a00f7712a4e793.zip
Add old mailing list archives
Diffstat (limited to '_build/static/archives/extend/2014-August/000441.html')
-rw-r--r--_build/static/archives/extend/2014-August/000441.html139
1 files changed, 139 insertions, 0 deletions
diff --git a/_build/static/archives/extend/2014-August/000441.html b/_build/static/archives/extend/2014-August/000441.html
new file mode 100644
index 00000000..8d0063bb
--- /dev/null
+++ b/_build/static/archives/extend/2014-August/000441.html
@@ -0,0 +1,139 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<HTML>
+ <HEAD>
+ <TITLE> [99s-extend] How to use the PUT verb with Cowboy_Rest ?
+ </TITLE>
+ <LINK REL="Index" HREF="index.html" >
+ <LINK REL="made" HREF="mailto:extend%40lists.ninenines.eu?Subject=Re%3A%20%5B99s-extend%5D%20How%20to%20use%20the%20PUT%20verb%20with%20Cowboy_Rest%20%3F&In-Reply-To=%3CCAKAMJXhPm0vZdTrhW3Zg%3DzyowQzc0AczhptyTAVyX404pvc3XA%40mail.gmail.com%3E">
+ <META NAME="robots" CONTENT="index,nofollow">
+ <style type="text/css">
+ pre {
+ white-space: pre-wrap; /* css-2.1, curent FF, Opera, Safari */
+ }
+ </style>
+ <META http-equiv="Content-Type" content="text/html; charset=us-ascii">
+ <LINK REL="Previous" HREF="000440.html">
+ <LINK REL="Next" HREF="000442.html">
+ </HEAD>
+ <BODY BGCOLOR="#ffffff">
+ <H1>[99s-extend] How to use the PUT verb with Cowboy_Rest ?</H1>
+ <B>Eduardo Gurgel</B>
+ <A HREF="mailto:extend%40lists.ninenines.eu?Subject=Re%3A%20%5B99s-extend%5D%20How%20to%20use%20the%20PUT%20verb%20with%20Cowboy_Rest%20%3F&In-Reply-To=%3CCAKAMJXhPm0vZdTrhW3Zg%3DzyowQzc0AczhptyTAVyX404pvc3XA%40mail.gmail.com%3E"
+ TITLE="[99s-extend] How to use the PUT verb with Cowboy_Rest ?">edgurgel at gmail.com
+ </A><BR>
+ <I>Sun Aug 24 02:25:54 CEST 2014</I>
+ <P><UL>
+ <LI>Previous message: <A HREF="000440.html">[99s-extend] How to use the PUT verb with Cowboy_Rest ?
+</A></li>
+ <LI>Next message: <A HREF="000442.html">[99s-extend] How to use the PUT verb with Cowboy_Rest ?
+</A></li>
+ <LI> <B>Messages sorted by:</B>
+ <a href="date.html#441">[ date ]</a>
+ <a href="thread.html#441">[ thread ]</a>
+ <a href="subject.html#441">[ subject ]</a>
+ <a href="author.html#441">[ author ]</a>
+ </LI>
+ </UL>
+ <HR>
+<!--beginarticle-->
+<PRE>I think you can always halt the processing and do the reply by yourself:
+
+{ok, Req2} = cowboy_req:reply(412, Req),
+{halt, Req2, State}.
+
+
+On Sun, Aug 24, 2014 at 12:22 PM, St&#233;phane Wirtel &lt;<A HREF="https://lists.ninenines.eu/listinfo/extend">stephane at wirtel.be</A>&gt;
+wrote:
+
+&gt;<i> resource_exists is used by POST
+</I>&gt;<i> is_conflict is used by PUT (from the code)
+</I>&gt;<i> but in the case where my database already exists, I need to return 412 and
+</I>&gt;<i> not 409.
+</I>&gt;<i>
+</I>&gt;<i> and I know I don't respect the default value returned by Cowboy_rest.
+</I>&gt;<i>
+</I>&gt;<i>
+</I>&gt;<i> On 24 Aug 2014, at 2:16, Daniel Goertzen wrote:
+</I>&gt;<i>
+</I>&gt;<i> You should implement the resource_exists() callback; this will let the
+</I>&gt;&gt;<i> rest
+</I>&gt;&gt;<i> module pick a 200 vs 201. If the db name was incorrect, I think you are
+</I>&gt;&gt;<i> just supposed to return false from the put callback. I can't remember the
+</I>&gt;&gt;<i> http code for that case.
+</I>&gt;&gt;<i>
+</I>&gt;&gt;<i> Regards,
+</I>&gt;&gt;<i> Dan.
+</I>&gt;&gt;<i>
+</I>&gt;&gt;<i>
+</I>&gt;&gt;<i> On Sat, Aug 23, 2014 at 6:58 PM, St&#233;phane Wirtel &lt;<A HREF="https://lists.ninenines.eu/listinfo/extend">stephane at wirtel.be</A>&gt;
+</I>&gt;&gt;<i> wrote:
+</I>&gt;&gt;<i>
+</I>&gt;&gt;<i> Hi all,
+</I>&gt;&gt;&gt;<i>
+</I>&gt;&gt;&gt;<i> 1. I would like to use the cowboy_rest protocol with cowboy 1.0 but I
+</I>&gt;&gt;&gt;<i> have
+</I>&gt;&gt;&gt;<i> a small crash.
+</I>&gt;&gt;&gt;<i>
+</I>&gt;&gt;&gt;<i> Here is my code:
+</I>&gt;&gt;&gt;<i>
+</I>&gt;&gt;&gt;<i> <A HREF="https://www.friendpaste.com/7O3X4fG4u31gBg9MgW5xg4">https://www.friendpaste.com/7O3X4fG4u31gBg9MgW5xg4</A>
+</I>&gt;&gt;&gt;<i>
+</I>&gt;&gt;&gt;<i> Could you tell me if I correctly use cowboy_rest for the PUT verb? I have
+</I>&gt;&gt;&gt;<i> seen is_conflict/2, but I don't know how to use it.
+</I>&gt;&gt;&gt;<i>
+</I>&gt;&gt;&gt;<i> 2. I would like to change the response code, but I get the error. Is it
+</I>&gt;&gt;&gt;<i> possible?
+</I>&gt;&gt;&gt;<i>
+</I>&gt;&gt;&gt;<i> Thank you.
+</I>&gt;&gt;&gt;<i>
+</I>&gt;&gt;&gt;<i> Regards,
+</I>&gt;&gt;&gt;<i>
+</I>&gt;&gt;&gt;<i> Stephane
+</I>&gt;&gt;&gt;<i>
+</I>&gt;&gt;&gt;<i> --
+</I>&gt;&gt;&gt;<i> St&#233;phane Wirtel - <A HREF="http://wirtel.be">http://wirtel.be</A> - @matrixise
+</I>&gt;&gt;&gt;<i> _______________________________________________
+</I>&gt;&gt;&gt;<i> Extend mailing list
+</I>&gt;&gt;&gt;<i> <A HREF="https://lists.ninenines.eu/listinfo/extend">Extend at lists.ninenines.eu</A>
+</I>&gt;&gt;&gt;<i> <A HREF="https://lists.ninenines.eu/listinfo/extend">https://lists.ninenines.eu/listinfo/extend</A>
+</I>&gt;&gt;&gt;<i>
+</I>&gt;&gt;&gt;<i>
+</I>&gt;<i>
+</I>&gt;<i> --
+</I>&gt;<i> St&#233;phane Wirtel - <A HREF="http://wirtel.be">http://wirtel.be</A> - @matrixise
+</I>&gt;<i> _______________________________________________
+</I>&gt;<i> Extend mailing list
+</I>&gt;<i> <A HREF="https://lists.ninenines.eu/listinfo/extend">Extend at lists.ninenines.eu</A>
+</I>&gt;<i> <A HREF="https://lists.ninenines.eu/listinfo/extend">https://lists.ninenines.eu/listinfo/extend</A>
+</I>&gt;<i>
+</I>
+
+
+--
+Eduardo
+-------------- next part --------------
+An HTML attachment was scrubbed...
+URL: &lt;<A HREF="http://lists.ninenines.eu/archives/extend/attachments/20140824/89d3a7f6/attachment.html">http://lists.ninenines.eu/archives/extend/attachments/20140824/89d3a7f6/attachment.html</A>&gt;
+</PRE>
+
+
+<!--endarticle-->
+ <HR>
+ <P><UL>
+ <!--threads-->
+ <LI>Previous message: <A HREF="000440.html">[99s-extend] How to use the PUT verb with Cowboy_Rest ?
+</A></li>
+ <LI>Next message: <A HREF="000442.html">[99s-extend] How to use the PUT verb with Cowboy_Rest ?
+</A></li>
+ <LI> <B>Messages sorted by:</B>
+ <a href="date.html#441">[ date ]</a>
+ <a href="thread.html#441">[ thread ]</a>
+ <a href="subject.html#441">[ subject ]</a>
+ <a href="author.html#441">[ author ]</a>
+ </LI>
+ </UL>
+
+<hr>
+<a href="https://lists.ninenines.eu/listinfo/extend">More information about the Extend
+mailing list</a><br>
+</body></html>