http server
npm install @kronos-integration/service-http








http server
* CTXBodyParamInterceptor
* name
* CTXInterceptor
* name
* CTXJWTVerifyInterceptor
* name
* reportError
* Parameters
* CTX
* Properties
* HTTPEndpoint
* Parameters
* endpointRouter
* Parameters
* ServiceHTTP
* Properties
* extendetName
* endpointFactoryFromConfig
* Parameters
* isSecure
* name
* WSEndpoint
* Parameters
* Properties
* authenticate
* Parameters
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 Error?
* description string?
Type: Object
* res ServerResponse
* req ServerRequest
* is Function
* throw Function
Extends SendEndpoint
Endpoint to link against a http route.
The endpoint name may be in the form of '
Then
and
* name string endpoint name
* owner Object owner of the endpoint
* options Object
* options.path string url path component defaults to endpoint name
* options.method string http method defaults to GET
* 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.
#### Parameters
* name string
* definition (Object | string)
* ic
Returns Class RouteSendEndpoint if path is present of name starts with '/'
Should we make a secure connection.
Returns boolean true if key is present
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:
``shell``
npm install @kronos-integration/service-http
BSD-2-Clause