Here is what POST and GET requests actually send:
***********post****************
POST /test.asp HTTP/1.1
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg,
application/msword, application/vnd.ms-excel, application/vnd.ms-powerpoint,
application/x-shockwave-flash, */*
Referer:
http://localhost/test.html
Accept-Language: en-us
Content-Type: application/x-www-form-urlencoded
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)
Host: localhost
Content-Length: 59
Connection: Keep-Alive
Cache-Control: no-cache
Cookie: ASPSESSIONIDCABBTSDS=HDMDFOODHJFOJHCCKJIIDOIF
field1=field+1+data&field2=field+2+data&field3=fie ld+3+data
***************get*******************************
GET /test.asp?field1=field+1+data&field2=field+2+data&f ield3=field+3+data
HTTP/1.1
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg,
application/msword, application/vnd.ms-excel, application/vnd.ms-powerpoint,
application/x-shockwave-flash, */*
Referer:
http://localhost/test.html
Accept-Language: en-us
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)
Host: localhost
Connection: Keep-Alive
Cookie: ASPSESSIONIDCABBTSDS=HDMDFOODHJFOJHCCKJIIDOIF
--
Mark Schupp
Head of Development
Integrity eLearning
www.ielearning.com
"Thomas Scheiderich" <tfs@deltanet.com> wrote in message
news:4027CEB5.2010403@deltanet.com...[color=blue]
> Peter Foti wrote:
>[color=green]
> > "Thomas Scheiderich" <tfs@deltanet.com> wrote in message
> > news:402515A8.1080707@deltanet.com...
> >[color=darkred]
> >>Peter Foti wrote:
> >>
> >>
> >>>"Thomas Scheiderich" <tfs@deltanet.com> wrote in message
> >>>news:4023F533.5050400@deltanet.com...
> >>>
> >>>
> >>>>I am trying to understand Session variables and ran into a question on
> >>>>how they work with data that is passed.
> >>>>
> >>>>I have an HTM file that calls an ASP file and sends the name either by
> >>>>GET or POST.
> >>>>
> >>>>When I find is that if I send the value by the GET method,
> >>>> response.write("From QueryString: " &
> >>>>Request.QueryString("usernamefromform") & "<br><br>")
> >>>>
> >>>> will get the variable fine, but
> >>>>
> >>>>Session("userName")=request.Form("userNameFrom Form")
> >>>>response.write("Session variable = " & Session("userName"))
> >>>>
> >>>>doesn't work.
> >>>>
> >>>>If I use the POST method then it is reversed. Response.QueryString
> >>>>doesn't get anything and the Session code works.
> >>>>
> >>>>Why is this? I can't seem to find an explanation in my ASP books.
> >>>>
> >>>>
> >>>When using method GET, you can access the form values via the
> >>>Request.Querystring collection. When using method POST, you can access
> >>>[/color]
> > the
> >[color=darkred]
> >>>form values via the Request.Form collection.
> >>>
> >>>
> >>Why is that?
> >>
> >>Aren't they both forms? I would have thought that the Request.Form,
> >>would still be able to get the data.
> >>
> >>I know that the difference between GET and POST is that you can see the
> >>data that is passed in the URL line in your browser, but you can't in
> >>the POST method.
> >>[/color]
> >
> > The method actually specifies which HTTP method is used to send the form[/color][/color]
to[color=blue][color=green]
> > the processing agent. With the HTTP "get" method, the form data is[/color][/color]
appended[color=blue][color=green]
> > to the URI specified by the action attribute, and this new URI is sent[/color][/color]
to[color=blue][color=green]
> > the processing agent. With the HTTP "post" method, the form data is
> > included in the body of the form and sent to the processing agent.[/color][/color]
Thus,[color=blue][color=green]
> > with the "get" method, your form data is transferred to the querystring,[/color][/color]
and[color=blue][color=green]
> > with the "post" method, it remains in the form.[/color]
>
>
> This is a "just curious" question as I understand now what "post" does,
> but everyone says that the "post" method is appended to the form data
> and then passed to the processing agent.
>
> In the "get" method, the URL/URI with the query string appended after
> the "?" is sent to the processor. What is actually sent to the
> processor for "POST"? When you say the body of the form with the form
> data, are you talking about an HTML page that just has the form
> information (no graphics,tables etc.).
>
>
> I assume the data somehow gets sent to the client for the browser to
> handle. Where does the data get put for the client to handle for things
> such as putting into cookies as well as putting on the screen?
>
> Thanks,
>
> Tom.
>
>[color=green]
> >
> > Hope that helps. For more info, you might try looking up HTTP and/or[/color][/color]
HTML[color=blue][color=green]
> > Forms (
www.w3.org is a good starting point).
> > Regards,
> > Peter Foti
> >
> >
> >[/color]
>[/color]