New issue
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
Extract creation of HTTP and WS clients for registration to proper factories #409
Conversation
With this change, HTTP and WS client can be configured correctly to work in all sorts of network situations, like tunnelling proxies.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGASONAICYWTATFFTM (Looks good. All suggestions optional. Not approving in case you want to address them. Feel free to merge.)
import * as parseUtils from "./lib/project/util/parseUtils"; | ||
import * as projectUtils from "./lib/project/util/projectUtils"; | ||
import * as secured from "./lib/secured"; | ||
import * as astUtils from "./lib/tree/ast/astUtils"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why move all these? And if you are going to break the alphabetical order, why not put them all at the top or bottom?
method: HttpMethod.Post, | ||
headers: { Authorization: authorization }, | ||
options: { | ||
timeout: configuration.ws.timeout || 10000, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't this default be provided by the configuration defaults?
lib/util/retry.ts
Outdated
const retryOptions: WrapOptions = { | ||
...DefaultRetryOptions, | ||
...DefaultRetryOptions as WrapOptions, | ||
...opts, | ||
}; | ||
logger.log("silly", `${description} with retry options '%j'`, retryOptions); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be inside a opts.log
conditional?
Pull request auto merged by Atomist.
[atomist:generated] [auto-merge:on-approve] |
With this change, HTTP and WS client can be configured correctly to work
in all sorts of network situations, like tunnelling proxies.