# ResponseFactory.hpp
This File On Github
Ask A Question
API: latest
module: oatpp
#include "oatpp/web/protocol/http/outgoing/ResponseFactory.hpp"
# ResponseFactory
Helper class to create http outgoing responses (oatpp::web::protocol::http::outgoing::Response).
namespace oatpp { namespace web { namespace protocol { namespace http { namespace outgoing {
class ResponseFactory {}
}}}}}
# Methods
Return Type | Name | Summary |
---|---|---|
std::shared_ptr<Response> | createResponse | Multiple implementations:
|
# ResponseFactory::createResponse
- Create oatpp::web::protocol::http::outgoing::Response with oatpp::web::protocol::http::outgoing::BufferBody.
- @param status - oatpp::web::protocol::http::Status.
- @param text - oatpp::String.
- @return -
std::shared_ptr
to oatpp::web::protocol::http::outgoing::Response.
static std::shared_ptr<Response> createResponse(const Status& status, const oatpp::String& text)
- Create oatpp::web::protocol::http::outgoing::Response with oatpp::web::protocol::http::outgoing::DtoBody.
- @param status - oatpp::web::protocol::http::Status.
- @param dto - see Data Transfer Object (DTO).
- @param objectMapper - oatpp::data::mapping::ObjectMapper.
- @return -
std::shared_ptr
to oatpp::web::protocol::http::outgoing::Response.
static std::shared_ptr<Response> createResponse(const Status& status, const oatpp::Void& dto, const std::shared_ptr<data::mapping::ObjectMapper>& objectMapper)