Computer science fundamentals · Lesson 45 of 60 · Concept lesson · Optional
Networking fundamentals
Every device on a network has an IP address, and DNS turns a name like example.com into that address.
TCP delivers data reliably and in order, UDP is faster but may lose or reorder data, and HTTP is the language browsers and servers speak on top of TCP.
A request goes out and a response comes back, each with a status code and sometimes data.
Picture it
Code example
const url = new URL("https://example.com:8080/docs?page=2");
console.log(url.hostname, url.port, url.searchParams.get("page"));Output: example.com 8080 2
A URL has a host name, an optional port and a query string.
from urllib.parse import urlparse, parse_qs
url = urlparse("https://example.com:8080/docs?page=2")
print(url.hostname, url.port, parse_qs(url.query)["page"][0])Output: example.com 8080 2
A URL has a host name, an optional port and a query string.
Check yourself
Pick an answer for each question. You can retry as many times as you like.
Loading the questions…