When running the server with -r and -a flags recording file body is empty
Opened this issue · 3 comments
hey, Thanks for the project, it looks great. but when i running the server with recording and save-headers flags I get the file (response) body object = null :
{ "statusCode": 200, "headers": { "date": "Wed, 28 Apr 2021 08:53:00 GMT", "content-type": "application/json; charset=utf-8", ... }, "body": null }
if I running the server with recording and without the "save-headers" flag then the file contains correct "body" value.
i think in recorder.js when this condition
data && ext === 'json'
is true then
1 - data = JSON.parse(data.toString('utf8'));
2 - data now is Object ==>
data instanceof Buffer ? (isString ? data.toString('utf8') : data.toString('base64')) : null
will return null.
i dont sure what should be here.
Thanks, I'll look into it.
facing same issue here. Did this get fixed?