Solvedvscode restclient response variable does not get resolved

  • VSCode
    Version: 1.22.1
    Shell 1.7.12
    Renderer 58.0.3029.110
    Node 7.9.0
    Architecture x64

  • OS Version: Windows 10 Home, Build Ver 1709

  • REST Client Version: 0.18.1

Steps to Reproduce:


# @name session_token
GET {{baseUrl}}/services/session/token HTTP/1.1
content-type: application/json


# @name login
POST {{baseUrl}}/api/user/login HTTP/1.1
content-type: application/json
X-CSRF-Token: {{login_token}}
test: {{session_token.response.body}}

   "some" : "json"

Sending session_token returns body:


Send request login actually sends (as caught by fiddler):

POST /api/user/login HTTP/1.1
content-type: application/json
X-CSRF-Token: 9m5UzOssDiuKpqlYb0HPIlPy7i7Q4ulBDCde34t80hc
test: {{session_token.response.body}}
User-Agent: vscode-restclient
host: some_host
accept-encoding: gzip, deflate
content-length: 76
Connection: keep-alive

I get a warning for a line "test: {{session_token.response.body}}"

	"owner": "_generated_diagnostic_collection_name_#0",
	"code": "undefined",
	"severity": 4,
	"message": "Body path should be provided right after \"body\"",

For now I have to copy the token manually to a variable but according to the docs I should be able to use like test: {{session_token.response.body}} unfortunetly session_token.response.body does not gets resolved

In this case, what seems to be expected is that the whole body is saved in variable

20 Answers

βœ”οΈAccepted Answer

@abenedykt got, as you said previously, I should implement a selector to fetch the whole response body, instead of extracting specific attribute of json and xml responses.

Related Issues:

