JSON-WSP Namespace


Classes


JSONWspClientHelper

constructor

With the help of this method you can create a new instance of JSONWspClientHelper.

Signature

constructor(void) : Object|JSONWspClientHelper

Returns

  • Object, JSONWspClientHelper
    • A new instance of JSONWspClientHelper

build

Build a JSON-WSP client instance. Example config: { hostname: 'localhost', port: 443, headers: {'Content-Type': 'application/json; charset=UTF-8'}, protocol: 'https', path: '/test?version=1', timeout: 10 }

Signature

build(Object config) : Object

Parameters

  • config
    • Config of the client
    • Type: Object

Returns

  • Object
    • The return value is not further described


JSONWspClient

constructor

With the help of this method you can create a new instance of JSONWspClient.

Signature

constructor(void) : Object|JSONWspClient

Returns

  • Object, JSONWspClient
    • A new instance of JSONWspClient

request

Perform a request.

Signature

request(Object options, String data, Function errorLogger, Function callback) : void

Parameters

  • options
    • Options for this request
    • Type: Object
  • data
    • Data to pass on POST requests
    • Type: String
  • errorLogger
    • Function to call on errors
    • Type: Function
  • callback
    • Function to call on finish
    • Type: Function

specification

Get the JSON-WSP specification.

Signature

specification(String path, Function callback) : void

Parameters

  • path
    • Path of the specification
    • Type: String
  • callback
    • Function to call on finish
    • Type: Function

call

Call an JSON-WSP method.

Signature

call(String method, Object args, [Object options], Function callback) : void

Parameters

  • method
    • Name of the method
    • Type: String
  • args
    • Arguments of the method to call
    • Type: Object
  • [options]
    • Options for this call
    • Type: Object
  • callback
    • Function to call on finish
    • Type: Function