0 Replies Latest reply on Dec 1, 2006 5:17 AM by iamnotwired

    How to HTTPService/POST non-encoded data please?

    iamnotwired
      Hello

      I am using the HTTPService object to send an HTTP request. Some data need to be send too and I can
      either send them as part of the URL using GET, like this:

      // GET: send data parameters as part of the URL
      if (m_params)
      for (i = 0; i < m_params.length; i++)
      s.url += "&rqp_" + m_params .pszName + "="+ m_params.value;

      s.send();

      or I can send them as separate data using POST, like that:

      // POST: send data separately
      var data:Object = new Object;
      if (m_params)
      for (var i:int = 0; i < m_params.length; i++)
      data["rqp_" + m_params .pszName] = m_params.value;

      s.send(data);


      My problem is that the GET method works but not the POST method. When I use the POST method, the data I send
      are encoded (apparently in utf-8) while they aren't when I uses the GET method. I tried to uses an URLVariables
      object instead of a pure Object but I got the same encoding problem.


      Any clues of how to send unencoded data using the POST operation with the HTTPService objet please?


      Thank you in advance.