Open ehaab opened 8 years ago
It looks like you have an extra parameter in your postJson call. Get rid of that empty object { }
cordovaHTTP.postJson(url, data, headers, function(response) { }, function(error) { });
@ehaab Where do you have postJson
in this repository?!? This plugin does not support posting json
. Right?
I tried to use this plugin(both original and forked version(https://github.com/brendonparker/cordova-HTTP)) to send the following information to api server but i don't get any response back ,but for different api url i get fail and success error!The alerts doesn't popup but i see on charle proxy that request has been made correctly with return data but the return data doesn't send back to JavaScript!.Could any one tell me why i don't get fail or success alerts ? Thanks in advance.
data to send via json post request:
POST /api/itemURL/1234 HTTP/1.1 API_KEY: XXXXXXXXXXXXXXXXXXXXXXXX UserID: XXXXXXXXXXXXXXXXXXXXXXXXX User-Agent: Dalvik/1.6.0 (Linux; U; Android 4.2.2; Galaxy Nexus Build/JDQ39) Host: XXXXXXXXXXXXXXXXXXXXX Connection: Keep-Alive Accept-Encoding: gzip Content-Type: application/x-www-form-urlencoded Content-Length: 0
code used to make json post request: