mirror of
https://github.com/ninenines/cowboy.git
synced 2025-07-15 04:30:25 +00:00
Remove http.hrl dependency in cowboy_rest
Only cowboy_protocol remaining now.
This commit is contained in:
parent
f205d44518
commit
82d7e89ea2
1 changed files with 3 additions and 4 deletions
|
@ -49,8 +49,6 @@
|
||||||
expires :: undefined | no_call | calendar:datetime()
|
expires :: undefined | no_call | calendar:datetime()
|
||||||
}).
|
}).
|
||||||
|
|
||||||
-include("http.hrl").
|
|
||||||
|
|
||||||
%% @doc Upgrade a HTTP request to the REST protocol.
|
%% @doc Upgrade a HTTP request to the REST protocol.
|
||||||
%%
|
%%
|
||||||
%% You do not need to call this function manually. To upgrade to the REST
|
%% You do not need to call this function manually. To upgrade to the REST
|
||||||
|
@ -693,8 +691,9 @@ process_post(Req, State) ->
|
||||||
is_conflict(Req, State) ->
|
is_conflict(Req, State) ->
|
||||||
expect(Req, State, is_conflict, false, fun put_resource/2, 409).
|
expect(Req, State, is_conflict, false, fun put_resource/2, 409).
|
||||||
|
|
||||||
put_resource(Req=#http_req{path=RawPath}, State) ->
|
put_resource(Req, State) ->
|
||||||
put_resource(cowboy_req:set_meta(put_path, RawPath, Req),
|
{Path, Req2} = cowboy_req:path(Req),
|
||||||
|
put_resource(cowboy_req:set_meta(put_path, Path, Req2),
|
||||||
State, fun is_new_resource/2).
|
State, fun is_new_resource/2).
|
||||||
|
|
||||||
%% content_types_accepted should return a list of media types and their
|
%% content_types_accepted should return a list of media types and their
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue