Are you sending parameters?  If you don’t send any parameters the POST will be ignored and will be sent as a GET.

 

Matt

 


From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of btkracker
Sent: Friday, September 15, 2006 8:53 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Posting data with HTTPService....Please help!

 

I found another post on this site that mentioned Flex's
internal "POST" / "GET" logic. After some testing, I discovered
that, even though I specify "POST", Flex thinks it knows better. I
checked the request on the web server and, sure enough, it sends the
request as a "GET"!!

To be blunt, this sucks. I'm not sure why Flex has this behaviour
and HOPE this is a bug (not a feature). I will keep trying
different things and looking for more explicit examples. I'll post
any relevent infomration I find to this thread.

Thanks for the reply.

Bruce

--- In [EMAIL PROTECTED]ups.com, "mthielman11" <[EMAIL PROTECTED]..>
wrote:
>
> I don't have the code with me now but i will post it later to help
you out. This KILLED us
> for over a week. The documentation was NOT accurate and I think
we sort of got lucky
> with our solution but it works. I will do my best to post it
later tonight.
>
>
> --- In [EMAIL PROTECTED]ups.com, "btkracker" <bthornbury@> wrote:
> >
> > I've seen several posts for this but haven't seen any kind of
> > resolution. I've seen other posts that say it is extremely easy.
> >
> > Well, I'm in the same boat: I can't seem to get post data to
send to
> > my IIS server. I have been able to use the exact same .asp file
on
> > the server side and _javascript_ in an IE window to get the
correct
> > results. When I try it from Flex...no data.
> >
> > Here is my code:
> >
> > Flex code:
> > <?xml version="1.0" encoding="utf-8"?>
> > <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
> > layout="absolute" creationComplete="test()">
> > <mx:Script>
> > <![CDATA[
> >
> > import mx.rpc.events.ResultEvent;
> > import mx.controls.Alert;
> >
> > private function test():void{
> > HttpRequest.addEventListener("result", testResponse);
> > HttpRequest.url = "" href="http://IIS_Server/AJAX/test.asp">http://IIS_Server/AJAX/test.asp";
> > HttpRequest.resultFormat = "text";
> > HttpRequest.method = "POST";
> > HttpRequest.contentType = "application/x-www-form-
> > urlencoded";
> > HttpRequest.request = "myString=TestString";
> > HttpRequest.send();
> > }
> >
> > private function testResponse(event: ResultEvent):void{
> > Alert.show(event.result.toString());
> > }
> > ]]>
> > </mx:Script>
> >
> > <mx:HTTPService id="HttpRequest" showBusyCursor="true" />
> > </mx:Application>
> >
> >
> > ASP Code (pretty simple stuff..):
> > <%@ Language=_vbscript_ %>
> > <%
> > Response.Write "here it is: '" & Request.Form & "'"
> > Response.End
> > %>
> >
> > This should return the entire post. The only thing I get back
in
> > Flex is the string "here it is: ''". As mentioned above, when I
use
> > the below _javascript_ and Microsoft's 'XMLHttpRequest' object, I
get
> > a successfull post and receive the string "here it
> > is: 'myString=StringTest'" back to the browser.
> >
> >
> >
> > Thanks in advance for any help!!
> >
> > Bruce
> >
>

__._,_.___

--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com





SPONSORED LINKS
Software development tool Software development Software development services
Home design software Software development company

Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___

Reply via email to