Home
last modified time | relevance | path

Searched refs:HttpClientError (Results 1 – 25 of 76) sorted by relevance

1234

/ohos5.0/commonlibrary/rust/ylong_http/ylong_http_client/src/
H A Derror.rs31 pub struct HttpClientError { struct
36 impl HttpClientError { implementation
136 impl HttpClientError { implementation
180 impl Debug for HttpClientError { implementation
189 impl Display for HttpClientError { implementation
197 impl error::Error for HttpClientError { implementation
339 use crate::{ErrorKind, HttpClientError};
426 let error = HttpClientError::from_io_error( in ut_client_err_io_error()
442 let error = HttpClientError::from_io_error( in ut_client_err_debug_fmt()
451 let error = HttpClientError::user_aborted(); in ut_client_err_debug_fmt()
[all …]
/ohos5.0/commonlibrary/rust/ylong_http/ylong_http_client/src/util/config/tls/verifier/
H A Dopenssl.rs19 use crate::{ErrorKind, HttpClientError};
42 pub fn version(&self) -> Result<usize, HttpClientError> { in version() argument
46 .map_err(|e| HttpClientError::from_error(ErrorKind::Connect, e))?; in version()
62 pub fn cert_name(&self) -> Result<String, HttpClientError> { in cert_name() argument
66 .map_err(|e| HttpClientError::from_error(ErrorKind::Connect, e))?; in cert_name()
69 .map_err(|e| HttpClientError::from_error(ErrorKind::Connect, e))?; in cert_name()
89 pub fn issuer(&self) -> Result<String, HttpClientError> { in issuer() argument
93 .map_err(|e| HttpClientError::from_error(ErrorKind::Connect, e))?; in issuer()
96 .map_err(|e| HttpClientError::from_error(ErrorKind::Connect, e))?; in issuer()
124 .map_err(|e| HttpClientError::from_error(ErrorKind::Connect, e))?; in cmp_pem_cert()
[all …]
/ohos5.0/commonlibrary/rust/ylong_http/ylong_http_client/src/async_impl/interceptor/
H A Dmod.rs21 use crate::HttpClientError;
91 fn intercept_connection(&self, _info: ConnDetail) -> Result<(), HttpClientError> { in intercept_connection() argument
96 fn intercept_input(&self, _bytes: &[u8]) -> Result<(), HttpClientError> { in intercept_input() argument
101 fn intercept_output(&self, _bytes: &[u8]) -> Result<(), HttpClientError> { in intercept_output() argument
106 fn intercept_request(&self, _request: &Request) -> Result<(), HttpClientError> { in intercept_request() argument
111 fn intercept_response(&self, _response: &Response) -> Result<(), HttpClientError> { in intercept_response() argument
116 fn intercept_retry(&self, _error: &HttpClientError) -> Result<(), HttpClientError> { in intercept_retry() argument
121 fn intercept_redirect_request(&self, _request: &Request) -> Result<(), HttpClientError> { in intercept_redirect_request() argument
129 ) -> Result<(), HttpClientError> { in intercept_redirect_response() argument
/ohos5.0/commonlibrary/rust/ylong_http/ylong_http_client/src/sync_impl/
H A Dconnector.rs84 use crate::{ErrorKind, HttpClientError};
88 type Error = HttpClientError;
117 HttpClientError::from_error(ErrorKind::Connect, e) in connect()
122 .map_err(|e| HttpClientError::from_error(ErrorKind::Connect, e))?; in connect()
151 ) -> Result<TcpStream, HttpClientError> { in tunnel() argument
168 .map_err(|e| HttpClientError::from_error(ErrorKind::Connect, e))?; in tunnel()
176 .map_err(|e| HttpClientError::from_error(ErrorKind::Connect, e))?; in tunnel()
179 return Err(HttpClientError::from_str( in tunnel()
192 return Err(HttpClientError::from_str( in tunnel()
198 return Err(HttpClientError::from_str( in tunnel()
[all …]
H A Dhttp_body.rs20 use crate::error::{ErrorKind, HttpClientError};
96 type Error = HttpClientError;
113 HttpClientError::from_str(ErrorKind::BodyDecode, "Get trailer failed") in trailer()
121 fn data(&mut self, buf: &mut [u8]) -> Result<usize, HttpClientError> { in data() argument
159 return Err(HttpClientError::from_str( in data()
171 return Err(HttpClientError::from_str( in data()
206 fn data(&mut self, buf: &mut [u8]) -> Result<usize, HttpClientError> { in data() argument
240 return Err(HttpClientError::from_str( in data()
263 fn merge_chunks(&mut self, buf: &mut [u8]) -> Result<(usize, bool), HttpClientError> { in merge_chunks() argument
282 .map_err(|e| HttpClientError::from_error(ErrorKind::BodyDecode, e))?; in merge_chunks()
[all …]
H A Dreader.rs19 use crate::error::HttpClientError;
115 pub fn read_all<B: Body>(&mut self, body: &mut B) -> Result<(), HttpClientError> { in read_all() argument
126 .map_err(|e| HttpClientError::from_error(ErrorKind::BodyDecode, e))?; in read_all()
131 .map_err(|e| HttpClientError::from_error(ErrorKind::BodyDecode, e))?; in read_all()
137 .map_err(|e| HttpClientError::from_error(ErrorKind::BodyDecode, e))?; in read_all()
145 .map_err(|e| HttpClientError::from_error(ErrorKind::BodyDecode, e))?; in read_all()
H A Dclient.rs17 use crate::error::HttpClientError;
109 ) -> Result<Response<HttpBody>, HttpClientError> { in request() argument
117 ) -> Result<Response<HttpBody>, HttpClientError> { in retry_send_request() argument
131 ) -> Result<Response<HttpBody>, HttpClientError> { in send_request_retryable() argument
140 ) -> Result<Response<HttpBody>, HttpClientError> { in redirect_request() argument
163 ) -> Result<Response<HttpBody>, HttpClientError> { in send_request_with_uri() argument
311 pub fn build(self) -> Result<Client<HttpConnector>, HttpClientError> { in build() argument
/ohos5.0/foundation/communication/netstack/interfaces/innerkits/rust/ylong_http_client/src/reqwest_impl/async_impl/downloader/
H A Doperator.rs16 use crate::HttpClientError;
67 ) -> Poll<Result<usize, HttpClientError>>; in poll_download() argument
77 ) -> Poll<Result<(), HttpClientError>> { in poll_progress() argument
113 ) -> Poll<Result<usize, HttpClientError>> { in poll_download() argument
122 ) -> Poll<Result<(), HttpClientError>> { in poll_progress() argument
137 type Output = Result<usize, HttpClientError>;
156 type Output = Result<(), HttpClientError>;
172 ) -> Poll<Result<usize, HttpClientError>> { in poll_download() argument
182 ) -> Poll<Result<(), HttpClientError>> { in poll_progress() argument
H A Dmod.rs25 use crate::{ErrorKind, HttpClientError, SpeedLimit, Timeout};
168 pub async fn download(&mut self) -> Result<(), HttpClientError> { in download() argument
178 async fn limited_download(&mut self) -> Result<(), HttpClientError> { in limited_download() argument
190 return Err(HttpClientError::new_with_cause( in limited_download()
207 fn check_timeout(&mut self) -> Result<(), HttpClientError> { in check_timeout() argument
211 return Err(HttpClientError::new(ErrorKind::Timeout)); in check_timeout()
217 async fn show_progress(&mut self) -> Result<(), HttpClientError> { in show_progress() argument
/ohos5.0/foundation/communication/netstack/interfaces/innerkits/rust/ylong_http_client/src/reqwest_impl/
H A Dconfig.rs16 use crate::{ErrorKind, HttpClientError};
240 .map_err(|e| HttpClientError::new_with_cause(ErrorKind::Build, Some(e))), in http()
257 .map_err(|e| HttpClientError::new_with_cause(ErrorKind::Build, Some(e))), in https()
274 .map_err(|e| HttpClientError::new_with_cause(ErrorKind::Build, Some(e))), in all()
294 pub struct ProxyBuilder(Result<reqwest::Proxy, HttpClientError>);
324 pub fn build(self) -> Result<Proxy, HttpClientError> { in build() argument
361 pub fn from_pem(pem: &[u8]) -> Result<Certificate, HttpClientError> { in from_pem() argument
367 HttpClientError::new_with_cause(ErrorKind::Build, Some(InvalidCertificate)) in from_pem()
383 .map_err(|e| HttpClientError::new_with_cause(ErrorKind::Build, Some(e)))?; in from_pem()
389 return Err(HttpClientError::new_with_cause( in from_pem()
H A Drequest.rs18 use crate::{ErrorKind, HttpClientError};
66 inner: Result<RequestInner, HttpClientError>,
114 .map_err(|e| HttpClientError::new_with_cause(ErrorKind::Build, Some(e)))?; in url()
133 .map_err(|e| HttpClientError::new_with_cause(ErrorKind::Build, Some(e)))?, in header()
136 .map_err(|e| HttpClientError::new_with_cause(ErrorKind::Build, Some(e)))?, in header()
174 pub fn body<T: Into<reqwest::Body>>(self, body: T) -> Result<Request<T>, HttpClientError> { in body() argument
199 pub fn multipart<T>(self, body: T) -> Result<Request<T>, HttpClientError> in multipart()
209 .map_err(|e| HttpClientError::new_with_cause(ErrorKind::Build, Some(e)))?, in multipart()
216 .map_err(|e| HttpClientError::new_with_cause(ErrorKind::Build, Some(e)))?, in multipart()
H A Derror.rs20 pub struct HttpClientError { struct
25 impl HttpClientError { impl
87 impl From<reqwest::Error> for HttpClientError { implementation
106 impl Debug for HttpClientError { implementation
115 impl Display for HttpClientError { implementation
/ohos5.0/commonlibrary/rust/ylong_http/ylong_http_client/src/async_impl/downloader/
H A Doperator.rs18 use crate::error::HttpClientError;
31 ) -> Poll<Result<usize, HttpClientError>>; in poll_download() argument
42 ) -> Poll<Result<(), HttpClientError>> { in poll_progress() argument
84 ) -> Poll<Result<usize, HttpClientError>> { in poll_download() argument
93 ) -> Poll<Result<(), HttpClientError>> { in poll_progress() argument
107 type Output = Result<usize, HttpClientError>;
125 type Output = Result<(), HttpClientError>;
141 ) -> Poll<Result<usize, HttpClientError>> { in poll_download() argument
154 ) -> Poll<Result<(), HttpClientError>> { in poll_progress() argument
/ohos5.0/foundation/communication/netstack/test/unittest/http_client/
H A DHttpClientErrorTest.cpp44 HttpClientError req;
52 HttpClientError req;
61 HttpClientError req;
69 HttpClientError req;
78 HttpClientError req;
87 HttpClientError req;
/ohos5.0/commonlibrary/rust/ylong_http/ylong_http_client/src/async_impl/connector/
H A Dmod.rs29 use crate::{HttpClientError, Timeout};
38 type Future: Future<Output = Result<Self::Stream, HttpClientError>>
84 async fn tcp_stream(eyeballs: HappyEyeballs) -> Result<TcpStream, HttpClientError> { in tcp_stream() argument
99 HttpClientError::from_io_error(crate::ErrorKind::Connect, e) in tcp_stream()
111 ) -> Result<TcpStream, HttpClientError> { in eyeballs_connect() argument
114 HttpClientError::from_dns_error( in eyeballs_connect()
137 use crate::HttpClientError;
193 use crate::{HttpClientError, TlsConfig};
289 ) -> Result<HttpStream<MixStream<TcpStream>>, HttpClientError> { in https_connect() argument
312 HttpClientError::from_tls_error( in https_connect()
[all …]
/ohos5.0/commonlibrary/rust/ylong_http/ylong_http_client/src/sync_impl/conn/
H A Dhttp1.rs21 use crate::error::{ErrorKind, HttpClientError};
31 ) -> Result<Response<HttpBody>, HttpClientError> in request()
47 .map_err(|e| HttpClientError::from_error(ErrorKind::Request, e))?; in request()
59 .map_err(|e| HttpClientError::from_error(ErrorKind::BodyTransfer, e))?; in request()
70 .map_err(|e| HttpClientError::from_error(ErrorKind::Request, e))?; in request()
78 .map_err(|e| HttpClientError::from_error(ErrorKind::Request, e))?; in request()
88 .map_err(|e| HttpClientError::from_error(ErrorKind::Request, e))?; in request()
/ohos5.0/foundation/communication/netstack/interfaces/innerkits/rust/ylong_http_client/src/reqwest_impl/async_impl/uploader/
H A Doperator.rs16 use crate::HttpClientError;
60 ) -> Poll<Result<(), HttpClientError>> { in poll_progress() argument
86 ) -> Poll<Result<(), HttpClientError>> { in poll_progress() argument
102 type Output = Result<(), HttpClientError>;
119 ) -> Poll<Result<(), HttpClientError>> { in poll_progress() argument
/ohos5.0/commonlibrary/rust/ylong_http/ylong_http_client/src/async_impl/uploader/
H A Doperator.rs18 use crate::error::HttpClientError;
58 ) -> Poll<Result<(), HttpClientError>> { in poll_progress() argument
84 ) -> Poll<Result<(), HttpClientError>> { in poll_progress() argument
100 type Output = Result<(), HttpClientError>;
117 ) -> Poll<Result<(), HttpClientError>> { in poll_progress() argument
/ohos5.0/commonlibrary/rust/ylong_http/ylong_http_client/src/async_impl/
H A Dtimeout.rs20 use crate::error::HttpClientError;
39 T: Future<Output = Result<Response, HttpClientError>> + Unpin,
41 type Output = Result<Response, HttpClientError>;
74 use crate::HttpClientError;
103 Result::<crate::async_impl::Response, HttpClientError>::Err( in ut_timeout_future()
104 HttpClientError::user_aborted(), in ut_timeout_future()
H A Dresponse.rs20 use crate::error::HttpClientError;
34 pub async fn data(&mut self, buf: &mut [u8]) -> Result<usize, HttpClientError> { in data() argument
39 pub async fn text(mut self) -> Result<String, HttpClientError> { in text() argument
50 String::from_utf8(vec).map_err(|e| HttpClientError::from_error(ErrorKind::BodyDecode, e)) in text()
/ohos5.0/foundation/communication/netstack/interfaces/innerkits/rust/ylong_http_client/src/reqwest_impl/async_impl/
H A Dmod.rs16 use crate::{Certificate, HttpClientError, Proxy, Redirect, Request, Timeout, TlsVersion};
105 ) -> Result<Response, HttpClientError> { in request() argument
113 .map_err(HttpClientError::from) in request()
365 pub fn build(self) -> Result<Client, HttpClientError> { in build() argument
366 self.0.build().map(Client).map_err(HttpClientError::from) in build()
/ohos5.0/foundation/communication/netstack/frameworks/native/http/http_client/
H A Dhttp_client_error.cpp64 const std::string &HttpClientError::GetErrorMessage() const in GetErrorMessage()
74 void HttpClientError::SetErrorCode(HttpErrorCode code) in SetErrorCode()
79 HttpErrorCode HttpClientError::GetErrorCode() const in GetErrorCode()
84 void HttpClientError::SetCURLResult(CURLcode result) in SetCURLResult()
/ohos5.0/commonlibrary/rust/ylong_http/ylong_http_client/src/util/c_openssl/
H A Dadapter.rs18 use crate::error::{ErrorKind, HttpClientError};
395 pub fn build(mut self) -> Result<TlsConfig, HttpClientError> { in build() argument
416 .map_err(|e| HttpClientError::from_error(ErrorKind::Build, e))?; in build()
596 pub fn from_pem(pem: &[u8]) -> Result<Self, HttpClientError> { in from_pem() argument
598 HttpClientError::from_error(ErrorKind::Build, e) in from_pem()
613 pub fn from_der(der: &[u8]) -> Result<Self, HttpClientError> { in from_der() argument
615 HttpClientError::from_error(ErrorKind::Build, e) in from_der()
622 .map_err(|e| HttpClientError::from_error(ErrorKind::Build, e))? in stack_from_pem()
656 pub fn from_pem(pem: &[u8]) -> Result<Self, HttpClientError> { in from_pem() argument
658 .map_err(|e| HttpClientError::from_error(ErrorKind::Build, e))? in from_pem()
[all …]
/ohos5.0/commonlibrary/rust/ylong_http/ylong_http_client/src/util/
H A Dredirect.rs20 use crate::error::{ErrorKind, HttpClientError};
45 ) -> Result<Trigger, HttpClientError> { in redirect() argument
68 .ok_or(HttpClientError::from_str( in redirect()
124 fn trigger(&self, info: &RedirectInfo) -> Result<Trigger, HttpClientError> { in trigger() argument
128 .ok_or(HttpClientError::from_str( in trigger()
/ohos5.0/commonlibrary/rust/ylong_http/ylong_http_client/examples/
H A Dsync_http.rs19 use ylong_http_client::{HttpClientError, Request};
21 fn main() -> Result<(), HttpClientError> { in main()
28 .map_err(HttpClientError::other)?; in main()

1234