rest.nvim icon indicating copy to clipboard operation
rest.nvim copied to clipboard

Feature Request: Add less restrictive run method (default GET)

Open kevintraver opened this issue 2 years ago • 1 comments

It would be great to have an additional run method that is less restrictive. Instead of following RFC 2616, it would just send the full URL that is currently at the cursor position.

Here is an example use case:

Imagine you are in an existing text document, or a JSON file, and one of the key values is a url. You could place the cursor on the URL and send the request without having to add anything or type out any part of the HTTP specification.

This mode could assume the use of the GET method.

kevintraver avatar Sep 16 '23 16:09 kevintraver

I imagine it could be something like a new method similar to start_request, that skipped searching for the HTTP verbs:

https://github.com/rest-nvim/rest.nvim/blob/f13ae54ae2545d4d612593d4a442cbb33a1b5b65/lua/rest-nvim/request/init.lua#L190-L201

Happy to help with a PR

kevintraver avatar Sep 16 '23 17:09 kevintraver

Closing this due to v3 release. Now you can omit the GET method. rest.nvim will use GET http method when not specifed

boltlessengineer avatar Aug 23 '24 16:08 boltlessengineer