-
Notifications
You must be signed in to change notification settings - Fork 35
feat: implement send function #980
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
base: feat/async-http
Are you sure you want to change the base?
Conversation
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.
A couple questions. Also, fix the string interpolation messages so we aren't logging Optional(...)
all over the logs
var nioRequest = AsyncHTTPClient.HTTPClientRequest(url: url.absoluteString) | ||
nioRequest.method = method | ||
|
||
for header in request.headers.headers + config.defaultHeaders.headers { |
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.
What if a header is set in the request AND in defaults?
Is the request's value used, the default's, or are both headers set? (HTTP is okay with two headers with the same keys and/or values)
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.
Addressed. Header in request will be preferred and overwrite if its in default as well.
httpMetricsUsage.connectionsLimit = 0 // TODO: Get from AsyncHTTPClient configuration | ||
do { | ||
let timeout: TimeAmount = .seconds(Int64(config.socketTimeout)) | ||
let nioResponse = try await client.execute(nioRequest, timeout: timeout) |
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.
lol is this really all it takes? Will it also do HTTP/2 bidi streaming out of the box for us?
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.
Yup :) All integration tests are passing for me!
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.
How is performance? We should look at the tests where we run huge #s of S3 streaming ops at the same time
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.
I'll be doing performance testing for the whole implementation prior to merging the feature branch to main. So that answer is incoming! But I dont think we need to hold off on merging this to the feature branch until we get those numbers.
Issue #
Description of changes
Scope
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.