forked from vieter-v/vieter
remove me later
parent
fa780b6e4a
commit
e29c188f76
|
|
@ -50,6 +50,8 @@ pub fn (mut d DockerDaemon) send_request_with_json<T>(method string, url urllib.
|
|||
|
||||
// read_response_head consumes the socket's contents until it encounters
|
||||
// '\r\n\r\n', after which it parses the response as an HTTP response.
|
||||
// Importantly, this function never consumes past the HTTP separator, so the
|
||||
// body can be read fully later on.
|
||||
pub fn (mut d DockerDaemon) read_response_head() ?http.Response {
|
||||
mut c := 0
|
||||
mut buf := []u8{len: 4}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,9 @@
|
|||
module docker
|
||||
|
||||
import io
|
||||
|
||||
struct ChunkedResponseStream {
|
||||
reader io.Reader
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue