Package com.google.api.client.http
Class HttpHeaders.HeaderParsingFakeLevelHttpRequest
- java.lang.Object
-
- com.google.api.client.http.LowLevelHttpRequest
-
- com.google.api.client.http.HttpHeaders.HeaderParsingFakeLevelHttpRequest
-
- Enclosing class:
- HttpHeaders
private static class HttpHeaders.HeaderParsingFakeLevelHttpRequest extends LowLevelHttpRequest
LowLevelHttpRequest which will call the .parseHeader() method for every header added.
-
-
Field Summary
Fields Modifier and Type Field Description private HttpHeaders.ParseHeaderState
state
private HttpHeaders
target
-
Constructor Summary
Constructors Constructor Description HeaderParsingFakeLevelHttpRequest(HttpHeaders target, HttpHeaders.ParseHeaderState state)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addHeader(java.lang.String name, java.lang.String value)
Adds a header to the HTTP request.LowLevelHttpResponse
execute()
Executes the request and returns a low-level HTTP response object.-
Methods inherited from class com.google.api.client.http.LowLevelHttpRequest
getContentEncoding, getContentLength, getContentType, getStreamingContent, setContentEncoding, setContentLength, setContentType, setStreamingContent, setTimeout, setWriteTimeout
-
-
-
-
Field Detail
-
target
private final HttpHeaders target
-
state
private final HttpHeaders.ParseHeaderState state
-
-
Constructor Detail
-
HeaderParsingFakeLevelHttpRequest
HeaderParsingFakeLevelHttpRequest(HttpHeaders target, HttpHeaders.ParseHeaderState state)
-
-
Method Detail
-
addHeader
public void addHeader(java.lang.String name, java.lang.String value)
Description copied from class:LowLevelHttpRequest
Adds a header to the HTTP request.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.- Specified by:
addHeader
in classLowLevelHttpRequest
- Parameters:
name
- header namevalue
- header value
-
execute
public LowLevelHttpResponse execute() throws java.io.IOException
Description copied from class:LowLevelHttpRequest
Executes the request and returns a low-level HTTP response object.- Specified by:
execute
in classLowLevelHttpRequest
- Throws:
java.io.IOException
-
-