MythTV master
Static Public Member Functions | List of all members
MythHTTPRoot Class Reference

#include <libmythbase/http/mythhttproot.h>

Static Public Member Functions

static HTTPResponse RedirectRoot (const HTTPRequest2 &Request, const QString &File)
 A convenience method to seemlessly redirect requests for index.html to a context specific file. More...
 

Detailed Description

Definition at line 7 of file mythhttproot.h.

Member Function Documentation

◆ RedirectRoot()

HTTPResponse MythHTTPRoot::RedirectRoot ( const HTTPRequest2 Request,
const QString &  File 
)
static

A convenience method to seemlessly redirect requests for index.html to a context specific file.

e.g. assuming 'mythfrontend.html' points to a valid file:

auto frontend = [](HTTPRequest2 Request, const QString& Root)
{
return MythHTTPRoot::RedirectRoot(Request, Root, "mythfrontend.html");
};
MythHTTPService::AddHandlers( {{"/", frontend }});
static HTTPResponse RedirectRoot(const HTTPRequest2 &Request, const QString &File)
A convenience method to seemlessly redirect requests for index.html to a context specific file.
static FRACTAL * Root
Definition: ifs.cpp:102
std::shared_ptr< MythHTTPRequest > HTTPRequest2
Definition: mythhttptypes.h:39

Definition at line 24 of file mythhttproot.cpp.

Referenced by main(), run_backend(), and run_setup_webserver().


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