reponse containing html code string return 404 through antoAwrapper
scil opened this issue · 1 comments
scil commented
I return html code string and get 404 ,and the wanted data in the exceptionMessage
{
"isError": true,
"responseException": {
"exceptionMessage": {
"commentList": [
{
"id": 19,
"createdUser": "4k2n1gmr4zt5w03t0xg075p4wn"
}
],
"pagerHtml": "\r\n<ul class=\"pager\"><li class=\"disabled first\"><a><<</a></li><li class=\"disabled\"><a rel=\"prev\"><</a></li><li class=\"active\"><a href=\"/api/common/comment/Index?AuditStatus=030203&Status=1&page=1\">1</a></li><li><a href=\"/api/common/comment/Index?AuditStatus=030203&Status=1&page=2\" rel=\"next\">2</a></li><li><a href=\"/api/common/comment/Index?AuditStatus=030203&Status=1&page=2\" rel=\"next\">></a></li><li class=\"last\"><a href=\"/api/common/comment/Index?AuditStatus=030203&Status=1&page=2\">>></a></li></ul>\r\n"
}
}
}
I tried new ApiResponse
and failed
{
"isError": true,
"responseException": {
"exceptionMessage": {
"version": "1.0.0.0",
"statusCode": 200,
"message": "GET Request successful.",
"responseException": null,
"result": {
"contentType": null,
"serializerSettings": null,
"statusCode": null,
"value": {
"commentList": [
{
"id": 19,
"createdUser": "4k2n1gmr4zt5w03t0xg075p4wn"
}
],
"pagerHtml": "\r\n<ul class=\"pager\"><li class=\"disabled first\"><a><<</a></li><li class=\"disabled\"><a rel=\"prev\"><</a></li><li class=\"active\"><a href=\"/api/common/comment/Index?AuditStatus=030203&Status=1&page=1\">1</a></li><li><a href=\"/api/common/comment/Index?AuditStatus=030203&Status=1&page=2\" rel=\"next\">2</a></li><li><a href=\"/api/common/comment/Index?AuditStatus=030203&Status=1&page=2\" rel=\"next\">></a></li><li class=\"last\"><a href=\"/api/common/comment/Index?AuditStatus=030203&Status=1&page=2\">>></a></li></ul>\r\n"
}
}
}
}
}```
SaravananArunagiri commented
use
BypassHTMLValidation = true,
will resolve your issue.