Garry's Mod Wiki


  boolean HTTP( table parameters )


Launches an asynchronous http request with the given parameters.

This cannot send or receive multiple headers with the same name.

Issue Tracker: 2232
HTTP-requests that respond with a large body may return an unsuccessful error. Try using the Range header to download the file in chunks.
HTTP-requests to destinations on private networks (such as, or won't work.
To enable HTTP-requests to destinations on private networks use Command Line Parameters -allowlocalhttp. (Dedicated servers only)


1 table parameters
The request parameters. See HTTPRequest structure.


1 boolean
true if we made a request, nil if we failed.


HTTP( { failed = function( reason ) print( "HTTP request failed", reason ) end, success = function( code, body, headers ) print( "HTTP request succeeded", code, body, headers ) end, method = "GET", url = "" } )