Quantcast
Viewing latest article 6
Browse Latest Browse All 13

createHTTPClient gets error on post

When I do a Ti.Network.createHTTPClient(); I get a error from the Apache Tomcat server

Ti code:

var loader = Titanium.Network.createHTTPClient();
loader.open("post", "http://192.168.100.138:8080/");
loader.send({body:'test'});
 
var vData       = [];   
var data        = []; //[data_init];
var index       = []; // index array.
 
loader.onload = function(){
    alert( this.responseText )
    Ti.API.debug(this.responseText)
}
Error which I get:
HTTP Status 415 -
 
type Status report
 
message
 
description The server refused this request because the request entity is in
a format not supported by the requested resource for the requested method ().
Does anyone know what I do wrong?

Viewing latest article 6
Browse Latest Browse All 13

Trending Articles