diff options
author | Alexander Tkachev | 2016-05-23 12:21:45 +0600 |
---|---|---|
committer | Alexander Tkachev | 2016-08-24 16:07:55 +0600 |
commit | 735db74b900d1e0a0654ca03983cd91cea36f41e (patch) | |
tree | 05d851451ca39bf493ebe6d3e452aa4b6acefd85 /backends/networking/curl/curljsonrequest.cpp | |
parent | a439bd4c33e6f8a47a856d7cb4a4db7c540a85ab (diff) | |
download | scummvm-rg350-735db74b900d1e0a0654ca03983cd91cea36f41e.tar.gz scummvm-rg350-735db74b900d1e0a0654ca03983cd91cea36f41e.tar.bz2 scummvm-rg350-735db74b900d1e0a0654ca03983cd91cea36f41e.zip |
CLOUD: Add DropboxStorage::listDirectory sketch
It doesn't support any "has_more", doesn't call user's callback and just
prints JSON instead of parsing in into an array of files.
I believe it would become DropboxListDirectoryRequest in the next
commit.
Diffstat (limited to 'backends/networking/curl/curljsonrequest.cpp')
-rw-r--r-- | backends/networking/curl/curljsonrequest.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/backends/networking/curl/curljsonrequest.cpp b/backends/networking/curl/curljsonrequest.cpp index 702de22f46..805852ea0a 100644 --- a/backends/networking/curl/curljsonrequest.cpp +++ b/backends/networking/curl/curljsonrequest.cpp @@ -70,10 +70,12 @@ bool CurlJsonRequest::handle() { if (_stream->eos()) { if (_stream->httpResponseCode() != 200) - warning("HTTP response code is not 200 OK"); + warning("HTTP response code is not 200 OK (it's %d)", _stream->httpResponseCode()); if (_callback) { - char *contents = getPreparedContents(); + char *contents = getPreparedContents(); + if (_stream->httpResponseCode() != 200) + debug("%s", contents); Common::JSONValue *json = Common::JSON::parse(contents); (*_callback)(json); //potential memory leak, free it in your callbacks! } |