the basics of http jason dean

Post on 18-Jan-2016

215 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

The Basics of HTTP

Jason Deanhttp://www.12robots.com

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

Overview

HTTP on the OSI Model

Resources

HTTP URL Basics

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

Example:

HTTP Messages

HTTP Message Flow

HTTP Message Parts

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

Request MethodsGET

OPTIONS

PUT

DELETEHEAD

POST

TRACE

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>

Status Codes

404 Not Found302

Fou

nd

301

Mov

ed P

erm

anen

tly

403 Forbidden 401 Unauthorized

500 Internal Server Error

200 OK

TLS/SSL

TLS

/SS

L C

onne

ctio

n

SSL Handshake

top related