Packageyourminis.api.net
Classpublic class HTTPLoader
InheritanceHTTPLoader Inheritance flash.net.URLLoader

An HTTP-related helper class

See also

yourminis.api.Widget.newHTTP()


Public Properties
 PropertyDefined by
  paramObj : Object
HTTPLoader
Public Methods
 MethodDefined by
  
getProxyUrl(url:String):String
Helper function to build the yourminis proxy URL
HTTPLoader
  
load(request:URLRequest):void
Load and Proxy an HTTP Request.
HTTPLoader
Property detail
paramObjproperty
public var paramObj:Object
Method detail
getProxyUrl()method
public function getProxyUrl(url:String):String

Helper function to build the yourminis proxy URL

Parameters
url:String — The URL to be proxied

Returns
String

See also


Example
Create a URLRequest object and proxy URL
  import yourminis.api.IWidget
  var widget:IWidget;
  addEventListener("widget-loaded",onWidgetLoaded);
  function onWidgetLoaded(evt:Event) {
   widget.initWidget(300,250,0x000000);
   widget.debugMode = true;
   var loader:URLLoader = new URLLoader();
   loader.addEventListener(Event.COMPLETE, completeHandler);
    
   var url:String = "http://www.some3rdPartyDomain.com/server.php";
   var request:URLRequest = new URLRequest(widget.newHTTP().getProxyUrl(url));
   try {
    loader.load(request);
   } catch (error:Error) {
    widget.debug("Unable to load requested document.");
   }
  }
  function completeHandler(event:Event):void {
   var loader:URLLoader = URLLoader(event.target);
   widget.debug("loaded: " + loader.data);
  }
 

load()method 
public override function load(request:URLRequest):void

Load and Proxy an HTTP Request. The request will be proxied from the yourminis widget server.

Parameters
request:URLRequest — The URL of the request

See also