Page 1 of 1

how http_get works?

Posted: 28.10.2012 5:06
by -k-
i try to use, but i dont understand, hehe =]

Re: how http_get works?

Posted: 28.10.2012 10:00
by Vizit0r
http_get ==> filled "HTTP_Header" + "HTTP_Body"

Re: how http_get works?

Posted: 28.10.2012 14:46
by -k-
i try this:

Code: Select all

Program http;
var
header,body:string;
Begin 
HTTP_Get('www.google.com');
header:=HTTP_Header;
body:=HTTP_Body;
addtosystemjournal(header);
addtosystemjournal(body);
end.
but nothing return, i scripting correct?

Re: how http_get works?

Posted: 28.10.2012 21:41
by Vizit0r
1) NOT www.google.com BUT http://www.google.com
2) you need to get file, not site.

Re: how http_get works?

Posted: 28.10.2012 23:43
by -k-
thanks, now i understand hehe =]]]]]]

Re: how http_get works?

Posted: 25.11.2012 2:48
by Lonny
How dou you make it work?
I tried to make a post, and receive a response from the server but the HTTP_BODY was empty...
same thing with http_get....

in the server, i created a simple php page with echo "something"
and in pascal, i used like -k- described but changed to http://myurl/file.php

Re: how http_get works?

Posted: 25.11.2012 5:00
by Lonny
I did make it work with get, but sometimes the HTTP_Body receives the header value...

Code: Select all

HTTP_Get(post);
header:=HTTP_Header;
body:=HTTP_Body;
addtosystemjournal('Body: ' + body + ' - Header: ' + header);

Code: Select all

Body: HTTP/1.0 200 OK - Header: <htm><head></head><body>OK</body></html>
i did something wrong?

Re: how http_get works?

Posted: 25.11.2012 8:49
by Vizit0r
OK and OK, whats wrong?

Re: how http_get works?

Posted: 26.11.2012 3:10
by Lonny
I thought it was the opposite...
anyway, works fine for me...

thanks...