This commit is contained in:
anlicheng 2023-12-24 16:04:03 +08:00
parent 325d95e784
commit 9894d99908

View File

@ -85,6 +85,7 @@ handle_cast({ai_event, Id}, State = #state{}) ->
case hackney:request(post, Url, Headers, Body, [{pool, false}]) of case hackney:request(post, Url, Headers, Body, [{pool, false}]) of
{ok, 200, _, ClientRef} -> {ok, 200, _, ClientRef} ->
{ok, RespBody} = hackney:body(ClientRef), {ok, RespBody} = hackney:body(ClientRef),
lager:debug("[iot_api] send body: ~p, get error is: ~p", [Body, RespBody]),
hackney:close(ClientRef); hackney:close(ClientRef);
{ok, HttpCode, _, ClientRef} -> {ok, HttpCode, _, ClientRef} ->
{ok, RespBody} = hackney:body(ClientRef), {ok, RespBody} = hackney:body(ClientRef),