aspose file tools*
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes What is the meaning of POST has a body ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "What is the meaning of POST has a body ?" Watch "What is the meaning of POST has a body ?" New topic
Author

What is the meaning of POST has a body ?

Harikrishna Gorrepati
Ranch Hand

Joined: Sep 23, 2010
Posts: 422
Hi, What is the meaning of POST has a body ? GET has no body ?


OCPJP 6.0-81% | Preparing for OCWCD
http://www.certpal.com/blogs/cert-articles | http://sites.google.com/site/mostlyjava/scwcd |
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60057
    
  65

Basic HTTP. POST has a body in which data can be posted. GET does not.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Gaurav Sagar
Ranch Hand

Joined: Sep 08, 2010
Posts: 97

Harikrishna Gorrepati wrote:Hi, What is the meaning of POST has a body ? GET has no body ?


The POST has the ability to carry data as PAYLOAD, whereas the GET doesn't has this type of special capability. Henceforth, since POST ought to carry data with itself, it has body. Hope you are not concerned with the body of the method i.e. the code. In that case its empty as a default for you to override.

Regards,
Gaurav


SCJP 1.6(91%), SCWCD 1.5(100%), SCBCD in progress
Jayr Motta
Ranch Hand

Joined: Jul 30, 2010
Posts: 110

Harikrishna,

It's because if you want to send data to the server you can use some mechanisms, one of them is the URL through http parameters (those with &name=value), and other is the body. The body does the same of the URL while sending data to the server, however, there is some benefits and some limitations,

Using URL you can bookmark it, which allow your users to restore the state of your application through just URL in an RESTful manner.
Using body you don't have any size limit. (There is size limit with URL because most part of browsers limit a maximum of characters in the URL, however, there is no such limitation on the HTTP specification)
Using URL all data is sent to the URL when submiting some data, with body it doesn't. (let's say you want to send some password to the server, you'll not want that it appear on the URL)

The body is also called payload, because it's in bytes how much you've to pay to get that load of data.

About the second answer. No, GET has no body, it just carries the basics HTTP headers / info. It's because in theory how his name explicit, it's just a call to get something, not to send. While with POST you're posting something to the server.

Hope it helps!


Feel free to ask me anything!
www.BlackBeltFactory.com/ui#!/ref=jmotta, SCJP 6, OCWCD JEE5, OCE EJB JEE6
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: What is the meaning of POST has a body ?
 
Similar Threads
How to prepare:? 3 More Weeks left
Arabization broblem.
Portal means ????????????
Forum Site
Drivel