diepm / vim-rest-console

A REST console for Vim.
658 stars 54 forks source link

Add option `g:vrc_enable_header_buffer` to filter curl header into a separate buffer #57

Closed hiberabyss closed 5 years ago

diepm commented 6 years ago

Thanks for this great idea. Please consider my comments below.

hiberabyss commented 6 years ago

Hi @diepm,

For your first point, we do not care about header content in many cases, showing it in a separate window may be a waste of the space to display response content.

From my experience, the reason I enable curl header is to get the response filetype and have a see of the http status code if there is any error.

How do you think about this?

I will update source code according your comments.

Thanks!

diepm commented 6 years ago

We can add two options,

Of course these two options only take effect if the response includes headers (i.e., with -i option). The "hide" option has a higher priority than the "split" one since if the user wants to hide the header section, we don't have to display it.

What do you think?

hiberabyss commented 6 years ago

I think it's a little complicated to add two options for this feature. Maybe we could add one first, and then add another one if there is the demand.