This project is read-only.
public class Program : SmallHTTPServiceBase {
	static void Main(string[] args) {
		new Program().Run();

		Console.WriteLine("press any key to exit.");
		Console.ReadLine();
	}

	private void Run() {
		this.Open();
	}

	// http://localhost:7005/Action/Default
	public ActionResult Default() {
		return new ContentResult("<h1>hello world</h1>");
	}

/*
	public ActionResult Default(Arguments arg) {
		var ctx = ChannelContext.Current;
		byte[] buffer = new byte[ctx.ContentLength];
		ctx.Stream.Read(buffer, 0, ctx.ContentLength);
		Console.WriteLine(Encoding.UTF8.GetString(buffer));
	
		return new ContentResult("ok");
	}
*/
}

Last edited Nov 30, 2013 at 9:30 AM by nonocast, version 5

Comments

No comments yet.