cowboy_req.path_info.asciidoc 953 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. = cowboy_req:path_info(3)
  2. == Name
  3. cowboy_req:path_info - Access the route's trailing path segments
  4. == Description
  5. [source,erlang]
  6. ----
  7. path_info(Req :: cowboy_req:req()) -> cowboy_router:tokens()
  8. ----
  9. Return the tokens for the trailing path segments.
  10. This is the part of the host name that was matched using
  11. the `...` notation.
  12. == Arguments
  13. Req::
  14. The Req object.
  15. == Return value
  16. The tokens are returned as a list of case sensitive
  17. binary strings.
  18. == Changelog
  19. * *2.0*: Only the tokens are returned, they are no longer wrapped in a tuple.
  20. * *1.0*: Function introduced.
  21. == Examples
  22. .Get the path_info tokens
  23. [source,erlang]
  24. ----
  25. PathInfo = cowboy_req:path_info(Req).
  26. ----
  27. == See also
  28. link:man:cowboy_req(3)[cowboy_req(3)],
  29. link:man:cowboy_req:binding(3)[cowboy_req:binding(3)],
  30. link:man:cowboy_req:bindings(3)[cowboy_req:bindings(3)],
  31. link:man:cowboy_req:host_info(3)[cowboy_req:host_info(3)],
  32. link:man:cowboy_router(3)[cowboy_router(3)]