From 35cc8afbbad87e85dd2a55674a7a4f3c685f84e4 Mon Sep 17 00:00:00 2001 From: Tim Pope Date: Mon, 30 Nov 2015 20:29:26 -0500 Subject: [PATCH] Support custom headers --- plugin/rhubarb.vim | 3 +++ 1 file changed, 3 insertions(+) diff --git a/plugin/rhubarb.vim b/plugin/rhubarb.vim index d4ba36e..344c88f 100644 --- a/plugin/rhubarb.vim +++ b/plugin/rhubarb.vim @@ -128,6 +128,9 @@ function! s:curl_arguments(path, ...) abort if has_key(options, 'method') call extend(args, ['-X', toupper(options.method)]) endif + for header in get(options, 'headers', []) + call extend(args, ['-H', header]) + endfor if type(get(options, 'data', '')) != type('') call extend(args, ['-d', rhubarb#json_generate(options.data)]) elseif has_key(options, 'data')