http server
- CTXBodyParamInterceptor
- CTXInterceptor
- CTXJWTVerifyInterceptor
- reportError
- CTX
- HTTPEndpoint
- endpointRouter
- ServiceHTTP
- WSEndpoint
- authenticate
Extends CTXInterceptor
Extracts params from request body. Supported content types are:
- application/json
- application/x-www-form-urlencoded
Returns string 'ctx-body-param'
Extends Interceptor
Basic interceptor providing/consuming http request/response.
Returns string 'ctx'
Extends Interceptor
Only forward requests if a valid JWT token is present.
Returns string 'ctx-jwt-verify'
Write WWW-Authenticate header.
-
ctx
any -
code
-
error
any? -
description
string?
Type: Object
Extends SendEndpoint
Endpoint to link against a http route.
The endpoint name may be in the form of ':'. Then will be used as http method and as the url path component.
-
httpService
HTTPServer
Returns RequestListener
Extends Service
HTTP server.
-
server
http.Server only present if state is running
Returns string name with url
On demand create RouteSendEndpoint´s.
Returns Class RouteSendEndpoint if path is present of name starts with '/'
Should we make a secure connection.
Returns boolean true if key is present
Options passed to @see {http.createServer} or @see {https.createServer}.
Returns Object
Returns string 'http'
Extends SendReceiveEndpoint
Endpoint to link against a websocket route.
-
name
string endpoint name -
owner
Object owner of the endpoint -
options
Object-
options.path
string url path defaults to endpoint name
-
Check sec-websocket-protocol header for presence of 'access_token' and the token. Throws if no valid token is present.
-
service
Service -
request
any
With npm do:
npm install @kronos-integration/service-http
BSD-2-Clause