vibe.d beta banner
get vibe.d
0.10.0

Asynchronous I/O that doesn’t get in your way, written in D

Function HTTPClientResponse.readRawBody

Provides unsafe means to read raw data from the connection.

void readRawBody (
  scope @safe void delegate(scope vibe.internal.interfaceproxy.InterfaceProxy!(vibe.core.stream.InputStream)) del
) @safe;

void readRawBody (
  scope @safe void delegate(scope InputStream) del
) @safe;

No transfer decoding and no content decoding is done on the data.

Not that the provided delegate must read the whole stream, as the state of the response is unknown after raw bytes have been taken. Failure to read the right amount of data will lead to protocol corruption in later requests.

Authors

Sönke Ludwig, Jan Krüger

Copyright

© 2012-2014 Sönke Ludwig

License

Subject to the terms of the MIT license, as written in the included LICENSE.txt file.