function _httpPost( wpreq, data = {} ) {
	let file = wpreq._attachment;
	if ( file ) {
		// Handle files provided as a path string
		if ( typeof file === 'string' ) {
			file = fs.createReadStream( file );
		}

		// Build the form data object
		const form = new FormData();
		form.append( 'file', file, wpreq._attachmentName );
		Object.keys( data ).forEach( key => form.append( key, data[ key ] ) );

		// Fire off the media upload request
		return send( wpreq, {
			method: 'POST',
			redirect: 'follow',
			body: form,
		} );
	}

	return send( wpreq, {
		method: 'POST',
		headers: {
			'Content-Type': 'application/json',
		},
		redirect: 'follow',
		body: JSON.stringify( data ),
	} );
}
Invoke an HTTP "POST" request against the provided endpoint
@method post
@async
@param {WPRequest} wpreq A WPRequest query object
@param {Object} data The data for the POST request
@returns {Promise} A promise to the results of the HTTP request