Hi Hugo, We are using org.apache.royale.net.HTTPService; in our production application for years now and there is no problem with that at all. :)
Thanks, Piotr pt., 18 lis 2022 o 11:40 Hugo Ferreira <hferreira...@gmail.com> napisaĆ(a): > Hi, > > I'm going to create a showcase for a very simple App (list + details) with > connection with a backend and publish in a github public repo (I'm doing > this for a particuar need however this can also serve as one more resource > for future Royale developers). > One of the requirements is to use a web api (REST) and not a RPC (like > AMF). > > For Royale, the HTTPService class is the the way to go or do you guys > recommend other options ? > > // add the variables to send var urlVars:URLVariables = new URLVariables(); > urlVars.set("variable", key); // create the httpservice instance var > service:HTTPService = new HTTPService(); service.url = "http://domain.foo > "; > service.method = HTTPConstants.POST; service.addEventListener("complete", > resultCallback); service.addEventListener("ioError", faultCallback); // add > the variables service.contentData = urlVars; // trigger the service > service.send(); > -- Piotr Zarzycki