Print path

Purpose: Print out URL that leads to a request handler.

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

print-path outputs URL application path of a URL that called this request handler, followed by string <request path>.

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, followed by "/<request path>":
/<app name>/<request path>

print-path is used in construction of URLs or HTML forms (either for HTML or API) to refer back to the same application. Use it to create the absolute URL path to refer back to a service of yours so you can issue requests to it.

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

If you are building HTML forms, you can add a note with:
@<form action='<<print-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  
print-format  
print-out  
print-path  
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.