Quantcast
Channel: ASPNETWebStack Issue Tracker Rss Feed
Viewing all articles
Browse latest Browse all 7215

Closed Issue: WebAPI returning 405 in cases that should be 404 [1130]

$
0
0
Sometimes WebAPI returns 405 in cases where it should return 404. If there is no possible verb to satisfy a URL, then it should be 404.

Consider an empty controller:
class TestController : ApiController {
}

Today. calls to GET Api/Test will return a 405. It should be 404.

Comments: Verified. I used the following controller for verification: Request: GET http://localhost:9095/api/values public class ValuesController : ApiController { // POST api/values public void Post([FromBody]string value) { } // PUT api/values/5 public void Put(int id, [FromBody]string value) { } // DELETE api/values/5 public void Delete(int id) { } }

Viewing all articles
Browse latest Browse all 7215

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>