Noir
  • πŸšΆβ€β™‚οΈIntro
  • πŸ“Tutorials
    • πŸŽ“Starting Noir
    • πŸ“–Libraries
    • πŸ–₯️Services
    • ❔Libraries VS Services
    • πŸ’¬Callbacks
    • πŸ’₯Classes
    • πŸ”ŽDebugging
  • πŸ“šExamples
  • β˜„οΈAPI Reference
    • Bootstrapper
    • Built-Ins
      • Classes
        • AITarget
        • Body
        • Command
        • Connection
        • Event
        • HTTPRequest
        • HTTPResponse
        • Library
        • Message
        • Object
        • Player
        • Service
        • Task
        • TickIterationProcess
        • Tracker
        • Vehicle
        • Widgets
          • MapLabelWidget
          • MapLineWidget
          • MapObjectWidget
          • PopupWidget
          • ScreenPopupWidget
          • Widget
      • Libraries
        • Base64
        • Dataclasses
        • Deprecation
        • Events
        • HTTP
        • JSON
        • Logging
        • Matrix
        • Number
        • String
        • Table
      • Services
        • CommandService
        • GameSettingsService
        • HTTPService
        • MessageService
        • NotificationService
        • ObjectService
        • PlayerService
        • TaskService
        • TPSService
        • UIService
        • VehicleService
    • Callbacks
    • Class
    • Classes
    • Debugging
    • Definition
    • Libraries
    • Noir
    • Services
    • TypeChecking
Powered by GitBook
On this page
  • Parameters
  • Returns
  • Parameters
  • Returns
  • Parameters
  • Returns
  • Returns
Edit on GitHub
  1. API Reference
  2. Built-Ins
  3. Services

HTTPService

Noir.Services.HTTPService: NoirService

A service for sending HTTP requests.

Requests are localhost only due to Stormworks limitations.


Noir.Services.HTTPService:_FindRequest(URL, port)

Get earliest request for a URL and port.

Used internally.

Parameters

  • URL: string

  • port: integer

Returns

  • NoirHTTPRequest|nil,: integer|nil


Noir.Services.HTTPService:IsPortValid(port)

Returns if a port is within the valid port range.

Parameters

  • port: integer

Returns

  • boolean


Noir.Services.HTTPService:GET(URL, port, callback)

Send a GET request.

All requests are localhost only. This is a Stormworks limitation.

Parameters

  • URL: string

  • port: integer

  • callback: fun(response: - NoirHTTPResponse)|nil

Returns

  • NoirHTTPRequest


Noir.Services.HTTPService:GetActiveRequests()

Returns all active requests.

Returns

  • table<integer, NoirHTTPRequest>

PreviousGameSettingsServiceNextMessageService

Last updated 2 months ago

β˜„οΈ