You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Wire up rate limit headers via HTTP/REST client wrappers (#669)
* Add rate limit header wrapper for all API responses
Introduce AdoHttpClient and AdoRestClient wrappers that automatically
extract rate limit headers and attach them as a rateLimit property on
response objects. This avoids needing to regenerate all API clients.
- Add RateLimitUtils.ts with shared extractRateLimitHeaders function
- Add AdoHttpClientBases.ts with AdoHttpClient and AdoRestClient wrappers
- Update ClientApiBases.ts and WebApi.ts to use new wrappers
- Add unit test for rate limit header extraction
- Bump version to 15.1.4
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Address review: only set rateLimit when headers present, handle collections, add 429 and no-header tests
- Only assign target.rateLimit when at least one rate limit header exists
- Attach rateLimit to response.result.value for collection responses
- Add unit test for 429 error path with rateLimit on error object
- Add unit test verifying rateLimit is undefined when no headers present
- Remove redundant IRestResponse cast
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Address review: bump to 15.2.0, attach rateLimit to response object, remove res.message duplication
- Bump version to 15.2.0 (minor, per reviewer feedback)
- Attach rateLimit to IRestResponse object for primitive result types
- Remove redundant extractRateLimitHeaders on res.message in AdoHttpClient
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Remove unnecessary rateLimit attachment to response wrapper object
All ADO APIs return JSON objects, so attaching to response.result is
sufficient. No need for the confusing fallback on the IRestResponse itself.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
---------
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
0 commit comments