proxygen
proxygen::HTTPStaticErrorPage Class Reference

#include <HTTPErrorPage.h>

Inheritance diagram for proxygen::HTTPStaticErrorPage:
proxygen::HTTPErrorPage

Public Member Functions

 HTTPStaticErrorPage (std::unique_ptr< folly::IOBuf > content, const std::string &contentType="text/html; charset=utf-8")
 
Page generate (uint64_t requestID, unsigned httpStatusCode, const std::string &reason, std::unique_ptr< folly::IOBuf > body, const std::string &detailReason) const override
 
- Public Member Functions inherited from proxygen::HTTPErrorPage
virtual ~HTTPErrorPage ()
 

Private Attributes

std::unique_ptr< folly::IOBufcontent_
 
std::string contentType_
 

Detailed Description

Static error page generator.

Definition at line 53 of file HTTPErrorPage.h.

Constructor & Destructor Documentation

proxygen::HTTPStaticErrorPage::HTTPStaticErrorPage ( std::unique_ptr< folly::IOBuf content,
const std::string contentType = "text/html; charset=utf-8" 
)
explicit

Definition at line 18 of file HTTPErrorPage.cpp.

19  :
20  content_(std::move(content)),
21  contentType_(contentType) {
22 }
std::unique_ptr< folly::IOBuf > content_
Definition: HTTPErrorPage.h:66
constexpr detail::Map< Move > move
Definition: Base-inl.h:2567

Member Function Documentation

HTTPErrorPage::Page proxygen::HTTPStaticErrorPage::generate ( uint64_t  requestID,
unsigned  httpStatusCode,
const std::string reason,
std::unique_ptr< folly::IOBuf body,
const std::string detailReason 
) const
overridevirtual

Implements proxygen::HTTPErrorPage.

Definition at line 24 of file HTTPErrorPage.cpp.

References content_, and contentType_.

29  {
30 
31  return HTTPErrorPage::Page(contentType_, content_->clone());
32 }
std::unique_ptr< folly::IOBuf > content_
Definition: HTTPErrorPage.h:66

Member Data Documentation

std::unique_ptr<folly::IOBuf> proxygen::HTTPStaticErrorPage::content_
private

Definition at line 66 of file HTTPErrorPage.h.

Referenced by generate().

std::string proxygen::HTTPStaticErrorPage::contentType_
private

Definition at line 67 of file HTTPErrorPage.h.

Referenced by generate().


The documentation for this class was generated from the following files: