Skip to content

Context ​

Interface

data ​

headers ​

locals ​

Use this to store any abitrary data that can be accessed from another hook.

method ​

params ​

Params are values parsed from the URL path. For example, if a service handles the path pattern /songs/:songId, you get params for a url /songs/123 as

javascript
{
   songId: '123'
}
{
   songId: '123'
}

path ​

The path part of the URL without the query parameters. If you want the full URL, see Context.url

query ​

Query are request query parameters

result ​

Set this with the result of processing a context. When set, subsequent before hooks are not called.

statusCode ​

The status code the server adapter sets on the response.

url ​

user ​

The authenticated user. This is normally set by an authentication hook.