In order for this site to work correctly we need to store a small file (called a cookie) on your computer. Most every site in the world does this, however since the 25th of May 2011, by law we have to get your permission first. Please abandon the forum if you disagree.

Para que este foro funcione correctamente es necesario guardar un pequeño fichero (llamado cookie) en su ordenador. La mayoría de los sitios de Internet lo hacen, no obstante desde el 25 de Marzo de 2011 y por ley, necesitamos de su permiso con antelación. Abandone este foro si no está conforme.

PostRequest method

Xailer English public forum
sax
Mensajes: 1
Registrado: Mié Dic 30, 2009 9:58 am

PostRequest method

Mensaje por sax »

Hello,
In the following sample code the handle hData is always equal to 0.
How to make a post call with the TInternet class?
LOCAL hData
LOCAL cData:= Space(65536)
WITH OBJECT TInternet():New( Self )
IF :Open()
IF
!Empty(hData:=:PostRequest("http://localhost:8085/prova.php","p1=1&p2=2"))
IF :ReadFile( hData, @cData, 65536 )
::oMemo1:Value := cData
ENDIF
:CloseRequest( hData )
ENDIF
:Close()
ENDIF
END
Best Regards,
saX
Responder