HTTP Response Issue - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: HTTP Response Issue (
/showthread.php?tid=255666)
HTTP Response Issue -
Norn - 16.05.2011
I'm trying to load data using HTTP but it's not working, it doesn't even print outside of any if statements:
pawn Код:
HTTP(0, HTTP_GET, "urlremoved", "", "serverResponse");
pawn Код:
public serverResponse(index, response_code, data[])
{
printf("%d", response_code);
new buffer[500][10028];
if(response_code == 200)
{
split(data, buffer, '\n');
printf("The URL replied: %s", buffer[0]);
}
else
{
printf("The request failed! The response code was: %d", response_code);
}
}