Giter Site home page Giter Site logo

Comments (4)

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

My understanding is that 102 is a code that should be sent as an interim for a single response, whereas the polling response has completed successfully, so 200 is more correct. Our position in general is that the HTTP status code refers to the specific HTTP call rather than the overarching operation.

from api-guidelines.

darrelmiller avatar darrelmiller commented on May 3, 2024

@edent The 200 response refers to the client making a GET request on a status resource. That status/progress resource is retrieved successfully and so the 200 is appropriate. How the progress resource reports the state of the operation is not defined by HTTP, but in the pattern doc I linked to I make some suggestions.

from api-guidelines.

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

I think we're comfortable with the current use of the codes here, so 'm going to close this one.

from api-guidelines.

whozDougie avatar whozDougie commented on May 3, 2024

Hi there,

I started following the guidelines on 200 with a Retry-After, however, I quickly found that other frameworks such as jQuery does not support 200 with a Retry-After. An Article from Mozilla indicates that Retry-After is used with "413 Payload Too Large" and "503 Service Unavailable".
https://developer.mozilla.org/en-US/docs/Web/HTTP/Status

Also another article states the header can be used with 503 or 3XX: https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html

The problem is I then have to manually write code on these frameworks which have followed "standards" for the implementation. For example, if I try and get a Retry-After from a $.ajax call and I try to get headers, by default it jQuery will ignore the Retry-After header!

I'm not sure which standard / guideline is correct here, but I don't feel very confident with using 200 - unless I am missing something here.

Many thanks,
WhozDougie

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.