use of software.amazon.awssdk.http.Protocol in project flink by apache.
the class AWSGeneralUtilTest method testCreateNettyAsyncHttpClientHttpVersion.
@Test
public void testCreateNettyAsyncHttpClientHttpVersion() throws Exception {
Protocol httpVersion = HTTP1_1;
AttributeMap clientConfiguration = AttributeMap.builder().put(SdkHttpConfigurationOption.PROTOCOL, httpVersion).build();
NettyNioAsyncHttpClient.Builder builder = NettyNioAsyncHttpClient.builder();
SdkAsyncHttpClient httpClient = AWSGeneralUtil.createAsyncHttpClient(clientConfiguration, builder);
NettyConfiguration nettyConfiguration = TestUtil.getNettyConfiguration(httpClient);
assertEquals(httpVersion, nettyConfiguration.attribute(SdkHttpConfigurationOption.PROTOCOL));
}
use of software.amazon.awssdk.http.Protocol in project flink by apache.
the class AWSGeneralUtilTest method testCreateNettyAsyncHttpClientWithPropertyProtocol.
@Test
public void testCreateNettyAsyncHttpClientWithPropertyProtocol() throws Exception {
Protocol httpVersion = HTTP1_1;
Properties properties = new Properties();
properties.setProperty(AWSConfigConstants.HTTP_PROTOCOL_VERSION, String.valueOf(httpVersion));
SdkAsyncHttpClient httpClient = AWSGeneralUtil.createAsyncHttpClient(properties);
NettyConfiguration nettyConfiguration = TestUtil.getNettyConfiguration(httpClient);
assertEquals(httpVersion, nettyConfiguration.attribute(SdkHttpConfigurationOption.PROTOCOL));
}
Aggregations