Skip to content

When running the server with -r and -a flags recording file body is empty #16

Open

Description

@dennisbcloud

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.

Activity

  1. dennisbcloud commented on May 6, 2021

    @dennisbcloud
    Author

    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.

  2. sinedied commented on May 7, 2021

    @sinedied
    Owner

    Thanks, I'll look into it.

  3. HarryF514 commented on Apr 19, 2022

    @HarryF514

    facing same issue here. Did this get fixed?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    PR-welcomePR is gladly appreciatedbugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions