Class: RequestContext

Isolated

Represents an HTTP Context that allows user to pass data between interceptors.

Methods

set

Sets an attribute to the request context object.

get

Gets an attribute value from the request context object.

remove

Removes an attribute from the request context object.

next

Calls the next service in the interceptor pipeline.

set

function set(string key, Cloneable | isolated object {}  value)
Isolated Function

Sets an attribute to the request context object.

Parameters

  • key string
  • Represents the attribute key

  • value Cloneable | isolated object {}
  • Represents the attribute value

get

function get(string key) returns Cloneable | isolated object {} 
Isolated Function

Gets an attribute value from the request context object.

Parameters

  • key string
  • Represents the attribute key

Return Type

(Cloneable | isolated object {} )

Attribute value

remove

function remove(string key)
Isolated Function

Removes an attribute from the request context object. It panics if there is no such member.

Parameters

  • key string
  • Represents the attribute key

function next() returns NextService | error?
Isolated Function

Calls the next service in the interceptor pipeline.

Return Type

(NextService | error?)

The next service object in the pipeline. An error is returned, if the call fails