Skip to main content

Restful in .net core

Published 1 min readMarkdown

image.png

To return success with no content use

return NoContent();

POST is used to create a resource so if the POST has a ID like POST authors/myid If the id exists it should return Conflict

return new StatusCodeResult(StatusCodes.Status409Conflict)

To create the location URL in the header use

return CreateAtRoute(parametesr);

Patch command https://tools.ietf.org/html/rfc6902

No comments yet. Be the first to comment.