Forum Thread: HTTP Request, Request Methods and HTTP Response Codes

HTTP requests, request methods
An HTTP request, in its most basic format, has the following syntax:

&(URI method version)&

The method tells the server what to do with the URI, finally the version simply indicates the version number of the protocol that the client understands. A typical request uses the GET method to ask the server to return the requested URI:

&(GET /index.html HTTP / 1.0)&

HTTP Methods

GET:
Returns the resource identified in the requested URL.

HEAD:

It works like the GET, but without the server returning the body of the message. That is, only the header information is returned.

POST:
Tells the server to prepare to receive information from the client. It is often used to send information from forms.

PUT:
Send the resource identified in the URL from the client to the server.

OPTIONS:

Request information about the communication characteristics provided by the server. It allows the customer to negotiate communication parameters.

TRACE:

Starts a request message cycle. It is used for debugging and allows the client to see what the server receives on the other side.

DELETE:
Prompts the server to delete the resource identified with the URL.

CONNECT:

This method is reserved for use with proxies. It will allow a proxy to dynamically become a tunnel. For example for communications with SSL (Socket Secure Layer).

Of the three parameters the most important is the method. HTTP / 1.1 incorporates eight methods, though it only enforces GET and HEAD, all other options being optional. In any case, the servers that implement some of the additional methods, must adhere to the specification of the same ones. There is also the possibility of implementing extended methods, to which the specification does not set any limits.

In HTTP / 1.0 only three methods, GET, POST and HEAD, were specified. These are, by far, the three most widespread and used, so they are discussed a little more widely.

HTTP response codes
They are three-digit codes:

  • 1xx Messages

N ° - 100 111 Connection refused

  • 2xx Successful operation

N ° Description
200 OK
201-203 Unofficial information
204 No Content
205 Content to recharge
206 Partial content

  • 3xx Redirection to another URL

N ° Description
300 Multiple possibilities
301 Permanently moved
302 Found
303 See other
304 Unchanged
305 Use a proxy
307 Temporary redirection

  • 4xx Client error

N ° Description
400 Incorrect request
401 Unauthorized
402 Payment required
403 Prohibited
404 Not found
405 Method not allowed
406 Not acceptable
407 Proxy required
408 Waiting time out
409 Conflict
410 No longer available
411 Required length
412 Failed precondition
413 Request entity too long
414 URL of request too long
415 Media type not supported
416 Requested range not available
417

Expected failure * 5xx Server error

N ° Description
500 Internal error
501 Not implemented
502 Incorrect gateway
503 Service not available
504 Gateway timeout exhausted
505 HTTP version not supported

also i recommend reading this and also googling
https://developer.mozilla.org/en-US/docs/Web/HTTP/Status

Never Miss a Hacking or Security Guide

Get new Null Byte guides every week.

Be the First to Respond

Share Your Thoughts

  • Hot
  • Active