Hi, I'm developing a little application that uses the httpclient class from gb.net.curl component. In this case I used the Post method but I'm not been able to find documentation about it on gambasdoc.org. So, considering that I solved my problem, I would share my little portion of code hoping that it will be useful for someone else.
DIM str AS String DIM t AS HttpClient t.Async = FALSE t.URL = "http://www.example.dot/something.php" t.Timeout = 60 str = "Hello" t.Post("application/x-www-form-urlencoded", "s=" & str) IF t.Status < 0 THEN Message("error") ELSE IF Lof(t) THEN READ #t, buffer, Lof(t) Message(buffer) ENDIF The only problem I faced is about str encoding. I solved this problem using Replace function (with a String array manually populated) but I don't know if there's a better way. Any tips? Regards, Matteo ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ Gambas-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/gambas-user
