aboutsummaryrefslogtreecommitdiffstats
path: root/test/rest_empty_resource.erl
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2013-04-12 18:20:41 +0200
committerLoïc Hoguin <[email protected]>2013-04-12 19:02:00 +0200
commitb58a0549e139b410db50ddd443cc457fb677fa7e (patch)
tree819ab4484bfb6b75262e2d9eb871190453fecadb /test/rest_empty_resource.erl
parentd063511a0e4988d62357f9c17744bb9aa0470a06 (diff)
downloadcowboy-b58a0549e139b410db50ddd443cc457fb677fa7e.tar.gz
cowboy-b58a0549e139b410db50ddd443cc457fb677fa7e.tar.bz2
cowboy-b58a0549e139b410db50ddd443cc457fb677fa7e.zip
Add default operations for OPTIONS method in REST
It defaults to setting the Allow header to "HEAD, GET, OPTIONS".
Diffstat (limited to 'test/rest_empty_resource.erl')
-rw-r--r--test/rest_empty_resource.erl5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/rest_empty_resource.erl b/test/rest_empty_resource.erl
new file mode 100644
index 0000000..7e7c00a
--- /dev/null
+++ b/test/rest_empty_resource.erl
@@ -0,0 +1,5 @@
+-module(rest_empty_resource).
+-export([init/3]).
+
+init(_Transport, _Req, _Opts) ->
+ {upgrade, protocol, cowboy_rest}.