All IT Courses 50% Off
QA Tutorials

HTTP Request Methods: GET, POST, PUT

HTTP: is the Hypertext Transfer Protocol(HTTP) enables the communication between client and server. It has a request-response protocol for communication. The request sent by the client is responded by the server.

The HTTP methods used are: 

  • GET
  • POST
  • PUT
  • HEAD
  • DELETE
  • PATCH
  • OPTIONS

The set of commands are as follows:

This article explains : GET, POST & PUT methods.

  1. GET: This command is mainly used to get data from the resource. This command sends data as a part of the URL, it appends the form data into the URL in the name/value pairs. The length of the URL is limited to 2048 characters. We should not use GET method if password or any sensitive information is there in the server. Mainly useful for form submission where the user want to bookmark the result. Get is better for non-secure data like query things in Google. GET can’t be used to send binary data like images etc.

The syntax is 

<form action=”some.php” method=”GET”>

For example consider a simple example accepting name and password

Http Methods Get Post Put

HTTP Request Methods: GET, POST, PUT

2. POST method:

POST is used to send the information from the server or to the server. Let us see one example of passing information through post method.

  1. Create a notepad file to write a simple program using html .
  2. Use method post and input type name and company name text fields and a submit button.
  3. Save the file.
  4. Run the file.
HTTP Request Methods: GET, POST, PUT


The design of the form looks as above where the name and company fields has to be passed to a file called post.php.

HTTP Request Methods: GET, POST, PUT

And run the file and the post method passes the information without showing it in the URL and gets the result.

HTTP Request Methods: GET, POST, PUT

HTTP Request Methods: GET, POST, PUT

The main difference between get and post method the get method displays the information passed in the URL where as post method hides the information in the URL.there are various advantages in this post method , there is no restrictions for the data size to be sent.we can sent binary data and uses the http protocol which is secure method of passing information .

3. PUT method

It is an Idempotent method, we can send multiple requests with PUT, but will not affect server and same request can be sent multiple times, it will update data. It tries to identify the resource with request.

Consider an example to request using PUT in php

HTTP Request Methods: GET, POST, PUT

The client side request is sent as a blank request

HTTP Request Methods: GET, POST, PUT

The server side response will be like

HTTP Request Methods: GET, POST, PUT
HTTP Request Methods: GET, POST, PUT

HTTP Request Methods: GET, POST, PUT

Facebook Comments

