Skip to content

Instantly share code, notes, and snippets.

@mizutanikirin
Created June 5, 2014 11:40
Show Gist options
  • Save mizutanikirin/a161fa17b40b6f8cf6e1 to your computer and use it in GitHub Desktop.
Save mizutanikirin/a161fa17b40b6f8cf6e1 to your computer and use it in GitHub Desktop.
POST送信
// 送信かつページ遷移(POST)
var variables:URLVariables;
var request:URLRequest;
request = new URLRequest("http://hoge.jp/hoge.jsp");
variables = new URLVariables();
variables.decode("user_id=" + userNumber);
variables.decode("graph_id=fig" + figName);
request.data = variables;
request.method = URLRequestMethod.POST;
navigateToURL( request , "_self");
// 送信のみページ遷移なし(POST)
var variables:URLVariables;
var request:URLRequest;
request = new URLRequest("http://hoge.jp/hoge.jsp");
variables = new URLVariables();
variables.decode("user_id=" + userNumber);
variables.decode("graph_id=fig" + figName);
request.data = variables;
request.method = URLRequestMethod.POST;
sendToURL(request);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment