mirror of
https://github.com/ninenines/cowboy.git
synced 2025-07-16 05:00:24 +00:00
Rename cowboy_http_rest to cowboy_rest
This commit is contained in:
parent
d3dcaf109b
commit
6d84afd16d
7 changed files with 9 additions and 9 deletions
|
@ -4,7 +4,7 @@
|
|||
post_is_create/2, create_path/2, to_text/2, from_text/2]).
|
||||
|
||||
init(_Transport, _Req, _Opts) ->
|
||||
{upgrade, protocol, cowboy_http_rest}.
|
||||
{upgrade, protocol, cowboy_rest}.
|
||||
|
||||
rest_init(Req, [Forbidden]) ->
|
||||
{ok, Req, Forbidden}.
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
get_text_plain/2]).
|
||||
|
||||
init(_Transport, _Req, _Opts) ->
|
||||
{upgrade, protocol, cowboy_http_rest}.
|
||||
{upgrade, protocol, cowboy_rest}.
|
||||
|
||||
allowed_methods(Req, State) ->
|
||||
{['GET', 'HEAD', 'DELETE'], Req, State}.
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
-export([init/3, generate_etag/2, content_types_provided/2, get_text_plain/2]).
|
||||
|
||||
init(_Transport, _Req, _Opts) ->
|
||||
{upgrade, protocol, cowboy_http_rest}.
|
||||
{upgrade, protocol, cowboy_rest}.
|
||||
|
||||
generate_etag(Req, State) ->
|
||||
case cowboy_req:qs_val(<<"type">>, Req) of
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
-export([init/3, content_types_provided/2, get_text_plain/2]).
|
||||
|
||||
init(_Transport, _Req, _Opts) ->
|
||||
{upgrade, protocol, cowboy_http_rest}.
|
||||
{upgrade, protocol, cowboy_rest}.
|
||||
|
||||
content_types_provided(Req, State) ->
|
||||
{[{{<<"text">>, <<"plain">>, []}, get_text_plain}], Req, State}.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue