Giter Site home page Giter Site logo

Comments (3)

darrelmiller avatar darrelmiller commented on May 3, 2024 3

@CoolDadTx I agree that it is confusing. However, the 501 status code has the additional requirement that the functionality is not supported for any resource on the server. Although that may be the case for some API scenarios, there are other cases where certain functionality is not supported on a particular set of resources.

Requiring applications to sometimes return a 4XX code when there is partial support for a feature and 501 when there is none is an additional burden on the client.

Imagine also, if paging were not supported, and then at some point in the future it is added for just one resource. Does that mean all other resource now have to start returning 4XX instead of 501?

The 501 response code is more useful for Web servers, proxies, caches and other intermediaries. The intent is to make application developers aware that some piece of infrastructure is preventing their server application from behaving correctly and it is up to the server application developer to fix the issue.

Applications themselves don't gain any benefits from returning 501, at least none that I'm aware of.

from api-guidelines.

RobDolinMS avatar RobDolinMS commented on May 3, 2024

Thanks for posting this issue @CoolDadTx

For others who are likely wondering about HTTP 501, here's the reference in the HTTP 1.1 spec: http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.5.2

10.5.2 501 Not Implemented
The server does not support the functionality required to fulfill the request. This is the appropriate response when the server does not recognize the request method and is not capable of supporting it for any resource.

from api-guidelines.

garethj-msft avatar garethj-msft commented on May 3, 2024

I think this is fairly definitive from @darrelmiller

from api-guidelines.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.