anchor.diff:    Ref = gun:request(Conn, Method, Path, Headers),
     next(Req, State#state{ref = Ref}, fun req_body/2).
   
  -req_body(Req, State = #state{conn = Conn, ref = Ref}) ->
  +req_body(Req, State = #state{conn = Conn, ref = Ref, method = Method}) ->
     case cowboy_req:has_body(Req) of
       true ->
         case exported(Req, State, req_body, 3) of
  
positive.code:     {done, Req2} ->
        ok = gun:data(Conn, Ref, fin, <<>>),
        next(Req2, State, fun res_status/2);
      {error, _Reason} ->
        %% TODO send back a better error message
        next(Req, State, 400)
    end.
  
  res_status(Req, State = #state{conn = Conn, ref = Ref, timeout = _Timeout, res_headers = ResHeaders}) ->
    receive
      {gun_response, Conn, Ref, Fin, Status, Headers} ->
        next(Req, State#state{res_status = Status,
                              res_headers = filter_headers(Headers, ResHeaders),
                              res_has_body = Fin =:= nofin}, fun res_headers/2)
    %% after Timeout TODO
    end.
  
  res_headers(Req, State = #state{res_headers = ResHeaders}) ->
  
negative.code: res_body(Req, State) ->
    case exported(Req, State, res_body, 3) of
      true ->
        next(Req, State, fun transform_res_body/2);
      _ ->
        next(Req, State, fun chunk_res_body/2)
    end.
  
  transform_res_body(Req, State = #state{conn = Conn, ref = Ref, timeout = Timeout}) ->
    case gun:await_body(Conn, Ref, Timeout) of
      {ok, Body} ->
        {Body2, Req2, HandlerState} = call(Req, State, res_body, Body),
        ok = cowboy_req:chunk(Body2, Req2),
        terminate(Req, State#state{handler_state = HandlerState});
      {error, timeout} ->
        next(Req, State, 504);
      {error, Reason} ->
        error_terminate(Req, State, error, Reason, res_status, 2, 502)
    end.
  
  chunk_res_body(Req, State = #state{conn = Conn, ref = Ref, timeout = Timeout}) ->
    case gun:await(Conn, Ref, Timeout) of
      {data, nofin, Data} ->
        ok = cowboy_req:chunk(Data, Req),
        chunk_res_body(Req, State);
      {data, fin, Data} ->
        ok = cowboy_req:chunk(Data, Req),
        terminate(Req, State);
      {error, timeout} ->
        next(Req, State, 504);
      {error, Reason} ->
        error_terminate(Req, State, error, Reason, res_status, 2, 502)
    end.
  
  %% Formatting
  