mistweaverco/kulala.nvim

Unable to run multiple request.

Closed this issue · 2 comments

I do not know if this is a bug or incorrect set up, if i have multiple HTTP requests in a file, only the first one is being ran.

I will attach some picture to explain what I am saying.

Note the virtual text after the request, shows i ran the first request, also note the response

image

Now see the next request is sent, the response is the same with the first even tho it showed that the request was sent

image

Now, i changed it and made the second request first and ran it, this time, the response changed

image

Now, when i ran the second, it still shows the response

image

The only thing i changed is the icons, this is my config

vim.filetype.add({
  extension = {
    ["http"] = "http",
  },
})
return {
  "mistweaverco/kulala.nvim",
  ft = "http",
  keys = {
    { "<leader>R", "", desc = "+Rest" },
    { "<leader>Rs", "<cmd>lua require('kulala').run()<cr>", desc = "Send the request" },
    { "<leader>Rt", "<cmd>lua require('kulala').toggle_view()<cr>", desc = "Toggle headers/body" },
    { "<leader>Rp", "<cmd>lua require('kulala').jump_prev()<cr>", desc = "Jump to previous request" },
    { "<leader>Rn", "<cmd>lua require('kulala').jump_next()<cr>", desc = "Jump to next request" },
  },
  opts = {},
  config = function()
    require("kulala").setup({
      icons = {
        inlay = {
          loading = "",
          done = "",
          error = "",
        },
      },
    })
  end,
}

And no, I am not using lazyvim, I just opened it for reference.

That is not a bug, that is by intention.

You need separate these requests by ###, so it would look something like this:

GET https://httpbin.org/get
Accept: application/json

###

GET https://httpbin.org/get
Accept: application/json

###

GET https://httpbin.org/get
Accept: application/json

Ohh, I didn't know that. I must have missed that. Thank you, appreciate your response.