public static function instance_from_curl($ch, $body) {
		$transfer_info = curl_getinfo($ch);
		$statuscode = (!empty($transfer_info['http_code'])) ? (int)$transfer_info['http_code'] : 404;
		$errors = [];

		$err = static::decode_error_code(curl_errno($ch));
		if ($err !== 'SUCCESS') {
			$errors[] = $err;
		}

		$mime = (!empty($transfer_info['content_type'])) ? $transfer_info['content_type'] : 'text/plain';

		return new HttpClientResponse($statuscode, $mime, $body, $errors);
	}