例のデモ:
1 // 新しい新しいHTTPリクエスト 2 のvarリクエスト= 新しい新しいegret.HttpRequest(); 3 。4つの // リクエストパラメータ 。5 VARのparams = "P1 = P2 =&postP1 postP2" ; 6 。7 // POSTリクエストを送信する 。8 request.open(「HTTP: //Helloworld/test.php "egret.HttpMethod.POST); 9 10 // レスポンスヘッダを設定 11。 request.setRequestHeader("コンテンツタイプ""ファイルアプリケーション/ x-www-form-urlencodedで" ); 12は、 13であります / / 伝送パラメータ 14 request.send(paramsはする); 15 16 //モニタデータが返され、現在の要求の完了後 17。 request.addEventListener(egret.Event.COMPLETE、関数(EVT){ 18は 、// データを返すように要求 19。 VARのデータ= request.response; 20である にconsole.log(データ) 21である }、この);