Hi developers!
I have a wish…
can you implement the “ok” variable in the response body when I do a successfull http post request?
This is what happens on failure:
Response from cloud:
10-18 13:45:29.162: D/reponsebody(7659): {
10-18 13:45:29.162: D/reponsebody(7659): "ok": false, <<< --- we can test on this variable
10-18 13:45:29.162: D/reponsebody(7659): "error": "Timed out."
10-18 13:45:29.162: D/reponsebody(7659): }
10-18 13:45:29.162: W/System.err(7659): org.json.JSONException: No value for return_value
The cloud could not contact the spark, okay, can happen.
2 seconds later it can contact the spark and the expected response is:
10-18 13:45:29.172: D/postExecute...(7659): 7=null
10-18 13:45:31.695: D/reponsebody(7659): {
10-18 13:45:31.695: D/reponsebody(7659): "id": "50ff71065067545631180587",
10-18 13:45:31.695: D/reponsebody(7659): "name": "panna breadboard",
10-18 13:45:31.695: D/reponsebody(7659): "last_app": null,
10-18 13:45:31.695: D/reponsebody(7659): "connected": true,
10-18 13:45:31.695: D/reponsebody(7659): "return_value": 1002
10-18 13:45:31.695: D/reponsebody(7659): }
Where is the “ok”:true? It would be very nice to be able to test on this variable in both situations.
In Java the missing “ok” generates a null pointer exception, and that’s not what we want…
regards,
Marcus