-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy path2021-03-18_HTTP-Basics-8f02a96a834a.html
More file actions
415 lines (412 loc) · 32.1 KB
/
Copy path2021-03-18_HTTP-Basics-8f02a96a834a.html
File metadata and controls
415 lines (412 loc) · 32.1 KB
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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>HTTP Basics</title>
<link rel="stylesheet" href="./style.css">
</head>
<body>
<article class="h-entry">
<header>
<h1 class="p-name">HTTP Basics</h1>
</header>
<section data-field="subtitle" class="p-summary">
“If you want to build a ship, don’t drum up the men and women to gather wood, divide the work, and give orders.
Instead, teach them to…
</section>
<section data-field="body" class="e-content">
<section name="2251" class="section section--body section--first">
<div class="section-divider">
<hr class="section-divider">
</div>
<div class="section-content">
<div class="section-inner sectionLayout--insetColumn">
<h3 name="00fa" id="00fa" class="graf graf--h3 graf--leading graf--title">HTTP Basics</h3>
<blockquote name="fb38" id="fb38"
class="graf graf--blockquote graf--startsWithDoubleQuote graf-after--h3"><em
class="markup--em markup--blockquote-em">“If you want to build a ship, don’t drum up the men and women
to gather wood, divide the work, and give orders. Instead, teach them to yearn for the vast and
endless sea.” — Antoine de Saint-Exupery;</em></blockquote>
<figure name="b4c9" id="b4c9" class="graf graf--figure graf-after--blockquote"><img class="graf-image"
data-image-id="0*LUQe60D2FeVzDEi8.png" data-width="867" data-height="510" data-is-featured="true"
src="https://cdn-images-1.medium.com/max/800/0*LUQe60D2FeVzDEi8.png"></figure>
<ul class="postList">
<li name="cb9d" id="cb9d" class="graf graf--li graf-after--figure"><code
class="markup--code markup--li-code"><strong
class="markup--strong markup--li-strong">HTTP</strong></code> : Hypertext Transfer Protocol.</li>
<li name="8248" id="8248" class="graf graf--li graf-after--li"><code
class="markup--code markup--li-code"><strong
class="markup--strong markup--li-strong">HT</strong></code> : Hypertext - content with references
to other content.</li>
<li name="1ad1" id="1ad1" class="graf graf--li graf-after--li">Term used to refer to content in
computing.</li>
<li name="5ad0" id="5ad0" class="graf graf--li graf-after--li">What makes the Web a “web”.</li>
<li name="11eb" id="11eb" class="graf graf--li graf-after--li">Most fundamental part of how we interact.
</li>
<li name="41da" id="41da" class="graf graf--li graf-after--li"><code
class="markup--code markup--li-code"><strong
class="markup--strong markup--li-strong">Hyperlinks</strong></code> : Links; references between HT
resources.</li>
<li name="b0a1" id="b0a1" class="graf graf--li graf-after--li"><code
class="markup--code markup--li-code"><strong
class="markup--strong markup--li-strong">TP</strong></code> : Transfer Protocol - set of
guidelines surrounding the transmission of data.</li>
<li name="e43c" id="e43c" class="graf graf--li graf-after--li">Defines the expectations for both ends of
the transer.</li>
<li name="ca8a" id="ca8a" class="graf graf--li graf-after--li">Defines some ways the transfer might
fail.</li>
<li name="3995" id="3995" class="graf graf--li graf-after--li">HTTP is a <code
class="markup--code markup--li-code"><strong
class="markup--strong markup--li-strong">request/response</strong></code> protocol.</li>
<li name="dc85" id="dc85" class="graf graf--li graf-after--li">HTTP works between <code
class="markup--code markup--li-code"><strong
class="markup--strong markup--li-strong">clients</strong></code> & <code
class="markup--code markup--li-code"><strong
class="markup--strong markup--li-strong">servers</strong></code>.</li>
<li name="a965" id="a965" class="graf graf--li graf-after--li"><code
class="markup--code markup--li-code"><strong
class="markup--strong markup--li-strong">Clients</strong></code> : User Agent - the data consumer.
</li>
<li name="2588" id="2588" class="graf graf--li graf-after--li"><code
class="markup--code markup--li-code"><strong
class="markup--strong markup--li-strong">Servers</strong></code> : Origin - Data provider &
where the application is running.</li>
</ul>
<figure name="c524" id="c524" class="graf graf--figure graf-after--li"><img class="graf-image"
data-image-id="0*OBVdK39aaS5sjV9B.png" data-width="1596" data-height="1144"
src="https://cdn-images-1.medium.com/max/800/0*OBVdK39aaS5sjV9B.png"></figure>
<h3 name="68b6" id="68b6" class="graf graf--h3 graf-after--figure"><a
href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Overview#components_of_http-based_systems"
data-href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Overview#components_of_http-based_systems"
class="markup--anchor markup--h3-anchor" title="Permalink to Components of HTTP-based systems"
rel="noopener" target="_blank">Components of HTTP-based systems</a></h3>
<p name="4323" id="4323" class="graf graf--p graf-after--h3">HTTP is a client-server protocol: requests
are sent by one entity, the user-agent (or a proxy on behalf of it). Most of the time the user-agent is
a Web browser, but it can be anything, for example a robot that crawls the Web to populate and maintain
a search engine index.</p>
<p name="988f" id="988f" class="graf graf--p graf-after--p">Each individual request is sent to a server,
which handles it and provides an answer, called the <em class="markup--em markup--p-em">response</em>.
Between the client and the server there are numerous entities, collectively called <a
href="https://developer.mozilla.org/en-US/docs/Glossary/Proxy_server"
data-href="https://developer.mozilla.org/en-US/docs/Glossary/Proxy_server"
class="markup--anchor markup--p-anchor" rel="noopener" target="_blank">proxies</a>, which perform
different operations and act as gateways or <a
href="https://developer.mozilla.org/en-US/docs/Glossary/Cache"
data-href="https://developer.mozilla.org/en-US/docs/Glossary/Cache"
class="markup--anchor markup--p-anchor" rel="noopener" target="_blank">caches</a>, for example.</p>
<figure name="c89e" id="c89e" class="graf graf--figure graf-after--p"><img class="graf-image"
data-image-id="0*WR6l6JwNOvkfrljt.png" data-width="819" data-height="121"
src="https://cdn-images-1.medium.com/max/800/0*WR6l6JwNOvkfrljt.png"></figure>
<p name="7bf5" id="7bf5" class="graf graf--p graf-after--figure"><strong
class="markup--strong markup--p-strong">Properties of HTTP</strong></p>
<ul class="postList">
<li name="bc5b" id="bc5b" class="graf graf--li graf-after--p"><code
class="markup--code markup--li-code"><strong class="markup--strong markup--li-strong">Reliable
Connections</strong></code> : Messages passed between a client & server sacrifice a little
speed for the sake of trust.</li>
<li name="aec2" id="aec2" class="graf graf--li graf-after--li"><code
class="markup--code markup--li-code"><strong
class="markup--strong markup--li-strong">TCP</strong></code> is HTTP’s preferred connection type.
</li>
<li name="9880" id="9880" class="graf graf--li graf-after--li"><code
class="markup--code markup--li-code"><strong class="markup--strong markup--li-strong">Stateless
Transfer</strong></code> : HTTP is a stateless protocol - meaning it does not store any kind of
information.</li>
<li name="b204" id="b204" class="graf graf--li graf-after--li">HTTP supports cookies.</li>
<li name="5e72" id="5e72" class="graf graf--li graf-after--li"><code
class="markup--code markup--li-code"><strong
class="markup--strong markup--li-strong">Intermediaries</strong></code> : Servers or devices that
pass your request along which come in three types:</li>
</ul>
<ol class="postList">
<li name="fb4d" id="fb4d" class="graf graf--li graf-after--li"><code
class="markup--code markup--li-code"><strong
class="markup--strong markup--li-strong">Proxies</strong></code> : Modify your request so it
appears to come from a different source.</li>
<li name="bd02" id="bd02" class="graf graf--li graf-after--li"><code
class="markup--code markup--li-code"><strong
class="markup--strong markup--li-strong">Gateways</strong></code> : Pretend to be the resource
server you requested.</li>
<li name="06a0" id="06a0" class="graf graf--li graf-after--li graf--trailing"><code
class="markup--code markup--li-code"><strong
class="markup--strong markup--li-strong">Tunnels</strong></code> : Simply passes your request
along.</li>
</ol>
</div>
</div>
</section>
<section name="b593" class="section section--body">
<div class="section-divider">
<hr class="section-divider">
</div>
<div class="section-content">
<div class="section-inner sectionLayout--insetColumn">
<h3 name="0096" id="0096" class="graf graf--h3 graf--leading">HTTP Requests</h3>
<p name="9ae8" id="9ae8" class="graf graf--p graf-after--h3"><strong
class="markup--strong markup--p-strong">Structure of an HTTP Request</strong></p>
<pre name="0c49" id="0c49"
class="graf graf--pre graf-after--p"><code class="markup--code markup--pre-code">GET / HTTP/1.1<br>Host: appacademy.io<br>Connection: keep-alive<br>Upgrade-Insecure-Requests: 1<br>User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.132 Safari/537.36<br>Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3<br>Accept-Encoding: gzip, deflate<br>Accept-Language: en-US,en;q=0.9</code></pre>
<h3 name="7f10" id="7f10" class="graf graf--h3 graf-after--pre">Example of a request:</h3>
</div>
<div class="section-inner sectionLayout--outsetColumn">
<figure name="8d7b" id="8d7b" class="graf graf--figure graf--layoutOutsetCenter graf-after--h3"><img
class="graf-image" data-image-id="1*tq-BRYuzZ_Dx8s1g5xJKKQ.png" data-width="1780" data-height="747"
src="https://cdn-images-1.medium.com/max/1200/1*tq-BRYuzZ_Dx8s1g5xJKKQ.png"></figure>
</div>
<div class="section-inner sectionLayout--insetColumn">
<ul class="postList">
<li name="bfa1" id="bfa1" class="graf graf--li graf-after--figure"><strong
class="markup--strong markup--li-strong">Request-line & HTTP verbs</strong></li>
<li name="0e3d" id="0e3d" class="graf graf--li graf-after--li">The first line of an HTTP Request made up
of three parts:</li>
</ul>
<ol class="postList">
<li name="e67b" id="e67b" class="graf graf--li graf-after--li">The <code
class="markup--code markup--li-code"><strong
class="markup--strong markup--li-strong">Method</strong></code> : Indicated by an HTTP Verb.</li>
<li name="f17e" id="f17e" class="graf graf--li graf-after--li">The <code
class="markup--code markup--li-code"><strong
class="markup--strong markup--li-strong">URI</strong></code> : Uniform Resource Indicator that
ID’s our request.</li>
<li name="cf4a" id="cf4a" class="graf graf--li graf-after--li">THe <code
class="markup--code markup--li-code"><strong
class="markup--strong markup--li-strong">HTTP</strong></code><strong
class="markup--strong markup--li-strong"> Version</strong> : Version we expect to use.</li>
</ol>
<ul class="postList">
<li name="6fd5" id="6fd5" class="graf graf--li graf-after--li">HTTP Verbs are a simply way of declaring
our intention to the server.</li>
<li name="5435" id="5435" class="graf graf--li graf-after--li"><code
class="markup--code markup--li-code"><strong
class="markup--strong markup--li-strong">GET</strong></code> : Used for direct requests.</li>
<li name="9059" id="9059" class="graf graf--li graf-after--li"><code
class="markup--code markup--li-code"><strong
class="markup--strong markup--li-strong">POST</strong></code>: Used for creating new resources on
the server.</li>
<li name="456b" id="456b" class="graf graf--li graf-after--li"><code
class="markup--code markup--li-code"><strong
class="markup--strong markup--li-strong">PUT</strong></code>: Used to updated a resource on the
server.</li>
<li name="5c1a" id="5c1a" class="graf graf--li graf-after--li"><code
class="markup--code markup--li-code"><strong
class="markup--strong markup--li-strong">PATCH</strong></code> : Similar to PUT, but do not
require the whole resource to perform the update.</li>
<li name="3940" id="3940" class="graf graf--li graf-after--li"><code
class="markup--code markup--li-code"><strong
class="markup--strong markup--li-strong">DELETE</strong></code> : Used to destroy resources on the
server.</li>
</ul>
<p name="f982" id="f982" class="graf graf--p graf-after--li"><strong
class="markup--strong markup--p-strong">Headers</strong></p>
<ul class="postList">
<li name="682b" id="682b" class="graf graf--li graf-after--p">Key-Value pairs that come after the
request line — they appear on sep. lines and define metadata needed to process the request.</li>
<li name="5e4d" id="5e4d" class="graf graf--li graf-after--li">Some common headers:</li>
<li name="2971" id="2971" class="graf graf--li graf-after--li"><code
class="markup--code markup--li-code"><strong
class="markup--strong markup--li-strong">Host</strong></code> : Root path for our URI.</li>
<li name="21e1" id="21e1" class="graf graf--li graf-after--li"><code
class="markup--code markup--li-code"><strong
class="markup--strong markup--li-strong">User-Agent</strong></code> : Displays information about
which browser the request originated from.</li>
<li name="2555" id="2555" class="graf graf--li graf-after--li"><code
class="markup--code markup--li-code"><strong
class="markup--strong markup--li-strong">Referer</strong></code> : Defines the URL you’re coming
from.</li>
<li name="e946" id="e946" class="graf graf--li graf-after--li"><code
class="markup--code markup--li-code"><strong
class="markup--strong markup--li-strong">Accept</strong></code> : Indicates what the client will
receive.</li>
<li name="2011" id="2011" class="graf graf--li graf-after--li"><code
class="markup--code markup--li-code"><strong
class="markup--strong markup--li-strong">Content</strong></code><strong
class="markup--strong markup--li-strong">-</strong> : Define Details about the body of the request.
</li>
</ul>
<p name="35bd" id="35bd" class="graf graf--p graf-after--li"><strong
class="markup--strong markup--p-strong">Body</strong></p>
<ul class="postList">
<li name="8af8" id="8af8" class="graf graf--li graf-after--p">For when we need to send data that doesn’t
fit into the header & is too complex for the URI we can use the <em
class="markup--em markup--li-em">body</em>.</li>
<li name="9271" id="9271" class="graf graf--li graf-after--li"><code
class="markup--code markup--li-code"><strong class="markup--strong markup--li-strong">URL
encoding</strong></code> : Most common way form data is formatted.</li>
<li name="852a" id="852a" class="graf graf--li graf-after--li"><code
class="markup--code markup--li-code">name=claire&age=29&iceCream=vanilla</code></li>
<li name="cb18" id="cb18" class="graf graf--li graf-after--li">We can also format using JSON or XML.
</li>
</ul>
<p name="15b3" id="15b3" class="graf graf--p graf-after--li"><strong
class="markup--strong markup--p-strong">Sending an HTTP request from the command line</strong></p>
<ul class="postList">
<li name="7586" id="7586" class="graf graf--li graf-after--p"><strong
class="markup--strong markup--li-strong">netcat</strong> : (nc) A Utility that comes as part of
Unix-line environments such as Ubuntu and macOS.</li>
<li name="4288" id="4288" class="graf graf--li graf-after--li">Allows us to open a direct connection
with a URL and manually send HTTP requests.</li>
<li name="07dd" id="07dd" class="graf graf--li graf-after--li"><code
class="markup--code markup--li-code">nc -v appacademy.io 80</code></li>
<li name="b93e" id="b93e" class="graf graf--li graf-after--li graf--trailing"><code
class="markup--code markup--li-code">man nc</code> to open the netcat manual.</li>
</ul>
</div>
</div>
</section>
<section name="48b8" class="section section--body section--last">
<div class="section-divider">
<hr class="section-divider">
</div>
<div class="section-content">
<div class="section-inner sectionLayout--insetColumn">
<h3 name="bffb" id="bffb" class="graf graf--h3 graf--leading">HTTP Responses</h3>
<p name="a1b1" id="a1b1" class="graf graf--p graf-after--h3"><strong
class="markup--strong markup--p-strong">Structure of a Response</strong></p>
<pre name="de04" id="de04"
class="graf graf--pre graf-after--p"><code class="markup--code markup--pre-code">HTTP/1.1 200 OK<br>Content-Type: text/html; charset=utf-8<br>Transfer-Encoding: chunked<br>Connection: close<br>X-Frame-Options: SAMEORIGIN<br>X-Xss-Protection: 1; mode=block<br>X-Content-Type-Options: nosniff<br>Cache-Control: max-age=0, private, must-revalidate<br>Set-Cookie: _rails-class-site_session=BAh7CEkiD3Nlc3Npb25faWQGOgZFVEkiJTM5NWM5YTVlNTEyZDFmNTNlN; path=/; secure; HttpOnly<br>X-Request-Id: cf5f30dd-99d0-46d7-86d7-6fe57753b20d<br>X-Runtime: 0.006894<br>Strict-Transport-Security: max-age=31536000<br>Vary: Origin<br>Via: 1.1 vegur<br>Expect-CT: max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"<br>Server: cloudflare<br>CF-RAY: 51d641d1ca7d2d45-TXL</code></pre>
<pre name="f332" id="f332"
class="graf graf--pre graf-after--pre"><code class="markup--code markup--pre-code"><!DOCTYPE html><br><html><br>...<br>...<br></html></code></pre>
<p name="1c7d" id="1c7d" class="graf graf--p graf-after--pre"><strong
class="markup--strong markup--p-strong">Status</strong></p>
<ul class="postList">
<li name="f3f8" id="f3f8" class="graf graf--li graf-after--p">First line of an HTTP response — gives us
a high level overview of the server’s intentions. (<code class="markup--code markup--li-code"><strong
class="markup--strong markup--li-strong">status line</strong></code>)</li>
<li name="5353" id="5353" class="graf graf--li graf-after--li"><code
class="markup--code markup--li-code">HTTP/1.1 200 OK</code></li>
<li name="5882" id="5882" class="graf graf--li graf-after--li"><code
class="markup--code markup--li-code"><strong class="markup--strong markup--li-strong">HTTP status
codes</strong></code> : numeric way of representing a server’s response.</li>
<li name="78bc" id="78bc" class="graf graf--li graf-after--li">Follow the structure: x: xxx — xxx;</li>
</ul>
<h3 name="9eaf" id="9eaf" class="graf graf--h3 graf-after--li"><code
class="markup--code markup--h3-code"><strong class="markup--strong markup--h3-strong">Status codes 100
- 199: Informational</strong></code></h3>
<ul class="postList">
<li name="61b2" id="61b2" class="graf graf--li graf-after--h3">Allow the clinet to know that a req. was
received, and provides extra info from the server.</li>
</ul>
<h3 name="d8a1" id="d8a1" class="graf graf--h3 graf-after--li"><code
class="markup--code markup--h3-code"><strong class="markup--strong markup--h3-strong">Status codes 200
- 299: Successful</strong></code></h3>
<ul class="postList">
<li name="da7c" id="da7c" class="graf graf--li graf-after--h3">Indicate that the request has succeeded
and the server is handling it.</li>
<li name="c109" id="c109" class="graf graf--li graf-after--li">Common Examples: 200 OK (req received and
fulfilled) & 201 Created (received and new record was created)</li>
</ul>
<h3 name="b292" id="b292" class="graf graf--h3 graf-after--li"><code
class="markup--code markup--h3-code"><strong class="markup--strong markup--h3-strong">Status codes 300
- 399: Redirection</strong></code></h3>
<ul class="postList">
<li name="003b" id="003b" class="graf graf--li graf-after--h3">Let the client know if there has been a
change.</li>
<li name="0ca4" id="0ca4" class="graf graf--li graf-after--li">Common Examples: 301 Moved Permanently
(resource you requested is in a totally new location) & 302 Found (indicates a temporary move)
</li>
</ul>
<h3 name="a739" id="a739" class="graf graf--h3 graf-after--li"><code
class="markup--code markup--h3-code"><strong class="markup--strong markup--h3-strong">Status codes 400
- 499: Client Error</strong></code></h3>
<ul class="postList">
<li name="1f8a" id="1f8a" class="graf graf--li graf-after--h3">Indicate problem with client’s request.
</li>
<li name="d68d" id="d68d" class="graf graf--li graf-after--li">Common Examples: 400 Bad Request
(received, but could not understand) & 401 Unauthorized (resource exists but you’re not allowed to
see w/o authentication) & 403 Forbidden (resource exists but you’re not allowed to see it at all )
& 404 Not Found (resource requested does not exist);</li>
</ul>
<h3 name="b745" id="b745" class="graf graf--h3 graf-after--li"><code
class="markup--code markup--h3-code"><strong class="markup--strong markup--h3-strong">Status codes 500
- 599: Server Error</strong></code></h3>
<ul class="postList">
<li name="93fc" id="93fc" class="graf graf--li graf-after--h3">Indicates request was formatted
correctly, but the server couldn’t do what you asked due to an internal problem.</li>
<li name="96cf" id="96cf" class="graf graf--li graf-after--li">Common Examples: 500 Internal Server
Error (Server had trouble processing) & 504 Gateway Timeout (Server timeout);</li>
</ul>
<h3 name="4ca3" id="4ca3" class="graf graf--h3 graf-after--li"><strong
class="markup--strong markup--h3-strong">Headers</strong> : Work just like HTTP requests.</h3>
<blockquote name="c985" id="c985" class="graf graf--blockquote graf-after--h3">Common Examples:
</blockquote>
<ul class="postList">
<li name="6859" id="6859" class="graf graf--li graf-after--blockquote"><code
class="markup--code markup--li-code"><strong
class="markup--strong markup--li-strong">Location</strong></code> : Used by client for redirection
responses.</li>
<li name="a497" id="a497" class="graf graf--li graf-after--li"><code
class="markup--code markup--li-code"><strong
class="markup--strong markup--li-strong">Content-Type</strong></code> : Let’s client know what
format the body is in.</li>
<li name="1e08" id="1e08" class="graf graf--li graf-after--li"><code
class="markup--code markup--li-code"><strong
class="markup--strong markup--li-strong">Expires</strong></code> : When response is no longer
valid</li>
<li name="f45d" id="f45d" class="graf graf--li graf-after--li"><code
class="markup--code markup--li-code"><strong
class="markup--strong markup--li-strong">Content-Disposition</strong></code> : Let’s client know
how to display the response.</li>
<li name="b46e" id="b46e" class="graf graf--li graf-after--li"><code
class="markup--code markup--li-code"><strong
class="markup--strong markup--li-strong">Set-Cookie</strong></code> : Sends data back to the
client to set on the cookie.</li>
<li name="1e80" id="1e80" class="graf graf--li graf-after--li"><code
class="markup--code markup--li-code"><strong
class="markup--strong markup--li-strong">Data</strong></code> : If the request is successful, the
body of the response will contain the resource you have requested.</li>
</ul>
<h3 name="2b2f" id="2b2f" class="graf graf--h3 graf-after--li">If you found this guide helpful feel free
to checkout my GitHub/gists where I host similar content:</h3>
<div name="1c2f" id="1c2f" class="graf graf--mixtapeEmbed graf-after--h3"><a
href="https://gist.github.com/bgoonz" data-href="https://gist.github.com/bgoonz"
class="markup--anchor markup--mixtapeEmbed-anchor" title="https://gist.github.com/bgoonz"><strong
class="markup--strong markup--mixtapeEmbed-strong">bgoonz’s gists</strong><br><em
class="markup--em markup--mixtapeEmbed-em">Instantly share code, notes, and snippets. Web Developer,
Electrical Engineer JavaScript | CSS | Bootstrap | Python |…</em>gist.github.com</a><a
href="https://gist.github.com/bgoonz" class="js-mixtapeImage mixtapeImage u-ignoreBlock"
data-media-id="ab25adbb500306703daab23d08a7739a" data-thumbnail-img-id="0*3O67jrqm3EHjTK2H"
style="background-image: url(https://cdn-images-1.medium.com/fit/c/160/160/0*3O67jrqm3EHjTK2H);"></a>
</div>
<div name="3585" id="3585" class="graf graf--mixtapeEmbed graf-after--mixtapeEmbed"><a
href="https://github.com/bgoonz" data-href="https://github.com/bgoonz"
class="markup--anchor markup--mixtapeEmbed-anchor" title="https://github.com/bgoonz"><strong
class="markup--strong markup--mixtapeEmbed-strong">bgoonz — Overview</strong><br><em
class="markup--em markup--mixtapeEmbed-em">Web Developer, Electrical Engineer JavaScript | CSS |
Bootstrap | Python | React | Node.js | Express | Sequelize…</em>github.com</a><a
href="https://github.com/bgoonz" class="js-mixtapeImage mixtapeImage u-ignoreBlock"
data-media-id="6ee74d5200d495ddc7ddad0c92bd6dce" data-thumbnail-img-id="0*Udg3rbeFyslZ9dyl"
style="background-image: url(https://cdn-images-1.medium.com/fit/c/160/160/0*Udg3rbeFyslZ9dyl);"></a>
</div>
<h3 name="cb1a" id="cb1a" class="graf graf--h3 graf-after--mixtapeEmbed">Or Checkout my personal
Resource Site:</h3>
<p name="6bc8" id="6bc8" class="graf graf--p graf-after--h3"><strong
class="markup--strong markup--p-strong">Currently under development and very buggy!</strong></p>
<div name="4bce" id="4bce" class="graf graf--mixtapeEmbed graf-after--p"><a
href="https://web-dev-resource-hub.netlify.app/" data-href="https://web-dev-resource-hub.netlify.app/"
class="markup--anchor markup--mixtapeEmbed-anchor"
title="https://web-dev-resource-hub.netlify.app/"><strong
class="markup--strong markup--mixtapeEmbed-strong">Web-Dev-Hub</strong><br><em
class="markup--em markup--mixtapeEmbed-em">Edit
description</em>web-dev-resource-hub.netlify.app</a><a
href="https://web-dev-resource-hub.netlify.app/"
class="js-mixtapeImage mixtapeImage mixtapeImage--empty u-ignoreBlock"
data-media-id="142b348a1c3b7cab095decda3afd6236"></a></div>
<p name="9200" id="9200" class="graf graf--p graf-after--mixtapeEmbed">If you want to learn more and get
some practice in … download<a href="https://www.postman.com/" data-href="https://www.postman.com/"
class="markup--anchor markup--p-anchor" rel="noopener" target="_blank"> Postman</a> and start going
through some tutorials!</p>
<p name="c56a" id="c56a" class="graf graf--p graf-after--p graf--trailing">Happy Coding!</p>
</div>
</div>
</section>
</section>
<footer>
<p>By <a href="https://medium.com/@bryanguner" class="p-author h-card">Bryan Guner</a> on <a
href="https://medium.com/p/8f02a96a834a"><time class="dt-published"
datetime="2021-03-18T17:34:01.873Z">March 18, 2021</time></a>.</p>
<p><a href="https://medium.com/@bryanguner/http-basics-8f02a96a834a" class="p-canonical">Canonical link</a></p>
<p>Exported from <a href="https://medium.com">Medium</a> on April 3, 2021.</p>
</footer>
</article>
</body>
</html>