Search in sources :

Example 16 with HttpRequestMetaData

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

the class HttpRequestDecoderTest method assertRequestLine.

private static HttpRequestMetaData assertRequestLine(HttpRequestMethod expectedMethod, String expectedRequestTarget, HttpProtocolVersion expectedVersion, EmbeddedChannel channel) {
    HttpRequestMetaData request = channel.readInbound();
    assertThat(request.method(), equalTo(expectedMethod));
    assertThat(request.requestTarget(), equalTo(expectedRequestTarget));
    assertThat(request.version(), equalTo(expectedVersion));
    return request;
}
Also used : HttpRequestMetaData(io.servicetalk.http.api.HttpRequestMetaData)

Aggregations

HttpRequestMetaData (io.servicetalk.http.api.HttpRequestMetaData)16 Test (org.junit.jupiter.api.Test)12 EmbeddedChannel (io.netty.channel.embedded.EmbeddedChannel)11 ParameterizedTest (org.junit.jupiter.params.ParameterizedTest)11 Buffer (io.servicetalk.buffer.api.Buffer)9 DefaultHttpHeadersFactory (io.servicetalk.http.api.DefaultHttpHeadersFactory)4 HttpHeaders (io.servicetalk.http.api.HttpHeaders)4 ClientGroup (io.servicetalk.client.api.ClientGroup)3 ServiceDiscoverer (io.servicetalk.client.api.ServiceDiscoverer)3 AVAILABLE (io.servicetalk.client.api.ServiceDiscovererEvent.Status.AVAILABLE)3 DefaultPartitionAttributesBuilder (io.servicetalk.client.api.internal.partition.DefaultPartitionAttributesBuilder)3 PartitionAttributes (io.servicetalk.client.api.partition.PartitionAttributes)3 PartitionAttributesBuilder (io.servicetalk.client.api.partition.PartitionAttributesBuilder)3 PartitionedServiceDiscovererEvent (io.servicetalk.client.api.partition.PartitionedServiceDiscovererEvent)3 AsyncCloseables.newCompositeCloseable (io.servicetalk.concurrent.api.AsyncCloseables.newCompositeCloseable)3 Publisher (io.servicetalk.concurrent.api.Publisher)3 Single (io.servicetalk.concurrent.api.Single)3 TestPublisher (io.servicetalk.concurrent.api.TestPublisher)3 TestSubscription (io.servicetalk.concurrent.api.TestSubscription)3 BlockingHttpClient (io.servicetalk.http.api.BlockingHttpClient)3