Home
last modified time | relevance | path

Searched refs:uri (Results 1 - 25 of 27) sorted by relevance

12

/commonlibrary/ets_utils/js_api_module/uri/test/
H A Dtest_napi.cpp38 OHOS::Uri::Uri uri("http://username:password@www.baidu.com:99/path/path?query#fagment"); in HWTEST_F()
39 ASSERT_STREQ(uri.GetScheme().c_str(), "http"); in HWTEST_F()
40 ASSERT_STREQ(uri.GetAuthority().c_str(), "username:password@www.baidu.com:99"); in HWTEST_F()
41 ASSERT_STREQ(uri.GetSsp().c_str(), "//username:password@www.baidu.com:99/path/path?query"); in HWTEST_F()
42 ASSERT_STREQ(uri.GetUserinfo().c_str(), "username:password"); in HWTEST_F()
43 ASSERT_STREQ(uri.GetHost().c_str(), "www.baidu.com"); in HWTEST_F()
44 ASSERT_STREQ(uri.GetPort().c_str(), "99"); in HWTEST_F()
45 ASSERT_STREQ(uri.GetPath().c_str(), "/path/path"); in HWTEST_F()
46 ASSERT_STREQ(uri.GetQuery().c_str(), "query"); in HWTEST_F()
47 ASSERT_STREQ(uri in HWTEST_F()
[all...]
/commonlibrary/rust/ylong_http/ylong_http_client/src/util/
H A Dproxy.rs20 use ylong_http::request::uri::{Authority, Scheme, Uri};
37 pub(crate) fn match_proxy(&self, uri: &Uri) -> Option<&Proxy> {
38 self.list.iter().find(|proxy| proxy.is_intercepted(uri))
47 /// - Manage the uri of destination address.
64 pub(crate) fn http(uri: &str) -> Result<Self, HttpClientError> {
65 Ok(Proxy::new(Intercept::Http(ProxyInfo::new(uri)?)))
68 pub(crate) fn https(uri: &str) -> Result<Self, HttpClientError> {
69 Ok(Proxy::new(Intercept::Https(ProxyInfo::new(uri)?)))
72 pub(crate) fn all(uri: &str) -> Result<Self, HttpClientError> {
73 Ok(Proxy::new(Intercept::All(ProxyInfo::new(uri)
156 let mut uri = match Uri::try_from(uri) { global() variables
[all...]
H A Dnormalizer.rs15 use ylong_http::request::uri::{Scheme, Uri};
39 // TODO Formatting the uri in the request doesn't seem necessary.
43 let host_value = format_host_value(self.part.uri())?;
65 pub(crate) fn format(&self, uri: &mut Uri) -> Result<(), HttpClientError> {
66 let host = match uri.host() {
77 if let Some(req_scheme) = uri.scheme() {
83 if let Some(req_port) = uri.port().and_then(|port| port.as_u16().ok()) {
96 match uri.path() {
103 if let Some(query) = uri.query() {
107 *uri
229 let mut uri = UriBuilder::new() ut_uri_format() variables
240 let mut uri = Uri::from_bytes(b"http://example.com").unwrap(); ut_uri_format() variables
[all...]
H A Dpool.rs21 use ylong_http::request::uri::{Authority, Scheme};
59 use ylong_http::request::uri::Uri;
71 let uri = Uri::from_bytes(b"http://example1.com:80/foo?a=1").unwrap(); in ut_pool_get()
73 uri.scheme().unwrap().clone(), in ut_pool_get()
74 uri.authority().unwrap().clone(), in ut_pool_get()
H A Dalt_svc.rs20 use ylong_http::request::uri::{Host, Port};
100 let uri = request.ref_mut().uri();
101 let Some(scheme) = uri.scheme() else {
104 let Some(authority) = uri.authority() else {
107 let Some(host) = uri.host() else {
H A Dredirect.rs15 use ylong_http::request::uri::Uri;
62 info.previous.push(request.uri().clone());
77 let origin = request.uri();
/commonlibrary/rust/ylong_http/ylong_http/src/request/
H A Dmod.rs42 //! assert_eq!(request.uri().to_string(), "www.example.com");
56 pub mod uri; modules
61 use uri::Uri;
107 pub fn get<T>(uri: T) -> RequestBuilder in get()
112 RequestBuilder::new().method(Method::GET).url(uri) in get()
125 pub fn head<T>(uri: T) -> RequestBuilder in head()
130 RequestBuilder::new().method(Method::HEAD).url(uri) in head()
143 pub fn post<T>(uri: T) -> RequestBuilder in post()
148 RequestBuilder::new().method(Method::POST).url(uri) in post()
160 pub fn put<T>(uri
296 pub fn uri(&self) -> &Uri { uri() functions
[all...]
/commonlibrary/rust/ylong_http/ylong_http_client/src/async_impl/
H A Dpool.rs18 use ylong_http::request::uri::Authority;
20 use ylong_http::request::uri::Scheme;
21 use ylong_http::request::uri::Uri;
62 pub(crate) async fn connect_to(&self, uri: &Uri) -> Result<Conn<C::Stream>, HttpClientError> {
64 uri.scheme().unwrap().clone(),
65 uri.authority().unwrap().clone(),
76 uri,
H A Dclient.rs16 use ylong_http::request::uri::Uri;
191 let conn = self.connect_to(request.ref_mut().uri()).await?;
195 async fn connect_to(&self, uri: &Uri) -> Result<Conn<C::Stream>, HttpClientError> {
197 match timeout(dur, self.inner.connect_to(uri)).await {
203 self.inner.connect_to(uri).await
/commonlibrary/rust/ylong_http/ylong_http_client/src/sync_impl/
H A Dpool.rs19 use ylong_http::request::uri::Uri;
39 pub(crate) fn connect_to(&self, uri: Uri) -> Result<Conn<C::Stream>, HttpClientError> {
41 uri.scheme().unwrap().clone(),
42 uri.authority().unwrap().clone(),
47 .conn(|| self.connector.clone().connect(&uri))
H A Dclient.rs14 use ylong_http::request::uri::Uri;
132 let response = self.send_request_with_uri(request.uri().clone(), request)?; in send_request_retryable()
152 response = self.send_request_with_uri(request.uri().clone(), request)?; in redirect_request()
161 uri: Uri, in send_request_with_uri()
164 conn::request(self.inner.connect_to(uri)?, request) in send_request_with_uri()
509 use ylong_http::request::uri::Uri;
H A Dconnector.rs16 use ylong_http::request::uri::Uri;
29 fn connect(&self, uri: &Uri) -> Result<Self::Stream, Self::Error>; in connect()
57 use ylong_http::request::uri::Uri;
65 fn connect(&self, uri: &Uri) -> Result<Self::Stream, Self::Error> { in connect()
66 let addr = if let Some(proxy) = self.config.proxies.match_proxy(uri) { in connect()
67 proxy.via_proxy(uri).authority().unwrap().to_string() in connect()
69 uri.authority().unwrap().to_string() in connect()
81 use ylong_http::request::uri::{Scheme, Uri};
90 fn connect(&self, uri: &Uri) -> Result<Self::Stream, Self::Error> { in connect()
91 // Make sure all parts of uri i in connect()
[all...]
/commonlibrary/rust/ylong_http/ylong_http_client/src/util/config/
H A Dconnector.rs35 use ylong_http::request::uri::Uri;
47 let uri = Uri::from_bytes(b"http://127.0.0.1").unwrap(); in ut_connector_config_default()
48 assert!(config.proxies.match_proxy(&uri).is_none()) in ut_connector_config_default()
H A Dsettings.rs320 /// - replace origin uri by proxy uri to link proxy server.
322 /// - set no proxy which can keep origin uri not to be replaced by proxy uri.
415 /// Pass HTTPS to the proxy URL, but the https uri which is in the no proxy
469 use ylong_http::request::uri::Uri;
600 let uri = Uri::from_bytes(b"http://127.0.0.1:3456").unwrap(); in ut_proxy_clone()
601 assert!(!proxy.inner().is_intercepted(&uri)); in ut_proxy_clone()
602 assert!(!proxy_clone.inner().is_intercepted(&uri)); in ut_proxy_clone()
613 let uri in ut_proxy_https()
[all...]
/commonlibrary/rust/ylong_http/ylong_http/src/request/uri/
H A Dmod.rs19 //! [`URI`]: https://httpwg.org/specs/rfc9110.html#uri.references
29 // Maximum uri length.
34 /// The complete structure of the uri is as follows:
43 /// is forbidden. Fragment information in query is not stored in uri.
51 /// [`URI`]: https://httpwg.org/specs/rfc9110.html#uri.references
52 /// [RFC9110, Section 4.2]: https://httpwg.org/specs/rfc9110.html#uri.schemes
57 /// use ylong_http::request::uri::Uri;
59 /// let uri = Uri::builder()
67 /// assert_eq!(uri.scheme().unwrap().as_str(), "http");
68 /// assert_eq!(uri
[all...]
H A Dpercent_encoding.rs25 use crate::request::uri::{InvalidUri, Uri};
39 /// use ylong_http::request::uri::PercentEncoder;
347 use crate::request::uri::percent_encoding::PercentEncoder;
348 use crate::request::uri::{InvalidUri, Uri};
/commonlibrary/rust/ylong_http/ylong_http_client/src/async_impl/connector/
H A Dmod.rs24 use ylong_http::request::uri::Uri;
47 fn connect(&self, uri: &Uri, http_version: HttpVersion) -> Self::Future; in connect()
149 use ylong_http::request::uri::Uri;
163 fn connect(&self, uri: &Uri, _http_version: HttpVersion) -> Self::Future { in connect()
164 // Checks if this uri need be proxied. in connect()
166 let mut addr = uri.authority().unwrap().to_string(); in connect()
167 if let Some(proxy) = self.config.proxies.match_proxy(uri) { in connect()
168 addr = proxy.via_proxy(uri).authority().unwrap().to_string(); in connect()
204 use ylong_http::request::uri::{Scheme, Uri};
224 fn connect(&self, uri
[all...]
/commonlibrary/rust/ylong_http/ylong_http/src/h1/request/
H A Dencoder.rs68 use crate::request::uri::Uri;
140 // "UriSp" phase of encoding whitespace after uri.
189 uri_part: EncodeUri::new(part.uri, false), in new()
274 /// If you enable the flag, the uri part will be encoded as absolute form
275 /// in the headline. Otherwise the uri part will be encoded as origin form.
277 /// You should use this method before the uri part being encoded.
295 /// // After you create the request encoder, users can choose to set the uri form.
300 /// // If you disable the `is_absolute_uri` flag, the uri will be encoded as a origin form.
443 fn new(uri: Uri, is_absolute: bool) -> Self { in new()
445 let path = uri in new()
461 let mut uri = self.origin.as_slice(); encode() variables
[all...]
/commonlibrary/rust/ylong_http/ylong_http_client/src/util/c_openssl/verify/
H A Dpinning.rs17 use ylong_http::request::uri::Uri;
94 pub fn add(mut self, uri: &str, digest: &str) -> Self { in add()
96 let parsed = Uri::try_from(uri).map_err(|e| HttpClientError::from_error(Build, e))?; in add()
99 return err_from_msg!(Build, "uri has no host"); in add()
246 "HttpClientError { ErrorKind: Build, Cause: uri has no host }" in ut_pubkey_pins_builder_add()
/commonlibrary/rust/ylong_http/ylong_http_client/src/async_impl/conn/
H A Dhttp2.rs24 use ylong_http::request::uri::Scheme;
179 match request_part.uri.scheme() { in build_pseudo_headers()
188 .uri in build_pseudo_headers()
394 Uri: $uri:expr,
404 .url($uri)
H A Dhttp1.rs21 use ylong_http::request::uri::Scheme;
146 if conn.raw_mut().is_proxy() && request.uri().scheme() == Some(&Scheme::HTTP) {
/commonlibrary/rust/ylong_http/ylong_http/src/
H A Derror.rs33 use crate::request::uri::InvalidUri;
/commonlibrary/utils_lite/js/builtin/filekit/src/
H A Dnativeapi_fs.cpp52 int GetFullPath(const char* uri, char* fullPath, int len) in GetFullPath() argument
54 if (!IsValidPath(uri) || (fullPath == nullptr)) { in GetFullPath()
64 if (sprintf_s(fullPath, len, "%s%s", dataPath, uri + PREFIX_LEN) < 0) { in GetFullPath()
213 char* uri = JSI::GetStringProperty(args, FILE_URI); in ExecuteGetFileList() local
215 int ret = GetFullPath(uri, g_uriFullPath, sizeof(g_uriFullPath)); in ExecuteGetFileList()
216 JSI::ReleaseString(uri); in ExecuteGetFileList()
/commonlibrary/rust/ylong_http/ylong_http_client/src/
H A Dlib.rs31 pub use ylong_http::request::uri::{Scheme, Uri};
/commonlibrary/rust/ylong_http/ylong_http_client/tests/common/
H A Dmod.rs295 request.uri().to_string(),
358 request.uri().to_string(),
359 "Assert request uri failed",

Completed in 16 milliseconds

12