proudmonkey/AutoWrapper

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>&lt;&lt;</a></li><li class=\"disabled\"><a rel=\"prev\">&lt;</a></li><li class=\"active\"><a href=\"/api/common/comment/Index?AuditStatus=030203&amp;Status=1&amp;page=1\">1</a></li><li><a href=\"/api/common/comment/Index?AuditStatus=030203&amp;Status=1&amp;page=2\" rel=\"next\">2</a></li><li><a href=\"/api/common/comment/Index?AuditStatus=030203&amp;Status=1&amp;page=2\" rel=\"next\">&gt;</a></li><li class=\"last\"><a href=\"/api/common/comment/Index?AuditStatus=030203&amp;Status=1&amp;page=2\">&gt;&gt;</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>&lt;&lt;</a></li><li class=\"disabled\"><a rel=\"prev\">&lt;</a></li><li class=\"active\"><a href=\"/api/common/comment/Index?AuditStatus=030203&amp;Status=1&amp;page=1\">1</a></li><li><a href=\"/api/common/comment/Index?AuditStatus=030203&amp;Status=1&amp;page=2\" rel=\"next\">2</a></li><li><a href=\"/api/common/comment/Index?AuditStatus=030203&amp;Status=1&amp;page=2\" rel=\"next\">&gt;</a></li><li class=\"last\"><a href=\"/api/common/comment/Index?AuditStatus=030203&amp;Status=1&amp;page=2\">&gt;&gt;</a></li></ul>\r\n"
        }
      }
    }
  }
}```


use
BypassHTMLValidation = true,

will resolve your issue.