In the address https://api.shop.com/products?id=7, which part is the path?
Options
- https
- api.shop.com
- /products (Correct option)
- id=7
Answer
/products
Why
A URL is made of parts:
httpsis the scheme (protocol).api.shop.comis the host (the server's domain name)./productsis the path (which resource on that server).?id=7is the query string (extra parameters).
The port is hidden: HTTPS uses 443 by default and HTTP uses 80.
Remember
URL = scheme + host + path + query.