-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
1.增加 h5推出的sse客户端,用于处理服务端持续推送的数据. bug修复: 1.程序默认请求超时时间为0秒时,重置为30秒,导致场景存在局限性,本次修正为与标注库保持一致,timeout为0秒时用不超时.
- Loading branch information
1 parent
add2b71
commit 79c35a1
Showing
5 changed files
with
109 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,6 +15,7 @@ | |
> 11.增加简体中文与utf-8编码互转函数,不管是发送还是接受都随意对字符进行编码转换. | ||
> 12.增加 `XML` 格式数据提交,方便对接java类语言开发的 `webservice` 接口. | ||
> 13.创建 `httpClient` 对象时使用 `sync.pool` 临时对象池,使客户端的创建更加高效,服务器资源占用更低,满足开发者频繁创建客户端采集数据. | ||
> 14.增加 `sse` 客户端, 用于支持、处理 `h5` 推出的 `sse` 数据推送技术 . | ||
### 安装 goCurl 包 | ||
```code | ||
|
@@ -46,7 +47,7 @@ go get github.com/qifengzhang007/[email protected] | |
BaseURI string | ||
FormParams map[string]interface{} | ||
JSON interface{} | ||
Timeout float32 // 超时时间,单位:秒 | ||
Timeout float32 // 超时时间,单位:秒, 如果不设置或者设置为 0 表示程序一直等待不自动中断 | ||
Cookies interface{} | ||
Proxy string | ||
// 如果请求的站点响应头 Header["Content-Type"] 中没有明确的 charset=utf-8 、charset=gb2312 等 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters