TooTallNate / node-proxy-agent

Maps proxy protocols to `http.Agent` implementations
285 stars 69 forks source link

Document opts for constructor #24

Closed tnguyen14 closed 1 year ago

tnguyen14 commented 6 years ago

Hi,

Could you provide some documentation for the different object shapes that are available for the new ProxyAgent(opts) constructor?

RopoMen commented 3 years ago

Over here (https://github.com/TooTallNate/node-proxy-agent/blob/master/index.d.ts#L10-L12) opts are defined as "AgentOptions" from agent-base.

Inside agent-base "AgentOptions" is defined like this

export type AgentOptions = {
        timeout?: number;
    };

But still, "mapOptsToProxy" function https://github.com/TooTallNate/node-proxy-agent/blob/master/index.js#L79-L129 is expectin opts to contain properties like "port", "host", "protocol" etc.

TooTallNate commented 1 year ago

This code in this repository has been moved to the proxy-agents monorepo, so I am closing this pull request. If you feel that this issue still exists as of the latest release, feel free to open a new issue over there.