SlideShare una empresa de Scribd logo
1 de 13
Titleof the presentation
AnjaliG
anjalig2009@gmail.com
www.facebook.com/AnjaliGeetha
twitter.com/username
in.linkedin.com/in/AnjaliG
9497879952
METHODS GET AND POST
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
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
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.
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
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. . .
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.
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..
THANK YOU
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
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

Más contenido relacionado

La actualidad más candente

Javascript variables and datatypes
Javascript variables and datatypesJavascript variables and datatypes
Javascript variables and datatypes
Varun C M
 
Byte stream classes.49
Byte stream classes.49Byte stream classes.49
Byte stream classes.49
myrajendra
 
Html 5-tables-forms-frames (1)
Html 5-tables-forms-frames (1)Html 5-tables-forms-frames (1)
Html 5-tables-forms-frames (1)
club23
 

La actualidad más candente (20)

Form Handling using PHP
Form Handling using PHPForm Handling using PHP
Form Handling using PHP
 
Web services
Web servicesWeb services
Web services
 
Introduction of Html/css/js
Introduction of Html/css/jsIntroduction of Html/css/js
Introduction of Html/css/js
 
Javascript variables and datatypes
Javascript variables and datatypesJavascript variables and datatypes
Javascript variables and datatypes
 
HTTP request and response
HTTP request and responseHTTP request and response
HTTP request and response
 
DHTML
DHTMLDHTML
DHTML
 
PHP Form Validation Technique
PHP Form Validation TechniquePHP Form Validation Technique
PHP Form Validation Technique
 
Document Object Model
Document Object ModelDocument Object Model
Document Object Model
 
2. html attributes
2. html attributes2. html attributes
2. html attributes
 
Byte stream classes.49
Byte stream classes.49Byte stream classes.49
Byte stream classes.49
 
An Overview of HTML, CSS & Java Script
An Overview of HTML, CSS & Java ScriptAn Overview of HTML, CSS & Java Script
An Overview of HTML, CSS & Java Script
 
Intro to HTML and CSS basics
Intro to HTML and CSS basicsIntro to HTML and CSS basics
Intro to HTML and CSS basics
 
Introduction to XHTML
Introduction to XHTMLIntroduction to XHTML
Introduction to XHTML
 
Asp.net.
Asp.net.Asp.net.
Asp.net.
 
Intro to html 5
Intro to html 5Intro to html 5
Intro to html 5
 
Html 5-tables-forms-frames (1)
Html 5-tables-forms-frames (1)Html 5-tables-forms-frames (1)
Html 5-tables-forms-frames (1)
 
jQuery for beginners
jQuery for beginnersjQuery for beginners
jQuery for beginners
 
Html / CSS Presentation
Html / CSS PresentationHtml / CSS Presentation
Html / CSS Presentation
 
WSDL
WSDLWSDL
WSDL
 
Php forms
Php formsPhp forms
Php forms
 

Destacado

01 session tracking
01   session tracking01   session tracking
01 session tracking
dhrubo kayal
 
Java Servlets
Java ServletsJava Servlets
Java Servlets
Nitin Pai
 

Destacado (20)

Get_vs_Post
Get_vs_PostGet_vs_Post
Get_vs_Post
 
The post method era
The post method eraThe post method era
The post method era
 
Introduction to HTTP protocol
Introduction to HTTP protocolIntroduction to HTTP protocol
Introduction to HTTP protocol
 
Java servlet life cycle - methods ppt
Java servlet life cycle - methods pptJava servlet life cycle - methods ppt
Java servlet life cycle - methods ppt
 
HyperText Transfer Protocol (HTTP)
HyperText Transfer Protocol (HTTP)HyperText Transfer Protocol (HTTP)
HyperText Transfer Protocol (HTTP)
 
Aula02 Desenvolvimento em Ambiente Web - CSS 3
Aula02 Desenvolvimento em Ambiente Web - CSS 3Aula02 Desenvolvimento em Ambiente Web - CSS 3
Aula02 Desenvolvimento em Ambiente Web - CSS 3
 
01 session tracking
01   session tracking01   session tracking
01 session tracking
 
Servlet Filter
Servlet FilterServlet Filter
Servlet Filter
 
PHP & JavaScript & CSS Coding style
PHP & JavaScript & CSS Coding stylePHP & JavaScript & CSS Coding style
PHP & JavaScript & CSS Coding style
 
Http Vs Https .
Http Vs Https . Http Vs Https .
Http Vs Https .
 
Java servlets
Java servletsJava servlets
Java servlets
 
Hacking And Its Prevention
Hacking And Its PreventionHacking And Its Prevention
Hacking And Its Prevention
 
Post method pedagogy
Post method pedagogyPost method pedagogy
Post method pedagogy
 
Lecture 3: Servlets - Session Management
Lecture 3:  Servlets - Session ManagementLecture 3:  Servlets - Session Management
Lecture 3: Servlets - Session Management
 
Java Servlets
Java ServletsJava Servlets
Java Servlets
 
HTTP Basics
HTTP BasicsHTTP Basics
HTTP Basics
 
Java Servlets
Java ServletsJava Servlets
Java Servlets
 
Ethical hacking presentation
Ethical hacking presentationEthical hacking presentation
Ethical hacking presentation
 
Computer security threats & prevention
Computer security threats & preventionComputer security threats & prevention
Computer security threats & prevention
 
Servlets intro
Servlets introServlets intro
Servlets intro
 

Similar a Get and post methods

Session12 J2ME Generic Connection Framework
Session12 J2ME Generic Connection FrameworkSession12 J2ME Generic Connection Framework
Session12 J2ME Generic Connection Framework
muthusvm
 
RESTful SOA - 中科院暑期讲座
RESTful SOA - 中科院暑期讲座RESTful SOA - 中科院暑期讲座
RESTful SOA - 中科院暑期讲座
Li Yi
 

Similar a Get and post methods (20)

Making web forms using php
Making web forms using phpMaking web forms using php
Making web forms using php
 
Time to Migrate to HTTPS – The Simple Way to Do It Right, And the Ways That t...
Time to Migrate to HTTPS – The Simple Way to Do It Right, And the Ways That t...Time to Migrate to HTTPS – The Simple Way to Do It Right, And the Ways That t...
Time to Migrate to HTTPS – The Simple Way to Do It Right, And the Ways That t...
 
Session and cookies ,get and post methods
Session and cookies ,get and post methodsSession and cookies ,get and post methods
Session and cookies ,get and post methods
 
PHP Making Web Forms
PHP Making Web FormsPHP Making Web Forms
PHP Making Web Forms
 
The constrained application protocol (coap) part 2
The constrained application protocol (coap)  part 2The constrained application protocol (coap)  part 2
The constrained application protocol (coap) part 2
 
The constrained application protocol (coap) part 2
The constrained application protocol (coap)  part 2The constrained application protocol (coap)  part 2
The constrained application protocol (coap) part 2
 
The constrained application protocol (co ap) part 2
The constrained application protocol (co ap)  part 2The constrained application protocol (co ap)  part 2
The constrained application protocol (co ap) part 2
 
Form handling in php
Form handling in phpForm handling in php
Form handling in php
 
Asp.Net difference faqs- 4
Asp.Net difference faqs- 4Asp.Net difference faqs- 4
Asp.Net difference faqs- 4
 
WWW and HTTP
WWW and HTTPWWW and HTTP
WWW and HTTP
 
Session12 J2ME Generic Connection Framework
Session12 J2ME Generic Connection FrameworkSession12 J2ME Generic Connection Framework
Session12 J2ME Generic Connection Framework
 
Study of http
Study of httpStudy of http
Study of http
 
www and http services
www and http serviceswww and http services
www and http services
 
RESTful design
RESTful designRESTful design
RESTful design
 
HTTP Basics Demo
HTTP Basics DemoHTTP Basics Demo
HTTP Basics Demo
 
Under the Covers with the Web
Under the Covers with the WebUnder the Covers with the Web
Under the Covers with the Web
 
RESTful SOA - 中科院暑期讲座
RESTful SOA - 中科院暑期讲座RESTful SOA - 中科院暑期讲座
RESTful SOA - 中科院暑期讲座
 
Common Gateway Interface
Common Gateway InterfaceCommon Gateway Interface
Common Gateway Interface
 
Web Development
Web DevelopmentWeb Development
Web Development
 
Restful web services
Restful web servicesRestful web services
Restful web services
 

Más de baabtra.com - No. 1 supplier of quality freshers

Más de baabtra.com - No. 1 supplier of quality freshers (20)

Agile methodology and scrum development
Agile methodology and scrum developmentAgile methodology and scrum development
Agile methodology and scrum development
 
Best coding practices
Best coding practicesBest coding practices
Best coding practices
 
Core java - baabtra
Core java - baabtraCore java - baabtra
Core java - baabtra
 
Acquiring new skills what you should know
Acquiring new skills   what you should knowAcquiring new skills   what you should know
Acquiring new skills what you should know
 
Baabtra.com programming at school
Baabtra.com programming at schoolBaabtra.com programming at school
Baabtra.com programming at school
 
99LMS for Enterprises - LMS that you will love
99LMS for Enterprises - LMS that you will love 99LMS for Enterprises - LMS that you will love
99LMS for Enterprises - LMS that you will love
 
Php sessions & cookies
Php sessions & cookiesPhp sessions & cookies
Php sessions & cookies
 
Php database connectivity
Php database connectivityPhp database connectivity
Php database connectivity
 
Chapter 6 database normalisation
Chapter 6  database normalisationChapter 6  database normalisation
Chapter 6 database normalisation
 
Chapter 5 transactions and dcl statements
Chapter 5  transactions and dcl statementsChapter 5  transactions and dcl statements
Chapter 5 transactions and dcl statements
 
Chapter 4 functions, views, indexing
Chapter 4  functions, views, indexingChapter 4  functions, views, indexing
Chapter 4 functions, views, indexing
 
Chapter 3 stored procedures
Chapter 3 stored proceduresChapter 3 stored procedures
Chapter 3 stored procedures
 
Chapter 2 grouping,scalar and aggergate functions,joins inner join,outer join
Chapter 2  grouping,scalar and aggergate functions,joins   inner join,outer joinChapter 2  grouping,scalar and aggergate functions,joins   inner join,outer join
Chapter 2 grouping,scalar and aggergate functions,joins inner join,outer join
 
Chapter 1 introduction to sql server
Chapter 1 introduction to sql serverChapter 1 introduction to sql server
Chapter 1 introduction to sql server
 
Chapter 1 introduction to sql server
Chapter 1 introduction to sql serverChapter 1 introduction to sql server
Chapter 1 introduction to sql server
 
Microsoft holo lens
Microsoft holo lensMicrosoft holo lens
Microsoft holo lens
 
Blue brain
Blue brainBlue brain
Blue brain
 
5g
5g5g
5g
 
Aptitude skills baabtra
Aptitude skills baabtraAptitude skills baabtra
Aptitude skills baabtra
 
Gd baabtra
Gd baabtraGd baabtra
Gd baabtra
 

Último

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 

Último (20)

AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 

Get and post methods

  • 1.
  • 4. 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
  • 5. 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
  • 6. 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.
  • 7. 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
  • 8. 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. . .
  • 9. 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.
  • 10. 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..
  • 12. 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
  • 13. 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

Notas del editor

  1. Uri-identifies the resource upon which to apply the request.