0 Replies Latest reply on Feb 26, 2008 8:32 AM by Matthew_Soldo

    Submitting Binary Data AND URLVariables in an HTTP Post

    Matthew_Soldo
      I'm trying to figure out how I can submit both binary data and a set of URLVariables in an HTTP Post method to a server (running Ruby on Rails).

      My existing code just submitted some text as follows
      var variables:URLVariables = new URLVariables;
      variables.var1="1"
      variables.var2="2"
      var request:URLRequest = new URLRequest;
      request.method = "POST";
      request.url = "/orders/process_order";
      request.data = variables;
      navigateToURL(request,"_self");


      Now I need to also submit a ByteArray in addition to to variables that are already there. I tried:

      variables.var3=someByteArray;

      but that didn't seem to work, it looked like the ByteArray just got typecasted into a string. So how can I make this work? Any help or guidance would be extremely appreciated.

      Thanks,
      Matt
      Framr.com