search

Home  >  Q&A  >  body text

How to send image files and other data through http post in C++

Request method: post

Request content:

station_num 机器编号
station_pic 机器照片(图片文件)
station_time 照片拍摄的时间戳

I work in PHP, and I can only write local code in C. He won't send this request, saying there is a problem here, there is a problem there, so I have no choice but to ask and throw the code to him when the time comes. It breaks my heart

Please tell me how to write this code, please post the code

伊谢尔伦伊谢尔伦2759 days ago1129

reply all(3)I'll reply

  • 给我你的怀抱

    给我你的怀抱2017-05-31 10:41:33

    You can use the libcurl library for http processing. There are many specific usages online, and the information on the official website is also very detailed https://curl.haxx.se/libcurl/...

    reply
    0
  • 大家讲道理

    大家讲道理2017-05-31 10:41:33

    github

    Just choose the one you like.

    reply
    0
  • 淡淡烟草味

    淡淡烟草味2017-05-31 10:41:33

    It is recommended to use cURL, which is currently widely used and supports multiple protocols. Both http and https can be implemented more easily.
    Post the curl code address: https://github.com/curl/curl

    reply
    0
  • Cancelreply