|
Barracuda Application Server C/C++ Reference
Native APIs, integration guides, and platform interfaces
|
#include <HttpServer.h>
Go to the source code of this file.
Classes | |
| struct | HttpMuxDir |
| HttpMuxDir HttpDir Multiplexer captures many resource requests and feeds all resource requests to one page. More... | |
Typedefs | |
| typedef HttpMuxDir | HttpMuxDir |
| HttpMuxDir HttpDir Multiplexer captures many resource requests and feeds all resource requests to one page. More... | |
Functions | |
| void | HttpMuxDir_constructor (HttpMuxDir *o, const char *name, HttpDir *startDir, const char *muxResource, S8 priority) |
| Initialize a multiplexer; see HttpMuxDir::HttpMuxDir. More... | |
| typedef HttpMuxDir HttpMuxDir |
HttpMuxDir HttpDir Multiplexer captures many resource requests and feeds all resource requests to one page.
The HttpMuxDir class makes it possible to have an LSP or CSP page handle multiple URL's. The HttpMuxDir class is typically used in Representational State Transfer (REST) design. Another use for this class is to design a template based page design, where all pages use a common header and footer.
The page can get the full URI by calling:
C/C++ code HttpResponse::getRequestURI.
LSP: request:uri()
The URI is typically used as a path for opening HTML page fragments or for searching in a database.
The page can signal that it did not handle the request by leaving the response untouched: no output operation, no committed response, and status code still 200. The virtual file system will, in this case, continue searching for the requested resource.
| void HttpMuxDir_constructor | ( | HttpMuxDir * | o, |
| const char * | name, | ||
| HttpDir * | startDir, | ||
| const char * | muxResource, | ||
| S8 | priority | ||
| ) |
Initialize a multiplexer; see HttpMuxDir::HttpMuxDir.
| [out] | o | Caller-owned object. |
| [in] | name | Borrowed directory name, valid throughout use; NULL means empty. |
| [in] | startDir | Borrowed target directory, valid throughout use. |
| [in] | muxResource | Borrowed NUL-terminated target path, valid throughout use. |
| [in] | priority | Signed directory priority. No target lookup is performed until a request is served. |