HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
NET_UrlHandler Class Reference

#include <NET_UrlHandler.h>

+ Inheritance diagram for NET_UrlHandler:

Public Types

using Callback = std::function< NET_WebResponse(NET_HTTPRequest &req)>
 

Public Member Functions

 NET_UrlHandler (const UT_StringRef &path, const UT_StringArray &methods, bool allows_partial=false)
 
 NET_UrlHandler (const UT_StringRef &path, const UT_StringArray &methods, Callback clb, bool allows_partial=false)
 
void registerCallback (Callback callback)
 
void handle (NET_HTTPRequest &req, NET_WebResponse &resp) override
 
- Public Member Functions inherited from NET_BaseUrlHandler
 NET_BaseUrlHandler (const UT_StringRef &path, bool allows_partial=false)
 
 NET_BaseUrlHandler (const UT_StringRef &path, const UT_StringArray &methods, bool allows_partial=false)
 
virtual ~NET_BaseUrlHandler ()=default
 
const UT_StringHolderpath () const
 
void addMethod (const UT_StringRef &method)
 
void removeMethod (const UT_StringRef &method)
 
bool canHandleMethod (const UT_StringRef &method) const
 

Additional Inherited Members

- Public Attributes inherited from NET_BaseUrlHandler
bool myAllowsPartial
 

Detailed Description

Definition at line 60 of file NET_UrlHandler.h.

Member Typedef Documentation

Definition at line 63 of file NET_UrlHandler.h.

Constructor & Destructor Documentation

NET_UrlHandler::NET_UrlHandler ( const UT_StringRef path,
const UT_StringArray methods,
bool  allows_partial = false 
)
NET_UrlHandler::NET_UrlHandler ( const UT_StringRef path,
const UT_StringArray methods,
Callback  clb,
bool  allows_partial = false 
)

Member Function Documentation

void NET_UrlHandler::handle ( NET_HTTPRequest req,
NET_WebResponse resp 
)
overridevirtual

Implements NET_BaseUrlHandler.

void NET_UrlHandler::registerCallback ( Callback  callback)

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