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

#include <NET_UrlHandler.h>

+ Inheritance diagram for NET_APIUrlHandler:

Public Member Functions

 NET_APIUrlHandler (const UT_StringRef &path, const UT_StringArray &methods, bool allows_partial=false, unsigned api_version=1)
 
 NET_APIUrlHandler (const NET_APIUrlHandler &)=delete
 
NET_APIUrlHandleroperator= (const NET_APIUrlHandler &)=delete
 
void handle (NET_HTTPRequest &req, NET_WebResponse &resp) override
 
template<typename Cls , typename... Args>
void registerFunction (const UT_StringRef &name, NET_WebResponse(Cls::*func)(NET_HTTPRequest &req, Args...), Cls *owner, const NET_WebAPIHandler::ParamArray &parr)
 
NET_WebResponse cmd_api_info (NET_HTTPRequest &req, bool include_func)
 Adds a method to get the API version details for this path. More...
 
- 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
 

Protected Member Functions

bool handleAPI (NET_HTTPRequest &req, NET_WebResponse &resp)
 

Additional Inherited Members

- Public Attributes inherited from NET_BaseUrlHandler
bool myAllowsPartial
 

Detailed Description

Definition at line 82 of file NET_UrlHandler.h.

Constructor & Destructor Documentation

NET_APIUrlHandler::NET_APIUrlHandler ( const UT_StringRef path,
const UT_StringArray methods,
bool  allows_partial = false,
unsigned  api_version = 1 
)
NET_APIUrlHandler::NET_APIUrlHandler ( const NET_APIUrlHandler )
delete

Member Function Documentation

NET_WebResponse NET_APIUrlHandler::cmd_api_info ( NET_HTTPRequest req,
bool  include_func 
)

Adds a method to get the API version details for this path.

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

Implements NET_BaseUrlHandler.

bool NET_APIUrlHandler::handleAPI ( NET_HTTPRequest req,
NET_WebResponse resp 
)
protected
NET_APIUrlHandler& NET_APIUrlHandler::operator= ( const NET_APIUrlHandler )
delete
template<typename Cls , typename... Args>
void NET_APIUrlHandler::registerFunction ( const UT_StringRef name,
NET_WebResponse(Cls::*)(NET_HTTPRequest &req, Args...)  func,
Cls *  owner,
const NET_WebAPIHandler::ParamArray parr 
)
inline

Definition at line 114 of file NET_UrlHandler.h.


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