Skip to content

Commit

Permalink
update doc global config order
Browse files Browse the repository at this point in the history
  • Loading branch information
fawdlstty committed May 14, 2022
1 parent 38aa797 commit 32fa849
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 28 deletions.
13 changes: 12 additions & 1 deletion docs/en_us/0_Startup.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,4 +64,15 @@ fv::Tasks::RunAsync (async_func);
fv::Tasks::RunAsync (async_func2, 5);
```
Now that we have created the asynchronous function environment, we can write asynchronous code in it.
## Global configuration Settings
```cpp
// Set SSL verification function (default no verification)
fv::Config::SslVerifyFunc = [] (bool preverified, fv::Ssl::verify_context &ctx) { return true; };
// Setting global TCP transmission without delay (Used in scenarios requiring high real-time performance)
fv::Config::NoDelay = true;
// Setting the global HTTP header (client)
fv::Request::SetDefaultHeader ("User-Agent", "libfv-0.0.1");
```
13 changes: 0 additions & 13 deletions docs/en_us/1_HttpClient.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,5 @@
# HTTP Client

## Global configuration Settings

```cpp
// Set SSL verification function (default no verification)
fv::Config::SslVerifyFunc = [] (bool preverified, fv::Ssl::verify_context &ctx) { return true; };

// Setting global TCP transmission without delay (Used in scenarios requiring high real-time performance)
fv::Config::NoDelay = true;

// Setting the global HTTP header (client)
fv::Request::SetDefaultHeader ("User-Agent", "libfv-0.0.1");
```
## Launch request

A total of six HTTP requests are supported. You can use `fv::Head``fv::Option``fv::Get``fv::Post``fv::Put``fv::Delete` methods.
Expand Down
13 changes: 12 additions & 1 deletion docs/zh_hans/0_Startup.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,4 +64,15 @@ fv::Tasks::RunAsync (async_func);
fv::Tasks::RunAsync (async_func2, 5);
```
现在我们已经创建好了异步函数环境,可以自由在里面编写异步代码啦!
## 全局配置设置
```cpp
// 设置SSL校验函数(默认不校验)
fv::Config::SslVerifyFunc = [] (bool preverified, fv::Ssl::verify_context &ctx) { return true; };
// 设置全局TCP不延迟发送(对实时性要求较高场合使用)
fv::Config::NoDelay = true;
// 设置全局 http 头
fv::Request::SetDefaultHeader ("User-Agent", "libfv-0.0.1");
```
13 changes: 0 additions & 13 deletions docs/zh_hans/1_HttpClient.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,5 @@
# HTTP 客户端

## 全局配置设置

```cpp
// 设置SSL校验函数(默认不校验)
fv::Config::SslVerifyFunc = [] (bool preverified, fv::Ssl::verify_context &ctx) { return true; };

// 设置全局TCP不延迟发送(对实时性要求较高场合使用)
fv::Config::NoDelay = true;

// 设置全局 http 头
fv::Request::SetDefaultHeader ("User-Agent", "libfv-0.0.1");
```
## 发起请求

共支持6种HTTP请求,可使用 `fv::Head``fv::Option``fv::Get``fv::Post``fv::Put``fv::Delete` 方法。
Expand Down

0 comments on commit 32fa849

Please sign in to comment.