Http将请求发送到https

时间:2018-12-07 13:41:33

标签: c++ http

我目前有一个正在运行的应用程序,该应用程序通过发布命令将数据发送到服务器。现在,服务器已移动并更改为https *,并且不再收到消息。

要熟练使用https,需要做什么?

    boost::asio::ip::tcp::iostream stream;
stream.connect("website.com", "http");
stream << "POST /test/newdata.php HTTP/1.1\r\n";
stream << "Host: website.com\r\n";
stream << "Accept: */*\r\n";
stream << "Content-Type: application/x-www-form-urlencoded; charset=utf-8\r\n";
stream << "Content-Length: " << size << "\r\n";
stream << "Connection: close\r\n\r\n";

0 个答案:

没有答案