-
Notifications
You must be signed in to change notification settings - Fork 8
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
Unset header #15
Comments
Removing headers by not giving a value to the right of a header name is already a feature of Roast. However, looks like it stopped working some time ago and I never realized it. I fixed it now and also added a test so it doesn't come back. I personally don't like the idea of separate global and local header definitions. It's confusing as when we look at a header line we can't immediately tell whether it will apply to a request or not. In the same vein, appending some headers automatically also doesn't seem like a good idea. We can always add the headers we want always in a few lines at the top of the roast file and that will keep the details of the requests explicit. When I use roast, I test out a API call and see how it behaves and then translate that request into code to make that request. If roast did some hidden shenanigans that are not visible to me, I'll miss doing those shenanigans in my application code. That will result in a lot of hair pulled apart. Thank you for all your issues and suggestions, but sorry to be turning them down. Please don't let me discourage you. Your inputs are always welcome :). |
So cool :-) |
Hi !
Maybe it could be cool to unset header like curl done.
See also #13 (comment) . As I said in this comment
curl http://google.com
appends some headers automatically likeAccept: */*
. To remove it simply usecurl http://google.com -H 'Accept
. In Wireshark we see that the header Accept is not append.Have the feature to have Global definition and local definition of headers could also be a solution https://github.com/diepm/vim-rest-console#52-global-definitions
The text was updated successfully, but these errors were encountered: