|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.google.api.client.http.HttpTransport
com.google.api.client.http.javanet.NetHttpTransport
public final class NetHttpTransport
Thread-safe HTTP low-level transport based on the java.net
package.
Users should consider modifying the keep alive property on NetHttpTransport
to control
whether the socket should be returned to a pool of connected sockets. More information is
available here.
Implementation is thread-safe. For maximum efficiency, applications should use a single globally-shared instance of the HTTP transport.
Upgrade warning: in prior version 1.10 when using GET method with non-zero content, it
automatically changed the method to POST. However, starting with version 1.11 it now throws an
IllegalArgumentException
instead. Instead, use POST.
Constructor Summary | |
---|---|
NetHttpTransport()
|
Method Summary | |
---|---|
com.google.api.client.http.javanet.NetHttpRequest |
buildDeleteRequest(String url)
Builds a DELETE request. |
com.google.api.client.http.javanet.NetHttpRequest |
buildGetRequest(String url)
Builds a GET request. |
com.google.api.client.http.javanet.NetHttpRequest |
buildHeadRequest(String url)
Builds a HEAD request. |
com.google.api.client.http.javanet.NetHttpRequest |
buildPostRequest(String url)
Builds a POST request. |
com.google.api.client.http.javanet.NetHttpRequest |
buildPutRequest(String url)
Builds a PUT request. |
boolean |
supportsHead()
Returns whether this HTTP transport implementation supports the HEAD request method. |
Methods inherited from class com.google.api.client.http.HttpTransport |
---|
buildPatchRequest, createRequestFactory, createRequestFactory, shutdown, supportsPatch |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public NetHttpTransport()
Method Detail |
---|
public boolean supportsHead()
HttpTransport
HEAD
request method.
Default implementation returns false
.
supportsHead
in class HttpTransport
public com.google.api.client.http.javanet.NetHttpRequest buildDeleteRequest(String url) throws IOException
HttpTransport
DELETE
request.
buildDeleteRequest
in class HttpTransport
url
- URL
IOException
- I/O exceptionpublic com.google.api.client.http.javanet.NetHttpRequest buildGetRequest(String url) throws IOException
HttpTransport
GET
request.
buildGetRequest
in class HttpTransport
url
- URL
IOException
- I/O exceptionpublic com.google.api.client.http.javanet.NetHttpRequest buildHeadRequest(String url) throws IOException
HttpTransport
HEAD
request. Won't be called if HttpTransport.supportsHead()
returns false
.
Default implementation throws an UnsupportedOperationException
.
buildHeadRequest
in class HttpTransport
url
- URL
IOException
- I/O exceptionpublic com.google.api.client.http.javanet.NetHttpRequest buildPostRequest(String url) throws IOException
HttpTransport
POST
request.
buildPostRequest
in class HttpTransport
url
- URL
IOException
- I/O exceptionpublic com.google.api.client.http.javanet.NetHttpRequest buildPutRequest(String url) throws IOException
HttpTransport
PUT
request.
buildPutRequest
in class HttpTransport
url
- URL
IOException
- I/O exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |