What is the difference between Get and Post Method?

Answers were Sorted based on User's Feedback



What is the difference between Get and Post Method?..

Answer / manu

in Get method,data is passed in urlpattern i.e can be seen
everyone
in post method data is passed with in method body.

Is This Answer Correct ?    35 Yes 5 No

What is the difference between Get and Post Method?..

Answer / raghunath bj

Get and Post will do the same kind of operation which takes
requests from the browser but the key difference between
them is Get can not contain large number of data but post
can have large number of data to post the request.

Is This Answer Correct ?    18 Yes 1 No

What is the difference between Get and Post Method?..

Answer / jitendra

The key difference between Get and post is:
1) By using post method we can send large date as compare to
Get.
2) Post is more secure then Get because in case of Get
method, the data is visible in the URL of the browser and
can be directly accessed.

Is This Answer Correct ?    11 Yes 0 No

What is the difference between Get and Post Method?..

Answer / alok kumar ranjan

Re: What is the difference between Get and Post Method?
Answer: (1). Get is Default Http Method, but in post method
you should specify the post method implicitely as follows:-
<form action=" " method="post"

(2) In Get Method,data is pssed in URL Pattern. But in post
method data is passed with in method body.

(3) In Get Method,Size of URL is limited because of this e
can send only limited amount of data to server using the
get method. But in Post Method,We can send the data
unlimited amount of the data.

(4) Get Method is not secured because data can be seen in
URL. But Post Method is very Secured.

(5) Through Get Method,We can not send data to server But
In POst Method,We send the data to server

Is This Answer Correct ?    4 Yes 0 No

What is the difference between Get and Post Method?..

Answer / amitasite

I would like to add more to Jitendra's answer

3) Get is idempotent while post is not
4) you can send binary data using post

Is This Answer Correct ?    3 Yes 1 No

What is the difference between Get and Post Method?..

Answer / sandeep kumar

Get method is faster then post method

Is This Answer Correct ?    1 Yes 0 No

What is the difference between Get and Post Method?..

Answer / sandeep singh

In Get can't be more than 255 characters long
In Post enter more than 255 characters long

Is This Answer Correct ?    1 Yes 0 No

What is the difference between Get and Post Method?..

Answer / meera

Difference between GET and POST methods

•Fundamental Difference is probably the Visibility - GET
request is sent via the URL string (appended to the URI
with a question-mark as separator), which is visible
whereas POST request is encapsulated in the body of the
HTTP request and can't be seen.
•Length - Since, GET request goes via URL, so it has a
limitation for its length. It can't be more than 255
characters long (though this is browser dependent, but
usually the max is 255 characters only). Whereas no such
maximum length limitation holds for the POST request for
the obvious reason that it becomes a part of the body of
the HTTP request and there is no size limitation for the
body of an HTTP request/response.
•Performance - GET request is comparatively faster as it's
relatively simpler to create a GET request and the time
spent in the encapsulation of the POST request in the HTTP
body is saved in this case. In addition, the maximum length
restriction facilitates better optimization of GET
implementation.
•Type of Data - GET request is sent via URL string and as
we all know that URL can be text-only, so GET can carry
only text data whereas POST has no such restriction and it
can carry both text as well as binary data.
•Caching/Bookmarking - again for the obvious reason that a
GET request is nothing but an URL hence it can be cached as
well as Bookmarked. No such luxuries with a POST request.
•FORM Default - GET is the default method of the HTML FORM
element. To submit a FORM using POST method, we need to
specify the method attribute and give it the value "POST".
•Data Set - GET requests are restricted to use ASCII
characters only whereas POST requests can use the 'enctype'
attribute with a value "multipart/form-data" to use the
Universal Multiple-Octet Coded Character Set (UCS).

Is This Answer Correct ?    1 Yes 0 No

What is the difference between Get and Post Method?..

Answer / vivek gupta

I would like to add more to Jitendra and Amitasite's answer
5)By using GET,hidden variables are also shown as a part of URL,But By POST,hidden variables are hidden.

Is This Answer Correct ?    2 Yes 2 No

What is the difference between Get and Post Method?..

Answer / ravikiran.chd

Get is used to get the resouces from the server
post is the one which will post the content in the body of
the request

Is This Answer Correct ?    3 Yes 6 No

Post New Answer

More Servlets Interview Questions

what is the difference between servlets and struts?

3 Answers  


What do you mean by cgi in servlet?

0 Answers  


What's the use of servletcontext?

0 Answers  


Name the packages that work with servlet?

0 Answers  


What methods do you use in servlet - applet communication?

0 Answers  






What do you mean by a filter and how does it work?

0 Answers  


Can we use servlets in JavaScript?

2 Answers  


can i call init() method in destroy() method of servlset. ?

5 Answers   IBM,


what is meant by servlet to servlet communication?

1 Answers   KPIT,


Which application server is best for java?

0 Answers  


What are the uses of servlet and what is servlet chaining?

0 Answers  


What's the difference between authentication and authorization?

0 Answers  


Categories