Search in sources :

Example 76 with StreamingHttpClient

use of io.servicetalk.http.api.StreamingHttpClient in project servicetalk by apple.

the class ServiceTalkContentCodingTest method assertSuccessful.

protected void assertSuccessful(final ContentCodec encoding) throws Throwable {
    assertResponse(client().request(client().get("/").encoding(encoding).payloadBody(payloadAsString((byte) 'a'), textSerializerUtf8())).toStreamingResponse());
    final BlockingStreamingHttpClient blockingStreamingHttpClient = client().asBlockingStreamingClient();
    assertResponse(blockingStreamingHttpClient.request(blockingStreamingHttpClient.get("/").encoding(encoding).payloadBody(singletonList(payloadAsString((byte) 'a')), textSerializer())).toStreamingResponse());
    final StreamingHttpClient streamingHttpClient = client().asStreamingClient();
    assertResponse(streamingHttpClient.request(streamingHttpClient.get("/").encoding(encoding).payloadBody(from(payloadAsString((byte) 'a')), textSerializer())).toFuture().get());
}
Also used : BlockingStreamingHttpClient(io.servicetalk.http.api.BlockingStreamingHttpClient) FilterableStreamingHttpClient(io.servicetalk.http.api.FilterableStreamingHttpClient) StreamingHttpClient(io.servicetalk.http.api.StreamingHttpClient) BlockingStreamingHttpClient(io.servicetalk.http.api.BlockingStreamingHttpClient)

Aggregations

StreamingHttpClient (io.servicetalk.http.api.StreamingHttpClient)76 ParameterizedTest (org.junit.jupiter.params.ParameterizedTest)48 RedirectConfigBuilder (io.servicetalk.http.api.RedirectConfigBuilder)33 StreamingHttpRequest (io.servicetalk.http.api.StreamingHttpRequest)31 Test (org.junit.jupiter.api.Test)31 StreamingHttpResponse (io.servicetalk.http.api.StreamingHttpResponse)27 Buffer (io.servicetalk.buffer.api.Buffer)24 MethodSource (org.junit.jupiter.params.provider.MethodSource)22 StreamingHttpConnection (io.servicetalk.http.api.StreamingHttpConnection)19 SingleAddressHttpClientBuilder (io.servicetalk.http.api.SingleAddressHttpClientBuilder)16 HttpServerContext (io.servicetalk.http.api.HttpServerContext)15 InetSocketAddress (java.net.InetSocketAddress)15 ServerContext (io.servicetalk.transport.api.ServerContext)13 Single (io.servicetalk.concurrent.api.Single)12 AddressUtils.serverHostAndPort (io.servicetalk.transport.netty.internal.AddressUtils.serverHostAndPort)11 CountDownLatch (java.util.concurrent.CountDownLatch)11 ExecutionException (java.util.concurrent.ExecutionException)11 BufferAllocator (io.servicetalk.buffer.api.BufferAllocator)10 HostAndPort (io.servicetalk.transport.api.HostAndPort)10 Single.succeeded (io.servicetalk.concurrent.api.Single.succeeded)9