Donnerstag, 6. November 2014

HTTP - Hyper Text Transfer Protocol

Today we will have a look at this video:


HTTP (Hyper Text Transfer Protocol)

Let's have a look at this link: Hypertext_Transfer_Protocol
HTTP is the foundation of data communication for the World Wide Web. It's for exchanging or transfering hypertext.
The protocol is divided into different verbs (methods).


Now we are going to have a deeper view in two of them:

GET:

In principle the question "Are you requesting?"
It requests/asks for data and doesn't modify the data on the server.
Examples:
When you type something in your URL or clicking on a link (nearly everytime GET)

POST:

In principle the question "Are you adding something?"
It modifies the server/ changes the state of a server.
It's a POST-verb, everytime, when the server has more infos than before.
Examples:
SignUp, SignIn, posting a status (Facebook, Twitter, ..)

Reference:
Are google searches POST-verbs? NO, google searches are GET-verbs.



Common Questions:

  • Which request methods are used at HTTP? Which method do you use for which purpose?
HEAD
Asks for the response identical to the one that would correspond to a GET request, but without the response body. This is useful for retrieving meta-information written in response headers, without having to transport the entire content.

POST
Requests that the server accept the entity enclosed in the request as a new subordinate of the web resource identified by the URI. The data POSTed might be, for example, an annotation for existing resources; a message for a bulletin board, newsgroup, mailing list, or comment thread; a block of data that is the result of submitting a web form to a data-handling process; or an item to add to a database.

PUT
Requests that the enclosed entity be stored under the supplied URI. If the URI refers to an already existing resource, it is modified; if the URI does not point to an existing resource, then the server can create the resource with that URI.

DELETE
Deletes the specified resource.

TRACE
Echoes back the received request so that a client can see what (if any) changes or additions have been made by intermediate servers.

OPTIONS
Returns the HTTP methods that the server supports for the specified URL. This can be used to check the functionality of a web server by requesting '*' instead of a specific resource.

CONNECT
Converts the request connection to a transparent TCP/IP tunnel, usually to facilitate SSL-encrypted communication (HTTPS) through an unencrypted HTTP proxy. See HTTP CONNECT Tunneling.

PATCH
Applies partial modifications to a resource.
HTTP servers are required to implement at least the GET and HEAD methods and, whenever possible, also the OPTIONS method.[citation needed]
  • Do GET requests modify data on the server?
No.
  • When is a GET request transmitted to a server?
When you request data form a server.
  • What is the difference between GET and POST requests?
At GET-Requests, you doesn't modify the server. At POST-Requests you modify, you add something to the server.
  • When you log in to a server, which method is usually used?
Usually the POST-method is used,



Keine Kommentare:

Kommentar veröffentlichen