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());
}
Aggregations