Take the 2-minute tour ×
Stack Apps is a question and answer site for apps, scripts, and development with the Stack Exchange API. It's 100% free, no registration required.

In reading about the API rate limiting, the documentation talks about a method responding with an ominous backoff field, and states that the client should cease from calling that method for that many seconds.

Is there a dummy method that always returns a backoff that I can test against? Otherwise, what does the backoff field come back in the form of?

Regular int?

{ ... "backoff": 20}

a string to be parsed?

{ ... "backoff": "20"}
share|improve this question
    
Personally, I just have my apps (all low volume), just throw an exception if the backoff property is even defined. Hasn't happened yet. –  Brock Adams Jan 17 '13 at 16:50
add comment

1 Answer

The documentation for the response wrapper defines the backoff field as an integer, so you can expect it to come back in the first form.

I don't believe there's any way to graciously test a backoff response short of actually angering the API (which I'd recommend against).

share|improve this answer
add comment

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .