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

Commented Feature: ApiController.Created should accept relative URI [1627]

$
0
0
The Location header for HTTP 201 supports relative URIs, but the current code for ApiController.Created (which takes a string URI) does not.
Comments: Hi, Brad! We're just using the default Uri constructor, which does UriKind.Absolute. I'm hoping it will work if instead of: return Created("foo"); you do: return Created(new Uri("foo"), UriKind.Relative); I'll ask the team to verify that works. If it does, I'm inclined to think we should keep the current behavior. Since Uri says the default is absolute, I think there's potential confusion if we picked a different default such as UriKind.RelativeOrAbsolute. Thoughts? David

Viewing all articles
Browse latest Browse all 7215

Trending Articles



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