function extractResponseBody( response ) {
	let responseBody = response.body;
	if ( isEmptyObject( responseBody ) && response.type === 'text/html' ) {
		// Response may have come back as HTML due to caching plugin; try to parse
		// the response text into JSON
		try {
			responseBody = JSON.parse( response.text );
		} catch ( e ) {
			// Swallow errors, it's OK to fall back to returning the body
		}
	}
	return responseBody;
}
Extract the body property from the superagent response, or else try to parse
the response text to get a JSON object.

@private
@param {Object} response      The response object from the HTTP request
@param {String} response.text The response content as text
@param {Object} response.body The response content as a JS object
@returns {Object} The response content as a JS object