co.cask.common.http
Class HttpRequest.Builder

java.lang.Object
  extended by co.cask.common.http.HttpRequest.Builder
Enclosing class:
HttpRequest

public static final class HttpRequest.Builder
extends Object

Builder for HttpRequest.


Method Summary
 HttpRequest.Builder addHeader(String key, String value)
           
 HttpRequest.Builder addHeaders(Map<String,String> headers)
           
 HttpRequest.Builder addHeaders(com.google.common.collect.Multimap<String,String> headers)
           
 HttpRequest build()
           
 HttpRequest.Builder withBody(ByteBuffer body)
           
 HttpRequest.Builder withBody(File body)
           
 HttpRequest.Builder withBody(com.google.common.io.InputSupplier<? extends InputStream> body)
           
 HttpRequest.Builder withBody(String body)
           
 HttpRequest.Builder withBody(String body, Charset charset)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

addHeader

public HttpRequest.Builder addHeader(String key,
                                     String value)

addHeaders

public HttpRequest.Builder addHeaders(@Nullable
                                      com.google.common.collect.Multimap<String,String> headers)

addHeaders

public HttpRequest.Builder addHeaders(@Nullable
                                      Map<String,String> headers)

withBody

public HttpRequest.Builder withBody(com.google.common.io.InputSupplier<? extends InputStream> body)

withBody

public HttpRequest.Builder withBody(File body)

withBody

public HttpRequest.Builder withBody(String body)

withBody

public HttpRequest.Builder withBody(String body,
                                    Charset charset)

withBody

public HttpRequest.Builder withBody(ByteBuffer body)

build

public HttpRequest build()


Copyright © 2014 Cask Data, Inc. Licensed under the Apache License, Version 2.0.