DISCARD_STREAM_TIMEOUT_MILLIS
Constructor and Description |
---|
Http2Codec(OkHttpClient client,
Interceptor.Chain chain,
StreamAllocation streamAllocation,
Http2Connection connection) |
Modifier and Type | Method and Description |
---|---|
void |
cancel()
Cancel this stream.
|
okio.Sink |
createRequestBody(Request request,
long contentLength)
Returns an output stream where the request body can be streamed.
|
void |
finishRequest()
Flush the request to the underlying socket and signal no more bytes will be transmitted.
|
void |
flushRequest()
Flush the request to the underlying socket.
|
static List<Header> |
http2HeadersList(Request request) |
ResponseBody |
openResponseBody(Response response)
Returns a stream that reads the response body.
|
static Response.Builder |
readHttp2HeadersList(List<Header> headerBlock)
Returns headers for a name value block containing an HTTP/2 response.
|
Response.Builder |
readResponseHeaders(boolean expectContinue)
Parses bytes of a response header from an HTTP transport.
|
void |
writeRequestHeaders(Request request)
This should update the HTTP engine's sentRequestMillis field.
|
public Http2Codec(OkHttpClient client, Interceptor.Chain chain, StreamAllocation streamAllocation, Http2Connection connection)
public okio.Sink createRequestBody(Request request, long contentLength)
HttpCodec
createRequestBody
in interface HttpCodec
public void writeRequestHeaders(Request request) throws IOException
HttpCodec
writeRequestHeaders
in interface HttpCodec
IOException
public void flushRequest() throws IOException
HttpCodec
flushRequest
in interface HttpCodec
IOException
public void finishRequest() throws IOException
HttpCodec
finishRequest
in interface HttpCodec
IOException
public Response.Builder readResponseHeaders(boolean expectContinue) throws IOException
HttpCodec
readResponseHeaders
in interface HttpCodec
expectContinue
- true to return null if this is an intermediate response with a "100"
response code. Otherwise this method never returns null.IOException
public static Response.Builder readHttp2HeadersList(List<Header> headerBlock) throws IOException
IOException
public ResponseBody openResponseBody(Response response) throws IOException
HttpCodec
openResponseBody
in interface HttpCodec
IOException
Copyright © 2018. All rights reserved.