Docly Developers
Function Updated 22 Oct 2026

request()

Get information about the current request from the request object.

Parameters

This function takes no parameters.

Returns

An object with information about the current request:

Member Description
method HTTP method in upper case (GET, POST …). Null when no HTTP request exists (scheduled service).
user Email of the signed-in Docly user, or null
Jwt Payload of the custom JWT cookie (see writeJwt). Only set in API functions — always null in .hash pages
url, Url Site-relative URL as the site serves it (spaces become -)
rawurl, rawUrl Site-relative URL with the names as they are on the drive
completeUrl, encodedUrl, encodedFileUrl Absolute URL as the site serves it
siteUrl Absolute URL of the site root
urlpath Path part of the URL
filepath, filename Path and name of the file that answers the request
folderpath, foldername Path and name of the folder
fileId, fileGuid, folderId, folderGuid Ids of the file and the folder
opendoc, openfolder URLs that open the document or folder in the editor
sitename, sitepath, sitefolder, sitemodified The published folder: name, path, folder and last change
template, title Template in use and page title
isIndex, folderNotFound Whether the request is for a folder index, and whether the folder of a 404 request was NOT found (true = the folder does not exist)
authMode Login mode of the publication, or null

Query string and form values are not on request — read them with query and form in API functions.

Example

Normal JavaScript, running in the browser or on the Docly™ server.
write(JSON.format(JSON.stringify(request)));