如何使用 Google 的 C++ Native Client 执行 HTTP POST 请求?
这个问题很久以前就被问过,但以防万一其他人也想知道同样的事情:
您可以使用pp::URLRequestInfo::SetMethod https://developers.google.com/native-client/peppercpp/classpp_1_1_u_r_l_request_info.html#abf4024d196a5139dbca2e95b9ab9bdb6执行 POST 请求。
您可以使用以下命令将数据添加到帖子中pp::URLRequestInfo::AppendDataToBody https://developers.google.com/native-client/peppercpp/classpp_1_1_u_r_l_request_info.html#ab16f2efba1f2ddc434e2fc860dcbe90, pp::URLRequestInfo::AppendFileRangeToBody https://developers.google.com/native-client/peppercpp/classpp_1_1_u_r_l_request_info.html#af19afd7e5849e68497f1e4f4b7400995 or pp::URLRequestInfo::AppendFileToBody https://developers.google.com/native-client/peppercpp/classpp_1_1_u_r_l_request_info.html#a1ae72c8ac65a6cd6c174c8df238038fd.
请参阅此处使用 URLLoader 类的示例:https://developers.google.com/native-client/devguide/coding/URLLoading https://developers.google.com/native-client/devguide/coding/URLLoading
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)