@Test
    public void contentTypeNotThrift() throws Exception {
        // Browser clients often send a non-Thrift content type.
        final HelloService.Iface client =
                ThriftClients.builder(server.httpUri() + "/hello")
                             .setHeader(HttpHeaderNames.CONTENT_TYPE, "text/plain; charset=utf-8")
                             .build(HelloService.Iface.class);
        assertThat(client.hello("Trustin")).isEqualTo("Hello, Trustin!");
    }
Test of serialization format validation / detection based on HTTP headers.
thrift/thrift0.13/src/test/java/com/linecorp/armeria/server/thrift/ThriftSerializationFormatsTest.java