Api
Extends:
Method Summary
Public Methods | ||
public |
Make a GET request |
|
public |
Make a POST request |
|
public |
Make a PUT request |
|
public |
websocketInit(pid: number, json: object) Create a new websocket |
|
public |
websocketPop(pid: *, json: *) |
|
public |
websocketSend(pid: number, json: object) Send a json message down the websocket |
Private Methods | ||
private |
_websocketSendActual(json: *) |
|
private |
|
Inherited Summary
From class Queueable | ||
public |
queue: * |
|
public |
|
|
public |
finished(pid: *, mode: *) Call this method after you command has finished. |
|
public |
init(queue: *) init, override this for any promise based inits setting the self.ready=true after the promise |
|
public |
set(pid: *, value: *) |
|
public |
start(pid: *, command: *, json: *) Called from queue, starts running the actual command |
Public Methods
public get(pid: number, json: object) source
Make a GET request
Params:
Name | Type | Attribute | Description |
pid | number | Process ID |
|
json | object | queue arguments |
|
json.url | string | URL to make GET request to |
|
json.contentType | string |
|
Content type to request |
json.header | string | header object to send (note Content-Type is overwritten by above setting) |
|
json.name | string | name of error queue to use |
public post(pid: number, json: object) source
Make a POST request
Params:
Name | Type | Attribute | Description |
pid | number | Process ID |
|
json | object | queue arguments |
|
json.url | string | URL to make GET request to |
|
json.contentType | string |
|
Content type to request |
json.header | string | header object to send (note Content-Type is overwritten by above setting) |
|
json.body | string | object to send JSON.stringify is applies to this |
|
json.name | string | name of error queue to use |
public put(pid: number, json: object) source
Make a PUT request
Params:
Name | Type | Attribute | Description |
pid | number | Process ID |
|
json | object | queue arguments |
|
json.url | string | URL to make PUT request to |
|
json.contentType | string |
|
Content type to request |
json.header | string | header object to send (note Content-Type is overwritten by above setting) |
|
json.body | string | object to send JSON.stringify is applies to this |
|
json.name | string | name of error queue to use |
public websocketPop(pid: *, json: *) source
Params:
Name | Type | Attribute | Description |
pid | * | ||
json | * |
Private Methods
private _websocketSendActual(json: *) source
Params:
Name | Type | Attribute | Description |
json | * |