public interface HttpCodec
Modifier and Type | Field and Description |
---|---|
static int |
DISCARD_STREAM_TIMEOUT_MILLIS
The timeout to use while discarding a stream of input data.
|
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.
|
ResponseBody |
openResponseBody(Response response)
Returns a stream that reads the response body.
|
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.
|
static final int DISCARD_STREAM_TIMEOUT_MILLIS
okio.Sink createRequestBody(Request request, long contentLength)
void writeRequestHeaders(Request request) throws IOException
IOException
void flushRequest() throws IOException
IOException
void finishRequest() throws IOException
IOException
Response.Builder readResponseHeaders(boolean expectContinue) throws IOException
expectContinue
- true to return null if this is an intermediate response with a "100"
response code. Otherwise this method never returns null.IOException
ResponseBody openResponseBody(Response response) throws IOException
IOException
void cancel()
Copyright © 2017. All Rights Reserved.