Closed roastedmonk closed 4 years ago
Can you set up a RunKit example?
Or a reproducible repo?
Your example is incomplete therefore I'm not able to reproduce the issue.
I've written a simple test that proves it works as expected: 442be0c78b63b3a1795a74a205be9693fcbeddf6
I'll close this issue for housekeeping purposes. Feel free to send a reproducible code so I'll open this issue again. It'd be best if you used plain Node.js HTTP server instead of Restify as I'm not familiar with it.
i raised issue for Buffer not stream. @szmarczak
i raised issue for Buffer not stream.
The body? It's a Readable
stream in your example, so I followed it.
i raised issue for Buffer not stream.
The body? It's a
Readable
stream in your example, so I followed it.
@szmarczak : this function returns String or Buffer.
oh sorry my bad looking into this rn
It works as expected and we have a test for that:
i dont want wow
in response, it should be buffer of wow in server.
it should be buffer of wow in server
That's not a Got issue. You are responsible for parsing the data.
Feel free to experiment around our tests. In that test we just output the received body, so it works as expected.
Describe the bug
Actual behavior
receiving server getting buffer in json format as req.body Restify is the server used in the receiving end.
Expected behavior
req.body should be a instance of Buffer. Restify is the server used in the receiving end.
tested with currently depricated request plugin it works fine, but GOT is having this issue.
Code to reproduce
Checklist