aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/cowboy_req.erl31
1 files changed, 0 insertions, 31 deletions
diff --git a/src/cowboy_req.erl b/src/cowboy_req.erl
index 48e4c93..121f747 100644
--- a/src/cowboy_req.erl
+++ b/src/cowboy_req.erl
@@ -16,7 +16,6 @@
-module(cowboy_req).
%% Request API.
--export([new/14]).
-export([method/1]).
-export([version/1]).
-export([peer/1]).
@@ -157,36 +156,6 @@
%% Request API.
--spec new(any(), module(),
- undefined | {inet:ip_address(), inet:port_number()},
- binary(), binary(), binary(),
- cowboy:http_version(), cowboy:http_headers(), binary(),
- inet:port_number() | undefined, binary(), boolean(), boolean(),
- undefined | cowboy:onresponse_fun())
- -> req().
-new(Socket, Transport, Peer, Method, Path, Query,
- Version, Headers, Host, Port, Buffer, CanKeepalive,
- Compress, OnResponse) ->
- Req = #http_req{socket=Socket, transport=Transport, pid=self(), peer=Peer,
- method=Method, path=Path, qs=Query, version=Version,
- headers=Headers, host=Host, port=Port, buffer=Buffer,
- resp_compress=Compress, onresponse=OnResponse},
- case CanKeepalive of
- false ->
- Req#http_req{connection=close};
- true ->
- case parse_header(<<"connection">>, Req) of
- undefined ->
- case Version of
- 'HTTP/1.1' -> Req; %% keepalive
- 'HTTP/1.0' -> Req#http_req{connection=close}
- end;
- Tokens ->
- Connection = connection_to_atom(Tokens),
- Req#http_req{connection=Connection}
- end
- end.
-
-spec method(req()) -> binary().
method(#{method := Method}) ->
Method.