From 0f6b42953eceb250dcdb61611154cc276895ea85 Mon Sep 17 00:00:00 2001 From: FabioBatSilva Date: Mon, 22 Feb 2016 11:09:01 -0500 Subject: remove whitespaces --- lib/inets/src/http_client/httpc_request.erl | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) (limited to 'lib/inets/src/http_client') diff --git a/lib/inets/src/http_client/httpc_request.erl b/lib/inets/src/http_client/httpc_request.erl index af4c3f75f2..5c2d31ee57 100644 --- a/lib/inets/src/http_client/httpc_request.erl +++ b/lib/inets/src/http_client/httpc_request.erl @@ -186,16 +186,18 @@ is_client_closing(Headers) -> %%%======================================================================== %%% Internal functions %%%======================================================================== -post_data(Method, Headers, {ContentType, Body}, HeadersAsIs) - when (Method =:= post) orelse (Method =:= put) - orelse (Method =:= patch) -> +post_data(Method, Headers, {ContentType, Body}, HeadersAsIs) + when (Method =:= post) + orelse (Method =:= put) + orelse (Method =:= patch) -> + NewBody = case Headers#http_request_h.expect of - "100-continue" -> - ""; - _ -> - Body - end, - + "100-continue" -> + ""; + _ -> + Body + end, + NewHeaders = case HeadersAsIs of [] -> Headers#http_request_h{ @@ -213,7 +215,7 @@ post_data(Method, Headers, {ContentType, Body}, HeadersAsIs) _ -> HeadersAsIs end, - + {NewHeaders, NewBody}; post_data(_, Headers, _, []) -> -- cgit v1.2.3 From 0285ef94ab4d021c6bbfbe12ce6d3c1fa3c0cdda Mon Sep 17 00:00:00 2001 From: FabioBatSilva Date: Mon, 22 Feb 2016 11:10:15 -0500 Subject: inets: Add DELETE Body to client --- lib/inets/src/http_client/httpc_request.erl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib/inets/src/http_client') diff --git a/lib/inets/src/http_client/httpc_request.erl b/lib/inets/src/http_client/httpc_request.erl index 5c2d31ee57..8fcfbc30c0 100644 --- a/lib/inets/src/http_client/httpc_request.erl +++ b/lib/inets/src/http_client/httpc_request.erl @@ -189,7 +189,8 @@ is_client_closing(Headers) -> post_data(Method, Headers, {ContentType, Body}, HeadersAsIs) when (Method =:= post) orelse (Method =:= put) - orelse (Method =:= patch) -> + orelse (Method =:= patch) + orelse (Method =:= delete) -> NewBody = case Headers#http_request_h.expect of "100-continue" -> -- cgit v1.2.3