@tinyhttp/req
Advanced tools
Comparing version 1.2.1 to 1.2.2
@@ -6,5 +6,5 @@ import { IncomingMessage as Request, ServerResponse as Response } from 'http'; | ||
export declare const getRequestHeader: (req: Pick<Request, 'headers'>) => (header: string) => string | string[]; | ||
export declare const getRangeFromHeader: (req: Pick<Request, 'headers'>) => (size: number, options?: Options) => -1 | -2 | parseRange.Ranges; | ||
export declare const getRangeFromHeader: (req: Pick<Request, 'headers'>) => (size: number, options?: Options) => parseRange.Result | parseRange.Ranges; | ||
export declare const getFreshOrStale: (req: Pick<Request, 'headers' | 'method'>, res: Pick<Response, 'getHeader' | 'statusCode'>) => boolean; | ||
export declare const checkIfXMLHttpRequest: (req: Pick<Request, 'headers'>) => boolean; | ||
export declare const reqIs: (req: Pick<Request, 'headers'>) => (...types: string[]) => boolean; |
@@ -37,3 +37,3 @@ import parseRange from 'range-parser'; | ||
return fresh(req.headers, { | ||
etag: getRequestHeader(req)('ETag'), | ||
etag: res.getHeader('ETag'), | ||
'last-modified': res.getHeader('Last-Modified') | ||
@@ -40,0 +40,0 @@ }); |
{ | ||
"name": "@tinyhttp/req", | ||
"version": "1.2.1", | ||
"version": "1.2.2", | ||
"type": "module", | ||
@@ -5,0 +5,0 @@ "description": "request extensions for tinyhttp", |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
8629