ofxHTTP
A collection of tools for HTTP.
ofx::HTTP::PostRouteHandler Class Reference

A flexible POST route handler. More...

#include <PostRoute.h>

Inheritance diagram for ofx::HTTP::PostRouteHandler:
ofx::HTTP::BaseRouteHandler_< PostRoute > ofx::HTTP::AbstractRouteHandler ofx::HTTP::AbstractHTTPRequestHandler ofx::HTTP::AbstractServerEventRequestHandler

Public Types

typedef PostRouteSettings Settings
 A typedef for PostRouteSettings.
 

Public Member Functions

 PostRouteHandler (PostRoute &route)
 Create a PostRouteHandler. More...
 
virtual ~PostRouteHandler ()
 Destroy the PostRouteHandler.
 
void handleRequest (ServerEventArgs &evt)
 Handle the ServerEventArgs. More...
 
- Public Member Functions inherited from ofx::HTTP::BaseRouteHandler_< PostRoute >
 BaseRouteHandler_ (PostRoute &route)
 Create a BaseRoute.
 
virtual ~BaseRouteHandler_ ()
 Destroy a BaseRoute.
 
void handleRequest (Poco::Net::HTTPServerRequest &request, Poco::Net::HTTPServerResponse &response) override
 
virtual void stop () override
 Interrupt the handleRequest method if possible.
 
PostRouteroute ()
 Get the dispatching route.
 
- Public Member Functions inherited from ofx::HTTP::AbstractRouteHandler
virtual ~AbstractRouteHandler ()
 Destroy the AbstractRouteHandler instance.
 
- Public Member Functions inherited from ofx::HTTP::AbstractHTTPRequestHandler
virtual ~AbstractHTTPRequestHandler ()
 Destroy the AbstractHTTPRequestHandler.
 
- Public Member Functions inherited from ofx::HTTP::AbstractServerEventRequestHandler
virtual ~AbstractServerEventRequestHandler ()
 Destroy the AbstractServerEventRequestHandler.
 

Static Public Attributes

static const Poco::Net::MediaType POST_CONTENT_TYPE_TEXT_PLAIN = Poco::Net::MediaType("text/plain")
 A constant defining "text/plain".
 
static const Poco::Net::MediaType POST_CONTENT_TYPE_MULTIPART = Poco::Net::MediaType("multipart/form-data")
 A constant defining "multipart/form-data".
 
static const Poco::Net::MediaType POST_CONTENT_TYPE_URLENCODED = Poco::Net::MediaType("application/x-www-form-urlencoded")
 A constant defining "application/x-www-form-urlencoded".
 
static const Poco::Net::MediaType POST_CONTENT_TYPE_JSON = Poco::Net::MediaType("application/json")
 A constant defining "application/json".
 

Additional Inherited Members

- Protected Attributes inherited from ofx::HTTP::BaseRouteHandler_< PostRoute >
PostRoute_route
 The route.
 

Detailed Description

A flexible POST route handler.

Form data must be encoded with "multipart/form-data" or "application/x-www-form-urlencoded". "text/plain" form encoding is supported, but not parsed.

Constructor & Destructor Documentation

◆ PostRouteHandler()

ofx::HTTP::PostRouteHandler::PostRouteHandler ( PostRoute route)

Create a PostRouteHandler.

Parameters
routeThe parent PostRoute.

Member Function Documentation

◆ handleRequest()

void ofx::HTTP::PostRouteHandler::handleRequest ( ServerEventArgs evt)
virtual

Handle the ServerEventArgs.

Parameters
evtThe server request event.

Implements ofx::HTTP::BaseRouteHandler_< PostRoute >.


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