aboutsummaryrefslogtreecommitdiffstats
path: root/lib/inets/src/http_client/httpc.erl
diff options
context:
space:
mode:
authorPablo Lamela <[email protected]>2015-12-08 17:45:55 +0000
committerPablo Lamela <[email protected]>2015-12-08 19:39:48 +0000
commitb20321973be4d8f7be2f766ac51d2a7b9d5d120f (patch)
tree6387b62758c150170067740f1fd5cea9ee78d40d /lib/inets/src/http_client/httpc.erl
parenta16b7d63cc665dca90305b146c15de04487808db (diff)
downloadotp-b20321973be4d8f7be2f766ac51d2a7b9d5d120f.tar.gz
otp-b20321973be4d8f7be2f766ac51d2a7b9d5d120f.tar.bz2
otp-b20321973be4d8f7be2f766ac51d2a7b9d5d120f.zip
inets: Add PATCH method to client and server
Diffstat (limited to 'lib/inets/src/http_client/httpc.erl')
-rw-r--r--lib/inets/src/http_client/httpc.erl7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/inets/src/http_client/httpc.erl b/lib/inets/src/http_client/httpc.erl
index e4a6f8f748..85663b5ded 100644
--- a/lib/inets/src/http_client/httpc.erl
+++ b/lib/inets/src/http_client/httpc.erl
@@ -101,7 +101,8 @@ request(Url, Profile) ->
%% {ok, {StatusLine, Headers, Body}} | {ok, {Status, Body}} |
%% {ok, RequestId} | {error,Reason} | {ok, {saved_as, FilePath}
%%
-%% Method - atom() = head | get | put | post | trace | options| delete
+%% Method - atom() = head | get | put | patch | post | trace |
+%% options | delete
%% Request - {Url, Headers} | {Url, Headers, ContentType, Body}
%% Url - string()
%% HTTPOptions - [HttpOption]
@@ -176,8 +177,8 @@ request(Method,
request(Method,
{Url, Headers, ContentType, Body},
HTTPOptions, Options, Profile)
- when ((Method =:= post) orelse (Method =:= put) orelse (Method =:= delete)) andalso
- (is_atom(Profile) orelse is_pid(Profile)) ->
+ when ((Method =:= post) orelse (Method =:= patch) orelse (Method =:= put) orelse
+ (Method =:= delete)) andalso (is_atom(Profile) orelse is_pid(Profile)) ->
?hcrt("request", [{method, Method},
{url, Url},
{headers, Headers},