Open
Description
Currently the default property for as
is body
, but the logic makes this undesirables, as:
https://github.com/mjackson/http-client/blob/master/modules/index.js#L205
if (as in response)
return response[as]
will by default return response.body
, which may already be populated.
I run a response middleware after the parse usually, but using
parse('json'), recv(({body}) => body)
results in undefined
to be output.
If I instead use
parse('json', 'jsonData'), recv(({jsonData}) => jsonData)
,
it works as intended, returning the JSON/JS Object.
Not sure what a better name would be; perhaps bodyData
sticking by previous conventions?
Metadata
Metadata
Assignees
Labels
No labels