Git Product home page Git Product logo

Comments (4)

jabley avatar jabley commented on August 21, 2024

At the very least, I think that the HTTP headers should be made available. http://apiwiki.twitter.com/Rate-limiting

Then it would be possible to look at the rate-limiting headers in the response and provide more accurate feedback as to when rate-limits should be reset, for example.

from mgtwitterengine.

jabley avatar jabley commented on August 21, 2024

I've forked and have a local topic branch that I'm working up patches for this issue.

  1. Passing the HTTP headers through it pretty straightforward; not too invasive a change.
  2. Making the response body available to the requestFailed:withError: delegate call is a little bit more work.

For the second case, I'm thinking along these lines:

  • Adding a NSHTTPURLResponse field to MGTwitterURLConnection
  • Setting that field in the connection:didReceiveResponse: implementation. Only 304 Not Modified logic would be retained there.
  • Moving the part of connection:didReceiveResponse: that deals with 4xx status codes into connection:didFinish and using that as a guard condition above the existing code, before it invokes requestSucceeded: on the delegate.

Does that sound reasonable and would the changes be welcomed?

from mgtwitterengine.

jabley avatar jabley commented on August 21, 2024

Topic branch available here - http://github.com/jabley/MGTwitterEngine/tree/39-error-response-body

from mgtwitterengine.

jabley avatar jabley commented on August 21, 2024

Ping

http://github.com/jabley/MGTwitterEngine/compare/mattgemmell:master...39-error-response-body

from mgtwitterengine.

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.