rest-nvim / rest.nvim

A fast Neovim http client written in Lua
GNU General Public License v3.0
1.61k stars 142 forks source link

No longer working with cookies. #368

Closed bushblade closed 2 months ago

bushblade commented 7 months ago

The plugin no longer works with saving or using a cookie in the request.

This request used to work for me:

# Login a user
POST {{BASE_URL}}/api/users/auth
Content-Type: application/json

-c backend/http/cookies

{
  "email": "john@email.com",
  "password": "123456"
}

But now I get the following response:

POST http://localhost:5000/api/users/auth
HTTP/1.1 400 Bad Request

#+RES

#+END

The same request works in Postman and Insomnia and in Curl:

Screenshot_2024-04-18_12-09-51

And if I remove the -c backend/http/cookies then I do get a good response in rest-nvim but obviously no cookie was saved.

boltlessengineer commented 2 months ago

Closing this due to v3 release. Now rest.nvim officially supports cookies following RFC standards. You can edit cookies file with :Rest cookies command.