HTTP Methods - HttpWatch
HTTP Methods - HttpWatch
(/)
HTTP Gallery
Jump to ...
6. HTTP Methods
The HTTP method is supplied in the request line and species the operation that the client has requested. Internet Explorer will generally just
use two methods to access and interact with web sites; GET for queries that can be safely repeated and POST for operations that may have side
eects (e.g. ordering a book from an on-line store). For details of other HTTP methods refer to the HTTP 1.1 specication
(http://www.w3.org/Protocols/rfc2616/rfc2616.html).
For example, displaying the balance of a bank account has no eect on the account and can be safely repeated. In fact, Internet Explorer will
allow a user to refresh a page that resulted from a GET, without displaying any kind of warning. Other HTTP aware components such as proxies
may automatically retry GET requests if they encounter a temporary network connection problem.
One downside of GET requests is that they can only supply data in the form of parameters encoded in the URI (known as a Query String) or as
cookies in the cookie request header. Therefore, GET cannot be used for uploading les or other operations that require large amounts of data
to be sent to the server.
For banking, and other transactional web applications, the best approach is to use a POST when the user submits a change and then use a 302
redirection to change to a GET that displays the result of the action (e.g. the new account balance). The user can then safely refresh the resulting
page without being presented with the retry dialog shown above. For more details on the POST/302 technique see 7. Redirection
(../redirection/).
The POST request message has a content body that is normally used to send parameters and data. Unlike using the request URI or cookies,
there is no upper limit on the amount of data that can be sent and POSTmust be used if les or other variable length data has to be sent to the
server.
https://www.httpwatch.com/httpgallery/methods/ 1/3
7/4/2017 HTTPMethods|HttpWatch
If you are working with Microsoft's Internet Information Server (IIS) (e.g. running the samples in this HTTP Gallery) you may notice that it returns
two status codes in its response for a POST request. The rst is 100 Continue to indicate that it has successfully received the POST request and
the second is 200 OK after the request has been processed.
2 + 12 =
File name:
File type:
SUBMIT
1. Open HttpWatch by right clicking on the web page and selecting HttpWatch from the context menu
4. The submitted form values can be viewed in the rst sample by looking at the Query String tab and by looking at the POST Data
tab for the others.
https://www.httpwatch.com/httpgallery/methods/ 2/3
7/4/2017 HTTPMethods|HttpWatch
(/DOWNLOAD/)
BUY NOW (/BUY/)
HttpWatch
Features (/features/httpdebugger.aspx)
Compare Editions (/editions.aspx)
New in Version 10.x (/newin10x.aspx)
Download (/download/)
Pricing (/buy/)
Our Customers
Who is using it? (/#customers)
What are they saying? (/#quotes)
Support
Technical Support (/support/)
About Us (/company/)
Contact Us (/company/)
Blog (http://blog.httpwatch.com)
Twitter (https://twitter.com/httpwatch)
Search (/search/) Terms & Conditions (/company/terms.aspx) Privacy Policy (/company/privacy_policy.aspx) Copyright (/company/copyright.aspx)
https://www.httpwatch.com/httpgallery/methods/ 3/3