Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
VC 4.2 Http Post Requests
Message
Information générale
Forum:
Visual C++
Catégorie:
Autre
Divers
Thread ID:
00046811
Message ID:
00046961
Vues:
28
>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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform