使用 Google 的 C++ Native Client 的 HTTP POST 请求 [英] HTTP POST request with Google's C++ Native Client

查看:36
本文介绍了使用 Google 的 C++ Native Client 的 HTTP POST 请求的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何使用 Google 的 C++ Native Client 执行 HTTP POST 请求?

解决方案

这个问题很久以前就有人问过了,但以防万一其他人也想知道同样的事情:

您可以使用 pp::URLRequst>Info::SetMethod

您可以使用 pp::URLRequestInfo 向帖子添加数据::AppendDataToBodyToppendInfo::URLA> 或 pp::URLRequestInfo::AppendFileToBody>

在此处查看使用 URLLoader 类的示例:https://developers.google.com/native-client/devguide/coding/URLLoading

How would one perform a HTTP POST request with Google's C++ Native Client?

解决方案

This question was asked a long time ago, but just in case anyone else is wondering the same thing:

You can use pp::URLRequstInfo::SetMethod to do a POST request.

And you can add data to the post using pp::URLRequestInfo::AppendDataToBody, pp::URLRequestInfo::AppendFileRangeToBody or pp::URLRequestInfo::AppendFileToBody.

See an example of using URLLoader class here: https://developers.google.com/native-client/devguide/coding/URLLoading

这篇关于使用 Google 的 C++ Native Client 的 HTTP POST 请求的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