Commit 620ba371 authored by Kenton Varda's avatar Kenton Varda

Remove deprecated overload of newHttpClient() per TODO(soon).

parent a5e1d78f
......@@ -1910,8 +1910,10 @@ KJ_TEST("HttpClient WebSocket handshake") {
auto headerTable = tableBuilder.build();
FakeEntropySource entropySource;
HttpClientSettings clientSettings;
clientSettings.entropySource = entropySource;
auto client = newHttpClient(*headerTable, *pipe.ends[0], entropySource);
auto client = newHttpClient(*headerTable, *pipe.ends[0], clientSettings);
testWebSocketClient(waitScope, *headerTable, hMyHeader, *client);
......@@ -1936,8 +1938,10 @@ KJ_TEST("HttpClient WebSocket error") {
auto headerTable = tableBuilder.build();
FakeEntropySource entropySource;
HttpClientSettings clientSettings;
clientSettings.entropySource = entropySource;
auto client = newHttpClient(*headerTable, *pipe.ends[0], entropySource);
auto client = newHttpClient(*headerTable, *pipe.ends[0], clientSettings);
kj::HttpHeaders headers(*headerTable);
headers.set(hMyHeader, "foo");
......@@ -2455,7 +2459,9 @@ KJ_TEST("newHttpService from HttpClient WebSockets") {
{
HttpHeaderTable table;
FakeEntropySource entropySource;
auto backClient = newHttpClient(table, *backPipe.ends[0], entropySource);
HttpClientSettings clientSettings;
clientSettings.entropySource = entropySource;
auto backClient = newHttpClient(table, *backPipe.ends[0], clientSettings);
auto frontService = newHttpService(*backClient);
HttpServer frontServer(timer, table, *frontService);
auto listenTask = frontServer.listenHttp(kj::mv(frontPipe.ends[1]));
......@@ -2494,7 +2500,9 @@ KJ_TEST("newHttpService from HttpClient WebSockets disconnect") {
{
HttpHeaderTable table;
FakeEntropySource entropySource;
auto backClient = newHttpClient(table, *backPipe.ends[0], entropySource);
HttpClientSettings clientSettings;
clientSettings.entropySource = entropySource;
auto backClient = newHttpClient(table, *backPipe.ends[0], clientSettings);
auto frontService = newHttpService(*backClient);
HttpServer frontServer(timer, table, *frontService);
auto listenTask = frontServer.listenHttp(kj::mv(frontPipe.ends[1]));
......
......@@ -637,12 +637,6 @@ kj::Own<HttpClient> newHttpClient(HttpHeaderTable& responseHeaderTable, kj::Asyn
// subsequent requests will fail. If a response takes a long time, it blocks subsequent responses.
// If a WebSocket is opened successfully, all subsequent requests fail.
kj::Own<HttpClient> newHttpClient(
HttpHeaderTable& responseHeaderTable, kj::AsyncIoStream& stream,
kj::Maybe<EntropySource&> entropySource) KJ_DEPRECATED("use HttpClientSettings");
// Temporary for backwards-compatibilty.
// TODO(soon): Remove this before next release.
kj::Own<HttpClient> newHttpClient(HttpService& service);
kj::Own<HttpService> newHttpService(HttpClient& client);
// Adapts an HttpClient to an HttpService and vice versa.
......@@ -802,12 +796,4 @@ inline void HttpHeaders::forEach(Func&& func) const {
}
}
inline kj::Own<HttpClient> newHttpClient(
HttpHeaderTable& responseHeaderTable, kj::AsyncIoStream& stream,
kj::Maybe<EntropySource&> entropySource) {
HttpClientSettings settings;
settings.entropySource = entropySource;
return newHttpClient(responseHeaderTable, stream, kj::mv(settings));
}
} // namespace kj
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment