title: HTTP URLRequest in Adobe Flex
body: <p>Im trying to make a simple HTTP URLReqest in Adobe Flex, heres the code roughly:</p>
  
  <pre><code>var requestSender:URLLoader = new URLLoader();
  var urlRequest :URLRequest = new URLRequest("http://localhost:8888");
  var msg:String = "data=blah";
  
  urlRequest.data = msg;
  urlRequest.contentType = "application/x-www-form-urlencoded";
  urlRequest.method = URLRequestMethod.POST;
  </code></pre>
  
  <p><strong>This produces something close to:</strong></p>
  
  <pre><code>POST / HTTP/1.1
  Referer: app:/PersonSearch.swf
  Accept: text/xml, application/xml, application/xhtml+xml, ...
  x-flash-version: 10,1,85,3
  Content-Type: application/x-www-form-urlencoded
  Content-Length: 102
  Accept-Encoding: gzip,deflate
  User-Agent: Mozilla/5.0 (Windows; U; en-US) ...
  Host: 127.0.0.1:8888
  Connection: Keep-Alive
  
  data=blah
  </code></pre>
  
  <p><strong>What I really want is:</strong></p>
  
  <pre><code>POST / HTTP/1.1
  Content-Type:application/x-www-form-urlencoded
  Connection:close
  Via:MDS_777
  Accept:*/ *
  Host:localhost:8888
  Content-Length:104
  
  data=blah
  </code></pre>
  
  <p>Anyone know how I remove the fields like <em>Accept-Encoding</em>, add fields like "Via" and set <em>Connection to "close"</em>?</p>
  
  <p>Also how do we get the responce from the HTTP request?</p>
  
  <p>Thanks
  Phil</p>