Public Member Functions | |
CurlJsonRequest (JsonCallback cb, ErrorCallback ecb, const Common::String &url) | |
void | handle () override |
void | restart () override |
Public Member Functions inherited from Networking::CurlRequest | |
CurlRequest (DataCallback cb, ErrorCallback ecb, const Common::String &url) | |
void | handle () override |
void | restart () override |
Common::String | date () const override |
virtual void | setHeaders (const Common::Array< Common::String > &headers) |
virtual void | addHeader (const Common::String &header) |
virtual void | addPostField (const Common::String &field) |
virtual void | addFormField (const Common::String &name, const Common::String &value) |
virtual void | addFormFile (const Common::String &name, const Common::Path &filename) |
virtual void | setBuffer (byte *buffer, uint32 size) |
virtual void | usePut () |
virtual void | usePatch () |
virtual void | connectionKeepAlive (long idle=120, long interval=60) |
virtual void | connectionClose () |
virtual NetworkReadStreamResponse | execute () |
const NetworkReadStream * | getNetworkReadStream () const |
void | wait (int spinlockDelay=5) |
Public Member Functions inherited from Networking::Request | |
Request (DataCallback cb, ErrorCallback ecb) | |
virtual void | handleRetry () |
virtual void | pause () |
virtual void | finish () |
virtual void | retry (uint32 seconds) |
RequestState | state () const |
Static Public Member Functions | |
static bool | jsonIsObject (const Common::JSONValue *item, const char *warningPrefix) |
static bool | jsonContainsObject (const Common::JSONObject &item, const char *key, const char *warningPrefix, bool isOptional=false) |
static bool | jsonContainsString (const Common::JSONObject &item, const char *key, const char *warningPrefix, bool isOptional=false) |
static bool | jsonContainsIntegerNumber (const Common::JSONObject &item, const char *key, const char *warningPrefix, bool isOptional=false) |
static bool | jsonContainsArray (const Common::JSONObject &item, const char *key, const char *warningPrefix, bool isOptional=false) |
static bool | jsonContainsStringOrIntegerNumber (const Common::JSONObject &item, const char *key, const char *warningPrefix, bool isOptional=false) |
static bool | jsonContainsAttribute (const Common::JSONObject &item, const char *key, const char *warningPrefix, bool isOptional=false) |
Protected Member Functions | |
virtual void | finishJson (const Common::JSONValue *json) |
Protected Member Functions inherited from Networking::CurlRequest | |
NetworkReadStream * | makeStream () |
Protected Member Functions inherited from Networking::Request | |
virtual void | finishError (const ErrorResponse &error, RequestState state=FINISHED) |
virtual void | finishSuccess () |
Protected Attributes | |
JsonCallback | _jsonCallback |
Common::MemoryWriteStreamDynamic | _contentsStream |
byte * | _buffer |
Protected Attributes inherited from Networking::CurlRequest | |
Common::String | _url |
NetworkReadStream * | _stream |
curl_slist * | _headersList |
Common::String | _postFields |
Common::HashMap< Common::String, Common::String > | _formFields |
Common::HashMap< Common::String, Common::Path > | _formFiles |
byte * | _bytesBuffer |
uint32 | _bytesBufferSize |
bool | _uploading |
bool | _usingPatch |
bool | _keepAlive |
long | _keepAliveIdle |
long | _keepAliveInterval |
Protected Attributes inherited from Networking::Request | |
DataCallback | _callback |
ErrorCallback | _errorCallback |
RequestState | _state |
uint32 | _retryInSeconds |
|
protectedvirtual |
Sets FINISHED state and passes the JSONValue * into user's callback in JsonResponse.
|
overridevirtual |
Method, which does actual work. Depends on what this Request is doing.
Implements Networking::Request.
|
overridevirtual |
Method, which is used to restart the Request.
Implements Networking::Request.