vibe.d beta banner
get vibe.d
0.7.30

Function HTTPServerResponse.writeRawBody

Writes the whole response body at once, without doing any further encoding.

The caller has to make sure that the appropriate headers are set correctly (i.e. Content-Type and Content-Encoding).

Note that the version taking a RandomAccessStream may perform additional optimizations such as sending a file directly from the disk to the network card using a DMA transfer.

Prototypes

void writeRawBody(
  RandomAccessStream stream
);

void writeRawBody(
  InputStream stream,
  ulong num_bytes = 0LU
);

void writeRawBody(
  RandomAccessStream stream,
  int status
);

void writeRawBody(
  InputStream stream,
  int status,
  ulong num_bytes = 0LU
);
Authors

Sönke Ludwig, Jan Krüger, Ilya Shipunov

Copyright

© 2012-2013 RejectedSoftware e.K.

License

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