Files
neovim/runtime/doc
Yochem van Rosmalen f29b3b5d45 feat(net): vim.net.request(outbuf) writes response to buffer #36164
Problem:
Non-trivial to write output of vim.net.request to buffer. Requires extra
code in plugin/net.lua which can't be reused by other plugin authors.

```
vim.net.request('https://neovim.io', {}, function(err, res)
  if not err then
    local buf = vim.api.nvim_create_buf(true, false)
    if res then
      local lines = vim.split(res.body, '\n', { plain = true })
      vim.api.nvim_buf_set_lines(buf, 0, -1, true, lines)
    end
  end
end)
```

Solution:
Accept an optional `outbuf` argument to indicate the buffer to write output
to, similar to `outpath`.

    vim.net.request('https://neovim.io', { outbuf = buf })

Other fixes / followups:
- Make plugin/net.lua smaller
- Return objection with close() method
- vim.net.request.Opts class
- vim.validate single calls
- Use (''):format(...) instead of `..`
2026-03-23 18:48:03 -04:00
..
2026-03-12 11:12:56 +01:00
2026-03-11 18:24:57 +01:00
2026-02-12 13:46:45 +01:00
2026-03-11 18:17:46 +01:00
2024-05-15 23:19:26 +02:00
2026-03-11 18:00:18 +01:00
2026-03-11 18:00:18 +01:00
2026-03-16 14:52:03 +01:00
2025-12-06 20:33:02 -05:00
2023-06-25 17:14:28 +02:00
2026-03-11 18:00:18 +01:00
2026-01-27 17:14:57 -05:00
2026-03-22 01:57:28 +01:00
2026-01-12 03:50:57 +00:00
2025-12-15 13:55:15 -05:00
2026-03-16 10:29:58 +01:00
2026-02-12 13:46:45 +01:00
2025-12-15 13:55:15 -05:00
2026-03-11 18:17:46 +01:00
2025-09-28 20:57:59 -07:00
2025-12-15 13:55:15 -05:00
2026-03-11 18:00:18 +01:00
2025-12-15 13:55:15 -05:00
2025-12-06 20:33:02 -05:00
2026-03-11 18:24:57 +01:00
2026-03-22 01:57:28 +01:00
2026-03-22 01:57:28 +01:00
2026-03-18 20:40:20 +01:00
2026-01-07 08:11:42 +08:00
2025-12-06 20:33:02 -05:00
2025-12-06 20:33:02 -05:00
2026-03-11 12:39:49 +01:00
2025-12-15 13:55:15 -05:00
2026-03-11 18:00:18 +01:00
2026-03-20 23:30:09 +01:00
2026-03-20 23:30:09 +01:00
2026-03-11 18:17:46 +01:00