MCPcopy Index your code
hub / github.com/WP-API/node-wpapi / _httpHead

Function _httpHead

lib/http-transport.js:357–364  ·  view source on GitHub ↗

* @method head * @async * @param {WPRequest} wpreq A WPRequest query object * @param {Function} [callback] A callback to invoke with the results of the HEAD request * @returns {Promise} A promise to the header results of the HTTP request

( wpreq, callback )

Source from the content-addressed store, hash-verified

355 * @returns {Promise} A promise to the header results of the HTTP request
356 */
357function _httpHead( wpreq, callback ) {
358 checkMethodSupport( 'head', wpreq );
359 const url = wpreq.toString();
360 let request = _auth( agent.head( url ), wpreq._options );
361 request = _setHeaders( request, wpreq._options );
362
363 return invokeAndPromisify( request, callback, returnHeaders );
364}
365
366module.exports = {
367 delete: _httpDelete,

Callers

nothing calls this directly

Calls 3

_authFunction · 0.85
_setHeadersFunction · 0.85
invokeAndPromisifyFunction · 0.85

Tested by

no test coverage detected