public static final class HttpRequest.Builder extends Object
HttpRequest
objects.Modifier and Type | Method and Description |
---|---|
HttpRequest |
build()
Creates a
HttpRequest object for this builder. |
HttpRequest.Builder |
cacheFillBytes(long cacheFillBytes)
Deprecated.
|
HttpRequest.Builder |
cacheHit(boolean cacheHit)
Deprecated.
|
HttpRequest.Builder |
cacheLookup(boolean cacheLookup)
Deprecated.
|
HttpRequest.Builder |
cacheValidatedWithOriginServer(boolean cacheValidatedWithOriginServer)
Deprecated.
|
HttpRequest.Builder |
referer(String referer)
Deprecated.
|
HttpRequest.Builder |
remoteIp(String remoteIp)
Deprecated.
|
HttpRequest.Builder |
requestMethod(HttpRequest.RequestMethod requestMethod)
Deprecated.
|
HttpRequest.Builder |
requestSize(long requestSize)
Deprecated.
|
HttpRequest.Builder |
requestUrl(String requestUrl)
Deprecated.
|
HttpRequest.Builder |
responseSize(long responseSize)
Deprecated.
|
HttpRequest.Builder |
serverIp(String serverIp)
Deprecated.
|
HttpRequest.Builder |
setCacheFillBytes(long cacheFillBytes)
Sets the number of HTTP response bytes inserted into cache.
|
HttpRequest.Builder |
setCacheHit(boolean cacheHit)
Sets whether or not an entity was served from cache (with or without validation).
|
HttpRequest.Builder |
setCacheLookup(boolean cacheLookup)
Sets whether or not a cache lookup was attempted.
|
HttpRequest.Builder |
setCacheValidatedWithOriginServer(boolean cacheValidatedWithOriginServer)
Sets whether or not the response was validated with the origin server before being served
from cache.
|
HttpRequest.Builder |
setReferer(String referer)
Sets the referer URL of the request, as defined in HTTP/1.1 Header Field Definitions.
|
HttpRequest.Builder |
setRemoteIp(String remoteIp)
Sets the IP address (IPv4 or IPv6) of the client that issued the HTTP request.
|
HttpRequest.Builder |
setRequestMethod(HttpRequest.RequestMethod requestMethod)
Sets the HTTP request method.
|
HttpRequest.Builder |
setRequestSize(long requestSize)
Sets the size of the HTTP request message in bytes, including the request headers and the
request body.
|
HttpRequest.Builder |
setRequestUrl(String requestUrl)
Sets the requested URL.
|
HttpRequest.Builder |
setResponseSize(long responseSize)
Sets the size of the HTTP response message sent back to the client, in bytes, including the
response headers and the response body.
|
HttpRequest.Builder |
setServerIp(String serverIp)
Sets the IP address (IPv4 or IPv6) of the origin server that the request was sent to.
|
HttpRequest.Builder |
setStatus(int status)
Sets the response code indicating the status of response.
|
HttpRequest.Builder |
setUserAgent(String userAgent)
Sets the user agent sent by the client.
|
HttpRequest.Builder |
status(int status)
Deprecated.
|
HttpRequest.Builder |
userAgent(String userAgent)
Deprecated.
|
@Deprecated public HttpRequest.Builder requestMethod(HttpRequest.RequestMethod requestMethod)
public HttpRequest.Builder setRequestMethod(HttpRequest.RequestMethod requestMethod)
@Deprecated public HttpRequest.Builder requestUrl(String requestUrl)
http
, https
), the
host name, the path and the query portion of the URL that was requested. Example:
http://example.com/some/info?color=red
.public HttpRequest.Builder setRequestUrl(String requestUrl)
http
, https
), the
host name, the path and the query portion of the URL that was requested. Example:
http://example.com/some/info?color=red
.@Deprecated public HttpRequest.Builder requestSize(long requestSize)
public HttpRequest.Builder setRequestSize(long requestSize)
@Deprecated public HttpRequest.Builder status(int status)
public HttpRequest.Builder setStatus(int status)
@Deprecated public HttpRequest.Builder responseSize(long responseSize)
public HttpRequest.Builder setResponseSize(long responseSize)
@Deprecated public HttpRequest.Builder userAgent(String userAgent)
Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Q312461; .NET CLR 1.0.3705)
.public HttpRequest.Builder setUserAgent(String userAgent)
Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Q312461; .NET CLR 1.0.3705)
.@Deprecated public HttpRequest.Builder remoteIp(String remoteIp)
192.168.1.1
, FE80::0202:B3FF:FE1E:8329
.public HttpRequest.Builder setRemoteIp(String remoteIp)
192.168.1.1
, FE80::0202:B3FF:FE1E:8329
.@Deprecated public HttpRequest.Builder serverIp(String serverIp)
192.168.1.1
, FE80::0202:B3FF:FE1E:8329
.public HttpRequest.Builder setServerIp(String serverIp)
192.168.1.1
, FE80::0202:B3FF:FE1E:8329
.@Deprecated public HttpRequest.Builder referer(String referer)
public HttpRequest.Builder setReferer(String referer)
@Deprecated public HttpRequest.Builder cacheLookup(boolean cacheLookup)
false
is used.public HttpRequest.Builder setCacheLookup(boolean cacheLookup)
false
is used.@Deprecated public HttpRequest.Builder cacheHit(boolean cacheHit)
false
is used.public HttpRequest.Builder setCacheHit(boolean cacheHit)
false
is used.@Deprecated public HttpRequest.Builder cacheValidatedWithOriginServer(boolean cacheValidatedWithOriginServer)
cacheHit(boolean)
is set to
true
. If not set, false
is used.public HttpRequest.Builder setCacheValidatedWithOriginServer(boolean cacheValidatedWithOriginServer)
cacheHit(boolean)
is set to
true
. If not set, false
is used.@Deprecated public HttpRequest.Builder cacheFillBytes(long cacheFillBytes)
public HttpRequest.Builder setCacheFillBytes(long cacheFillBytes)
public HttpRequest build()
HttpRequest
object for this builder.Copyright © 2017 Google. All rights reserved.