HTTP Presentation
HTTP Presentation
Marcin Chodkowski
Welcome
HTTP Basics
HTTP - intro
HTTP Basics
TCP/IP
HTTP Basics
In this video you will learn:
• How to connect to a network?
• About TCP/IP network types
• With what equipment we build TCP/IP networks?
• What are: server, router, and application server?
TCP/IP
•Network card
• MAC (98:01:a7:ad:14:49)
• Physical machine
• Powerful processor
• Very weak graphic card
• Several network ports
Application server
Application that waits for requests
1 6.34
93.184.2 DNS Server
Request
Visited website
Response
Response
…
After watching this video you know:
• That a client sends requests and a server sends responses for that
requests.
Request
HTTP Basics
In this video you will learn:
• From what parts a request consists of.
Request
GET /?query=London HTTP/1.1
Host: example.com
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:60.0)
Gecko/20100101 Firefox/60.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-US;q=0.7,en;q=0.3
Accept-Encoding: gzip, deflate
Connection: close
[Empty line]
After watching this video you know:
• That a request consists of:
• http method
• urn
• http version
• host
• headers
• body
Response
HTTP Basics
In this video you will learn:
• From what parts a response consists of.
Response
HTTP/1.1 200 OK
Host: example.com
Connection: close
X-Powered-By: PHP/5.6.33
Access-Control-Allow-Origin: *
Content-type: text/html; charset=UTF-8
Body
After watching this video you know:
• That a request consists of:
• http version
• http code with description
• host
• response headers
• body
HTTP methods
HTTP Basics
In this video you will learn:
• What are HTTP methods?
• How many HTTP methods can be distinguished?
• With what HTTP methods the data can be sent to a server?
Methods of communication - HTTP
https://github.com/ login
URL URN
http://login:[email protected]:80/res/2/second?p1=1&p2=2#paragraph1
POST Add one car to existing list on a You shouldn’t use that
server
DELETE Remove all cars from a server Remove one car from a server
JSON
Car
{
"name": "Ford",
"doors": 4,
…
}
Car collection:
[{car1}, {car2}]
HATEOAS
GET /cars/car/1 HTTP
{
"id": 1,
"name": "Ford",
"links": [
{"href": ”/cars/car/1/status", "rel": "status", "type": "GET"},
...
]
}
After watching this video you know:
• That REST is a way of creating an urn part of the URI. The same as
HTTP, REST is also stateless.
• That JSON is a text format used in HTTP communication.
• That HATEOAS is an additional link in JSON response body from a
server.
• That HATEOAS is the most mature level of API levels.
Redirections
HTTP Basics
In this video you will learn:
• How to make a redirection on a user side?
• How to make a redirection on a server side?
Redirections
Link in html
Important!
• If you have installed Git for Windows you can omit this move.
After watching this video you know:
• How to correctly install a curl program.
curl - demo
HTTP Basics
In this video you will learn:
• How to sent requests using curl.
After watching this video you know:
• How to send a request by curl using HTTP methods: GET, POST.
• How to sent HTTP headers via curl.
• How HTTP headers and HTTP codes look like.
wget – installation, demo
HTTP Basics
In this video you will learn:
• How to install and use a wget program?
Important!
• This program isn’t installed with Git for Windows. That is why you
should install it with this instruction.
After watching this video you know:
• How install a wget program.
• How to download a response and save it to the file using wget.
ping - demo
HTTP Basics
In this video you will learn:
• How to check if computers are connected to the same network?
After watching this video you know:
• How to check whether two computers are in the same network.
• Known flags:
• -t - unlimited number of repetitions
• -n - specified number of repetitions
• -l - package size
• That you can use a few flags in one command in a terminal and in a
a cmd.
ssh - installation
HTTP Basics
In this video you will learn:
• How to install the ssh tool.
• How to create a basic configuration.
Important!
• If you have installed Git for Windows already, you can skip this
video.
After watching this video you know:
• How to install and configure the ssh tool.
ssh - demo
HTTP Basics
In this video you will learn:
• What the ssh can do.
• How to log in to a server using the ssh.
• How you can run a command on a server.
• How to log in to a server without a password.
• How to configure the ssh command.
After watching this video you know:
• That the ssh can be used to log in to a server.
• That in order to log in to a server without a password, you need a
public key.
• How to configure the ssh to use:
• port
• username
• any server name that you like
live http headers – installation,
demo
HTTP Basics
In this video you will learn:
• How to install the Live Http Headers addon to Google Chrome and
Mozilla Firefox browsers.
• How to collect all requests and responses that are in your browser
using the Live Http Headers addon .
After watching this video you know:
• Have installed the live http headers addon in Google Chrome or
Mozilla Firefox browser.
• Know how to collect and browse all requests and responses in your
browser using the live http headers addon.
postman - installation
HTTP Basics
In this video you will learn:
• How to install Postman.
After watching this video you know:
• Have Postman installed.
• Have an account created in Postman.
• Have the basic settings in Postman configured.
postman – demo
HTTP Basics
In this video you will learn:
• What Postman can be used for.
• What are the basic concepts in Postman.
• How to send a request and store it in Postman.
After watching this video you know:
• What Postman can be used for.
• What are:
• History
• Collection
• Environments
• Workspaces
• How response headers and HTTP codes look like.
• How to send POST and GET requests with or without headers.
HTTP vs HTTPS
HTTP Basics
In this video you will learn:
• What is HTTPS, what benefit you can get from it, and when you
should use it.
• What the server should have in order to be available over the
HTTPS.
User Site using Http
SSL
Certification
After watching this video you know:
• That HTTPS makes it difficult to eavesdrop on requests and
responses to and from a server.
• That a server must have a SSL certificate.
Congratulations!
You’ve finished the course!