Do not call from the main thread! Starts a Synchronous HTTP POST request. Call this static method to make a synchronous HTTP POST request through the browser from a thread that you have started. *IMPORTANT*: This must *never* be called on the main thread! void FBTestPluginAPI::getURL(const std::string& url, const FB::JSObjectPtr& callback) { FB::HttpStreamResponsePtr resp = FB::SimpleStreamHelper::SynchronousPost(m_host, FB::URI::fromString(url)); if (resp->success) { std::string dstr(reinterpret_cast<const char*>(resp->data.get()), size); } else { // The request failed } } }
Definition at line 137 of file SimpleStreamHelper.cpp. References FB::BrowserStreamRequest::setBufferSize(), FB::BrowserStreamRequest::setCacheable(), and SynchronousRequest(). 00139 { 00140 FB::BrowserStreamRequest req(uri, "POST"); 00141 req.setCacheable(cache); 00142 req.setBufferSize(bufferSize); 00143 req.setPostData(postdata); 00144 return SynchronousRequest(host, req); 00145 }
Here is the call graph for this function:
![]() |
Generated on 24 May 2013 for FireBreath by
1.6.1
Labels

