|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.google.api.client.http.HttpRequest
public final class HttpRequest
HTTP request.
| Field Summary | |
|---|---|
HttpContent |
content
HTTP request content or null for none. |
boolean |
disableContentLogging
Whether to disable request content logging during execute()
(unless Level.ALL is loggable which forces all logging). |
HttpHeaders |
headers
HTTP request headers. |
String |
method
HTTP request method. |
HttpTransport |
transport
HTTP transport. |
GenericUrl |
url
HTTP request URL. |
| Method Summary | |
|---|---|
HttpResponse |
execute()
Execute the HTTP request and returns the HTTP response. |
void |
setUrl(String encodedUrl)
Sets the url based on the given encoded URL string. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public HttpHeaders headers
Its value is initialized by calling clone() on the
HttpTransport.defaultHeaders. Therefore, it is initialized to be of
the same Java class, i.e. of the same Object.getClass().
public boolean disableContentLogging
execute()
(unless Level.ALL is loggable which forces all logging).
Useful for example if content has sensitive data such as an authentication
information. Defaults to false.
public HttpContent content
null for none.
public final HttpTransport transport
public String method
public GenericUrl url
| Method Detail |
|---|
public void setUrl(String encodedUrl)
url based on the given encoded URL string.
public HttpResponse execute()
throws IOException
Note that regardless of the returned status code, the HTTP response content has not been parsed yet, and must be parsed by the calling code.
Almost all details of the request and response are logged if
Level.CONFIG is loggable. The only exception is the value of the
Authorization header which is only logged if Level.ALL is
loggable.
HttpResponseException - for an HTTP error code
IOExceptionHttpResponse.isSuccessStatusCode
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||