public final class ByteArrayRequestConverterFunction extends Object implements RequestConverterFunction
RequestConverterFunction which converts a binary body of
the AggregatedHttpRequest to one of byte[] or HttpData.| Constructor and Description |
|---|
ByteArrayRequestConverterFunction() |
| Modifier and Type | Method and Description |
|---|---|
Object |
convertRequest(ServiceRequestContext ctx,
AggregatedHttpRequest request,
Class<?> expectedResultType)
Converts the specified
AggregatedHttpRequest to an object of expectedResultType. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitfallthroughpublic Object convertRequest(ServiceRequestContext ctx, AggregatedHttpRequest request, Class<?> expectedResultType) throws Exception
AggregatedHttpRequest to an object of expectedResultType.
This converter allows only byte[] and HttpData as its return type, and
AggregatedHttpRequest would be consumed only if it does not have a Content-Type header
or if it has Content-Type: application/octet-stream or Content-Type: application/binary.convertRequest in interface RequestConverterFunctionExceptionCopyright © 2020 LeanCloud. All rights reserved.