co.cask.common.http
Class HttpRequest

java.lang.Object
  extended by co.cask.common.http.HttpRequest

public class HttpRequest
extends Object

Represents an HTTP request to be executed by HttpRequests.


Nested Class Summary
static class HttpRequest.Builder
          Builder for HttpRequest.
 
Constructor Summary
HttpRequest(HttpMethod method, URL url, com.google.common.collect.Multimap<String,String> headers, com.google.common.io.InputSupplier<? extends InputStream> body)
           
 
Method Summary
static HttpRequest.Builder builder(HttpMethod method, URL url)
           
static HttpRequest.Builder builder(HttpRequest request)
           
static HttpRequest.Builder delete(URL url)
           
static HttpRequest.Builder get(URL url)
           
 com.google.common.io.InputSupplier<? extends InputStream> getBody()
           
 com.google.common.collect.Multimap<String,String> getHeaders()
           
 HttpMethod getMethod()
           
 URL getURL()
           
static HttpRequest.Builder post(URL url)
           
static HttpRequest.Builder put(URL url)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HttpRequest

public HttpRequest(HttpMethod method,
                   URL url,
                   @Nullable
                   com.google.common.collect.Multimap<String,String> headers,
                   @Nullable
                   com.google.common.io.InputSupplier<? extends InputStream> body)
Method Detail

get

public static HttpRequest.Builder get(URL url)

post

public static HttpRequest.Builder post(URL url)

delete

public static HttpRequest.Builder delete(URL url)

put

public static HttpRequest.Builder put(URL url)

builder

public static HttpRequest.Builder builder(HttpMethod method,
                                          URL url)

builder

public static HttpRequest.Builder builder(HttpRequest request)

getMethod

public HttpMethod getMethod()

getURL

public URL getURL()

getHeaders

@Nullable
public com.google.common.collect.Multimap<String,String> getHeaders()

getBody

@Nullable
public com.google.common.io.InputSupplier<? extends InputStream> getBody()


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