public interface HttpStream
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.
|
ResponseBody |
openResponseBody(Response response)
Returns a stream that reads the response body.
|
Response.Builder |
readResponseHeaders()
Read and return response headers.
|
void |
setHttpEngine(HttpEngine httpEngine) |
void |
writeRequestBody(RetryableSink requestBody)
Sends the request body returned by
createRequestBody(com.squareup.okhttp.Request, long) to the
remote peer. |
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) throws IOException
IOException
void writeRequestHeaders(Request request) throws IOException
IOException
void writeRequestBody(RetryableSink requestBody) throws IOException
createRequestBody(com.squareup.okhttp.Request, long)
to the
remote peer.IOException
void finishRequest() throws IOException
IOException
Response.Builder readResponseHeaders() throws IOException
IOException
ResponseBody openResponseBody(Response response) throws IOException
IOException
void setHttpEngine(HttpEngine httpEngine)
void cancel()
Copyright © 2016. All rights reserved.