Login  
Search All Forums
Dart Home | PowerTCP Web for ActiveX | Custom Development Reply | PowerTCP Web for ActiveX Topics | Forums   
AuthorForum: PowerTCP Web for ActiveX
Topic: HTTP post not working...
User185

Posts: 5
Member Since: 04/04/01
posted March 16, 2002 8:24 AM

Hi, here is an example of some code i'm using to post data to a website... unfortunately, the data doesn't seem to be getting posted, could you tell me what is wrong with the code?

CString Data = "";
CString URL = "https://www.24store.com.au/merchant/offline/index.pl";
// Initialise Variants...
Data = "test=blahblahblah";
ovData.ChangeType(VT_BSTR);
ovData.bstrVal = _bstr_t(Data);
ovResult.ChangeType(VT_BSTR);
ovResult = _bstr_t("");
ovEmpty.ChangeType(VT_EMPTY);
//ovData.bstrVal;
pComms->SetTimeout(0); // No timeout...
pComms->SetUrl(URL);
pComms->Post(ovData,ovEmpty,ovResult,ovEmpty,_bstr_t(""),_bstr_t(""));

unfortunately, the variable "test" doesn't make it to the web server.... is there something wrong with the code?
Thanks.
N/A posted March 18, 2002 10:26 AM


Hi,
The code below should work with our post sample site. Does it?
When you change the Url, does it work?
Thanks,
-ken

  COleVariant ovData, ovEmpty, ovResult;
  
  CString URL = "http://www.dart.com/PostSample.asp";
  pHttp->Url = _bstr_t(URL);
  
  CString Data = "test=blahblahblah";
  ovData = Data;

  ovResult.ChangeType(VT_BSTR);
  ovResult = "";

  ovEmpty.ChangeType(VT_EMPTY);

  pHttp->Post(ovData, ovEmpty, ovResult, ovEmpty, "", "");

K M Drake
Dart Tech Support
Reply | PowerTCP Web for ActiveX Topics | Forums   
This site is powered by PowerTCP WebServer Tool PowerTCP WebServer for ActiveX