Showing posts with label http. Show all posts
Showing posts with label http. Show all posts

Sunday, June 3, 2012

Common HTTP/1.1 Methods

  • GET -  Gets an object, such as a webpage, from the server. A GET request for a specific URL (Uniform Resource Locator) retrieves the resource.
  • POST - Sends data to the web server for processing. This is typically what happens when users enter data on a form and submit that data as part of their request, but it has other meanings when used outside the bounds of HTML forms.
  • HEAD - Retrieves the meta information for an object without downloading the page itself. HEAD is typically used to verify that a resource hasn’t changed since the browser cached it.
  • OPTIONS - Used by client applications to request a list of all supported commands. You can use OPTIONS to check to see if a server allows a particular command
  • PUT -Allows a client to directly create a resource at the indicated URL on the server. If the user has permission, the server takes the body of the request, creates the file specified in the URL, and copies the received data to the newly created file.
  • DELETE - Deletes a resource on the web server if the user has permission.
  • TRACE - Used for testing or diagnostics; allows the client to see what is being received at the other end of the request chain
  • CONNECT - Reserved for use with a proxy that can dynamically switch to being a tunnel, such as with the SSL protocol.
  • DEBUG  - Starts ASP.NET debugging. This command informs Visual Studio of the process to which the debugger will attach

HTTP header status codes


The status code available in the http header are usefull. Following are some of the common status codes


Status Code GroupDescription
1xx InformationalThe request was received, and the server is continuing to process.
2xx SuccessThe action was successfully received, understood, and accepted.
3xx Redirect CommandThe client must access a different resource instead.
4xx Client ErrorThe request has a syntax error or the server does not know how to fulfill the request.
5xx Server Errorhe server failed to fulfill a request that appears to be valid.



Status CodeDescription
100 Continue
200OK
201Created
300Multiple Choices
301Moved Permanently
302Found
400Bad Request
401Unauthorized
403Forbidden
404Not Found
407 Proxy Authentication Required
408Request Time-out
413Request Entity Too Large
500Internal Server Error
501Not Implemented