7 Comments

  1. HTTP: is the Hypertext Transfer Protocol(HTTP) enables the communication between client and server. It has a request-response protocol for communication. The request sent by the client is responded by the server.

    The HTTP methods used are:
    GET
    POST
    PUT
    HEAD
    DELETE
    PATCH
    OPTIONS

    GET: This command is mainly used to get data from the resource. This command sends data as a part of the URL, it appends the form data into the URL in the name/value pairs. The length of the URL is limited to 2048 characters. We should not use GET method if password or any sensitive information is there in the server. Mainly useful for form submission where the user want to bookmark the result. Get is better for non-secure data like query things in Google. GET can’t be used to send binary data like images etc.
    The syntax is

    Post method
    POST is used to send the information from the server or to the server.
    Create a notepad file to write a simple program using html .
    Use method post and input type name and company name text fields and a submit button.
    Save the file.
    Run the file.
    The design of the form looks as above where the name and company fields has to be passed to a file called post.php.
    And run the file and the post method passes the information without showing it in the URL and gets the result.

    PUT method
    It is an Idempotent method, we can send multiple requests with PUT, but will not affect server and same request can be sent multiple times, it will update data. It tries to identify the resource with request.

  2. HTTP: is the Hypertext Transfer Protocol(HTTP) enables the communication between client and server. It has a request-response protocol for communication. The request sent by the client is responded by the server.

    The HTTP methods used are:
    GET
    POST
    PUT
    HEAD
    DELETE
    PATCH
    OPTIONS

    GET: This command is mainly used to get data from the resource. This command sends data as a part of the URL, it appends the form data into the URL in the name/value pairs. The length of the URL is limited to 2048 characters. We should not use GET method if password or any sensitive information is there in the server. Mainly useful for form submission where the user want to bookmark the result. Get is better for non-secure data like query things in Google. GET can’t be used to send binary data like images etc.
    The syntax is

    Post method
    POST is used to send the information from the server or to the server.
    Create a notepad file to write a simple program using html .
    Use method post and input type name and company name text fields and a submit button.
    Save the file.
    Run the file.
    The design of the form looks as above where the name and company fields has to be passed to a file called post.php.
    And run the file and the post method passes the information without showing it in the URL and gets the result.

    PUT method
    It is an Idempotent method, we can send multiple requests with PUT, but will not affect server and same request can be sent multiple times, it will update data. It tries to identify the resource with request.

  3. HTTP: is the Hypertext Transfer Protocol(HTTP) enables the communication between client and server. It has a request-response protocol for communication. The request sent by the client is responded by the server.

    The HTTP methods used are:

    GET
    POST
    PUT
    HEAD
    DELETE
    PATCH
    OPTIONS
    The set of commands are as follows:

  4. HTTP: Hypertext Transfer Protocol enables the communication between client and server. It has a request(by the client) -response(by the server) protocol for communication.

    The HTTP methods used are:
    .GET
    .POST
    .PUT
    .HEAD
    .DELETE
    .PATCH
    .OPTIONS

    1.GET: This command is mainly used to get the data from the resource. This command sends data as form of the URL. We should not use GET method if any sensitive information is there in the server. Mainly useful for form submission where the user want to bookmark the result.
    The Syntax is:

    2. POST: POST is used to send the information from the server or to the server. Post method hides the information in the URL. there is no restrictions for the data size to be sent. We can sent binary data and uses the http protocol which is secure method of passing information .

    3.PUT: It is an Idempotent method, we can send multiple requests with PUT, but will not affect server and same request can be sent multiple times, it will update data. It tries to identify the resource with request.

  5. HTTP: is the Hypertext Transfer Protocol(HTTP) enables the communication between client and server. It has a request-response protocol for communication. The request sent by the client is responded by the server.

    The HTTP methods used are:

    GET
    POST
    PUT
    HEAD
    DELETE
    PATCH
    OPTIONS
    1.GET: This command is mainly used to get the data from the resource. This command sends data in form of the URL. We should not use the GET method if any sensitive information is there in the server. Mainly useful for form submission where the user wants to bookmark the result.
    The Syntax is:

    2. POST: POST is used to send the information from the server or to the server. The post method hides the information in the URL. there are no restrictions for the data size to be sent. We can send binary data and uses the HTTP protocol which is a secure method of passing information.

    3.PUT: It is an Idempotent method, we can send multiple requests with PUT, but will not affect the server, and the same request can be sent multiple times, it will update data. It tries to identify the resource with the request.

  6. The HTTP methods used are:

    GET
    POST
    PUT
    HEAD
    DELETE
    PATCH
    OPTIONS
    The set of commands are as follows:

    This article explains : GET, POST & PUT methods.

    GET: This command is mainly used to get data from the resource. This command sends data as a part of the URL, it appends the form data into the URL in the name/value pairs. The length of the URL is limited to 2048 characters. We should not use GET method if password or any sensitive information is there in the server. Mainly useful for form submission where the user want to bookmark the result. Get is better for non-secure data like query things in Google. GET can’t be used to send binary data like images etc.

    2. POST method:

    POST is used to send the information from the server or to the server. Let us see one example of passing information through post method.

    1.Create a notepad file to write a simple program using html .
    2.Use method post and input type name and company name text fields and a submit button.
    3.Save the file.
    4.Run the file.
    The main difference between get and post method the get method displays the information passed in the URL where as post method hides the information in the URL.there are various advantages in this post method , there is no restrictions for the data size to be sent.we can sent binary data and uses the http protocol which is secure method of passing information .

    3. PUT method

    It is an Idempotent method, we can send multiple requests with PUT, but will not affect server and same request can be sent multiple times, it will update data. It tries to identify the resource with request.

  7. HTTP Request Methods: GET, POST, PUT
    HTTP stands for the Hypertext Transfer Protocol(HTTP), it enables the communication between client and server. It has a request-response protocol for communication. The request sent by the client is responded by the server.
    The HTTP methods used are:
    GET
    POST
    PUT
    HEAD
    DELETE
    PATCH
    OPTIONS
    The set of commands are as follows:
    GET, POST & PUT methods.
    1. GET: This command is mainly used to get data from the resource. This command sends data as a part of the URL, it appends the form data into the URL in the name/value pairs. The length of the URL is limited to 2048 characters. We should not use GET method if password or any sensitive information is there in the server. Mainly useful for form submission where the user want to bookmark the result. Get is better for non-secure data like query things in Google. GET can’t be used to send binary data like images etc.
    The syntax is

    For example consider a simple example accepting name and password
    Http Methods Get Post Put
    HTTP Request Methods: GET, POST, PUT
    2. POST method:
    POST is used to send the information from the server or to the server. Let us see one example of passing information through post method.
    Create a notepad file to write a simple program using html .
    Use method post and input type name and company name text fields and a submit button.
    Save the file.
    Run the file.
    HTTP Request Methods: GET, POST, PUT
    The design of the form looks as above where the name and company fields has to be passed to a file called post.php.
    HTTP Request Methods: GET, POST, PUT
    And run the file and the post method passes the information without showing it in the URL and gets the result.
    HTTP Request Methods: GET, POST, PUT
    The main difference between get and post method the get method displays the information passed in the URL. Whereas post method hides the information in the URL. There are various advantages in this post method. There is no restrictions for the data size to be sent, so we cannot send binary data and it uses the http protocol which is secure method of passing information .
    3. PUT method
    It is an Idempotent method, we can send multiple requests with PUT, but will not affect the server and the same request can be sent multiple times, and it will update data. It tries to identify the resource with request.
    Consider an example to request using PUT in php
    HTTP Request Methods: GET, POST, PUT
    The client side request is sent as a blank request
    HTTP Request Methods: GET, POST, PUT
    The server side response will be like
    HTTP Request Methods: GET, POST, PUT
    HTTP Request Methods: GET, POST, PUT
    HTTP Request Methods: GET, POST, PUT

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Related Articles

Back to top button
Close
Close