the basics of http jason dean

16
The Basics of HTTP Jason Dean http://www.12robots.com

Upload: milo-garrison

Post on 18-Jan-2016

214 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: The Basics of HTTP Jason Dean

The Basics of HTTP

Jason Deanhttp://www.12robots.com

Page 2: The Basics of HTTP Jason Dean

About Me

Web Application Developer with the Minnesota Department of Health (MDH)

Chairperson and User Group Manager of the MDH ColdFusion User Group

Web Development Blogger (http://www.12robots.com)

Veteran of the U.S. Coast Guard

Page 3: The Basics of HTTP Jason Dean

Overview

Page 4: The Basics of HTTP Jason Dean

HTTP on the OSI Model

Page 5: The Basics of HTTP Jason Dean

Resources

Page 6: The Basics of HTTP Jason Dean

HTTP URL Basics

<scheme>://<host>:<port>/<path>?<query>#<frag>

Example:

Page 7: The Basics of HTTP Jason Dean

HTTP Messages

Page 8: The Basics of HTTP Jason Dean

HTTP Message Flow

Page 9: The Basics of HTTP Jason Dean

HTTP Message Parts

Page 10: The Basics of HTTP Jason Dean

Requests

Start Line POST http://demo.12robots.com:81/simple1request.cfm HTTP/1.1

HeadersHost: http.12robots.com:81Content-type: application/x-www-form-urlencodedContent-length: 10

Body myID=12345

Page 11: The Basics of HTTP Jason Dean

Request MethodsGET

OPTIONS

PUT

DELETEHEAD

POST

TRACE

Page 12: The Basics of HTTP Jason Dean

Responses

Start Line HTTP/1.1 200 OK

Headers

Content-Type: text/html; charset=UTF-8Connection: closeDate: Sun, 01 Mar 2009 02:55:05 GMTServer: Apache/2.2.10 (Win32) JRun/4.0

Body

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 4.0//EN"><html><head><title>My Page</title></head><body><h1>My POST Request Response</h1><p>The ID you passed in is: 12345.</p></body></html>

Page 13: The Basics of HTTP Jason Dean

Status Codes

404 Not Found302

Fou

nd

301

Mov

ed P

erm

anen

tly

403 Forbidden 401 Unauthorized

500 Internal Server Error

200 OK

Page 14: The Basics of HTTP Jason Dean

TLS/SSL

Page 15: The Basics of HTTP Jason Dean

TLS

/SS

L C

onne

ctio

n

Page 16: The Basics of HTTP Jason Dean

SSL Handshake