Marmos
v juptune
v asn1
v lang
v ast
v Classes
v Enums
v ir
v parser
v Enums
v Structs
v core
v crypto
v keyexchange
v memory
v data
v alphabet
v buffer
v json
v builder
v parser
v Enums
v Structs
v serialise
v Structs
v Templates
v pem
v Enums
v Structs

Functions Http1WriterBase.putBody

1
2
3
4
5
module juptune.http.v1;

Result putBody(
    void[] data
);

Documentation

Writes body data.

State

The writer must be in the bodystate.

The writer will be in the bodystate after this function is called.

Notes

If the body encoding is BodyEncoding.hasContentLengththen the writer will automatically keep track of how much data has been written, and will return an error if the user attempts to write more data than the content-lengthheader specified.

If the body encoding is BodyEncoding.isChunkedthen the writer will instead use a chunked encoded body, allowing the user to write as much data as they want.

Currently the ability to write chunk extensions is not supported.

Params

Throws

If an error occurs, the writer will be in an invalid state and should not be used again.

Anything the underlying I/O functions can throw. See juptune.event.io.IoError.

Http1Error.badTransportif the writer is using "content-length" for this message and the length of datawill exceed the amount of data allowed by "conent-length".

Http1Error.badTransportif the writer cannot determine how to encode the body.