Sane C++ Libraries
C++ Platform Abstraction Libraries
Loading...
Searching...
No Matches
SC::HttpResponse Struct Reference

Outgoing message from the perspective of the participants of an HTTP transaction. More...

#include <HttpConnection.h>

Public Member Functions

Result startResponse (int httpCode)
 Starts the response with a http standard code (200 OK, 404 NOT FOUND etc.)
 
Result addHeader (StringSpan headerName, StringSpan headerValue)
 Writes an http header to this response.
 
Result sendHeaders ()
 Start sending response headers, before sending any data.
 
void reset ()
 Resets this object for it to be re-usable.
 
Result end ()
 Finalizes the writable stream after sending all in progress writes.
 
AsyncWritableStreamgetWritableStream ()
 Obtain writable stream for sending content back to connected client.
 

Friends

struct HttpConnectionsPool
 
struct HttpAsyncServer
 

Detailed Description

Outgoing message from the perspective of the participants of an HTTP transaction.

Member Function Documentation

◆ addHeader()

Result SC::HttpResponse::addHeader ( StringSpan headerName,
StringSpan headerValue )

Writes an http header to this response.

◆ end()

Result SC::HttpResponse::end ( )

Finalizes the writable stream after sending all in progress writes.

◆ getWritableStream()

AsyncWritableStream & SC::HttpResponse::getWritableStream ( )
inline

Obtain writable stream for sending content back to connected client.

◆ reset()

void SC::HttpResponse::reset ( )

Resets this object for it to be re-usable.

◆ sendHeaders()

Result SC::HttpResponse::sendHeaders ( )

Start sending response headers, before sending any data.

◆ startResponse()

Result SC::HttpResponse::startResponse ( int httpCode)

Starts the response with a http standard code (200 OK, 404 NOT FOUND etc.)


The documentation for this struct was generated from the following file: