Author: mnapoli | Posted on: 7/11/2008 12:24:12 PM | Views : 569

I have an aspx page where I need to make a call to an outside API via a POST and I need to have some parameters passed in the Request object in order for the API to process our request. What I want to be able to do is create an HttpWebRequest that will post the data to the API and before I send the Request I want to populate some parameters just as if the POST was done from a form in the front end. I have my HttpWebRequest object already and I can get the request to work and I get a response. My problem is that I need to populate the request object with some parameters and I just don't know how to do that from the code behind. I have a backup solution but I would much rather handle it this way if possible. Does anyone know how to do what I am looking for and is it even possible?

HttpWebRequest myRequest = (HttpWebRequest) Go to the complete details ...