Get and Post are methods used to send data to the server. Both methods are used in form data handling where each one has some difference on the way they work. It's important for you to know which method you are using.

Points of difference between Get and Post methods

Get method

Post method

Lets see in more detailed about Get and Post methods

There is a character restriction of 255 in the URL. This is mostly the old browsers restriction and new ones can handle more than that. But we can't be sure that all our visitors are using new browsers. So when we show a text area or a text box asking users to enter some data, then there will be a problem if more data is entered. This restriction is not there in Post method.

In Get method data Gets transferred to the processing page in name value pairs through URL, so it is exposed and can be easily traced by visiting history pages of the browser. So any login details with password should never be posted by using Get method.

As the data transfers through address bar (URL) there are some restrictions in using space, some characters like ampersand (&) etc in the Get method of posting data. We have to take special care for encoding (while sending) and decoding (while receiving) data if such special characters are present.

However, one advantage of form data being sent as part of the URL is that one can bookmark the URLs and directly use them and completely bypass the form-filling process.

Please note that web forms in ASP.NET use Post by default. It can be changed into Get, but only for small forms. Web forms can Post a lot of data, especially when ViewState is involved.

Conclusion

I hope that this article would have helped you in understanding the HTTP client methods Get and Post. Please share it if you know more about this attribute. Your feedback and constructive contributions are welcome.