Most Linux distros come with wget built in, but,Ĭonspicuously, OSX does not come with wget. Downloading a Fileįiles via the command line. The response headers are the lines fromĭate: to x-envoy-upstream-service-time. To make curl print the entire response, including response headers, use the -i flag. When the HTTP request succeeds, curl prints out the HTTP response body. To make an HTTP GET request, you just need to run curl.
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtmp rtsp smb smbs smtp smtps telnet tftpįeatures: AsynchDNS IDN IPv6 Largefile GSS-API Kerberos SPNEGO NTLM NTLM_WB SSL libz TLS-SRP HTTP2 UnixSockets HTTPS-proxy PSL Making an HTTP GET Requestįirst, double-check that you have curl installed by running curl -version. I'll list out the patterns that I find myself using most often withĬurl, using the excellent service as an example. Unfortunately, the curl docs list 383 supported command-line flags, which makes it difficult to find what you're looking for. Curl supports a wide variety of other protocols,īut, as a Node.js developer, you'll most likely use it to make HTTP Curl is a popular command line tool often used for