Constructor
new Rest(handlerClass)
Parameters:
Name | Type | Description |
---|---|---|
handlerClass |
A class which does the low communication with the server. Typical this is the XMLHttpRequest. |
- Source:
Methods
delete(url) → {Promise}
teh http DELETE request.
Parameters:
Name | Type | Description |
---|---|---|
url |
string |
- Source:
Returns:
The response data.
- Type
- Promise
get(url) → {Promise}
The http GET request.
Parameters:
Name | Type | Description |
---|---|---|
url |
string | The request url |
- Source:
Returns:
The response data.
- Type
- Promise
post(url, data) → {Promise}
The http POST request.
Parameters:
Name | Type | Description |
---|---|---|
url |
string | The request url |
data |
The data of type FormData |
- Source:
Returns:
The response data.
- Type
- Promise