Skip to content
This repository was archived by the owner on Apr 16, 2025. It is now read-only.
This repository was archived by the owner on Apr 16, 2025. It is now read-only.

Trouble sending back PDF data #4

@awesomeunleashed

Description

I have an endpoint that creates a PDF based on data I send it. I'm trying to use mox to:

  1. return whatever the endpoint returns if the call returns a non-500 response, and
  2. return a static PDF file on my file system instead if the call returns 500.

However, I've only managed to do one or the other. I managed to get the static PDF going back (although I had to use express middleware to do it). However, once I've made the mutate call, the request call has already incorrectly parsed my PDF as a UTF-8 string, and so if I try to pass it through on a success it comes back corrupted. Any ideas, or possibility binary data could become better supported?

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions