makeurl
| Rivet Tcl Commands and Variables |

## Name

makeurl — construct url's based on hostname, port.

## Synopsis

::rivet::makeurl ?`filename`?

## Description

Create a self referencing URL from a filename. makeurl can be used in three ways

- No argument is passed to the command (returns the current script URL)
- A relative style path is passed (returns the argument prepended with the current script's URL
- An absolute path is passed to the command: (returns the full URL to the resource)

Example of absolute path:

    ::rivet::makeurl /tclp.gif

returns `http://[hostname]:[port]/tclp.gif`. where hostname and port are the hostname and port of the server in question. The protocol prefix is inferred from the protocol in the URL referencing the script.

load_response |  | no_body