cowboy_req:has_body(3)

NAME

cowboy_req:has_body - Is there a request body?

DESCRIPTION
    has_body(Req :: cowboy_req:req()) -> boolean()

Return whether the request has a body.

ARGUMENTS

Req
    The Req object.

RETURN VALUE

A boolean indicating whether the request has a body.

CHANGELOG
    • 1.0: Function introduced.

EXAMPLES

Ensure the request has a body
    true = cowboy_req:has_body(Req).

SEE ALSO

cowboy_req(3), cowboy_req:body_length(3), cowboy_req:read_body(3), cowboy_req:read_urlencoded_body(3), cowboy_req:read_part(3), cowboy_req:read_part_body(3)