You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
add something like this to file with .http extension and run request with this plugin from VS Code.
POST /auth/login HTTP/1.1
Host: api.XXX
{"username":"test@test.te","password":"test"}
api.XXX should be changed with appropriate example. I'm working with private API and cannot share details but any endpoint that answers with 301 will do.
Solution
I've spend some time debugging and seems to be the problem is in the got library.
Apparently got@9.6.0 does not respect followRedirect flag that plugin is passing to it.
Last version got@12.0.0 on the other hand do respect followRedirect.
Here are some code that you could try and see it for yourself:
got 12 switched to esm. See sindresorhus/got#1789. Rest client is commonjs. Switching to esm is doable, but needs some time. Maybe try got 11 which also supports followRedirect correctly. Tested with my own extension.
Option "followRedirect: true" is not working.
How to reproduce
add something like this to file with
.http
extension and run request with this plugin from VS Code.api.XXX
should be changed with appropriate example. I'm working with private API and cannot share details but any endpoint that answers with 301 will do.Solution
I've spend some time debugging and seems to be the problem is in the
got
library.Apparently
got@9.6.0
does not respectfollowRedirect
flag that plugin is passing to it.Last version
got@12.0.0
on the other hand do respectfollowRedirect
.Here are some code that you could try and see it for yourself:
got@9.6.0
:got@12.0.0
:Are you planing to update the
got
library?They've changed API since then but nothing critical AFAIK and this seems quite doable.
The text was updated successfully, but these errors were encountered: