actionscript 3 - How send parameters for URLRequest -


I have sent parameters to my backend in PHP but I have a code and I do not see the parameters

  var Request: URLRequest = New URLRequest (modelLocator.CaminhoServidor + "AnexoDocumentos_Financeiro / asdas / xml.php"); Var loader: URL loader = new URL loader (); Loader.dataFormat = URLLoaderDataFormat.VARIABLES; Request.data = Remessa; Request.method = URLRequestMethod.POST; Loader.addEventListener (Event.Complete, RecepxML); Loader.load (request);   

How do this parameter send 3 parameters?

You use the 'variable' field in the URLRequest object:

  var request: URLRequest = new URLRequest (url); Request.method = URLRequestMethod.POST; Var variable: URLVariables = new URLVariables (); Variables.param1 = ... variables.param2 = ... variables.param3 = ... request.data = variable; Var urlLoader: URLLoader = new URL loader (); UrlLoader.dataFormat = URLLoaderDataFormat.VARIABLES; UrlLoader.addEventListener (event.complete, urlLoader_complete); UrlLoader.addEventListener (IOErrorEvent.IO_ERROR, urlLoader_error); urlLoader.load (request); In addition, defining handlers for errors is a good idea (as shown above for IO_ERROR but also HTTP_STATUS and SECURITY_ERROR)   

Comments

Popular posts from this blog

c# - passing input text from view to contoller with FacebookContext using Facebook app -

ios - Does Core Data autoupdate a many to many relationship on saving -

Calling a C++ function from C# by passing a string with variable size to it -