是否可以使用 npapi 插件获取 post 请求的 postdata。我们可以使用插件轻松访问 url、cookie 等,但是发布数据呢!
FB::DOM::WindowPtr window = m_host->getDOMWindow();
referrer="";
title ="";postdata ="";
cookie = "";userAgent = "";
if (!window)
return;
if (window->getJSObject()->HasProperty("document"))
cookie = window->getNode("document")->getProperty<std::string>("cookie");
if (window->getJSObject()->HasProperty("document"))
referrer = window->getNode("document")->getProperty<std::string>("referrer");
if (window->getJSObject()->HasProperty("document"))
title = window->getNode("document")->getProperty<std::string>("title");
if (window->getJSObject()->HasProperty("navigator"))
userAgent = window->getNode("navigator")->getProperty<std::string>("userAgent");