Calibre2010
Calibre2010

Reputation: 3859

Reading a Post request from a user HttpApplication

I've been messing about with HttpApplication app = (HttpApplication)source;

Is there some way of the server identifying if the request is get or post.

Basically i want to create an if statement and if the request is a GET it jumps into the if statement, if its a post it doesnt.

Anyone?

Upvotes: 0

Views: 187

Answers (1)

Brandon
Brandon

Reputation: 70012

You can check the Request.HttpMethod property.

HttpApplication app = (HttpApplication)source;
if(app.Context.Request.HttpMethod == "GET")
{
  // Do stuff.
}

Upvotes: 1

Related Questions