Client: Caller
The caller actions for responding to client requests.
Remote Methods
respond | Sends the outbound response to the caller. |
promise | Pushes a promise to the caller. |
pushPromisedResponse | Sends a promised push response to the caller. |
'continue | Sends a |
redirect | Sends a redirect response to the user with the specified redirection status code. |
Methods
getRemoteHostName | Gets the hostname from the remote address. |
Fields
respond
function respond(ResponseMessage message) returns ListenerError?
Sends the outbound response to the caller.
Parameters
- message ResponseMessage (default ())
The outbound response or any allowed payload
promise
function promise(PushPromise promise) returns ListenerError?
Pushes a promise to the caller.
Parameters
- promise PushPromise
Push promise message
pushPromisedResponse
function pushPromisedResponse(PushPromise promise, Response response) returns ListenerError?
Sends a promised push response to the caller.
Return Type
(ListenerError?)An http:ListenerError
in case of failures while responding with the promised response
'continue
function 'continue() returns ListenerError?
Sends a 100-continue
response to the caller.
Return Type
(ListenerError?)An http:ListenerError
if failed to send the 100-continue
response or else ()
redirect
function redirect(Response response, RedirectCode code, string[ ] locations) returns ListenerError?
Sends a redirect response to the user with the specified redirection status code.
Parameters
- response Response
Response to be sent to the caller
- code RedirectCode
The redirect status code to be sent
- locations string[ ]
An array of URLs to which the caller can redirect to
Return Type
(ListenerError?)An http:ListenerError
if failed to send the redirect response or else ()
getRemoteHostName
function getRemoteHostName() returns string?
Gets the hostname from the remote address. This method may trigger a DNS reverse lookup if the address was created with a literal IP address.
1string? remoteHost = caller.getRemoteHostName();