Generate a POST from C# class library without submitting -
I know that I can generate and send a post via HttpWebRequest
, but I I am thinking that it is possible to generate this post and return it to the web application so that he can post it.
In other words, I want to call web application a method call in my class library which generates the request for the post, but I want to submit it to the web application. Is this possible?
Edit:
I know that it looks like "WTF"? Why do you want to do this? Give me some background some very complex logic has been used to create some of the encrypted post values (some of which do not have access to the web app). So to keep the web part simple, we kept the post generation away. The problem now is that we need calling application that actually posts.
Another explanation, I want to submit a request to the browser (such as the user has submitted the form and it has been submitted.)
There is no request for a HttpWebRequest
unless you call GetResponse
, you should make sure that Call HttpWebRequest
and call GetResponse
anywhere from you, though I'm not sure why you would like to do it this way.
http webbroken req = ClassLibrary.GetPostRequest (); HttpWebResponse Res = req.GetResponse ();
Comments
Post a Comment