Base solution for your next web application
Open Closed

using PostMan to demostrate POST webapi failed #2468


User avatar
0
trendline created

I am using Postman to demonstrate how the webapi works for non browser client. When running the GET methods it works fine, but when running the POST methods, it failed. it returns input is null, below is the return message:

{
  "result": null,
  "targetUrl": null,
  "success": false,
  "error": {
    "code": 0,
    "message": "Your request is not valid!",
    "details": "The following errors were detected during validation.\r\n - input is null!\r\n",
    "validationErrors": [
      {
        "message": "input is null!",
        "members": [
          "input"
        ]
      }
    ]
  },
  "unAuthorizedRequest": false,
  "__abp": true
}

I am using ABP 1.4.2 version, furthermore in debug mode in VS, the POST method cannot hit the break point, it seems the request been blocked by some filters, COSR? or DTO validation?


2 Answer(s)
  • User Avatar
    0
    trendline created

    I fixed it, the parameter transfer mode was wrong, after set the parameters as JSON object, it works now.

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi,

    Thanks for this info, I was trying to reproduce same error :).