Document Details

AccurateMint

Uploaded by AccurateMint

Samar Huwari

Tags

HTTP request methods web development programming computer networks

Summary

This document provides a comprehensive overview of HTTP request methods, including their functionalities, uses, and examples. It details the different methods like GET, POST, PUT, and DELETE, along with explanations of their actions and characteristics. The document also offers resources for further learning on the topic.

Full Transcript

HTTP REQUEST METHODS P R E PA IR ED B Y: S A ME R HU WA R I Outline What is HTTP Request Methods HTTP Request Methods Resources What is HTTP Request Methods HTTP request methods to indicates the desired action to be performed for a given resource. Performed actions are: retrieve, del...

HTTP REQUEST METHODS P R E PA IR ED B Y: S A ME R HU WA R I Outline What is HTTP Request Methods HTTP Request Methods Resources What is HTTP Request Methods HTTP request methods to indicates the desired action to be performed for a given resource. Performed actions are: retrieve, delete, update, or insert an item or multiple items. Each request method has a different semantic and some them shares common fetures. HTTP Request Methods - GET GET method usually used to retrieve data (single item or multiple items). The GET method displays the submitted input values in the URL. Data can be cached or bookmarked. The submitted values could be: - Query string: http://example.com/page/items?param1=value1&param2=value 1 where param1 is the input name and value1 represents the input value. - Path Parameters (Segments): http://example.com/page/items/value1/value2 value1 and value2 are positional arguments. - Both: http://example.com/page/items/value/?param1=value1&param2=value2 Usually used with tracking services HTTP Request Methods - POST POST method is used to send data to a server to create/update a resource or changing a resource’s state. The submitted data is stored in the request’s body. POST data cannot be cached or bookmarked. No restrictions on data length or type. HTTP Request Methods - Other PUT: used to send data to a server to create/update a resource. HEAD: is almost identical to GET, but without the response body. DELETE: deletes the specified resource. PATCH: is used to apply partial modifications to a resource. OPTIONS: describes the communication options for the target resource. CONNECT: is used to start a two-way communications (a tunnel) with the requested resource. TRACE: is used to perform a message loop-back test that tests the path for the target resource (useful for debugging purposes). HTTP Request Methods - Resources https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods https://www.w3schools.com/tags/ref_httpmethods.asp

Use Quizgecko on...
Browser
Browser