1

I make a Flex HTTPService:

<s:HTTPService id="svn" url="{Globals.URLINDEX}" result="doLoginCheck(event);"  
           resultFormat="text" fault="faultHandler(event)"  method="POST"  />

and have a PHP file a.php:

<?php
echo "{ ";
echo  '"act" :' . '"'. $_REQUEST['act'] .'"    ' ;
echo "}";
?>

problem is here.

If I send it like this, without contentType:

var params = {} ;
params.act ="act";
//svn.contentType = "application/json";   
svn.headers = {Accept : "application/json"}; 
svn.send(params);

result is OK.

{ "act": "act" ...} 

But I send it like this, with contentType:

svn.contentType = "application/json";   
svn.headers = {Accept : "application/json"}; 

result have problem

{"act" ,"" ...    }

(blank . can't get parameter)

How to solve this?

user13500
  • 3,817
  • 2
  • 26
  • 33

0 Answers0