From 26af587ac1aeb4af8f9e60242901dc7d20000915 Mon Sep 17 00:00:00 2001 From: JeremyStarTM Date: Sun, 24 Mar 2024 21:57:43 +0100 Subject: [PATCH] Update documentation for edl module --- docs/docs/reference/edl.md | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/docs/docs/reference/edl.md b/docs/docs/reference/edl.md index 8da47e0..6261c6a 100644 --- a/docs/docs/reference/edl.md +++ b/docs/docs/reference/edl.md @@ -7,7 +7,10 @@ Pulls files from the internet, awaitable and batchable. ## Functions ### *Dictionary* awaited_request(*String* url, *HTTPClient.Method* method = *HTTPClient.Method.METHOD_GET*, *PackedStringArray* headers = *PackedStringArray([])*, *String* data = *""*) -Requests a file from the internet, awaitable. +:::note[Awaiting required] +Using the `await` keyword is required for this function. +::: +Requests a file from the internet. The returned `Dictionary` has the following structure (example): ```gdscript @@ -21,13 +24,19 @@ The returned `Dictionary` has the following structure (example): ------------------------------------------------------------------------------------ Equal to @GlobalScope.Error. If not 0/Error.OK = the request failed ``` ### *Variant* oneline_awaited_request(*String* url, *bool* return_utf8 = *true*, *bool* ignore_http_code = *false* *HTTPClient.Method* method = *HTTPClient.Method.METHOD_GET*, *PackedStringArray* headers = *PackedStringArray([])*, *String* data = *""*) +:::note[Awaiting required] +Using the `await` keyword is required for this function. +::: Returns a file from the internet without returning the godot code, http code or headers. Useful for oneliners. Returns `null` on error. To ignore HTTP errors (ie. non-200 statuses) set `ignore_http_code` to `true`. Returns a UTF-8 string with `return_utf8` turned on, returns bytes when turned off. ### *Array[Dictionary]* batch_awaited_request(*PackedStringArray* urls, *HTTPClient.Method* method = *HTTPClient.Method.METHOD_GET*, *PackedStringArray* headers = *PackedStringArray([])*, *String* data = *""*) -Requests multiple file from the internet, awaitable. +:::note[Awaiting required] +Using the `await` keyword is required for this function. +::: +Requests multiple file from the internet. The returned `Dictionary`s have the following structure (example): ```gdscript