The GET and POST methods in HTTP and HTTPS are the two most popular methods used to transfer data from a client to a server using the HTTP protocol (Hypertext Transfer Protocol). Both GET and POST can be used to send a request and receive a response, but there is a significant difference between them.
The difference between GET and POST requests in HTTP or HTTPS is a popular question in every web programming interview. Because HTML is not dependent on web server technology such as Java, ASP, or PHP and HTTP is the main protocol in the Internet space, one cannot clearly ignore the importance of understanding the GET and POST methods. In this article we will look at what the HTTP GET method is, what the HTTP POST method is, when to use a particular request, and what is the difference between them. Let us examine each concept separately.
What is HTML?
HTML — , -. , HTML-. .
HTML, - :
<! doctype html>
<HTML>
<>
<> TechTerms.com </ >
</ HEAD>
<>
<p> HTML. </ p>
</ Body>
</ Html>
, . <! doctype html> , HTML5. HTML- <html>, <head> <body>, . , <head>. <body>.
, HTML , -. , - , HTML . HTML5 , HTML 4.01 XHTML 1.0, HTML5 . , HTML JavaScript .
- - « », , PHP ASP. HTML. HTML-, -.
HTTP?
HTTP -.
- , , -, — .
() HTTP- , , .
GET POST
- :
GET POST .
HTTP
HTTP — , . - , -.
HTTP server-client. , . HTTP-, , - -, Apache IIS. -, - HTTP. URL- , - .
HTTP :
200 — ( -);
301 — ( URL-);
401 — ( );
403 — ( );
500 — ( ).
POST GET HTTP
HTTP GET POST, -. CONNECT , SSL. HTTP- HTTPS — HTTP, .
URL-, «http://», 80. URL-, «https://», HTTPS 443.
POST
POST — , . , . POST . , .
Mac Windows POST , . , , . POST , , . POST BIOS. , «08», , , « ». Mac POST , , , , .
POST. , . , Apple iMac , , , . POST, .
POST — , . , , . - POST, - . — .
GET
POST HTML - , . — GET, URL. HTTP POST () . , GET URL. HTML , = POST method = GET ( ) <form>. , . GET, URL- . POST HTTP-.
POST - , . -.
HTTP GET . GET URL-, , , .
POST . POST - .
GET POST , HTTP-, HTTP. : , enctype. METHOD = "POST enctype multipart/form-data application/x-www-form-urlencoded, METHOD =" GET " application/x-www-form-urlencoded. set .
METHOD = "GET" URL-, , application/x-www-form-urlencoded). URL-, (, URL- ). URL , GET URL . , , ASCII. URL- ASCII.
METHOD = «POST» POST , , enctype.
PHP
PHP — -, HTML. , PHP- HTML-. PHP , . GET POST PHP HTML-, . PHP- HTML , PHP- . PHP .
PHP , C, Java Perl. PHP . — - .
Wordpress
WordPress — , -. .
WordPress , -, -. , .
WordPress , POST GET WordPress . , -, . , , -.
POST_GET_ID () , , , , . , , .