1 Reply Latest reply on May 18, 2006 2:19 PM by Newsgroup_User

    HTTPService methods and custom headers problems

    Cristian_Ivascu
      Hi,
      Is there a way to pass through an HTTPService (or other FLEX data service) HTTP methods DIFFERENT FROM post AND get? I'm trying to get it to pass PUT and DELETE as methods to a REST web service and it does not suport it as yet.
      The second problem is passing custom headers with the HTTPService. No matter what I set in the service.headers property, nothing is passed to the server.

      Any help on this would be appreciated,
      Cristian
        • 1. Re: HTTPService methods and custom headers problems
          Level 7
          HTTPService will support PUT and DELETE methods if you are using Flex Data Services. Don't forget to
          set useProxy="true" on the HTTPService tag.

          If you are not using Flex Data Services, then HTTPService has the same restrictions as the
          flash.net.URLLoader class. This class only supports GET and POST.

          About your second problem: The service.headers property is an Object, and it's intended to be used
          as a hashtable, like this...

          service.headers = {SomeHeader:"SomeValue", SomeOtherHeader:"SomeOtherValue"};

          Note again that since the underlying Flash API is flash.net.URLLoader there are certain headers that
          you cannot send. For details, please see the docs for flash.net.URLRequestHeader.


          Hope this helps...

          Mark Shepherd
          Adobe Flex Team



          Cristian Ivascu wrote:
          > Hi,
          > Is there a way to pass through an HTTPService (or other FLEX data service)
          > HTTP methods DIFFERENT FROM post AND get? I'm trying to get it to pass PUT and
          > DELETE as methods to a REST web service and it does not suport it as yet.
          > The second problem is passing custom headers with the HTTPService. No matter
          > what I set in the service.headers property, nothing is passed to the server.
          >
          > Any help on this would be appreciated,
          > Cristian
          >