@Override public SdkHttpFullRequest marshall(BaseEventT eventT) { return marshallers.getOrDefault(eventT.getClass(), defaultMarshaller).marshall(eventT); }
@Override public SdkHttpFullRequest marshall(T in) { SdkHttpFullRequest.Builder marshalled = delegate.marshall(in).toBuilder(); marshalled.contentStreamProvider(requestBody.contentStreamProvider()); String contentType = marshalled.firstMatchingHeader(CONTENT_TYPE) .orElse(null); if (StringUtils.isEmpty(contentType)) { marshalled.putHeader(CONTENT_TYPE, requestBody.contentType()); } marshalled.putHeader(CONTENT_LENGTH, String.valueOf(requestBody.contentLength())); return marshalled.build(); } }
static <InputT extends SdkRequest, OutputT> InterceptorContext finalizeSdkHttpFullRequest( ClientExecutionParams<InputT, OutputT> executionParams, ExecutionContext executionContext, InputT inputT, SdkClientConfiguration clientConfiguration) { runBeforeMarshallingInterceptors(executionContext); SdkHttpFullRequest request = executionParams.getMarshaller().marshall(inputT); request = modifyEndpointHostIfNeeded(request, clientConfiguration, executionParams); addHttpRequest(executionContext, request); runAfterMarshallingInterceptors(executionContext); return runModifyHttpRequestInterceptors(request, executionContext); }