diff options
author | Tommy Carpenter <tommy@research.att.com> | 2017-09-25 16:28:17 -0400 |
---|---|---|
committer | Tommy Carpenter <tommy@research.att.com> | 2017-09-25 16:29:11 -0400 |
commit | 4d68a25267d0173b13e6238d76274dc874967872 (patch) | |
tree | 5a79bdd8b8c58f548a43ec6e6f1a3fbb6169b462 /src/httpabs.erl | |
parent | aebd63152eec0fc8eff7b8757330c27a90849f49 (diff) |
Greatly increase unit tests
Issue-ID: DCAEGEN2-99
Change-Id: I03b62d8a54b8a6eb443f5ce648a92ff1f9953ade
Signed-off-by: Tommy Carpenter <tommy@research.att.com>
Diffstat (limited to 'src/httpabs.erl')
-rw-r--r-- | src/httpabs.erl | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/src/httpabs.erl b/src/httpabs.erl index 152621e..4a29f83 100644 --- a/src/httpabs.erl +++ b/src/httpabs.erl @@ -86,9 +86,8 @@ sanitize(URL) -> -spec post(string(), string()|binary(), string(), any()) -> httpstat(). post(XER, URL, ContentType, Body) -> %post that sends the XER, no headers signature - Headers = [{"x-ecomp-requestid", XER}], U = sanitize(URL), - parse_response(httpc:request(post, {U, Headers, ContentType, Body}, [],[]), U). + parse_response(httpc:request(post, {U, [{"x-ecomp-requestid", XER}], ContentType, Body}, [],[]), U). -spec post(string(), string()|binary(), list(), string(), any()) -> httpstat(). post(XER, URL, Headers, ContentType, Body) -> @@ -100,19 +99,16 @@ post(XER, URL, Headers, ContentType, Body) -> get(XER, URL) -> %http get that always sends the XER.. even if the server doesn't want it; maybe this will blow up on me one day. U = sanitize(URL), - Headers = [{"x-ecomp-requestid", XER}], - parse_response(httpc:request(get, {U, Headers}, [], []), U). + parse_response(httpc:request(get, {U, [{"x-ecomp-requestid", XER}]}, [], []), U). -spec put(string(), string()|binary(), string(), any()) -> httpstat(). put(XER, URL, ContentType, Body) -> %http put that always sends the XER U = sanitize(URL), - Headers = [{"x-ecomp-requestid", XER}], - parse_response(httpc:request(put, {U, Headers, ContentType, Body}, [],[]), U). + parse_response(httpc:request(put, {U, [{"x-ecomp-requestid", XER}], ContentType, Body}, [],[]), U). -spec delete(string(), string()|binary()) -> httpstat(). delete(XER, URL) -> %http delete that always sends the XER U = sanitize(URL), - Headers = [{"x-ecomp-requestid", XER}], - parse_response(httpc:request(delete, {U, Headers}, [],[]), U). + parse_response(httpc:request(delete, {U, [{"x-ecomp-requestid", XER}]}, [],[]), U). |