* Sends DELETE request to API with payload. * * ```js * I.sendDeleteRequestWithPayload('/api/users/1', { author: 'john' }); * ``` * * @param {*} url * @param {*} [payload={}] - the payload to be sent. By default it is sent as an empty object * @param {object} [headers={}] - t
(url, payload = {}, headers = {})
| 459 | * @returns {Promise<*>} response |
| 460 | */ |
| 461 | async sendDeleteRequestWithPayload(url, payload = {}, headers = {}) { |
| 462 | const request = { |
| 463 | baseURL: this._url(url), |
| 464 | method: 'DELETE', |
| 465 | data: payload, |
| 466 | headers, |
| 467 | } |
| 468 | |
| 469 | return this._executeRequest(request) |
| 470 | } |
| 471 | } |
| 472 | |
| 473 | export { REST as default } |
no test coverage detected