brooklyn-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bostko <>
Subject [GitHub] brooklyn-server pull request #285: Adding HttpExecutor to be used for interc...
Date Mon, 29 Aug 2016 11:27:42 GMT
Github user bostko commented on a diff in the pull request:
    --- Diff: utils/common/src/main/java/org/apache/brooklyn/util/http/executor/
    @@ -0,0 +1,128 @@
    + * 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
    + *
    + *
    + *
    + * Unless required by applicable law or agreed to in writing,
    + * software distributed under the License is distributed on an
    + * KIND, either express or implied.  See the License for the
    + * specific language governing permissions and limitations
    + * under the License.
    + */
    +package org.apache.brooklyn.util.http.executor;
    +import static;
    +import java.util.Map;
    +import javax.annotation.Nullable;
    +public interface HttpRequest {
    +    // TODO Should we use InputStream for body (rather than byte[]). That would mean
we don't have
    +    // to hold the entire body in-memory, which might be important for really big payloads!
    --- End diff --
    I think the end consumer who is using HttpResponse and HttpRequest should take care for
closing the Stream.
    Please check `org.apache.http.HttpEntity`.
    In essence HttpExecutor is a pattern for providing external httpClients.
    For deciding what to return in HttpRequest and HttpResponse Stream or byte[], I think
we should better take a look at exposing it in a way which is implemented in most of the httpClients
like Apache Http Client.

If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at or file a JIRA ticket
with INFRA.

View raw message