* Gets an http agent. This function is useful when you need an http agent that handles * routing through a proxy server - depending upon the url and proxy environment variables. * @param serverUrl The server URL where the request will be sent. For example, https://api.github.com
(serverUrl)
| 2879 | * @param serverUrl The server URL where the request will be sent. For example, https://api.github.com |
| 2880 | */ |
| 2881 | getAgent(serverUrl) { |
| 2882 | const parsedUrl = new URL(serverUrl); |
| 2883 | return this._getAgent(parsedUrl); |
| 2884 | } |
| 2885 | _prepareRequest(method, requestUrl, headers) { |
| 2886 | const info = {}; |
| 2887 | info.parsedUrl = requestUrl; |