* @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 )
| 355 | * @returns {Promise} A promise to the header results of the HTTP request |
| 356 | */ |
| 357 | function _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 | |
| 366 | module.exports = { |
| 367 | delete: _httpDelete, |
nothing calls this directly
no test coverage detected