MCPcopy Index your code
hub / github.com/codeceptjs/CodeceptJS / sendDeleteRequestWithPayload

Method sendDeleteRequestWithPayload

lib/helper/REST.js:461–470  ·  view source on GitHub ↗

* 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 = {})

Source from the content-addressed store, hash-verified

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
473export { REST as default }

Callers 1

REST_test.jsFile · 0.80

Calls 2

_urlMethod · 0.95
_executeRequestMethod · 0.95

Tested by

no test coverage detected