|
import System;
import System.IO;
// PATH 環境変数取得
var strMethod : String =
Environment.GetEnvironmentVariable( "REQUEST_METHOD" );
// HTTP ヘッダ
Console.WriteLine("Content-Type: text/html; Charset=shift_jis");
Console.WriteLine("");
Console.WriteLine("{0}<br>", strMethod );
if ( strMethod == "GET" ) {
var strQueryString : String =
Environment.GetEnvironmentVariable( "QUERY_STRING" );
Console.WriteLine(strQueryString);
}
if ( strMethod == "POST" ) {
var line : String = null;
line = Console.ReadLine();
while( line != null ) {
Console.WriteLine(line);
line = Console.ReadLine();
}
}
| |