Extends
Methods
calcBodyLength(data) → {number}
Calculates the length of the request body
Parameters:
Name | Type | Description |
---|---|---|
data |
string |
Returns:
body length
- Type
- number
delete(path, options, callback)
Send a task to open the server for DELETE requests on the given path.
Parameters:
Name | Type | Description |
---|---|---|
path |
string | The path (relative to root) |
options |
object | null | The options for the server |
callback |
function | The async callback function |
get(path, options, callback)
Send a task to open the server for GET requests on the given path.
Parameters:
Name | Type | Description |
---|---|---|
path |
string | The path (relative to root) |
options |
object | null | The options for the server |
callback |
function | The async callback function |
post(path, options, callback)
Send a task to open the server for POST requests on the given path.
Parameters:
Name | Type | Description |
---|---|---|
path |
string | The path (relative to root) |
options |
object | null | The options for the server |
callback |
function | The async callback function |
put(path, options, callback)
Send a task to open the server for PUT requests on the given path.
Parameters:
Name | Type | Description |
---|---|---|
path |
string | The path (relative to root) |
options |
object | null | The options for the server |
callback |
function | The async callback function |
(async) request(url, options)
Easy NodeJS http request package on all platforms. This method is not using the dispatcher to send the task to the underlying system but instead is using the request means that are available on this platform.
Parameters:
Name | Type | Description |
---|---|---|
url |
string | The URL for the http request call |
options |
object | null | The options for the request |
setPort(port)
Set the port on the native part for the communication module.
Parameters:
Name | Type | Description |
---|---|---|
port |
number | The port to use |