HTTP
& her friends
New RCOS, who dis?
I'm ada
RCOS alum 2014-2018
I am the schedule
I work at Datto
(and we are hiring)
We're going to talk about...
HTTP!
Webservers
Making Requests
But not...
TCP/IP
Encryption
Streaming
This talk will be interactive!
Raise your hand(s) if...
You've worked on a 'web application'?
Are comfortable with web protocols?
Could craft an HTTP request 'by hand'?
Some History
HTTP was created by Sir Tim Berners-Lee in 1999
Alternatives/Competitors??
HTTP is the Web
And it's Free (as in THAT'S NOT FREE SOFTWARE! :0)
Requests
GET /meanest_mans HTTP/1.1
Host: http://apo.union.rpi.eduMethod
Resource
Headers
Requests
POST /meanest_mans/SIS_MAN_1 HTTP/1.1
Host: http://apo.union.rpi.edu
Content-Type: application/json; charset=utf-8
Content-Length: 119
{
"ability": "Destroyer of Grades",
"catch_phrase":
"So I heard you like changing your password...",
"age": 195
}Method
Resource
Headers
Body
Methods
GET
POST
PUT
DELETE
PATCH
HEAD
OPTIONS
TRACEHeaders
Host
Authorization
Accept / Content-Type
Content-Length
Connection
Cookie / Set-Cookie
...Lots of standard ones, but can be non-standard
Response Codes
GET
200 OK
301 Moved
404 Not Found
POST
201 Created
400 Bad Request
409 ExistsMost useful ones
PUT
200 OK
400 Bad Request
DELETE
404 Not Found
200 OK
202 AcceptedTime for an Activity!
You do not need a web browser to make requests...
netcat
cUrl
Postman
Writing straight to the dang socket
Time for an Activity!
nc -v rpi.yacs.io 4500
POST /meanest_mans/SIS_MAN HTTP/1.1
Host: localhost
Content-Type: text/plain; charset=utf-8
Content-Length: 45
So I heard you like changing your password...curl -X POST -v https://rpi.yacs.io:4500/meanest_mans/SIS_MAN -d "
So I heard you like changing your password...
"Just kidding nothing is actually that simple
Designing for Complexity
Rules are simple, but following them isn't always
But you should try to do it anyway
REST
Client–server architecture
Statelessness
Cacheability
Layered system
Code on demand
Uniform interface
Resource identification in requests
Resource manipulation through representations
Self-descriptive messages
HATEOAS
Thanks
RCOS
The Coordinators & Faculty
Red Hat
Goldschmidt
Turner
Moorthy
Tim Berners-Lee
Alan Turing
Grace Hopper
My GF
My Mom
http
By Ada Young
http
- 665