Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F103725737
response-interceptor.d.ts
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Tue, Mar 4, 08:04
Size
687 B
Mime Type
text/x-java
Expires
Thu, Mar 6, 08:04 (2 d)
Engine
blob
Format
Raw Data
Handle
24650588
Attached To
rOACCT Open Access Compliance Check Tool (OACCT)
response-interceptor.d.ts
View Options
/// <reference types="node" />
import type * as http from 'http';
declare type Interceptor = (buffer: Buffer, proxyRes: http.IncomingMessage, req: http.IncomingMessage, res: http.ServerResponse) => Promise<Buffer | string>;
/**
* Intercept responses from upstream.
* Automatically decompress (deflate, gzip, brotli).
* Give developer the opportunity to modify intercepted Buffer and http.ServerResponse
*
* NOTE: must set options.selfHandleResponse=true (prevent automatic call of res.end())
*/
export declare function responseInterceptor(interceptor: Interceptor): (proxyRes: http.IncomingMessage, req: http.IncomingMessage, res: http.ServerResponse) => Promise<void>;
export {};
Event Timeline
Log In to Comment