Skip to content

Instantly share code, notes, and snippets.

@CIPop
Created September 30, 2016 17:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save CIPop/ba74bf3563b51b2faff9500129d58c6d to your computer and use it in GitHub Desktop.
Save CIPop/ba74bf3563b51b2faff9500129d58c6d to your computer and use it in GitHub Desktop.
Simple IIS/ASP.Net POST handler
<%@ WebHandler Language="C#" Class="Echo" %>
using System;
using System.Web;
using System.IO;
public class Echo : IHttpHandler {
public void ProcessRequest (HttpContext context) {
if (context.Request.HttpMethod == "POST")
{
context.Request.InputStream.CopyTo(context.Response.OutputStream);
}
}
public bool IsReusable {
get {
return false;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment