I am new to titanium and want to call a web service from my titanium app. WebService returns a json response. Since I am aware of calling webService using XMLRPC , but very confusing regarding json.
So far, I know that we must create an HTTPClient .
var request = Titanium.Network.createHTTPClient(); request.open("POST", "http://test.com/services/json"); request.onload = function() { var content = JSON.parse(this.responseText);
Now the problem is that my url (endpoints) have many WebServices, so when I give the method name ie the name WS, which should be called.
From the Titanium mobile API documentation, the open ie request.open function accepts 3 parameters:
In the above code, what does "POST" do there? and if my name is WS system.connect , then where will I mention that in the code?
And what if WS needs a parameter, since we can send this parameter to the webService formula with the code above.
I know that request.send() can be used to send a parameter, but like <
source share