@Override
    public Object convertRequest(
            ServiceRequestContext ctx, AggregatedHttpRequest request, Class<?> expectedResultType,
            @Nullable ParameterizedType expectedParameterizedResultType) throws Exception {

        final HttpData content = request.content();
        if (expectedResultType == byte[].class) {
            return content.array();
        }
        if (expectedResultType == HttpData.class) {
            return content;
        }
        return RequestConverterFunction.fallthrough();
    }
A {@link RequestConverterFunction} which converts a binary body of the
{@link AggregatedHttpRequest} to one of {@code byte[]} or {@link HttpData} depending on the
{@code expectedResultType}.
Note that this {@link RequestConverterFunction} is applied to an annotated service by default,
so you don't have to specify this converter explicitly.
core/src/main/java/com/linecorp/armeria/server/annotation/ByteArrayRequestConverterFunction.java