vscode restclient Header name must be a valid HTTP token ["{"]
OK looks like the error is: where as this is OK: I had a previous simple test file that was working ...
vscode restclient response variable does not get resolved
@abenedykt got as you said previously I should implement a selector to fetch the whole response body...
gatsby Error: ENOSPC: System limit for number of file watchers reached, watch '/home/foldername/abcrypto/static'
It’s hitting your system's file watchers limit Try echo fs.inotify.max_user_watches=524288 | sudo te...
react starter kit How to call child component method from parent?
For example you can use Refs to Components approach like so: Demo:
graphql subscriptions Cannot find name 'AsyncIterator' error in Typescript compilation process.
Thanks!! By adding: to tsconfig.json file fixed the issue for good. I have found a difficulty compil...
gatsby Testing Site with Gatsby Develop from Local LAN
You can also use gatsby develop -H Summary I've searched as best I could ...
gatsby Unknown type "ContentfulFixed". Did you mean "ContentfulBlogPost", "ContentfulContentType", or "ContentfulBlogPostEdge"?
For those having the same error ERROR #85901 GRAPHQL I'm trying to fetch my blogs from contentful an...
apollo client Store error: the application attempted to write an object with no provided id but the store already contains an id of...
Hey @hinok πŸ‘‹ This error only should occur when you have made a query with an id field for a portion...
graphql js Compile error with webpack 4
It looks like manually supplying extensions may cause this issue - which is common for those who sav...
apollo client Catching Network error: Converting circular structure to JSON
To anyone else coming here I ran into this doing Ran into the issue because the onClick event object...
prettier Change HTML/JSX formatting to have one attribute/prop per line
The point I am trying to make is that the vertical space matters Wasting it (too much) has negative ...
apollo client Could not find "client" in the context of Apollo(MyComponent). Wrap the root component in an <ApolloProvider>
I got this error when trying to use @apollo/react-hooks The solution as suggested by @sampathsris is...
apollo client In order to initialize Apollo Client, you must specify link & cache properties on the config
Switch: to If you do that you'll then be using the apollo-boost version of Apollo Client which doesn...
react apollo BatchHttpLink: Error writing result to store for query
I had the same error #1003 is a possible solution Don't forget to query the ids of nested entities. ...
gatsby [v2] Error: Cannot find module 'core-js/modules/es6.array.filter'
Thanks Pieh yeah tried that no go I'm afraid I did actually just fix this by running npm install --s...
apollo client Can't find field <field> on object (ROOT_QUERY) undefined.
For what it's worth I ran into the same issue and found out that I forgot the variables when calling...
gatsby "Gatsby: command not found" on trying to run Gatsby command after installing npm install --global gatsby-cli
@bfeldman89 Here are the steps I took that resolved the issue for me as well based on @pereiraryan's...
graphql engine relay support
Hi @srghma @toxsick relay makes assumptions about the GraphQL server as outlined here We haven't mad...
amplify cli Many-To-Many
You can implement many to many yourself using two 1-M @connections and a joining @model ...
gatsby Cannot find module '../build/Release/sharp.node'
Had the same error Deleting node_modules .cache public and reinstalling all dependencies fixed it fo...
apollo client Unable to resolve "graphql/language/visitor" from "node_modules/apollo-utilities/lib/bundle.umd.js"
apollo-utilities v1.1.3 has a dependency on graphql which is not mentioned in its package.json but i...
gatsby Error: Cannot find module 'react' - after installing Plugin
This occurred for me when I added gatsby-plugin-sass via npm Description When i followed the documen...
juniper Interop with async? (Tokio/Futures)
This is landed on master! πŸŽ‰ There is still some cleanup work to do (and the book tests don't pass) ...
apollo client refetchQueries after mutation
@tokenvolt I think this may be a shape issue within refetchQueries Can you try The object is needed ...
gatsby Ambiguous "StoreStateProvider" error for all gatsby commands
I fixed the problem! I used npm to uninstall then (re)install react react-dom and gatsby I did it in...
prettier [resolved] [HTML] allow corresponding option to jsxBracketSameLine
I don't think I've ever seen any markup language with the closing brackets on a separate line I'd li...
apollo client apollo-client require react ??
I just stumbled across that same problem but I got the client to work without having to install reac...
gatsby gatsby command not found
On the latest MacOS I had to update my npm config npm config delete prefix npm config set prefix /us...
type graphql Getting "Schema must contain uniquely named types but contains multiple types named" for a single type
This was a hard one to track down with an annoying fix (Nest specific not the fault of type-graphql)...
strapi πŸ‘‰ Question: What are the main pain points you have using Strapi? (Episode 3)
Pain point Issue: No TypeScript support Context: I know it has been mentioned as something the team ...
graphene django Bypass csrf
Hi @nlhkh! You can do something like: I have the use case of a mobile client app accessing graphql r...
prettier Feature Request: breakBeforeElse
This feels like one of those I can't adopt prettier unless options that was mentioned in the 1.0 rel...
gatsby Question: How do I query based on gatsby-source-filesystem name?
@tsiq-swyx I'm using something like this to pass the collection field from File to MarkdownRemark Th...
prettier Add option to omit semicolons in output
I use standard.js which is a popular no-configuration style guide & linter They insist on a semicolo...
react starter kit OverwriteModelError: Cannot overwrite xxx model once compiled.
The way I did it is removing the model from mongoose's models with Then you can register the model a...
amplify cli aws-exports.js is not generated
Even after the third read I find it utterly confusing and I have usability issues too ...
graphene Graphene real-time subscriptions and Apollo client graphql integration
@Eraldo @hballard Yes I think I should post an update here as I'm working full on subscriptions now ...
apollo client 'ObservableQuery with this id doesn't exist: id' on unmounted component
Found solution The error is raised by Promise returned by the fetchMore call So you have to catch th...
gatsby events.js:182 throw er; // Unhandled 'error' event
This fix for me: echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysc...
apollo client TypeScript error when using client without react
Instead of importing from @apollo/client you can import from @apollo/client/core to get everything e...
apollo server Apollo Server 3.0 Roadmap
IMO it would be a great idea to implement the previous roadmap before creating the new 😜 I'm person...
apollo client client.resetStore() doesn't reset the store
I think client.resetStore is most confusing when it comes to active queries that are contingent on a...
apollo client Async Middleware (with ApolloLink)
@pycraft114 @matteodem Here is how I got it working: @jbaxleyiii The documentation was a little conf...
apollo tooling 2.12.3: Error: Cannot use GraphQLSchema "[object GraphQLSchema]" from another module or realm
If you are using npm: Copy the version of graphql from your node_modules/apollo/package.json For me ...
graphql tools Stitching schema without a Query shows "Query root type must be provided."
We solves this by just filling in Discription I am trying to stitch two schemas that one of them onl...
prettier Space after function name in declarations
This is one of the reasons I've had to step away from adopting Prettier I would be quite happy with ...
react apollo How to use the MockedProvider
Finally got it to work @fc Next tick doesn't work but for some reason setTimeout does Also non of th...
react apollo webpack 4 compatibility issue
Adding this to the webpack config rules section worked for me: Intended outcome: I'm migrate a proje...
gatsby Gatsby@2.11.0 Build failure (JavaScript heap out of memory)
Yeah affects Netlify too I was able to get Netlify to build correctly by adding an environment varia...
prettier Ugly line break in a template string
Maybe templates should never be wrapped because it looks ugly most of time This input looks better t...