diff --git a/README.md b/README.md index 318b40b75b81a8a8e48561bb4dd95524724dd418..50c5c57bdcfe8501c88ae54fb0bd5ae1bb15ee00 100644 --- a/README.md +++ b/README.md @@ -5,18 +5,18 @@ `ylong_http` has built a complete HTTP capability, supporting users to use HTTP capability to meet the needs of communication scenarios. -`ylong_http` provides HTTP protocol support to the network subsystem in the -`OpenHarmony` system service layer, and through the network subsystem, helps -upper layer applications recommend HTTP communication capabilities. - `ylong_http` is written in the Rust language to support OpenHarmony's Rust capability. -**Structure**: +### The position of ylong_http in OpenHarmony + +`ylong_http` provides HTTP protocol support to the `netstack` module in the +`OpenHarmony` system service layer, and through the `netstack` module, helps +upper layer applications build HTTP communication capabilities. ![structure](./figures/structure.png) -**Inner Structure**: +### The internal structure of ylong_http ![inner_structure](./figures/inner_structure.png) @@ -49,7 +49,7 @@ Abilities supported by the current `ylong_http` crate: ## Build -`GN` is supported. User should add dependencies in `deps` of `BUILD.GN` to build this crate. +`GN` is supported. User should add dependencies in `deps` of `BUILD.gn` to build this crate. ```gn deps += ["//example_path/ylong_http_client:ylong_http_client"] diff --git a/README_zh.md b/README_zh.md index ea1350863c48a7384ec2a9efd419469fbf4d79c4..ece1ab861157e58ab2103436327b662fd640d978 100644 --- a/README_zh.md +++ b/README_zh.md @@ -4,16 +4,16 @@ ylong_http 协议栈构建了完整的 HTTP 能力,支持用户使用 HTTP 能力完成通信场景的需求。 -ylong_http 向 OpenHarmony 系统服务层中的网络子系统提供 HTTP 协议支持,经由网络子系统帮助上层应用建议 HTTP 通信能力。 - ylong_http 协议栈主体使用 Rust 语言编写,为 OpenHarmony 的 Rust 能力构筑提供支持。 -**架构图**: +### ylong_http 在 OpenHarmony 中的位置 + +ylong_http 向 OpenHarmony 系统服务层中的网络协议栈模块提供 HTTP 协议支持,经由网络协议栈模块帮助上层应用建立 HTTP 通信能力。 -![structure](./figures/structure.png) +![structure](./figures/structure_zh.png) -**内部架构图**: -![inner_structure](./figures/inner_structure.png) +### ylong_http 的内部架构: +![inner_structure](./figures/inner_structure_zh.png) ### ylong_http_client 库 @@ -42,7 +42,7 @@ ylong_http 库提供了 HTTP 协议的各种基础组件,例如序列化组件 ## 编译构建 -若使用 GN 编译工具链, 在 ```BUILD.GN``` 的 ```deps``` 段下添加依赖。添加后使用 GN 进行编译和构建: +若使用 GN 编译工具链, 在 ```BUILD.gn``` 的 ```deps``` 段下添加依赖。添加后使用 GN 进行编译和构建: ```gn deps += ["//example_path/ylong_http_client:ylong_http_client"] diff --git a/docs/user_guide.md b/docs/user_guide.md index 252d4277670455b2f6ce0f0eefb183b0e030c2c1..a81ac6b755033ab32b289da9a48b3222c6645d9e 100644 --- a/docs/user_guide.md +++ b/docs/user_guide.md @@ -19,7 +19,7 @@ ylong_http 整体分为 2 个库: 在使用 ylong_http_client 的功能之前,请保证在 `BUILD.gn` 或 `Cargo.toml` 中已成功添加依赖并开启对应 feature。 -### v1.0.0 +当前支持的功能: - 支持异步 HTTP 客户端创建 - 支持 HTTP/1.1 @@ -59,7 +59,7 @@ async fn create_client_with_builder() { 当前版本提供的 Client 的配置选项: - `connect_timeout`: 设置连接超时时间 -- `request_timeout`: 设置连接超时时间 +- `request_timeout`: 设置请求超时时间 - `redirect`: 设置重定向逻辑 - `proxy`: 设置代理逻辑 - `tls_built_in_root_certs`: 是否使用预置证书 diff --git a/figures/inner_structure.png b/figures/inner_structure.png index d5ad865c248eaec4c05af625b14e0522bcd4a840..d70db04218492e0a96cf9b8206a2d461dc5de923 100644 Binary files a/figures/inner_structure.png and b/figures/inner_structure.png differ diff --git a/figures/inner_structure_zh.png b/figures/inner_structure_zh.png new file mode 100644 index 0000000000000000000000000000000000000000..1a8af7d98fbce1e8ed00a7679452c79ec4e5a738 Binary files /dev/null and b/figures/inner_structure_zh.png differ diff --git a/figures/structure.png b/figures/structure.png index e4ed6e20a20644a38b54e27f0850552d70b4dfb7..54499185631bbfd27e816128d5bffc6d8fdea4aa 100644 Binary files a/figures/structure.png and b/figures/structure.png differ diff --git a/figures/structure_zh.png b/figures/structure_zh.png new file mode 100644 index 0000000000000000000000000000000000000000..fa9a1fd3513d9ca807e350e0af8b28b1890fdbb6 Binary files /dev/null and b/figures/structure_zh.png differ