Permalink
Browse files

Remove code/4 infavour of fun's calling code/3 themselfs

  • Loading branch information...
1 parent f72811b commit a0e462ea28413c89114c5407d1f7ef5e86f63d32 @lafka committed Aug 24, 2012
Showing with 2 additions and 5 deletions.
  1. +2 −5 src/tavern_req.erl
View
@@ -8,7 +8,7 @@
-export([exposed_method/2, client_acceptable/2, authorized/2, consumed_type/2]).
%% HTTP Request validation cycle
--export([call/3, call/4]).
+-export([call/3]).
-compile([export_all]).
@@ -95,7 +95,7 @@ consumed_type(Req, State) ->
, Req
, State};
_ ->
- call(true, Req,
+ call(Req,
State#tavern{
content_type = <<Mime1, $/, Mime2>>
, charset = Charset}
@@ -124,9 +124,6 @@ decode_body(Req, #tavern{content_type = ContentType} = State) ->
{true, Req, State#tavern{body = Payload}, success}.
call(Req, State, Fun) when is_function(Fun) ->
- call(Req, State, Fun, success).
-
-call(Req, State, Fun, Next) when is_function(Fun) ->
case Fun(Req, State) of
{true, Req2, State2, success} ->
{true, Req2, State2};

0 comments on commit a0e462e

Please sign in to comment.