HTTP Status Codes

When analysing the visits to my "Well Known Traffic Advice" page I pondered why you may want to return a status code other the a successful 200.

Top

Asking Copilot - Bing ChatGPT

I was surprised that I actually found something that was related and I didn't know.

RESTful Approach:

Whether using 200 OK for a POST request aligns with a RESTful approach depends on the architectural properties of your API.

RESTfulness doesn’t strictly require specific return codes; it focuses on principles like statelessness, resource-based URLs, and uniform interfaces.

As long as your API adheres to these principles, using 200 OK for successful POST requests is consistent with RESTfulness.

Links

  • REST - Representational state transfer

Link to PDF Disabled

If you require a copy please email tempusfugit.me.uk

Top

References: - a note on these

  • List of HTTP status codes - https:// en.wikipedia.org/wiki/ List_of_HTTP_status_codes
  • -->

Site design by Tempusfugit Web Design -