class innerbbop-rest-manager~ manager_node_sync
Source: manager.
new manager_node_sync(response_handler)
Contructor for the REST query manager--synchronous in node.
This is an synchronous engine, so while both fetch and start will run the callbacks, fetch will return a response while start returns an instantly resolvable promise. Using the response results is entirely optional--the main method is still considered to be the callbacks.
See also:
Parameter
Name | Type | Optional | Description |
---|---|---|---|
response_handler |
Object |
|
- Returns
-
manager_node_sync
Methods
fetch([url][, payload], method) → Object
It should combine the URL, payload, and method in the ways appropriate to the subclass engine.
Parameters
Name | Type | Optional | Description |
---|---|---|---|
url |
String |
Yes |
update resource target with string |
payload |
Object |
Yes |
object to represent arguments |
method |
String |
|
GET, POST, etc. |
- Returns
-
Object
returns response
start([url][, payload], method) → Object
This is the synchronous data getter for Node (and technically the browser, but never never do that)--probably your best bet right now for scripting.
Works as fetch, except returns an (already resolved) promise.
Parameters
Name | Type | Optional | Description |
---|---|---|---|
url |
String |
Yes |
update resource target with string |
payload |
Object |
Yes |
object to represent arguments |
method |
String |
|
GET, POST, etc. |
- Returns
-
Object
returns promise