script PostResponse: res is not a function
tried to save some ids to var in Post Response under scripts: const ids = res('features.id')
Error: Error invoking remote method 'send-http-request': TypeError: res is not a function
the same thing works with Vars.
@gmajcen Yup, I am able to reproduce the bug. Will get this fixed.
Meanwhile, here is a workaround.
const {get} = require('lodash');
const page = get(res.getBody(), 'page');
console.log('page', page)
I created https://github.com/usebruno/bruno/pull/579 to fix it. It works on my machine 😄
Hello, I have the same problem (v1.2.0). Any updates on this @helloanoop ?
It seems somewhat misleading from a user's perspective because the documentation explicitly states that the feature works but it does not. Tell me if I can do anything to help 😄
Note: the workaround mentionned works fine
The res object doesn't seem to be created at all.
The fix doesn't work, I am still getting 'Error invoking remote method 'send-http-request': TypeError: res is not a function' on the latest Bruno version.
@anusreesubash Please work with @sanjai0py and prioritise reviewing the PR #579
The res property should be a function which uses a custom query parser maintained by us - see https://docs.usebruno.com/scripting/response/response-query