add json response for yweb 3 calls

git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@534 e54a6e83-5905-42d5-8d5c-058d10e6a962
This commit is contained in:
yjogol
2010-04-01 14:25:15 +00:00
parent e413dc3ef0
commit aa52b78495

View File

@@ -176,8 +176,8 @@ public:
void WriteLn(char const *text) {WriteLn(std::string(text));}
void SendHTMLHeader(const std::string& Titel);
void SendHTMLFooter(void);
void SendOk(void) {Write("ok");}
void SendError(void) {Write("error");}
void SendOk(void) {(ParamList["response"]=="json") ? Write("{\"success\": true}") : Write("ok");}
void SendError(void) {(ParamList["response"]=="json") ? Write("{\"success\": false}") : Write("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;}