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:
  1. Create oatpp::web::protocol::http::outgoing::Response with oatpp::web::protocol::http::outgoing::BufferBody.
  2. Create oatpp::web::protocol::http::outgoing::Response with oatpp::web::protocol::http::outgoing::DtoBody.

ResponseFactory::createResponse

  1. Create oatpp::web::protocol::http::outgoing::Response with oatpp::web::protocol::http::outgoing::BufferBody.
    static std::shared_ptr<Response> createResponse(const Status& status, const oatpp::String& text)
    
  2. Create oatpp::web::protocol::http::outgoing::Response with oatpp::web::protocol::http::outgoing::DtoBody.
    static std::shared_ptr<Response> createResponse(const Status& status,
                                                    const oatpp::Void& dto,
                                                    const std::shared_ptr<data::mapping::ObjectMapper>& objectMapper)