cowboy_req:path(3)

NAME

cowboy_req:path - URI path

DESCRIPTION
    path(Req :: cowboy_req:req()) -> Path :: binary()

Return the path of the effective request URI.

The path can also be obtained using pattern matching:

    #{path := Path} = Req.

ARGUMENTS

Req
    The Req object.

RETURN VALUE

The path is returned as a binary string. It is case sensitive.

CHANGELOG
    • 2.0: Only the path is returned, it is no longer wrapped in a tuple.
    • 1.0: Function introduced.

EXAMPLES

Get the effective request URI's path
    Path = cowboy_req:path(Req).

SEE ALSO

cowboy_req(3), cowboy_req:binding(3), cowboy_req:bindings(3), cowboy_req:path_info(3)