diff --git a/bundle.json b/bundle.json index 69212b9b727d17f5fe25797a0c8e27cf9795ad3f..2f8c2d2f62cdba6ecfb2630eb7f77deaeacb402c 100644 --- a/bundle.json +++ b/bundle.json @@ -26,8 +26,9 @@ "ram": "~200KB", "deps": { "components": [ - "ylong_runtime", - "openssl" + "libc", + "openssl", + "ylong_runtime" ] }, "build": { diff --git a/ylong_http_client/BUILD.gn b/ylong_http_client/BUILD.gn index c61eadfeb58313999728e768ab863871127fd459..a42799f80c4474635ce8d84bad11775bc39eac45 100644 --- a/ylong_http_client/BUILD.gn +++ b/ylong_http_client/BUILD.gn @@ -31,11 +31,9 @@ ohos_rust_shared_library("ylong_http_client_inner") { ] sources = [ "src/lib.rs" ] - deps = [ - "../ylong_http:ylong_http", - "//third_party/rust/crates/libc:lib", - ] + deps = [ "../ylong_http:ylong_http" ] external_deps = [ + "libc:lib", "openssl:libcrypto_shared", "openssl:libssl_shared", "ylong_runtime:ylong_runtime", @@ -55,11 +53,9 @@ ohos_rust_unittest("rust_ylong_http_client_test_ut") { ] sources = [ "src/lib.rs" ] - deps = [ - "../ylong_http:ylong_http", - "//third_party/rust/crates/libc:lib", - ] + deps = [ "../ylong_http:ylong_http" ] external_deps = [ + "libc:lib", "openssl:libcrypto_shared", "openssl:libssl_shared", "ylong_runtime:ylong_runtime", diff --git a/ylong_http_client/src/async_impl/interceptor/mod.rs b/ylong_http_client/src/async_impl/interceptor/mod.rs index 27edf37f7450361a36072fb975339510ba3e6d7f..87964e9ac3229273189df9f01387657416574b22 100644 --- a/ylong_http_client/src/async_impl/interceptor/mod.rs +++ b/ylong_http_client/src/async_impl/interceptor/mod.rs @@ -23,7 +23,7 @@ use crate::HttpClientError; pub(crate) type Interceptors = dyn Interceptor + Sync + Send + 'static; /// Transport layer protocol type. -#[derive(Clone)] +#[derive(Clone, Debug)] pub enum ConnProtocol { /// Tcp protocol. Tcp, @@ -32,7 +32,7 @@ pub enum ConnProtocol { } /// Tcp connection information. -#[derive(Clone)] +#[derive(Clone, Debug)] pub struct ConnDetail { /// Transport layer protocol type. pub(crate) protocol: ConnProtocol, @@ -102,7 +102,7 @@ pub trait Interceptor { } /// Intercepts the response that is eventually returned. - fn intercept_response(&self, _request: &Response) -> Result<(), HttpClientError> { + fn intercept_response(&self, _response: &Response) -> Result<(), HttpClientError> { Ok(()) }