aboutsummaryrefslogtreecommitdiffstats
path: root/lib/inets/test
diff options
context:
space:
mode:
authorJames Wheare <[email protected]>2013-06-14 17:45:36 +0100
committerIngela Anderton Andin <[email protected]>2014-02-05 10:32:24 +0100
commit2c0dabc1ea0330c765e7621483e7a96d751db0aa (patch)
tree7ade42bc2594547b149f867c348903ec2cd0cdd0 /lib/inets/test
parentdf096a3f447080d74d831cee795d456da8a569c4 (diff)
downloadotp-2c0dabc1ea0330c765e7621483e7a96d751db0aa.tar.gz
otp-2c0dabc1ea0330c765e7621483e7a96d751db0aa.tar.bz2
otp-2c0dabc1ea0330c765e7621483e7a96d751db0aa.zip
httpc: Allow content body in DELETE requests
Diffstat (limited to 'lib/inets/test')
-rw-r--r--lib/inets/test/httpc_proxy_SUITE.erl17
1 files changed, 17 insertions, 0 deletions
diff --git a/lib/inets/test/httpc_proxy_SUITE.erl b/lib/inets/test/httpc_proxy_SUITE.erl
index 2475489bb3..ef277f2b01 100644
--- a/lib/inets/test/httpc_proxy_SUITE.erl
+++ b/lib/inets/test/httpc_proxy_SUITE.erl
@@ -69,6 +69,7 @@ local_proxy_cases() ->
http_post,
http_put,
http_delete,
+ http_delete_body,
http_headers,
http_proxy_auth,
http_doesnotexist,
@@ -262,6 +263,22 @@ http_delete(Config) when is_list(Config) ->
%%--------------------------------------------------------------------
+http_delete_body(doc) ->
+ ["Perform a DELETE request with a content body. The server will not allow it "
+ "but we only test sending the request."];
+http_delete_body(Config) when is_list(Config) ->
+ Method = delete,
+ URL = url("/delete.html", Config),
+ Content = "foo=bar",
+ Request = {URL,[],"application/x-www-form-urlencoded",Content},
+ HttpOpts = [],
+ Opts = [],
+ {ok,{{_,405,_},[_|_],[_|_]}} =
+ httpc:request(Method, Request, HttpOpts, Opts),
+ ok.
+
+%%--------------------------------------------------------------------
+
http_headers(doc) ->
["Use as many request headers as possible"];
http_headers(Config) when is_list(Config) ->