diff options
Diffstat (limited to 'backends/networking/curl/postrequest.h')
-rw-r--r-- | backends/networking/curl/postrequest.h | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/backends/networking/curl/postrequest.h b/backends/networking/curl/postrequest.h index 568979473c..8992d3a1a3 100644 --- a/backends/networking/curl/postrequest.h +++ b/backends/networking/curl/postrequest.h @@ -37,15 +37,23 @@ class PostRequest: public Networking::Request { byte *_postData; int _postLen; + Common::JSONValue *_jsonData; + + Common::String _contentType; - void start(); void responseCallback(Networking::JsonResponse response); void errorCallback(Networking::ErrorResponse error); public: - PostRequest(Common::String url, byte *postData, int postLen, Networking::JSONValueCallback cb, Networking::ErrorCallback ecb); + PostRequest(Common::String url, Networking::JSONValueCallback cb, Networking::ErrorCallback ecb); virtual ~PostRequest(); + void start(); + + void setPostData(byte *postData, int postLen); + void setJSONData(Common::JSONValue *jsonData); + void setContentType(Common::String type) { _contentType = type; } + virtual void handle(); virtual void restart(); virtual Common::String date() const; |