http.Get not work

http.Get(“”,"", GetCallBack)

function GetCallBack(contents, size)

so message print out on server console

is it Http.Get borken long time?


If you’re talking about the nothing gets printed then yeah there’s a limit on how much you can print at once. At least that’s what I’ve found out. Try writing the content to a file if this is the problem or cut the text out with patterns.


oh lol you need to print the string “contents”

like so:

http.Get(“”,"", GetCallBack)

function GetCallBack(contents, size)


actually I don’t knwo what you want

i add file.Write(“dddd.txt”, contents) nothing happen

I suggest you putting the funtion before the http.Get

GetCallBack is nil before you do function GetCallBack() blah blah blah end. The function GetCallBack() … end line basically does:
GetCallBack = function() … end

Or in other words GetCallBack is a variable that is equal to that function.

Just move the http.Get line beneath the function.

i change to
http.Get(“”,"", function (contents, size)
file.Write(“dddd.txt”, “777”)

not working

You broke rule number 1 of the “Unwritten rules of the Facepunch Lua Help section”.

Never ever say it’s not working WITHOUT posting some kind of error message or explaining the problem.

sorry for that

there are file create after use http.get

Works for me.

The function is threaded as far as I can tell and only runs the callback function once it’s finished.

This means that the game needs to be running and active ( running Tick / Think ) to do anything.

Single player: Close the console after running it or the script
Listen Server: Should work as normal
Dedicated Server: I think you need a player on the server for it to work.