Axios fix the request body
commit522dc3c2cbf40bbee46a6cbbfb7ff39a4f2380e9
authorFreezeboy <freezeboy@users.noreply.github.com>
dateTue 28 Jul 2015, 11:33 (11 years ago)
parentb085e63
servant-js/src/Servant/JS/Axios.hs+1−1
@@ -51,7 +51,7 @@ generateAxiosJSWith opts req = "\n" <>
5151
5252 dataBody =
5353 if req ^. reqBody
54− then " , data: JSON.stringify(body)\n" <>
54+ then " , data: body\n" <>
5555 " , responseType: 'json'\n"
5656 else ""
5757