async-http-client
async-http-client copied to clipboard
HTTP client library built on SwiftNIO
Fixes https://github.com/swift-server/async-http-client/issues/364 ### Modification - remember if we own the thread pool or not. - shutdown the thread pool if we own it after we are done with it ###...
When function `try await response.body.collect(upTo: maxBodySize)` is called where response is a `HTTPClientResponse` and maxBodySize = 1048576 (i.e 1 MB) and the response body is greater than 1MB then AsyncHTTPClient/Transaction+StateMachine...
Hello! I found an issue while using Vapor 4 and the Soto library to upload and delete objects from a DigitalOcean S3-compatible bucket. After some debugging you can follow in...
A useful trick we learned in grpc-swift is that it can be handy to allow users to insert a "debug handler" (or several) into each channel pipeline. This should usually...
/Sources/AsyncHTTPClient/ConnectionPool/State Machine/HTTPConnectionPool+HTTP1Connections.swift had unnecessary lazy calls in it. Since the results of the lazy calls are immediately consumed, using lazy here introduces an unnecessary performance overhead!
Title says it all. Tesla's Auth API requires 2 redirects to be followed, one of which has a token in as a query parameter in the URL. It seems with...
### Motivation: This change was proposed in issue [#389](https://github.com/swift-server/async-http-client/issues/389). Users writing their own `HttpClientResponseDelegate` implementation might want to emit log messages to the `task`'s `logger`. ### Modifications: Changed the access...
[When we added `NWWaitingHandler`](https://github.com/swift-server/async-http-client/blob/main/Sources/AsyncHTTPClient/NIOTransportServices/NWWaitingHandler.swift) in https://github.com/swift-server/async-http-client/pull/588 we didn’t add a unit test for the `NWWaitingHandler`. This is because we need to make an enhancement to `NIOTransportServices` to make the `WaitingForConnectivity`...
At the moment, we have a pretty gnarly issue with AHC's API: Settings can either be supplied globally or per request. So if you want to set certain configuration for...
There's this assertion which tests that a provided `eventLoop` for a request is part of AHC's `eventLoopGroup`. https://github.com/swift-server/async-http-client/blob/24425989dadab6d6e4167174791a23d4e2a6d0c3/Sources/AsyncHTTPClient/HTTPClient.swift#L551 It's clear that this precondition is required for `delegateAndChannel(on: eventLoop)` but I'm...