Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Current rate sent back with each call #50

Merged
merged 1 commit into from
Dec 14, 2013
Merged

Current rate sent back with each call #50

merged 1 commit into from
Dec 14, 2013

Conversation

andrewspode
Copy link
Contributor

This change now fetches the current rate limit / remaining etc. from the HEADER of each returned call and returns it as a second object to the callback parameter. This means you don't have to keep doing calls to find out what is left.

This change now fetches the current rate limit / remaining etc. from the HEADER of each returned call and returns it as a second object to the callback parameter. This means you don't have to keep doing calls to find out what is left.
@ZweiSteinSoft
Copy link
Contributor

Good idea. Can you rebase your changes on the most recent develop contents? Your current commit contains reverts to an older stage.

@ghost ghost assigned ZweiSteinSoft Dec 8, 2013
@ZweiSteinSoft ZweiSteinSoft merged commit 82178cd into jublo:develop Dec 14, 2013
@ZweiSteinSoft
Copy link
Contributor

@unclespode Your code is correct, in my tests with Firefox I keep getting null for the values, though. Why?

@andrewspode
Copy link
Contributor Author

mynetx - apologies for not rebasing. Been a little busy!

I almost exclusively use codebird in a node environment for running daemons - where this code has been flawless. I noticed in Chrome the other day that it was not returning correctly and that is because those headers are not considered "safe" for access (think CORS).

I believe Twitter just needs to set the correct headers, allowing us safe access to them.

In the meantime, the code doesn't harm anyone and, as I say, works in Node.

@ZweiSteinSoft
Copy link
Contributor

I will get a look into supporting safe access to these headers in a CORS environment. Codebird is accessing the Twitter API via the codebird-cors-proxy, hosted by us, in order to add CORS headers to Twitter’s API response.

@ZweiSteinSoft
Copy link
Contributor

@unclespode Thanks for your patch. I was able to verify that it works in node.js and added the headers to the CORS whitelist. The new proxy version is about to be sent to production server.

@andrewspode
Copy link
Contributor Author

Excellent.

On Thu, Dec 26, 2013 at 3:36 PM, J.M. [email protected] wrote:

@unclespode https://github.com/unclespode Thanks for your patch. I was
able to verify that it works in node.js and added the headers to the CORS
whitelist. The new proxy version is about to be sent to production server.


Reply to this email directly or view it on GitHubhttps://github.com//pull/50#issuecomment-31224505
.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants