|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.google.api.client.http.LowLevelHttpRequest
com.google.api.client.testing.http.MockLowLevelHttpRequest
public class MockLowLevelHttpRequest
Mock for LowLevelHttpRequest.
| Field Summary | |
|---|---|
HttpContent |
content
HTTP content or null for none. |
com.google.common.collect.ListMultimap<String,String> |
headers
Headers added in addHeader(String, String). |
String |
url
Request URL or null for none. |
| Constructor Summary | |
|---|---|
MockLowLevelHttpRequest()
|
|
MockLowLevelHttpRequest(String url)
|
|
| Method Summary | |
|---|---|
void |
addHeader(String name,
String value)
Adds a header to the HTTP request. |
LowLevelHttpResponse |
execute()
Executes the request and returns a low-level HTTP response object. |
void |
setContent(HttpContent content)
Sets the HTTP request content. |
| Methods inherited from class com.google.api.client.http.LowLevelHttpRequest |
|---|
setTimeout |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public String url
null for none.
public final com.google.common.collect.ListMultimap<String,String> headers
addHeader(String, String).
public HttpContent content
null for none.
| Constructor Detail |
|---|
public MockLowLevelHttpRequest()
public MockLowLevelHttpRequest(String url)
url - Request URL or null for none| Method Detail |
|---|
public void addHeader(String name,
String value)
LowLevelHttpRequest
Note that multiple headers of the same name need to be supported, in which case
LowLevelHttpRequest.addHeader(java.lang.String, java.lang.String) will be called for each instance of the header.
addHeader in class LowLevelHttpRequestname - header namevalue - header value
public LowLevelHttpResponse execute()
throws IOException
LowLevelHttpRequest
execute in class LowLevelHttpRequestIOException
public void setContent(HttpContent content)
throws IOException
LowLevelHttpRequest
setContent in class LowLevelHttpRequestIOException - I/O exception
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||