Open fthouraud opened 3 years ago
We have the same issue. I'd vote to just fix the type and leave it as a Buffer
(or add an option) as we use it to request PNG files and other things that should be processed as a Buffer and not a string.
Maybe something like:
parser: 'none'
returns a Buffer
parser: 'string'
returns a string
Thanks for the suggestion, I agree that seems wrong. A PR would be much appreciated.
@ethanent I added a PR for this https://github.com/ethanent/phin/pull/64
As #64 is merged does that mean that this issue is fixed?
Hi 👋
I think there's a problem with either the response body parsing or the type definitions.
Expected
Looking at type definitions, the response body is of type
string
when we're usingparser: 'none'
.Experienced
The body is in fact the
Buffer
object initialized in centra.Resolution
I think those type definitions have to be fixed or the buffer has to be consumed to produce a
string
instead.I'll be happy to help with a PR once I got your opinion on that.