ابدأ بالتواصل مع الأشخاص وتبادل معارفك المهنية

أنشئ حسابًا أو سجّل الدخول للانضمام إلى مجتمعك المهني.

متابعة

What are the differences between get and post methods?

user-image
تم إضافة السؤال من قبل مستخدم محذوف‎
تاريخ النشر: 2013/08/07
Mohamed El Shaer
من قبل Mohamed El Shaer , Senior System Engineer , Etisalat UAE

GET. Is used to retrieve data from the database. for example when you search google they send your keywords to the server as a get request. why? in order to make it easy to bookmark this page and come to the results any time. also GET requests are shown on the URL so it is easier to change the values. POST Is used whenever you want to store the data on a page, for example when you register on facebook the send your data on a POST request in which is sent on the background to avoid any errors could happen. Technical Differences. GET Is limited by the number of characters allowed on the URL of each browser. You can't upload images to the server by using get. Data are shown on the URL of the website so user can easily modify it. Pages use GET can be bookmarked. POST POST requests are sent on the background so it's not easy to modify the send data. The size of the POSTed data is configurable you can change it as you want. Cannot be bookmarked.

ANUMOL C.S
من قبل ANUMOL C.S , Programmer , Computer Lab Consultant , Silex Innovation Pvt.Ltd

GET - Requests data from a specified resource,Data is visible to everyone in the URL POST - Submits data to be processed to a specified resource,Data is not displayed in the URL

alkhadim abdul hamid
من قبل alkhadim abdul hamid , desinger , SSI-GROUPE

if you want to know more for this question get this link : http://www.w3schools.com/tags/ref_httpmethods.asp

Tariq Momani
من قبل Tariq Momani , web team leader , Work in Ketab

Get send data in url, post send data hidden

Get have limit, post don't have limit

Sandeep Vadgama
من قبل Sandeep Vadgama , Sr. Technical Lead , JUST DIAL

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 than255 characters long (though this is browser dependent, but usually the max is255 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).

Ansar Naseeh
من قبل Ansar Naseeh , Senior Software Developer , fidhaps

GET -1.Requests data from a resource2. data request having limit3. data can be viewed in URL4. GET request can be cashed , POST -1.Submits data to be processed to a resource2. data submission having no limit3. data cannot be visible4. post request is not cashed

Zack Rose
من قبل Zack Rose

1. GET Method have some limit like only2Kb data able to send for request But in POST method unlimited data can we send.

2. when we use GET method requested data show in url but Not in POST method so POST method is good for send sensetive request.

Amr Ahmed Mohamed Soliman
من قبل Amr Ahmed Mohamed Soliman , Team Manager , Tawrny

GET is for data retrieval only. You can refine what you are getting but it is a read only setup and yes, as you mentioned anything used for refinement are part of the URL.

POST is meant for sending data, but is generally a way to 'break' the simple workings of HTML because you are neither guaranteed of anything that is happening, it can just fetch data, send data or delete data.

There are also PUT and DELETE in the HTML standards, but its all about finding web servers that support these actions as well. As the names imply PUT sends data for either the creation or updating while DELETE is for removal of data.

Enjoy! :)

المزيد من الأسئلة المماثلة

هل تحتاج لمساعدة في كتابة سيرة ذاتية تحتوي على الكلمات الدلالية التي يبحث عنها أصحاب العمل؟