mirror of https://github.com/apache/jclouds.git
added constructor that accepts http headers
git-svn-id: http://jclouds.googlecode.com/svn/trunk@1842 3d8758e0-26b5-11de-8745-db77d3ebf521
This commit is contained in:
parent
20fb575056
commit
6f58f153b5
|
@ -32,6 +32,7 @@ import org.jclouds.command.Request;
|
||||||
|
|
||||||
import com.google.common.collect.Multimap;
|
import com.google.common.collect.Multimap;
|
||||||
import com.google.inject.internal.Lists;
|
import com.google.inject.internal.Lists;
|
||||||
|
import com.google.inject.internal.Nullable;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Represents a request that can be executed within {@link HttpCommandExecutorService}
|
* Represents a request that can be executed within {@link HttpCommandExecutorService}
|
||||||
|
@ -70,6 +71,20 @@ public class HttpRequest extends HttpMessage implements Request<URI> {
|
||||||
setHeaders(checkNotNull(headers, "headers"));
|
setHeaders(checkNotNull(headers, "headers"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @param endPoint
|
||||||
|
* This may change over the life of the request due to redirects.
|
||||||
|
* @param method
|
||||||
|
* If the request is HEAD, this may change to GET due to redirects
|
||||||
|
*/
|
||||||
|
public HttpRequest(HttpMethod method, URI endPoint, Multimap<String, String> headers,
|
||||||
|
@Nullable Object entity) {
|
||||||
|
this(method, endPoint);
|
||||||
|
setHeaders(checkNotNull(headers, "headers"));
|
||||||
|
setEntity("entity");
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
final StringBuilder sb = new StringBuilder();
|
final StringBuilder sb = new StringBuilder();
|
||||||
|
|
Loading…
Reference in New Issue