Vscode-restclient: Only one response variable gets resolved

Created on 12 Apr 2018  路  4Comments  路  Source: Huachao/vscode-restclient

  • VSCode Version: 1.12.1
  • OS Version: win7
  • REST Client Version: 0.18.1

Capture response variables only works for one variable.
You can mouseover in the editor and see that the variables are resolved correctly, but when the request is sent, the variables does not get resolved. Maybe the parser is greedy?

Steps to Reproduce:

# @name postjson
POST http://httpbin.org/post

{
    "key1" : "a",
    "key2" : "b"
}

###
# works fine
GET http://httpbin.org/get?key1={{postjson.response.body.json.key1}}

###

# variables doesn't resolve if there are more than one in a request
GET http://httpbin.org/get?key1={{postjson.response.body.json.key1}}&key2={{postjson.response.body.json.key2}}

bug

Most helpful comment

@lldata @herkulano you can try the latest version 0.18.2 to verify

All 4 comments

@lldata really nice catch, I will publish this fix in next release.

@lldata @herkulano you can try the latest version 0.18.2 to verify

@Huachao works as expected 馃挴

Works for me too.

Was this page helpful?
0 / 5 - 0 ratings