-
Notifications
You must be signed in to change notification settings - Fork 77
/
methods.tex
101 lines (86 loc) · 3.89 KB
/
methods.tex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
\documentclass[final,table]{beamer}
\usecolortheme{dove}
\usepackage[orientation=landscape, size=a1]{beamerposter}
\usepackage{graphicx}
\newcommand{\yes}{\color{green!60!black}{yes}}
\newcommand{\no}{\color{red}{no}}
\newcommand{\method}[1]{\textbf{#1}}
\definecolor{light-gray}{gray}{0.95}
\setlength{\tabcolsep}{18pt}
\renewcommand{\arraystretch}{1.1}
\input{./footer.tex}
\begin{document}
\begin{frame}{}
\begin{minipage}{\textwidth}
\centering
\includegraphics[]{./title-methods.pdf}
\end{minipage}
\vspace{0.5in}
\begin{columns}
\begin{column}{0.1\textwidth}
\end{column}
\begin{column}{0.8\textwidth}
\begin{block}{}
\huge
HTTP methods, also called verbs, are used to specify which \emph{action}
to apply to the \emph{resource} specified by the Uniform Resource
Identifier (URI). What exactly this resource represents, or the exact
action performed on the resource, depends on the application server.
\normalsize
\end{block}
\end{column}
\begin{column}{0.1\textwidth}
\end{column}
\end{columns}
\vspace{0.5in}
\begin{columns}
\begin{column}{0.05\textwidth}
\end{column}
\begin{column}{0.9\textwidth}
\begin{block}{}
\Huge
\rowcolors{3}{light-gray}{white}
\begin{tabular}{r p{0.62\textwidth} l l l}
Method & Description & Safe? & Idempotent? & Specification \\ \hline
\method{GET} & Request a representation of the resource & \yes & \yes & HTTP 1.0 \\
\method{HEAD} & Request only the headers for the resource & \yes & \yes &HTTP 1.0 \\
\method{POST} & Process the request body with the resource & \no & \no & HTTP 1.0 \\
\method{PUT} & Create or update a new resource with the contents of the request body & \no & \yes & HTTP 1.1 \\
\method{DELETE} & Remove the specified resource & \no & \yes & HTTP 1.1 \\
\method{OPTIONS} & Return the HTTP methods the specified resource supports & \yes & \yes & HTTP 1.1 \\
\method{TRACE} & Echo the received request & \yes & \yes & HTTP 1.1 \\
\method{CONNECT} & Convert the connection to a transparent TCP/IP tunnel, usually to allow SSL/TLS through an unencrypted HTTP proxy & --- & --- & HTTP 1.1 \\
\method{PATCH} & Apply partial modifications to the resource & \no & \yes & RFC-5789 \\
\end{tabular}
\end{block}
\vspace{0.5in}
\begin{columns}
\begin{column}{0.34\textwidth}
\begin{block}{\huge{Safe Methods}}
\Large
Certain methods are specified to be \emph{safe}, which means that executing
them will not modify the resource or have other side effects on the
overall state of the server. Unsafe methods may cause side effects, such
as modifying a resource, sending an email or initiating the processing of
a credit card.
\end{block}
\end{column}
\begin{column}{0.64\textwidth}
\begin{block}{\huge{Idempotent Methods}}
\Large
Some methods are \emph{idempotent}, meaning that executing identical
requests multiple times will have the same effect as executing only one
request. For example, DELETE requests are idempotent because once a
resource is deleted it can't be deleted again. Conversely, POST requests
are not idempotent because a second POST request may send a second email
or process the same credit card a second time.
By definition, \emph{safe} methods are also \emph{idempotent}.
\end{block}
\end{column}
\end{columns}
\end{column}
\begin{column}{0.05\textwidth}
\end{column}
\end{columns}
\end{frame}
\end{document}