@hugoalh/http-header-retry-after
Version:
A module to handle the HTTP header `Retry-After` according to the specification RFC 9110.
45 lines • 1.19 kB
TypeScript
/**
* Handle the HTTP header `Retry-After` according to the specification RFC 9110.
*/
export declare class HTTPHeaderRetryAfter {
#private;
get [Symbol.toStringTag](): string;
/**
* Initialize.
* @param {number | string | Date | Headers | Response} input Input.
*/
constructor(input: number | string | Date | Headers | Response);
/**
* Get `Date`.
* @returns {Date}
*/
getDate(): Date;
/**
* Get remain time in milliseconds.
* @returns {number}
*/
getRemainTimeMilliseconds(): number;
/**
* Get remain time in seconds.
* @returns {number}
*/
getRemainTimeSeconds(): number;
/**
* Stringify.
* @returns {string}
*/
stringify(): string;
/**
* Convert to string.
* @returns {string}
*/
toString(): string;
/**
* Initialize in safe way.
* @param {number | string | Date | Headers | Response} input Input.
* @returns {HTTPHeaderRetryAfter | null}
*/
static parseSafe(input: number | string | Date | Headers | Response): HTTPHeaderRetryAfter | null;
}
export default HTTPHeaderRetryAfter;
//# sourceMappingURL=mod.d.ts.map