caseyamcl / guzzle_retry_middleware

Middleware for Guzzle v6/7+ that automatically retries HTTP requests on 429, 503 responses.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Enhancement] Customize date format of `RetryAfter` header

boddie2 opened this issue · comments

Detailed description

I came across this date format 2020-11-10T18:44:00.000+00:00 in theRetryAfter header.

Context

It would be useful to have a possibility to specify the date format of this header.

Possible implementation

Add an option in the options array that allows us to specify the date format of this header. Default constant DATE_FORMAT

Hi @boddie2, I implemented this enhancement in v2.6; refer to the README file for documentation.