qt network 收集

qt network 收集

参考:
qt 练习 题目 例子: netfleet 多线程下载 记录
https://blog.csdn.net/wowocpp/article/details/113247877

QNetworkAccessManager、QNetworkRequest和 QNetworkReply

下载模拟
http://mp3.s7s2.com/jfnfdg/1200.mp3
http://tp.st10086.com/music/17.mp3
http://clubpic.vodone.com/attachments/2010/11/149372892_201011121328245556.png
http://hiphotos.baidu.com/1180833151708/pic/item/5a1a1a8b3c6adaada4c27296.jpg

https://mirrors.tuna.tsinghua.edu.cn/qt/archive/qt/5.9/5.9.9/submodules/qtbase-opensource-src-5.9.9.zip
https://mirrors.tuna.tsinghua.edu.cn/qt/archive/qt/5.9/5.9.9/submodules/qtdatavis3d-opensource-src-5.9.9.tar.xz
https://mirrors.tuna.tsinghua.edu.cn/qt/archive/qt/5.15/5.15.2/single/qt-everywhere-src-5.15.2.zip
https://www.sqlite.org/src/tarball/sqlite.tar.gz?r=release

在这里插入图片描述
https://busybox.net/downloads/busybox-1.20.2.tar.bz2
https://busybox.net/downloads/binaries/1.21.1/busybox-binaries.tar.bz2

http://slproweb.com/download/Win64OpenSSL_Light-1_1_1j.exe

1

HTTP测试服务器接受GET / POST请求

http://httpbin.org/

它回显您的请求中用于以下任何类型的数据:

http://httpbin.org/ip返回原始IP。

http://httpbin.org/user-agent返回用户代理。

http://httpbin.org/headers返回标头字典。

http://httpbin.org/get返回GET数据。

http://httpbin.org/post返回POST数据。

http://httpbin.org/put返回PUT数据。

http://httpbin.org/delete返回DELETE数据

http://httpbin.org/gzip返回gzip编码的数据。

http://httpbin.org/status/:code返回给定的HTTP状态代码。

http://httpbin.org/response-headers?key=val返回给定的响应头。

http://httpbin.org/redirect/:n 302重定向n次。

http://httpbin.org/relative-redirect/:n 302相对重定向n次。

http://httpbin.org/cookies返回cookie数据。

http://httpbin.org/cookies/set/:name/:value设置一个简单的cookie。

http://httpbin.org/basic-auth/:user/:passwd挑战HTTP基本认证。

http://httpbin.org/hidden-basic-auth/:user/:passwd 404的BasicAuth。

http://httpbin.org/digest-auth/:qop/:user/:passwd挑战HTTP摘要验证。

http://httpbin.org/stream/:n流n-100行。

http://httpbin.org/delay/:n延迟响应n-10秒。

2

有http://ptsv2.com/
“在这里,您将找到一个服务器,该服务器接收您希望提供的任何POST并存储内容供您查看。
http://requestb.in与已经提到的工具相似,并且具有非常好的UI。

RequestBin为您提供了一个URL,该URL将收集对其发出的请求,并让您以人性化的方式检查它们。使用RequestBin查看HTTP客户端正在发送的内容或检查和调试Webhook请求。

尽管它已于2018年3月21日停产。

由于滥用行为的持续存在,我们很难使该网站可靠地保持正常运行,因此我们已停止了RequestBin的公共托管版本。请参阅说明为建立自己的自托管的实例。

在这里插入图片描述

在这里插入图片描述

在这里插入图片描述
https://doc.qt.io/qt-5/qnetworkaccessmanager.html

遇到问题

F:\qt_work\qt5_code_plus_jack\http_download_example\downloadA>downloadmanager.exe   https://mirrors.tuna.tsinghua.edu.cn/qt/archive/qt/5.9/5.9.9/submodules/qtdatavis3d-opensource-src-5.9.9.tar.xz http
s://mirrors.tuna.tsinghua.edu.cn/qt/archive/qt/5.15/5.15.2/single/qt-everywhere-src-5.15.2.zip
Downloading https://mirrors.tuna.tsinghua.edu.cn/qt/archive/qt/5.9/5.9.9/submodules/qtdatavis3d-opensource-src-5.9.9.tar.xz...
qt.network.ssl: QSslSocket::connectToHostEncrypted: TLS initialization failed
[###    ]      0.0 bytes/sec
Failed: TLS initialization failed
Downloading https://mirrors.tuna.tsinghua.edu.cn/qt/archive/qt/5.15/5.15.2/sinqgtl.en/eqttw-oervke.rsyswlh:e rQeS-sslrSco-c5k.e1t5:.:2c.ozninpe.c.t.T
oHostEncrypted: TLS initialization failed

3

https://httpbin.org/get?show_env=1
在这里插入图片描述
http://slproweb.com/products/Win32OpenSSL.html

注意根据自己需要的是32位还是64位选择对应的包。
我下载的是Win32OpenSSL_Light-1_1_1d.exe
安装好之后将libcrypto-1_1.dll 和libssl-1_1.dll两个文件拷贝到
D:\Qt\Qt5.12.7\Tools\mingw730_32\bin文件夹下即可
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

downloadmanager.exe https://busybox.net/downloads/busybox-1.20.2.tar.bz2  https://busybox.net/downloads/binaries/1.21.1/busybox-binaries.tar.bz2

在这里插入图片描述

打包

C:\Qt\Qt5.13.0\Tools\mingw730_64\bin
C:\Qt\Qt5.13.0\5.13.0\mingw73_64\bin
库 复制过去

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值