mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-09-02 10:21:04 +02:00
yhook: send valide error/ok responses; allow error message
Origin commit data
------------------
Commit: 57cc01978b
Author: vanhofen <vanhofen@gmx.de>
Date: 2016-02-20 (Sat, 20 Feb 2016)
Origin message was:
------------------
- yhook: send valide error/ok responses; allow error message
This commit is contained in:
@@ -192,8 +192,8 @@ public:
|
||||
void WriteLn(char const *text) {WriteLn(std::string(text));}
|
||||
void SendHTMLHeader(const std::string& Titel);
|
||||
void SendHTMLFooter(void);
|
||||
void SendOk(void) {(ParamList["response"]=="json") ? Write("{\"success\": \"true\"}") : Write("ok");}
|
||||
void SendError(void) {(ParamList["response"]=="json") ? Write("{\"success\": \"false\"}") : Write("error");}
|
||||
void SendOk(void);
|
||||
void SendError(std::string error = "");
|
||||
void SendFile(const std::string& url) {NewURL = url; status = HANDLED_SENDFILE;}
|
||||
void SendRedirect(const std::string& url) {httpStatus=HTTP_MOVED_TEMPORARILY; NewURL = url; status = HANDLED_REDIRECTION;}
|
||||
void SendRewrite(const std::string& url) {NewURL = url; status = HANDLED_REWRITE;}
|
||||
|
Reference in New Issue
Block a user