Import std.net.http.client
Http
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
-
Sends a GET to
url, through a client of its own, and gives the response. -
The text of
url's response. Throws a NetError of HTTP_STATUS when its status isn't success. -
The bytes of
url's response. Throws a NetError of HTTP_STATUS when its status isn't success. -
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, TimeoutErrorstatic method #Sends a POST of
bodytourl, through a client of its own, and gives the response. -
Public Static Method Put(url: String, body: Body): HttpResponse Throws NetError, TimeoutErrorstatic method #Sends a PUT of
bodytourl, through a client of its own, and gives the response. -
Public Static Method Patch(url: String, body: Body): HttpResponse Throws NetError, TimeoutErrorstatic method #Sends a PATCH of
bodytourl, through a client of its own, and gives the response. -
Public Static Method Delete(url: String): HttpResponse Throws NetError, TimeoutErrorstatic 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, TimeoutErrorstatic 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, IOErrorstatic method #Writes
url's body to the file atpath, as HttpClient's Download does. -
Public Static Async Method GetAsync(url: String): HttpResponse Throws NetError, TimeoutErrorstatic method #What Get does, without blocking its thread: a call gives its Task.
-
Public Static Async Method GetTextAsync(url: String): String Throws NetError, TimeoutErrorstatic method #What GetText does, without blocking its thread: a call gives its Task.
-
Public Static Async Method GetBytesAsync(url: String): UInt8[] Throws NetError, TimeoutErrorstatic 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, TimeoutErrorstatic 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, TimeoutErrorstatic 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, IOErrorstatic method #What Download does, without blocking its thread: a call gives its Task.
Report an issue with this page or with FutureBlitz on GitHub.