drdrej / rest-api-mock

simple rest api mock
MIT License
0 stars 1 forks source link

Multiple actions on same URL are throwing 405 error #28

Open mkljakubowski opened 7 years ago

mkljakubowski commented 7 years ago

Very cool tool! Super simple and very effective. I have found an issue though. I you have a URL for which you want to have both f.e. GET and POST it will throw a 405 Method Not Allowed in your face for one of them.

{
  "mocks": [
    {
      "on": {
        "endpoint": {
          "method": "get",
          "pattern": "/potato",
          "path": "/potato"
        }
      },
      "action": {}
    },
    {
      "on": {
        "endpoint": {
          "method": "post",
          "pattern": "/potato",
          "path": "/potato"
        }
      },
      "action": {}
    }
  ]
}
drdrej commented 6 years ago

Sorry, don't saw your request. I will check this in the next time. Thank you for help!