i have function called javascript (browser):
stdmethodimp cactivexobject::writetorest(bstr data, bstr* retstr) { std::string sdata = converttostring(data); restclient restclient; restclient::response resp = restclient.post("somewhere.com", "/post", sdata); ccombstr bstrresult(resp.body.c_str()); *retstr = bstrresult.detach(); return s_ok; } this method called javascript this:
for (var = 0; < rowelems.length; i++) { var resp = activexobject.writetorest(_rowtodata(rowelems[i])); } the function works fine, unless call rest or server gets slow, , javascript (browser), i.e. internet explorer show "not responding" error box. browser shuts down. if remove "post" call , log data, there's no such error this.
sometimes writetorest called twice or 3 times.
what possible solution can make c++ code?
Comments
Post a Comment