aboutsummaryrefslogtreecommitdiffstats
path: root/test/http_SUITE_data
diff options
context:
space:
mode:
Diffstat (limited to 'test/http_SUITE_data')
-rw-r--r--test/http_SUITE_data/http_body_qs.erl2
-rw-r--r--test/http_SUITE_data/http_loop_stream_recv.erl2
-rw-r--r--test/http_SUITE_data/http_multipart.erl4
-rw-r--r--test/http_SUITE_data/http_multipart_stream.erl6
4 files changed, 7 insertions, 7 deletions
diff --git a/test/http_SUITE_data/http_body_qs.erl b/test/http_SUITE_data/http_body_qs.erl
index e0673cf..09ca5e4 100644
--- a/test/http_SUITE_data/http_body_qs.erl
+++ b/test/http_SUITE_data/http_body_qs.erl
@@ -10,7 +10,7 @@ init(Req, Opts) ->
{ok, maybe_echo(Method, HasBody, Req), Opts}.
maybe_echo(<<"POST">>, true, Req) ->
- case cowboy_req:body_qs(Req) of
+ case cowboy_req:read_urlencoded_body(Req) of
{badlength, Req2} ->
echo(badlength, Req2);
{ok, PostVals, Req2} ->
diff --git a/test/http_SUITE_data/http_loop_stream_recv.erl b/test/http_SUITE_data/http_loop_stream_recv.erl
index c006b6d..18b3d29 100644
--- a/test/http_SUITE_data/http_loop_stream_recv.erl
+++ b/test/http_SUITE_data/http_loop_stream_recv.erl
@@ -15,7 +15,7 @@ info(stream, Req, undefined) ->
stream(Req, 1, <<>>).
stream(Req, ID, Acc) ->
- case cowboy_req:body(Req) of
+ case cowboy_req:read_body(Req) of
{ok, <<>>, Req2} ->
{stop, cowboy_req:reply(200, Req2), undefined};
{_, Data, Req2} ->
diff --git a/test/http_SUITE_data/http_multipart.erl b/test/http_SUITE_data/http_multipart.erl
index 212f569..5a4c6be 100644
--- a/test/http_SUITE_data/http_multipart.erl
+++ b/test/http_SUITE_data/http_multipart.erl
@@ -9,9 +9,9 @@ init(Req, Opts) ->
{ok, cowboy_req:reply(200, #{}, term_to_binary(Result), Req2), Opts}.
acc_multipart(Req, Acc) ->
- case cowboy_req:part(Req) of
+ case cowboy_req:read_part(Req) of
{ok, Headers, Req2} ->
- {ok, Body, Req3} = cowboy_req:part_body(Req2),
+ {ok, Body, Req3} = cowboy_req:read_part_body(Req2),
acc_multipart(Req3, [{Headers, Body}|Acc]);
{done, Req2} ->
{lists:reverse(Acc), Req2}
diff --git a/test/http_SUITE_data/http_multipart_stream.erl b/test/http_SUITE_data/http_multipart_stream.erl
index 82662ad..88cf611 100644
--- a/test/http_SUITE_data/http_multipart_stream.erl
+++ b/test/http_SUITE_data/http_multipart_stream.erl
@@ -9,9 +9,9 @@ init(Req, Opts) ->
{ok, cowboy_req:reply(200, Req2), Opts}.
multipart(Req) ->
- case cowboy_req:part(Req) of
+ case cowboy_req:read_part(Req) of
{ok, [{<<"content-length">>, BinLength}], Req2} ->
- Length = list_to_integer(binary_to_list(BinLength)),
+ Length = binary_to_integer(BinLength),
{Length, Req3} = stream_body(Req2, 0),
multipart(Req3);
{done, Req2} ->
@@ -19,7 +19,7 @@ multipart(Req) ->
end.
stream_body(Req, N) ->
- case cowboy_req:part_body(Req) of
+ case cowboy_req:read_part_body(Req) of
{ok, Data, Req2} ->
{N + byte_size(Data), Req2};
{more, Data, Req2} ->