HTTPRequest::WriteReply

WriteReply overloads

Synopses

Declared in <httpserver.h>

Queue a reply with the given status code and a string body.

void
WriteReply(
    HTTPStatusCode status,
    std::string_view reply_body_view);
» more...

Queue a reply with the given status code and body to be sent to the client.

void
WriteReply(
    HTTPStatusCode status,
    std::span<std::byte const> reply_body = {});
» more...

Parameters

NameDescription
statusThe HTTP status code to send.
reply_body_viewThe response body as a string view.
reply_bodyThe response body bytes; empty for a status-only reply.