* @method get * @async * @param {WPRequest} wpreq A WPRequest query object * @param {Function} [callback] A callback to invoke with the results of the GET request * @returns {Promise} A promise to the results of the HTTP request
( wpreq, callback )
| 268 | * @returns {Promise} A promise to the results of the HTTP request |
| 269 | */ |
| 270 | function _httpGet( wpreq, callback ) { |
| 271 | checkMethodSupport( 'get', wpreq ); |
| 272 | const url = wpreq.toString(); |
| 273 | |
| 274 | let request = _auth( agent.get( url ), wpreq._options ); |
| 275 | request = _setHeaders( request, wpreq._options ); |
| 276 | |
| 277 | return invokeAndPromisify( request, callback, returnBody.bind( null, wpreq ) ); |
| 278 | } |
| 279 | |
| 280 | /** |
| 281 | * Invoke an HTTP "POST" request against the provided endpoint |
nothing calls this directly
no test coverage detected