Boost C++ Libraries

PrevUpHomeNext

Function reject

boost::taar::reject — Reject the request with status and a text/plain body.

Synopsis

// In header: <boost/taar/core/interceptor.hpp>


interceptor_result 
reject(boost::beast::http::status status, std::string_view text = {});

Description

The session aligns the response's version and keep-alive with the request and applies the response filter, as for any response.

Parameters:

status

The response status, such as 401 Unauthorized.

text

The body; when empty, the status's reason phrase ("Unauthorized").


PrevUpHomeNext