mirror of
https://github.com/internetee/epp_proxy.git
synced 2025-08-14 03:39:18 +02:00
Replace apply(Fun, Args) with a direct module:function(Args) call
This commit is contained in:
parent
ae478d685d
commit
0ce33fd7cc
1 changed files with 5 additions and 2 deletions
|
@ -12,8 +12,11 @@
|
||||||
|
|
||||||
%% Callback API
|
%% Callback API
|
||||||
request(#epp_request{} = Request) ->
|
request(#epp_request{} = Request) ->
|
||||||
HackneyArgs = handle_args(Request),
|
[Method, URL, Headers, Payload, Options] =
|
||||||
case apply(hackney, request, HackneyArgs) of
|
handle_args(Request),
|
||||||
|
case hackney:request(Method, URL, Headers, Payload,
|
||||||
|
Options)
|
||||||
|
of
|
||||||
{error, Error} -> log_and_return_canned(Error, Request);
|
{error, Error} -> log_and_return_canned(Error, Request);
|
||||||
{Status, _StatusCode, _Headers, ClientRef} ->
|
{Status, _StatusCode, _Headers, ClientRef} ->
|
||||||
{ok, Body} = hackney:body(ClientRef), {Status, Body}
|
{ok, Body} = hackney:body(ClientRef), {Status, Body}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue