We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Great lib!! I'm using it now instead of node-http-proxy. But I love TypeScript so here are the definition file, maybe you can at it inside your lib.
THX
declare module "http2-proxy" { import * as Http from "http"; import * as Http2 from "http2"; import * as Net from "net"; function web(req: Http.IncomingMessage | Http2.Http2ServerRequest, res: Http.ServerResponse | Http2.Http2ServerResponse, options: webOptions, callback?: (err: Error) => Function): Promise<Error> function ws(req: Http.IncomingMessage | Http2.Http2ServerRequest, socket: Net.Socket, head: Buffer, options: wsOptions, callback?: (err: Error) => Function): Promise<Error> interface options { hostname: string; port: number; proxyTimeout?: number; proxyName?: string; timeout?: Http.IncomingMessage | Http2.Http2ServerRequest; onReq?(req: Http.IncomingMessage, options: Http.RequestOptions): void; } interface webOptions extends options { onRes?(req: Http.IncomingMessage | Http2.Http2ServerRequest, res: Http.ServerResponse | Http2.Http2ServerResponse): void } interface wsOptions extends options{ onRes?(req: Http.IncomingMessage | Http2.Http2ServerRequest, socket: Net.Socket): void } }
The text was updated successfully, but these errors were encountered:
Please PR.
Sorry, something went wrong.
No branches or pull requests
Great lib!!
I'm using it now instead of node-http-proxy.
But I love TypeScript so here are the definition file, maybe you can at it inside your lib.
THX
The text was updated successfully, but these errors were encountered: