Get and post methods

497 views

Published on

Published in: Technology, Design
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
497
On SlideShare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
12
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide
  • Uri-identifies the resource upon which to apply the request.
  • Get and post methods

    1. 1. Titleof the presentation AnjaliG anjalig2009@gmail.com www.facebook.com/AnjaliGeetha twitter.com/username in.linkedin.com/in/AnjaliG 9497879952
    2. 2. METHODS GET AND POST
    3. 3. INTRODUCTION  Get and Post are HTTP request methods to transfer data from client to server.  HTTP works as a request-response protocol between a client and server.  Get - Requests data from a specified resource  Post - Submits data to be processed to a specified resource  Both GET and POST can be used to send request and receive response
    4. 4. GET METHOD  GET requests can be cached  The GET method means retrieve whatever information (in the form of an entity) is identified by the Request-URI. GET requests remain in the browser history GET can't be used to send binary data, like images or word documents, to the server. GET requests can be bookmarked GET requests should never be used when dealing with sensitive data GET requests have length restrictions GET requests should be used only to retrieve data  Eg: http://www.example.com/servlet?foo=bar
    5. 5. POST METHOD  POST requests are never cached POST requests do not remain in the browser history POST requests cannot be bookmarked  POST requests have no restrictions on data length The POST method can be used to send ASCII as well as binary data. The data sent by POST method goes through HTTP header so security depends on HTTP protocol. By using Secure HTTP you can make sure that your information is secure.
    6. 6. COMPARE GET VS POST GET POST BACK button/Reload Harmless Data will be re-submitted (the browser should alert the user that the data are about to be re- submitted) Bookmarked Can be bookmarked Cannot be bookmarked Cached Can be cached Not cached History Parameters remain in browser history Parameters are not saved in browser history
    7. 7. GET POST Restrictions on data length Yes, when sending data, the GET method adds the data to the URL; and the length of a URL is limited (maximum URL length is 2048 characters) No restrictions Restrictions on data type Only ASCII characters allowed No restrictions. Binary data is also allowed Security GET is less secure compared to POST because data sent is part of the URL Never use GET when sending passwords or other sensitive information! POST is a little safer than GET because the parameters are not stored in browser history or in web server logs Visibility Data is visible to everyone in the URL Data is not displayed in the URL CONTINUE. . .
    8. 8. ADVANTAGES OF GET  Save the results of a form submission. For example, you can submit data and bookmark the resultant URL, send it to a colleague by email, or put it in a normal hypertext link. The ability to bookmark the results page is the main reason google.com, yahoo.com, and other search engines use GET.  Type data in by hand. You can test Servlets or JSP pages that use GET simply by entering a URL with the appropriate data attached.
    9. 9. ADVANTAGES OF POST  Transmit large amounts of data. Many browsers limit URLs to a few thousand characters, making GET inappropriate when your form must send a large amount of data. Since HTML forms let you upload files from the client machine, sending multiple megabytes of data is quite commonplace. Only POST can be used for this task.  Send binary data. Spaces, carriage returns, tabs, and many other characters are illegal in URLs. If you upload a large binary file, it would be a time-consuming process to encode all the characters before transmission and decode them on the other end.  Keep the data private from someone looking over the user’s shoulder..
    10. 10. THANK YOU
    11. 11. If this presentation helped you, please visit our page facebook.com/baabtra and like it. Thanks in advance. www.baabtra.com | www.massbaab.com |www.baabte.com
    12. 12. Contact Us Emarald Mall (Big Bazar Building) Mavoor Road, Kozhikode, Kerala, India. Ph: + 91 – 495 40 25 550 NC Complex, Near Bus Stand Mukkam, Kozhikode, Kerala, India. Ph: + 91 – 495 40 25 550 Start up Village Eranakulam, Kerala, India. Email: info@baabtra.com

    ×