@andersonmuller wrote:
Hi,
I use DF(2.1.1) to call a remote API and its working fine. But, if server response has a HTTP Code 400, DF encode the response.
Remote API send me this, with HTTP 400 and Content-Type: application/json
{ "errors": [ { "errorMessage": "Device ID inválido" } ] }
And DF gives me this:
{ "status_code": 400, "content": { "error": { "context": null, "message": "{"errors":[{"errorMessage":"Device ID inv\\u00e1lido"}]}", "code": 400 } }, "content_type": null, "format": 201 }
I can use lodash._.unescape to revert the htmlencode and JSON.parse to get a working json, but I still would not have the special chars converted, just one in this case "\u00e1".
There is a way to get the original Remote API response?
Thanks!
Posts: 2
Participants: 2