A / superagent-mocker

Pretty simple in-browser mocks for CRUD and REST API
132 stars 32 forks source link

Types are not respected in the mock endpoint req.body #26

Open TSteele27 opened 8 years ago

TSteele27 commented 8 years ago

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.