new ServiceCall(apiVersion, httpRequest, options)
Note: The constructor is not accessible from the client
code. Instances are created internally by the framework.
Parameters:
Name | Type | Description |
---|---|---|
apiVersion |
string | Application API version. |
httpRequest |
http.external:IncomingMessage | HTTP request. |
options |
module:x2node-ws~ApplicationOptions | Application configuration options. |
Members
-
<nullable> actor :module:x2node-common.Actor
-
Authenticated actor associated with the call, or
null
if unauthenticated.Type:
-
<readonly> apiVersion :string
-
Application API version.
Type:
- string
-
<readonly> appOptions :module:x2node-ws~ApplicationOptions
-
Application configuration options originally passed to the module's createApplication() function, or an empty object if none were passed.
Type:
-
<readonly> authenticator :module:x2node-ws.Authenticator
-
The authenticator associated with the call, if any.
Type:
-
authorized :boolean
-
Tells if the call has been authorized.
Type:
- boolean
-
<readonly> authorizers :Array.<module:x2node-ws.Authorizer>
-
List of authorizers (including the handler if it has
isAllowed
method) associated with the call, if any.Type:
- Array.<module:x2node-ws.Authorizer>
-
<nullable> entity :Object
-
Entity provided with the call by the caller, or
null
if none.Type:
- Object
-
entityContentType :string
-
If entity is set on the call, this is the entity content type (all lower case, without any parameters such as charset).
Type:
- string
-
<readonly> handler :module:x2node-ws.Handler
-
The handler associated with the call.
Type:
-
<readonly> httpRequest :http.external:IncomingMessage
-
The original HTTP request.
Type:
-
<readonly> id :string
-
Call id unique for the process.
Type:
- string
-
<readonly> method :string
-
HTTP request method (shortcut for
httpRequest.method
).Type:
- string
-
<readonly> requestUrl :external:Url
-
Parsed request URL object including parsed query string.
Type:
-
<readonly> timestamp :number
-
Timestamp when the call was registered (from
Date.now()
).Type:
- number
-
<readonly> uriParams :Array.<string>
-
Parameter values extracted from the request URI. May be empty array.
Type:
- Array.<string>