diff options
Diffstat (limited to 'crates/shirabe/src/util/http/curl_response.rs')
| -rw-r--r-- | crates/shirabe/src/util/http/curl_response.rs | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/crates/shirabe/src/util/http/curl_response.rs b/crates/shirabe/src/util/http/curl_response.rs index 9f330b6..cc3d21b 100644 --- a/crates/shirabe/src/util/http/curl_response.rs +++ b/crates/shirabe/src/util/http/curl_response.rs @@ -13,16 +13,14 @@ pub struct CurlResponse { impl CurlResponse { pub fn new( - request: IndexMap<String, PhpMixed>, + url: String, code: Option<i64>, headers: Vec<String>, body: Option<String>, curl_info: IndexMap<String, PhpMixed>, - ) -> anyhow::Result<Result<Self, shirabe_php_shim::LogicException>> { - match Response::new(request, code, headers, body)? { - Ok(inner) => Ok(Ok(Self { inner, curl_info })), - Err(e) => Ok(Err(e)), - } + ) -> Self { + let inner = Response::new(url, code, headers, body); + Self { inner, curl_info } } pub fn get_curl_info(&self) -> &IndexMap<String, PhpMixed> { |
