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

Support reply-after for 429 & 503 responses #26

Merged
merged 3 commits into from
Apr 2, 2024
Merged

Conversation

telegrapher
Copy link
Collaborator

Add support for the reply-after header.

Add tests for reply-after and x-debug-id header parsing

@telegrapher telegrapher requested a review from andresbott April 1, 2024 19:42
Copy link
Contributor

@andresbott andresbott left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, but maybe it is worth to replace the ReplyAfter string type with a computed time.Date

@@ -76,7 +76,8 @@ type Response struct {
// The raw body of the HTTP response.
Body []byte
// The value of the X-Debug-Id header.
XDebugID string
XDebugID string
RetryAfter string
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

food for though, you looked more into the usage of retry after.
from my view it makes sense extract the returned time and parse it into a date-time type directly in the client, instead of delegating this responsibility to the caller.

@telegrapher
Copy link
Collaborator Author

I include an update of the jwt lib.

@telegrapher telegrapher merged commit bcbf7de into master Apr 2, 2024
6 checks passed
@telegrapher telegrapher deleted the reply-after branch April 2, 2024 12:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants