From b1ebf45a6d251fc81446fa21d9b2bf25bcc87c5e Mon Sep 17 00:00:00 2001 From: Ellison Date: Tue, 5 May 2026 17:26:59 -0300 Subject: fix(vim.net): unreliable integration tests #39594 --- runtime/lua/vim/net.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'runtime/lua/vim/net.lua') 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) -- cgit