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

Method sendHeadRequest

lib/helper/REST.js:318–325  ·  view source on GitHub ↗

* Send HEAD request to REST API * * ```js * I.sendHeadRequest('/api/users.json'); * ``` * * @param {*} url * @param {object} [headers={}] - the headers object to be sent. By default, it is sent as an empty object * * @returns {Promise<*>} response

(url, headers = {})

Source from the content-addressed store, hash-verified

316 * @returns {Promise<*>} response
317 */
318 async sendHeadRequest(url, headers = {}) {
319 const request = {
320 baseURL: this._url(url),
321 method: 'HEAD',
322 headers,
323 }
324 return this._executeRequest(request)
325 }
326
327 /**
328 * Sends POST request to API.

Callers

nothing calls this directly

Calls 2

_urlMethod · 0.95
_executeRequestMethod · 0.95

Tested by

no test coverage detected