diff options
author | Rider Linden <none@none> | 2015-03-26 13:32:09 -0700 |
---|---|---|
committer | Rider Linden <none@none> | 2015-03-26 13:32:09 -0700 |
commit | 97b93179692b764aba7eee571f1b557f6f8070db (patch) | |
tree | 73b3d56746f86542833513fd315abc6e575b6e65 /indra/llmessage/llhttpsdhandler.h | |
parent | f6ba7514d2392bfb5bbbe8b003b4b860118fddc5 (diff) |
Create trivial handler for SD Messages, method in LLAgent for posting HTTP requests.
Diffstat (limited to 'indra/llmessage/llhttpsdhandler.h')
-rw-r--r-- | indra/llmessage/llhttpsdhandler.h | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/indra/llmessage/llhttpsdhandler.h b/indra/llmessage/llhttpsdhandler.h index 7b7da61b3c..b3eb7d6145 100644 --- a/indra/llmessage/llhttpsdhandler.h +++ b/indra/llmessage/llhttpsdhandler.h @@ -30,8 +30,12 @@ #include "httphandler.h" #include "lluri.h" +/// Handler class LLCore's HTTP library. Splitting with separate success and +/// failure routines and parsing the result body into LLSD on success. It +/// is intended to be subclassed for specific capability handling. /// -/// +// *TODO: This class self deletes at the end of onCompleted method. This is +// less than ideal and should be revisited. class LLHttpSDHandler : public LLCore::HttpHandler { public: @@ -52,5 +56,19 @@ private: LLURI mUri; }; +/// A trivial implementation of LLHttpSDHandler. This success and failure +/// methods log the action taken, the URI accessed and the status code retuned +/// in the response. +class LLHttpSDGenericHandler : public LLHttpSDHandler +{ +public: + LLHttpSDGenericHandler(const LLURI &uri, const std::string &action); + +protected: + virtual void onSuccess(LLCore::HttpResponse * response, LLSD &content); + virtual void onFailure(LLCore::HttpResponse * response, LLCore::HttpStatus status); +private: + std::string mCaps; +}; #endif
\ No newline at end of file |