-
Notifications
You must be signed in to change notification settings - Fork 17
Results
mauricioaniche edited this page Dec 25, 2010
·
7 revisions
If you want Restfulie to take care of the response and render resource in the correct media type, you should always return a restfulie result in your action.
You can find a different result for basically each HTTP Response Code.
Don’t worry about it. If media type is HTML, Restfulie will simply allow ASP.NET MVC to do its job.
Result | Parameters | HTTP Status Code | Location | Output |
Bad Request | (none) | 400 | ||
Created | resource and location | 201 | X | X |
InternalServerError | (none) | 500 | ||
NotAcceptable | (none) | 406 | ||
NotFound | (none) | 404 | ||
PreconditionFailed | (none) | 412 | ||
SeeOther | location | 303 | X | |
Forbidden | (none) | 403 | ||
NotModified | (none) | 304 | ||
OK | resource | 200 | X | |
Service Unavailable | (none) | 503 |
Restfulie automatically sends some responses to the client if some of the following occurs:
1) An error ocurred when unmarshalling resource: Bad Request.
2) The media type requested is not valid: Not Acceptable
When it happens, the invoked action is not even executed.