Skip to content
FutureBlitz

    Install

    Import std.net.http.client

    Http

    std.net.http.client

    struct

    Public Struct Http

    One request each, through a client of its own, with HttpClient's settings as they start.

    Examples

    Local page = Try Http.GetText("https://example.com/")
    Print(page)

    std/net/http/client.fb, line 598

    • Public Static Method Get(url: String): HttpResponse Throws NetError, TimeoutError static method #

      Sends a GET to url, through a client of its own, and gives the response.

    • Public Static Method GetText(url: String): String Throws NetError, TimeoutError static method #

      The text of url's response. Throws a NetError of HTTP_STATUS when its status isn't success.

    • Public Static Method GetBytes(url: String): UInt8[] Throws NetError, TimeoutError static method #

      The bytes of url's response. Throws a NetError of HTTP_STATUS when its status isn't success.

    • Public Static Method Head(url: String): HttpResponse Throws NetError, TimeoutError static method #

      Sends a HEAD to url, through a client of its own, and gives the response.

    • Public Static Method Post(url: String, body: Body): HttpResponse Throws NetError, TimeoutError static method #

      Sends a POST of body to url, through a client of its own, and gives the response.

    • Public Static Method Put(url: String, body: Body): HttpResponse Throws NetError, TimeoutError static method #

      Sends a PUT of body to url, through a client of its own, and gives the response.

    • Public Static Method Patch(url: String, body: Body): HttpResponse Throws NetError, TimeoutError static method #

      Sends a PATCH of body to url, through a client of its own, and gives the response.

    • Public Static Method Delete(url: String): HttpResponse Throws NetError, TimeoutError static method #

      Sends a DELETE to url, through a client of its own, and gives the response.

    • Public Static Method Download(url: String, progress: Func(Int64, Int64)? = Null): UInt8[] Throws NetError, TimeoutError static method #

      url's body, as HttpClient's Download gives it.

    • Public Static Method Download(url: String, path: Path, progress: Func(Int64, Int64)? = Null) Throws NetError, TimeoutError, IOError static method #

      Writes url's body to the file at path, as HttpClient's Download does.

    • Public Static Async Method GetAsync(url: String): HttpResponse Throws NetError, TimeoutError static method #

      What Get does, without blocking its thread: a call gives its Task.

    • Public Static Async Method GetTextAsync(url: String): String Throws NetError, TimeoutError static method #

      What GetText does, without blocking its thread: a call gives its Task.

    • Public Static Async Method GetBytesAsync(url: String): UInt8[] Throws NetError, TimeoutError static method #

      What GetBytes does, without blocking its thread: a call gives its Task.

    • Public Static Async Method PostAsync(url: String, body: Body): HttpResponse Throws NetError, TimeoutError static method #

      What Post does, without blocking its thread: a call gives its Task.

    • Public Static Async Method DownloadAsync(url: String, progress: Func(Int64, Int64)? = Null): UInt8[] Throws NetError, TimeoutError static method #

      What Download does, without blocking its thread: a call gives its Task.

    • Public Static Async Method DownloadAsync(url: String, path: Path, progress: Func(Int64, Int64)? = Null) Throws NetError, TimeoutError, IOError static method #

      What Download does, without blocking its thread: a call gives its Task.

    Report an issue with this page or with FutureBlitz on GitHub.