DEV Community

Boluwatife
Boluwatife

Posted on

HTTP METHOD AND STATUS CODE

HTTP method are used to indicate the desired action to be performed on a resources.
The methods are: GET,POST,PUT,HEAD, DELETE,PATCH, OPTIONS, CONNECT AND TRACE.
**
1 **Get
- is used to request data from a specified resources.
2 Post- is used to send data to the server to create/update a sources.

  1. Put- replaces all current representation of the target resources with the upload content.
  2. Head- same as Get, but transfer the status line and header section only.
  3. Delete - removes all current representation of a target resources given by a URI.
  4. Patch- used to apply partial updates to a resources. it can have a side effect.
  5. Options-describes the communication options for the target resources.
  6. Connect - establishes a tunnel to the server identified by a given URI.
  7. Trace- performs a message loop-back test along the path to the target resources.

*HTTP status code *

  • 1xx INFORMATIONAL: It means the request has been received and the process is continuing. E.g. 100 continue.
  • 2xx SUCCESS: It means the action was successful received, understood,and acceptable. E.g. 202 Accepted.
  • 3xx REDIRECTED: It means further action must be taken in order to complete the request. E.g. 302 Found.
  • 4xx CLIENT ERROR: It means the request contains incorrect syntax or cannot be fulfilled. E.g. 404 Not found.
  • 5xx SERVER ERROR: It means the server failed to fulfill an apparently valid request. E.g. 505 Http version not supported.

Top comments (0)