summaryrefslogblamecommitdiffstats
path: root/archives/extend/2014-August/000443.html
blob: d36a68584ecd30e6874a54325f37eb50a1a5c110 (plain) (tree)




















































































                                                                                                                                                                                                         
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML>
 <HEAD>
   <TITLE> [99s-extend] Full example of 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%20Full%20example%20of%20cowboy_rest%3F&In-Reply-To=%3CE2ADBA0D-9198-4933-A50E-0675C1CD4FFF%40wirtel.be%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="000442.html">
   <LINK REL="Next"  HREF="000444.html">
 </HEAD>
 <BODY BGCOLOR="#ffffff">
   <H1>[99s-extend] Full example of cowboy_rest?</H1>
    <B>St&#233;phane Wirtel</B> 
    <A HREF="mailto:extend%40lists.ninenines.eu?Subject=Re%3A%20%5B99s-extend%5D%20Full%20example%20of%20cowboy_rest%3F&In-Reply-To=%3CE2ADBA0D-9198-4933-A50E-0675C1CD4FFF%40wirtel.be%3E"
       TITLE="[99s-extend] Full example of cowboy_rest?">stephane at wirtel.be
       </A><BR>
    <I>Sun Aug 24 11:54:58 CEST 2014</I>
    <P><UL>
        <LI>Previous message: <A HREF="000442.html">[99s-extend] How to use the PUT verb with Cowboy_Rest ?
</A></li>
        <LI>Next message: <A HREF="000444.html">[99s-extend] Full example of cowboy_rest?
</A></li>
         <LI> <B>Messages sorted by:</B> 
              <a href="date.html#443">[ date ]</a>
              <a href="thread.html#443">[ thread ]</a>
              <a href="subject.html#443">[ subject ]</a>
              <a href="author.html#443">[ author ]</a>
         </LI>
       </UL>
    <HR>  
<!--beginarticle-->
<PRE>Hi all,

Do you have a concrete example of cowboy_rest ? with POST, GET, HEAD, 
PUT and DELETE ?

POST will use resource_exists and allow_missing_post
PUT will use is_conflict
DELETE delete_resource, etc...

Currently, I started with the example with put_json and get_json and in 
the functions, I fetch the Method and I use the pattern matching with 
the Method, but I think it's not the right solution.

What are the best practices?

The examples in the repository of cowboy don't cover all the 
possibilities of a simple rest api with these verbs.

Thanks in advance,

Stephane

--
St&#233;phane Wirtel - <A HREF="http://wirtel.be">http://wirtel.be</A> - @matrixise
</PRE>


<!--endarticle-->
    <HR>
    <P><UL>
        <!--threads-->
	<LI>Previous message: <A HREF="000442.html">[99s-extend] How to use the PUT verb with Cowboy_Rest ?
</A></li>
	<LI>Next message: <A HREF="000444.html">[99s-extend] Full example of cowboy_rest?
</A></li>
         <LI> <B>Messages sorted by:</B> 
              <a href="date.html#443">[ date ]</a>
              <a href="thread.html#443">[ thread ]</a>
              <a href="subject.html#443">[ subject ]</a>
              <a href="author.html#443">[ author ]</a>
         </LI>
       </UL>

<hr>
<a href="https://lists.ninenines.eu/listinfo/extend">More information about the Extend
mailing list</a><br>
</body></html>