Return to Snippet

Revision: 51511
at September 27, 2011 08:16 by parkerkrhoyt


Initial Code
public function read( className:String, objectId:String ):void
{
  var authorization:String = null;			
  var request:URLRequest = null;	
  var header:URLRequestHeader = null;			

  authorization = Base64.encode( APPLICATION_ID + ":" + MASTER_KEY );			
  header = new URLRequestHeader( "Authorization", "Basic " + authorization );						

  request = new URLRequest( "https://api.parse.com/1/classes/" + className + "/" + objectId );
  request.method = URLRequestMethod.GET;
  request.contentType = "application/json";
  request.requestHeaders.push( header );

  if( loader == null )
  {
    loader = new URLLoader();				
  }

  loader.addEventListener( Event.COMPLETE, doReadComplete );
  loader.load( request );			
}

Initial URL

                                

Initial Description

                                

Initial Title
Read an Object from Parse

Initial Tags

                                

Initial Language
ActionScript 3