-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
1,678 additions
and
232 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
import "@site/src/languages/highlight"; | ||
|
||
# HttpClient | ||
|
||
**Description:** | ||
|
||
  Represents an HTTP client. | ||
|
||
## downloadAsync | ||
|
||
**Type:** Function. | ||
|
||
**Description:** | ||
|
||
  Downloads a file asynchronously from the specified URL and saves it to the specified path. Should be run in a coroutine. | ||
|
||
**Signature:** | ||
```tl | ||
downloadAsync: function(self: HttpClient, url: string, fullPath: string, progress: function(current: integer, total: integer)): boolean | ||
``` | ||
|
||
**Parameters:** | ||
|
||
| Parameter | Type | Description | | ||
| --- | --- | --- | | ||
| url | string | The URL of the file to download. | | ||
| fullPath | string | The full path where the downloaded file should be saved. | | ||
| progress | string | [optional] A callback function that is called periodically to report the download progress. The function receives two parameters: current (the number of bytes downloaded so far) and total (the total number of bytes to be downloaded). | | ||
|
||
**Returns:** | ||
|
||
| Return Type | Description | | ||
| --- | --- | | ||
| boolean | A boolean value indicating whether the download was done successfully. | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.