diff --git a/slides/1_intro.md b/slides/1_intro.md index 312e9cc..d1c1df6 100644 --- a/slides/1_intro.md +++ b/slides/1_intro.md @@ -2,3 +2,4 @@ class: center,middle # cURL ### [brettlangdon](http://brett.is) | [Shapeways](https://www.shapeways.com) + http://brettlangdon.github.io/curl-talk diff --git a/slides/2_what_is_curl.md b/slides/2_what_is_curl.md new file mode 100644 index 0000000..ffcd6ae --- /dev/null +++ b/slides/2_what_is_curl.md @@ -0,0 +1,29 @@ +# What is cURL? + +CLI tool for getting/sending files via URL's + +Supported Protocols: +.float-block[ +* DICT +* FILE +* FTP +* FTPS +* GOPHER +* HTTP +* HTTPS] +.float-block[ +* IMAP +* IMAPS +* LDAP +* LDAPS +* POP3 +* POP3S +* RTMP] +.float-block[ +* RTSP +* SCP +* SFTP +* SMTP +* SMTPS +* TELNET +* TFTP] diff --git a/slides/3_quick_examples.md b/slides/3_quick_examples.md new file mode 100644 index 0000000..e2db10b --- /dev/null +++ b/slides/3_quick_examples.md @@ -0,0 +1,16 @@ +# Quick Examples + +```bash +$ curl http://icanhazip.com +108.46.182.85 + +$ curl -i http://icanhazip.com +HTTP/1.1 200 OK +Date: Sat, 26 Apr 2014 19:49:57 GMT +Server: Apache +Content-Length: 14 +Content-Type: text/plain; charset=UTF-8 +Connection: close + +108.46.182.85 +``` diff --git a/slides/4_helpful_args.md b/slides/4_helpful_args.md new file mode 100644 index 0000000..439d13d --- /dev/null +++ b/slides/4_helpful_args.md @@ -0,0 +1,9 @@ +# Useful CLI Arguments + +* `-v` - __Verbose:__ Make cURL more talkative +* `-h` - __Help:__ Show all CLI options +* `-F CONTENT` - __Form Data:__ Add Multipart Form data to request +* `-H HEADER` - __Header:__ Add HEADER to request header +* `-X COMMAND` - __Method:__ Which request method to use (GET/POST/etc) +* `-o FILE` - __Output:__ Output to FILE rather than stdout +* `-L` - __Follow Redirects:__ Follow all redirects diff --git a/slides/5_dowload_file.md b/slides/5_dowload_file.md new file mode 100644 index 0000000..cdd6bb6 --- /dev/null +++ b/slides/5_dowload_file.md @@ -0,0 +1,15 @@ +# Download a File + +```bash +$ curl http://www.google.com + +... +``` + +### Save to a File + +```bash +$ curl -o google.com http://www.google.com +``` diff --git a/slides/6_head.md b/slides/6_head.md new file mode 100644 index 0000000..a8726fe --- /dev/null +++ b/slides/6_head.md @@ -0,0 +1,18 @@ +# Response Headers Only + +```bash +$ curl -I http://www.google.com +HTTP/1.1 200 OK +Date: Sat, 26 Apr 2014 20:40:04 GMT +Expires: -1 +Cache-Control: private, max-age=0 +Content-Type: text/html; charset=ISO-8859-1 +Set-Cookie: PREF=ID=61629e9495553921:FF=0:TM=1398544804:LM=... +Set-Cookie: NID=67=HHSAgTCIZ3zd6w2hjrNqoX1VX9NDaqscV9YckpI2... +P3P: CP="This is not a P3P policy! See ..." +Server: gws +X-XSS-Protection: 1; mode=block +X-Frame-Options: SAMEORIGIN +Alternate-Protocol: 80:quic +Transfer-Encoding: chunked +``` diff --git a/slides/7_cookies.md b/slides/7_cookies.md new file mode 100644 index 0000000..6d55a64 --- /dev/null +++ b/slides/7_cookies.md @@ -0,0 +1,14 @@ +# Save/Reuse Cookies + +```bash +$ curl -c cookies http://www.google.com +$ cat cookies +# Netscape HTTP Cookie File +# http://curl.haxx.se/docs/http-cookies.html +# This file was generated by libcurl! Edit at your own risk. + +ID=bec963a425f5d8ca:FF=0:TM=1398545024:LM=1398545024:S=... +67=BV0jhMokci-G3ZbOJ2UeFaNX1faFdfbFVcPHYIpAh35Uz2th6lVq... +# resuse stored cookies +$ curl -c cookies -b cookies http://www.google.com +```