diff options
| author | Ellison <ellisonleao@gmail.com> | 2026-05-05 17:26:59 -0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-05-05 16:26:59 -0400 |
| commit | b1ebf45a6d251fc81446fa21d9b2bf25bcc87c5e (patch) | |
| tree | fa9eb7bd543e5002dca743cefb7b97767edb10ff /runtime/lua/vim/net.lua | |
| parent | 97ef9f74b251bc4236823f31ae8c21a280d6a138 (diff) | |
| download | rneovim-b1ebf45a6d251fc81446fa21d9b2bf25bcc87c5e.tar.gz rneovim-b1ebf45a6d251fc81446fa21d9b2bf25bcc87c5e.tar.bz2 rneovim-b1ebf45a6d251fc81446fa21d9b2bf25bcc87c5e.zip | |
fix(vim.net): unreliable integration tests #39594
Diffstat (limited to 'runtime/lua/vim/net.lua')
| -rw-r--r-- | runtime/lua/vim/net.lua | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/runtime/lua/vim/net.lua b/runtime/lua/vim/net.lua index 6e09619615..ff3a1558f1 100644 --- a/runtime/lua/vim/net.lua +++ b/runtime/lua/vim/net.lua @@ -10,7 +10,7 @@ local http_methods = { } ---@alias vim.net.request.ResponseFunc fun(err: string?, response: vim.net.request.Response?) ----@alias vim.net.HttpMethod string "GET" | "POST" | "PUT" | "PACH" | "HEAD"| "DELETE +---@alias vim.net.HttpMethod string "GET" | "POST" | "PUT" | "PATCH" | "HEAD" | "DELETE" ---@class vim.net.request.Opts ---@inlinedoc @@ -98,8 +98,8 @@ function M.request(method, url, opts, on_response) opts = opts or {} vim.validate('method', method, function(m) - return http_methods[m] == true, ('invalid HTTP method: %s'):format(m) - end) + return http_methods[m] == true + end, 'method should be one of GET, POST, PUT, PATCH, HEAD, DELETE') vim.validate('url', url, 'string') vim.validate('opts', opts, 'table', true) vim.validate('opts.headers', opts.headers, 'table', true) |