Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature: buffer flags #55

Open
Abdullah-Khawahir opened this issue Oct 7, 2024 · 0 comments
Open

feature: buffer flags #55

Abdullah-Khawahir opened this issue Oct 7, 2024 · 0 comments

Comments

@Abdullah-Khawahir
Copy link

Abdullah-Khawahir commented Oct 7, 2024

I am thinking of something that would lower the boilerplate and enhances the UX.

buffer flags:
curl flags at the start of the buffer to be applied across this buffer curl commands. something similar to config flags but for the buffer and it is defined somewhere in the buffer.

buffer_flag -X DELETE
buffer_flag -H 'Content-Type: application/json'
buffer_flag -d 
{
 "message":"curl.nvim is great"
}
curl http://www.postman.com

this should be equivalent to this for all the curl commands in that buffer

curl -X DELETE http://www.postman.com
-H 'Content-Type: application/json'
-d
{
 "messge":"curl.nvim is great"
}

this demo is not practical but the idea is buffer flags should be used for authentication headers or domain specific headers. those things are lengthy and ugly to look at it would be good to have them written once and forgotten about.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant