Function parseRetryAfter

  • Retry-After = "Retry-After" ":" ( HTTP-date | delta-seconds ) https://www.rfc-editor.org/rfc/rfc2616#page-141

    Parameters

    • retryAfter: Maybe<string>

      The string to parse into a timestamp. If nullish, null is returned.

    Returns Timestamp | null

    The unix timestamp to wait until before retrying. If the Retry-After header could not be found, or provided a date that cannot be parsed, returns null.