# RequestInterceptor.hpp

This File On Github
Ask A Question

API: latest
module: oatpp
#include "oatpp/web/server/interceptor/RequestInterceptor.hpp"

# RequestInterceptor

RequestInterceptor.

namespace oatpp { namespace web { namespace server { namespace interceptor { 
  class RequestInterceptor {}
}}}}

# Typedefs

Type Name Summary
oatpp::web::protocol::http::incoming::Request IncomingRequest Convenience typedef for oatpp::web::protocol::http::incoming::Request.
oatpp::web::protocol::http::outgoing::Response OutgoingResponse Convenience typedef for oatpp::web::protocol::http::outgoing::Response.

# Methods

Return Type Name Summary
[none] ~RequestInterceptor Default virtual destructor.
std::shared_ptr<OutgoingResponse> intercept This method should not do any "heavy" nor I/O operations

# RequestInterceptor::IncomingRequest

Convenience typedef for oatpp::web::protocol::http::incoming::Request.

typedef oatpp::web::protocol::http::incoming::Request IncomingRequest

# RequestInterceptor::OutgoingResponse

Convenience typedef for oatpp::web::protocol::http::outgoing::Response.

typedef oatpp::web::protocol::http::outgoing::Response OutgoingResponse

# RequestInterceptor::~RequestInterceptor

Default virtual destructor.

virtual ~RequestInterceptor() = default

# RequestInterceptor::intercept

This method should not do any "heavy" nor I/O operations as it is used for both "Simple" and "Async" API NOT FOR I/O operations!!! - return nullptr to continue. - return OutgoingResponse to send response immediately possible usage ex: return 301 - redirect if needed

virtual std::shared_ptr<OutgoingResponse> intercept(const std::shared_ptr<IncomingRequest>& request) = 0