rest.nvim
rest.nvim copied to clipboard
Feature Request: Add less restrictive run method (default GET)
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.
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
Closing this due to v3 release.
Now you can omit the GET method. rest.nvim will use GET http method when not specifed