Converting HTTP GET to HTTP Post
I was asked the following:
Quote:
I want to use ASP.NET to convert an incoming request from an HTTP GET to an HTTP POST. I'm pretty sure I've got to send JavaScript back to the client -- but I've been unsuccessful in my searching for an answer thus far.
Can anyone make suggestions?
Thanks,
Brad!
Re: Converting HTTP GET to HTTP Post
Hi Brad! :wave:
honestly, I don't think that this is possible. If I'm sending a form usig Post, it means that I will not utilize any information further; in other words I will not be able to save the info in a db, or do any kind of processing with the data sent.
If I'm sending through Get it will mean that I actually want to use the information that gets sent, and do further processing. Also, if Form data is sent via Get, my ASP file needs to be set up properly in order to use that information - so it is not just a quick convert from Post to get and voila!
I'd suggest if any data will be utilised further, the script should be set up properly in the first plave with Get
A scripting guru may prove me wrong and give better advice, but this is how I've always understood / learnt / used it. :)
I hope I was helpful :)
Re: Converting HTTP GET to HTTP Post
As Hannes already mentioned, it has to be changed on the client-side code. My main question is...How can this guy not have access to the client-side code?
POST and GET are two completely separate protocols for transfering data from client-side to the server-side. There is no incoming request to the server before the data is sent from the client. Whatever the client is going to send, it just plain sends it.
Re: Converting HTTP GET to HTTP Post
Thanks guys. I'll pass this back to the guy that asked me. (or I'll point him here). It sounds like I might have lost something in translation.... :)