superagent-mocker icon indicating copy to clipboard operation
superagent-mocker copied to clipboard

Types are not respected in the mock endpoint req.body

Open TSteele27 opened this issue 8 years ago • 0 comments

If I mock an endpoint that takes an array of objects or string as a body param, when I get the body in the mock handler it is not what I am expecting. If I send an array I get a dictionary of the array in the body. If I send just a string, then I get nothing in the body param. Arrays and Strings are considered valid json and should be serialized and represented in the body parameter as they were passed in.

TSteele27 avatar Mar 30 '16 15:03 TSteele27