P path

Purpose: Outputs URL application and request path of a request handler.

 p-path <request path> [ new-line ]

p-path outputs a URL application path (see request) with <request path> following immediately afterwards.

If no "--path" option in gg is used to specify URL application path, then it is the same as application name prepended with a forward slash:
/<app name>

p-path is used in construction of URLs or HTML forms (either for HTML or API) to refer back to the same application.

Use p-path to create the absolute URL path to refer back to your service so you can issue requests to it.

For example, this is a link that specifies request to service "show-notes":
@<a href="<<p-path "/show-notes">>?date=yesterday">Show Notes</a>

If you are building HTML forms, you can add a note with:
@<form action='<<p-path "/add-note">>' method="POST">
@<input type="text" name="note" value="">
@</form>

See request for more on URL structure.

If "new-line" clause is used, then a new line ("\n") is output after the URL path.
See also
Output
finish-output  
flush-output  
output-statement  
pf-out  
pf-url  
pf-web  
p-num  
p-out  
p-path  
p-source-file  
p-source-line  
p-url  
p-web  
See all
documentation


Copyright (c) 2019-2025 Gliim LLC. All contents on this web site is "AS IS" without warranties or guarantees of any kind.