jamesnetherton commented on a change in pull request #3597: URL: https://github.com/apache/camel-quarkus/pull/3597#discussion_r821525989
########## File path: extensions-support/azure-core-http-client-vertx/runtime/src/main/java/org/apache/camel/quarkus/support/azure/core/http/vertx/BufferedVertxHttpResponse.java ########## @@ -0,0 +1,72 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.camel.quarkus.support.azure.core.http.vertx; + +import java.io.ByteArrayInputStream; +import java.io.InputStream; +import java.nio.ByteBuffer; + +import com.azure.core.http.HttpRequest; +import com.azure.core.http.HttpResponse; +import io.vertx.core.buffer.Buffer; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +public final class BufferedVertxHttpResponse extends VertxHttpAsyncResponse { + + private final Buffer body; + + BufferedVertxHttpResponse(HttpRequest request, io.vertx.ext.web.client.HttpResponse response, Buffer body) { + super(request, response); + this.body = body; Review comment: Originally, I was thinking along the same lines. When I started testing with massive responses (10s of gigabytes) it seems Azure / Azure SDK handles it as `HTTP 206 Partial Content`, so the overall body is read and assembled in chunks. Thus I left things as-is. > We could just get the body handler or the read stream associated with it Do you have an example of that? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
