Professional Documents
Culture Documents
https://aulaglobal.uc3m.es/course/view.php?id=91019
https://www.google.com/search?q=madrid&tbm=isch
http://example.com/manual#cap3
http://example.com/manual?lang=es#cap3
GET requests:
I Are used to get the contents of resources (HTML pages,
images, etc.).
I Are generated by Web browsers when, among others, users
type some URL at their address bar or click on a hyperlink,
additional resources linked to a just-received Web page are
needed, or some forms need to be sent.
I Are subject to caching to optimize resource utilization.
I Are supposed to be safe, that is, they cannot have side effects
on the server, application state, etc.
POST requests:
I Are used to perform actions (authenticate a user, add a
product to the shopping cart, confirm an order in an online
shop, upload a message to a social network, etc.).
I Are generated by Web browsers when some forms are sent.
I Aren’t subject to caching.
I Can be unsafe. Among other potential problems, repeating
the request could have side effects (e.g. confirming the same
order twice).
A request body:
I Cannot appear in GET resources.
I Includes, in POST request, the data needed by the server to
process it.
I Is usually combined with the Content-Type and
Content-Length request headers.
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Set-Cookie: JSESSIONID=E26E8...; Domain=www.uc3m.es; HttpOnly
Cache-Control: no-store
Last-Modified: Fri, 10 Nov 2017 11:44:28 CET
Content-Type: text/html;charset=UTF-8
Transfer-Encoding: chunked
Date: Fri, 10 Nov 2017 10:44:28 GMT
<!DOCTYPE html>
<html lang="es" class="no-js">
<head>
<title>Inicio | UC3M</title>
(...)
Cookies allow the server to keep state: they are small data
pieces associated to a name that the server creates and sends
to the client in its response messages, in order to the client to
send them back with its next requests.