docs: small fixes (#35791)

Close #34938
Close #35030
Close #35233
Close #35259
Close #35290
Close #35433
Close #35541
Close #35766
Close #35792

Co-authored-by: huylg <45591413+huylg@users.noreply.github.com>
Co-authored-by: Jason Del Ponte <961963+jasdel@users.noreply.github.com>
Co-authored-by: sooriya <74165167+thuvasooriya@users.noreply.github.com>
Co-authored-by: Andrew Braxton <andrewcbraxton@gmail.com>
Co-authored-by: Enric Calabuig <enric.calabuig@gmail.com>
Co-authored-by: Augusto César Dias <augusto.c.dias@gmail.com>
Co-authored-by: David Sierra DiazGranados <davidsierradz@gmail.com>
Co-authored-by: Stepan Nikitin <90522882+vectravox@users.noreply.github.com>
Co-authored-by: Emilien Breton <bricktech2000@gmail.com>
This commit is contained in:
zeertzjq
2025-09-16 11:41:36 +08:00
committed by GitHub
parent e7ff132708
commit ff777f9a85
27 changed files with 40 additions and 43 deletions

View File

@@ -4,7 +4,7 @@ local M = {}
---
--- This function operates in one mode:
--- - Asynchronous (non-blocking): Returns immediately and passes the response object to the
--- provided `on_response` handler on completetion.
--- provided `on_response` handler on completion.
---
--- @param url string The URL for the request.
--- @param opts? table Optional parameters:
@@ -12,7 +12,7 @@ local M = {}
--- - `retry` (integer|nil): Number of retries on transient failures (default: 3).
--- - `outpath` (string|nil): File path to save the response body to. If set, the `body` value in the Response Object will be `true` instead of the response body.
--- @param on_response fun(err?: string, response?: { body: string|boolean }) Callback invoked on request
--- completetion. The `body` field in the response object contains the raw response data (text or binary).
--- completion. The `body` field in the response object contains the raw response data (text or binary).
--- Called with (err, nil) on failure, or (nil, { body = string|boolean }) on success.
function M.request(url, opts, on_response)
vim.validate({