June 2019
Intermediate to advanced
328 pages
7h 27m
English
cURL is a powerful command-line tool for interacting with web servers. Using cURL, you can make requests and view the responses, download files, grab information about remote servers, or interact with remote APIs. cURL does exactly what your web browser does, except that it doesn’t render the HTML. Let’s explore how it works.
You’ll use cURL to make a request to a URL. Execute this command in your terminal to make a request to Google’s home page:
| | $ curl http://google.com |
Responses from web servers come in two parts: the response header and the response body. cURL shows the response body by default:
| | <HTML><HEAD><meta http-equiv="content-type" content="text/html;charset=utf-8"> |
| | <TITLE>301 Moved</TITLE></HEAD><BODY> ... |