has_resp_body(Req :: cowboy_req:req()) -> boolean()
cowboy_req:has_resp_body - Is there a response body?
has_resp_body(Req :: cowboy_req:req()) -> boolean()
Return whether a response body has been set.
The Req object.
A boolean indicating whether a response body has been set.
This function will return false
when an empty response body has been set.
false = cowboy_req:has_resp_body(Req0), Req1 = cowboy_req:set_resp_body(<<"Hello!">>, Req0), true = cowboy_req:has_resp_body(Req1), Req = cowboy_req:set_resp_body(<<>>, Req1), false = cowboy_req:has_resp_body(Req).
Donate to Loïc Hoguin because his work on Cowboy, Ranch, Gun and Erlang.mk is fantastic:
Recurring payment options are also available via BountySource. These funds are used to cover the recurring expenses like dedicated servers or domain names.