diepm / vim-rest-console

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

Request with Bearer token timing out #95

Closed mttigg closed 3 years ago

mttigg commented 3 years ago

First want to thank the developers of this plugin as I use it regularly :+1:

When using a bearer token for authentication it seems that VRC times out, I tried the same in curl and it is working.

I may be missing something simple here tho.

VRC:

http://localhost:4000

Authorization: Bearer ***

POST /api/auth/magicLink

curl:

curl --location --request POST 'http://localhost:4000/api/auth/magicLink' \
--header 'Authorization: Bearer ***' 

I also tried setting this in the vimrc with no luck:

let g:vrc_curl_opts = {
  \ '-H': 'Authorization: Bearer ***',
}
mttigg commented 3 years ago

Hmmm... after a while this problem has seemed to disapear. The only thing that has changed is my local api. I might keep this open in case someone can pinpoint why VRC would handle the same request differently than curl.

emaniacs commented 3 years ago

you can use all of curl option with this plugin, so if you ever face this issue, just make it verbose with put -vvv