Slide 1

Slide 1 text

Debugging HTTP Lorna Mitchell, SmashingConf 2015

Slide 2

Slide 2 text

Why Debugging HTTP?

Slide 3

Slide 3 text

6 Stages of Debugging

Slide 4

Slide 4 text

Denial That can't happen.

Slide 5

Slide 5 text

Frustration That doesn't happen on my machine.

Slide 6

Slide 6 text

Disbelief That shouldn't happen.

Slide 7

Slide 7 text

Testing Why does that happen?

Slide 8

Slide 8 text

Gotcha Oh, I see.

Slide 9

Slide 9 text

Relief How did that ever work?

Slide 10

Slide 10 text

Fault-Finding HTTP ... is just like fault-finding elsewhere in a web project Seeing the problem is usually harder than fixing it

Slide 11

Slide 11 text

Developer Tools Get to know the tools in your browser.

Slide 12

Slide 12 text

Developer Tools

Slide 13

Slide 13 text

Curl Curl (or cURL) is command-line multitool for HTTP http://curl.haxx.se/

Slide 14

Slide 14 text

Lornajane's Curl Cheat Sheet -X [verb] The verb to use for this request -H "[Header :value]" A header to send. Use as many times as needed -d [value] Body data as a string, a filename, or a key/value pair -s The "silent" switch, to hide curl's progress meter when piping the output to something else -c [filename] Where to store any incoming cookies for future use -b [filename] Cookies to send with the request -v to show headers for both request and response

Slide 15

Slide 15 text

Postman

Slide 16

Slide 16 text

RESTClient

Slide 17

Slide 17 text

Paw

Slide 18

Slide 18 text

Ngrok Expose local websites to the wider web https://ngrok.com/

Slide 19

Slide 19 text

Charles Proxy Multi-platform Web Debugging Proxy http://www.charlesproxy.com/

Slide 20

Slide 20 text

Debugging SSL Charles can perform a man-in-the-middle attack

Slide 21

Slide 21 text

Debugging SSL You need to authorise the "attack"

Slide 22

Slide 22 text

Make Debugging Your Super Power

Slide 23

Slide 23 text

Other Excellent Tools • Postman (Chrome) http://getpostman.com/ • RESTClient http://restclient.net/ • Paw http://luckymarmot.com/paw • Fiddler http://www.telerik.com/fiddler

Slide 24

Slide 24 text

Questions? From http://www.oreilly.com Contact: http://lornajane.net - @lornajane