CURL 打印 POST请求信息

由于项目需要给服务端发送请求信息,但那边总是格式不多,让服务端打印我的格式信息,总感觉挺麻烦的,后来自己查了资料,打印出来。参考官网:https://curl.haxx.se/libcurl/c/CURLOPT_DEBUGFUNCTION.html

比如我想发送的请求信息包含如下属性:

 

POST /recognition HTTP/1.1
Host: www.xxx.xxx:8888
Accept: 
Content-Length: 461499
Content-Type: multipart/form-data; boundary=------------------------4d2354a84eb624c4

--------------------------4d2354a84eb624c4
Content-Disposition: form-data; name="width"

640
--------------------------4d2354a84eb624c4
Content-Disposition: form-data; name="height"

480
--------------------------4d2354a84eb624c4
Content-Disposition: form-data; name="type"

SEND_TYPE
--------------------------4d2354a84eb624c4
Content-Disposition: form-data; name="data"; filename="test"
Content-Type: application/octet-stream

 

你可能感兴趣的:(C++,SQLite)