HTTPRequest

    A node with the ability to send HTTP(S) requests.

    HTTPRequest.swift:35
    class HTTPRequest

    A node with the ability to send HTTP requests. Uses HTTPClient internally.

    Can be used to make HTTP requests, i.e. download or upload files or web content via HTTP.

    Example of contacting a REST API and printing one of its returned fields:

    Example of loading and displaying an image using HTTPRequest:

    Gzipped response bodies: HTTPRequest will automatically handle decompression of response bodies. A Accept-Encoding header will be automatically added to each of your requests, unless one is already specified. Any response with a Content-Encoding: gzip header will automatically be decompressed and delivered to you as uncompressed bytes.

    This object emits the following signals:

    Superclasses

    Citizens in SwiftGodot

    Conformances

    • protocol CustomStringConvertible

      A type with a customized textual representation.

    • protocol Equatable

      A type that can be compared for value equality.

    • protocol Hashable

      A type that can be hashed into a Hasher to produce an integer hash value.

    • protocol Identifiable<ID>

      A class of types whose instances hold the value of an entity with stable identity.

    • protocol VariantRepresentable

      Types that conform to VariantRepresentable can be stored directly in Variant with no conversion. These include all of the Variant types from Godot (for example GString, Rect, Plane), Godot objects (those that subclass SwiftGodot.Object) as well as the built-in Swift types UInt8, Int64 and Double.

    • protocol VariantStorable

      Types that conform to VariantStorable can be stored in a Variant and can be extracted back out of a Variant.

    Types

    Type members

    Instance members