Skip to content

http

These functions allow HTTP control.

moonlight.http.post

Parameters

  • string url
  • string post_fields
  • opt. string header

Returns

  • number Response Code
  • string Response Body

Remarks

  • This function will pause the game until the request is complete.

moonlight.http.get

Parameters

  • string url
  • opt. string header

Returns

  • number Response Code
  • string Response Body

Remarks

  • This function will pause the game until the request is complete.

moonlight.http.download

Remarks

  • Mirrors moonlight.windows.download

moonlight.http.download_file

Remarks

  • Mirrors moonlight.windows.download_file

moonlight.http.connection

Parameters

  • string url
  • number port

Returns

  • number Connection ID

moonlight.http.send

Parameters

  • number connection_id
  • string data

Returns

  • boolean

moonlight.http.request

Parameters

  • number connection_id

Returns

  • string