forked from vieter-v/vieter
remove me later
This commit is contained in:
parent
fa780b6e4a
commit
e29c188f76
2 changed files with 11 additions and 0 deletions
|
|
@ -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
|
// 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.
|
// '\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 {
|
pub fn (mut d DockerDaemon) read_response_head() ?http.Response {
|
||||||
mut c := 0
|
mut c := 0
|
||||||
mut buf := []u8{len: 4}
|
mut buf := []u8{len: 4}
|
||||||
|
|
|
||||||
9
src/docker/stream.v
Normal file
9
src/docker/stream.v
Normal file
|
|
@ -0,0 +1,9 @@
|
||||||
|
module docker
|
||||||
|
|
||||||
|
import io
|
||||||
|
|
||||||
|
struct ChunkedResponseStream {
|
||||||
|
reader io.Reader
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue