HttpBody

A body content that can be sent or received with an HTTP message.

Members

Functions

append
void append(ubyte[] data)
Undocumented in source. Be warned that the author may not have intended to support it.
append
void append(ByteBuffer buffer)
Undocumented in source. Be warned that the author may not have intended to support it.
asString
string asString()
Undocumented in source. Be warned that the author may not have intended to support it.
contentLength
long contentLength()

Returns the number of bytes that will be written to {@code sink} in a call to {@link #writeTo}, or -1 if that count is unknown.

contentType
string contentType()
Undocumented in source.
getRaw
const(ubyte)[] getRaw()
Undocumented in source. Be warned that the author may not have intended to support it.
toString
string toString()
Undocumented in source. Be warned that the author may not have intended to support it.
writeTo
void writeTo(HttpOutputStream sink)

Writes the content of this request to {@code sink}.

Static functions

create
HttpBody create(T content)
Undocumented in source. Be warned that the author may not have intended to support it.
create
HttpBody create(string contentType, long contentLength)
Undocumented in source. Be warned that the author may not have intended to support it.
create
HttpBody create(string contentType, string content)

Returns a new request body that transmits {@code content}. If {@code contentType} is non-null and lacks a charset, this will use UTF-8.

create
HttpBody create(string contentType, ByteBuffer buffer)
Undocumented in source. Be warned that the author may not have intended to support it.
create
HttpBody create(string type, const(ubyte)[] content)

Returns a new request body that transmits {@code content}.

createFromFile
HttpBody createFromFile(string type, string fileName)

Returns a new request body that transmits the content of {@code file}.

See Also

org.apache.hc.core5.http.HttpEntity

Meta