2 Replies Latest reply on Mar 16, 2008 4:31 AM by alejandro52

    Httpservice how to send data

    alejandro52 Level 1
      I want to connect to youtube web service but i have to sent a password so i can get the data back. As it says in the youtube dev. web page i have to:
      --The POST request must specify the value application/x-www-form-urlencoded for the Content-Type header.
      --The POST body must include a string in the following format:mail=<youtube_username>&Passwd=<youtube_password>&service=youtube&source=<source>
      But how do i send the string??
      if i use:
      <mx:HTTPService headers="" contentType="application/x-www-form-urlencoded" id="userRequest" url="https://www.google.com/accounts/ClientLogin" method="POST">
      <mx:request xmlns=""> <mx:String>Email=<youtube_username>&Passwd=<youtube_password>&service=youtube&source=<sou rce></mx:String>
      </mx:request>
      </mx:HTTPService>
      i get parse error at string.
      if i remove the <mx:sting> tag and add to the init:
      userRequest.send(Email=<youtube_username>&Passwd=<youtube_password>&service=youtube&source =<source>)
      I get variable Email=..... not defined.