Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
VC 4.2 Http Post Requests
Message
General information
Forum:
Visual C++
Category:
Other
Miscellaneous
Thread ID:
00046811
Message ID:
00046961
Views:
23
>Hello all. I am trying to perform an HTTP post transaction with a web page thru VC and am unable to succeed. I was wondering if anyone could see a fault in what I am doing or have any example code for this type of request. My session and connection seem to be working. I don't know if I am passing the correct parameters to the OpenRequest function. With this following code excerpt, I access the correct page and get the correct error for not finding the zipcode data. My guess is that either my OpenRequest is wrong, or my SendRequest is wrong. Any ideas would be much appreciated.
>
> cPage="getzip.html";
> wwwFile=wwwConnection->OpenRequest(
> CHttpConnection::HTTP_VERB_POST,cPage);
>
> LPSTR cData="zip=50309";
>
> if (wwwFile->SendRequest(NULL,0,cData,sizeof(cData)))
>
>TIA,
>
>Garritt
>
>
>******************************************************************
>Garritt Grandberg, Programmer/Analyst
>Visionary Systems, Ltd
>Des Moines, IA
>
>E-Mail: Garritt@visionary.com http://www.visionary.com
>******************************************************************


My problem has been fixed. I was using the sizeof function instead of the strlen function. Silly me :)

Thank you.

Garritt
Previous
Reply
Map
View

Click here to load this message in the networking platform