Open navigation menu
Close suggestions
Search
Search
en
Change Language
Upload
Sign in
Sign in
Download free for days
0 ratings
0% found this document useful (0 votes)
13 views
Intro HTT (
intro to http and headers
Uploaded by
ramagoddy
AI-enhanced title
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content,
claim it here
.
Available Formats
Download as PDF or read online on Scribd
Download now
Download
Save intro_htt[ For Later
Download
Save
Save intro_htt[ For Later
0%
0% found this document useful, undefined
0%
, undefined
Embed
Share
Print
Report
0 ratings
0% found this document useful (0 votes)
13 views
Intro HTT (
intro to http and headers
Uploaded by
ramagoddy
AI-enhanced title
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content,
claim it here
.
Available Formats
Download as PDF or read online on Scribd
Download now
Download
Save intro_htt[ For Later
Carousel Previous
Carousel Next
Save
Save intro_htt[ For Later
0%
0% found this document useful, undefined
0%
, undefined
Embed
Share
Print
Report
Download now
Download
You are on page 1
/ 15
Search
Fullscreen
‘972924, 9:25 AM Projects | 100xDevs =_IntrotoH}TTP of 14 Context Today, we'll understand about HTTP Servers More specifically 1, Intro to the HTTP Protocol, what does it solve 1. Exploring the network tab in the chrome developer tools 2, Request Response model 2. Diving into some HTTP Constructs. 1, Domain name/IP 2. Port 3. Methods 4. Plaintext vs JSON vs HTML response 5. Status codes 6. Body, Headers 7. Routes 3. Installing Postman and playing with it 4. Trying to code an in memory todo app 5. Assignment - Trying to code a filesystem based todo app ntps:iPprojcts.100xevs.com/pathit-ntontroto-HTTP-1 ans‘972924, 9:25 AM Projects | 100xDevs =_IntrotoH}TTP of 14 Why the HTTP Protocol? Back in the day, HTTP was introduced so machines all around the world could talk to each other. This would be useful for things like 1. Talking via im (instant messenger) 2. Emails 3. Accessing an algorithm that is anly available on a very big machine at Stanford lets say Slowly the HTTP Protocol was formalised and now spec’d out here - https://datatracker.ietf.org/doc/html/rfc2616 Mini assignments Try exploring the network tab and seeing all the HTTP requests that go out when you visit https://google.com ntps:iPprojcts.100xevs.com/pathit-ntontroto-HTTP-1 28‘972924, 9:25 AM Projects | 100xDevs =_IntrotoH}TTP of 14 Request Response model Request response model The request-response model is a fundamental communication pattern. It describes how data is exchanged between a client anda server or between two systems, Are there other ways for you to communicate b/w machines? Yes, there are various other protocols that exist that let machines communicate with each other. 1, Websockets 2. WebRTC 3. GRPC ntps:iPprojcts.100xevs.com/pathit-ntontroto-HTTP-1 ans‘972924, 9:25 AM Projects | 100xDevs =_IntrotoH}TTP of 14 Domain name/IP Domain names The way to reach a sever is through its Domain name . For example 1. google.com 2. app.l00xdevs.com 3.xcom IPs Every domain that you see, actually has an underlying IP that it resolves to. You can check the ip by running the ping command. ping google.com B When you try to visit a website, you are actually visiting the underlying IP address . ntps:iPprojcts.100xevs.com/pathit-ntontroto-HTTP-1 ans,‘12024, 925 4M Projects | 100xDove Damain name - Phone contact » IntrotoHTTP 1ofl4 umber Ports In networking, ports are logical endpoints used by protocols to identify specific processes running on a computer or server. They help direct network traffic to the correct application or service on a system. ntps:iPprojcts.100xevs.com/pathit-ntontroto-HTTP-1‘972924, 9:25 AM Projects | 100xDevs =_IntrotoH}TTP of 14 Methods HTTP methods are used to specify the type of action that the client wants to perform on a resource on the server, g You done NEED to use all the methods, but you always should. You can do everything you want with a GET or Post method, but it is usually advisable to use them right. Common methods 1.GET - Retrieve data from a server. (Get my TODOS) 2. POST - Submit data to be processed by a server. (Create a TODO) 3, PUT - Update or create a resource on the server (Update my todo) 4. DELETE - Remove a resource from the server. (Delete my todo) ntps:iPprojcts.100xevs.com/pathit-ntontroto-HTTP-1‘972924, 9:25 AM Projects | 100xDevs =_IntrotoH}TTP of 14 Response The response represents what the server returns you in response to the request. It could be 1. Plaintext data - Not used as often 2. HTML - If it is a website 3. JSON Data - If you want to fetch some data (user details, list of todos...) JSON JSON stands for JavaScript Object Notation. It is a lightweight, text-based format used for data interchange { © “name”: “John Doe", "age": 30, *isEmployed’: true, “address’: { “street": "123 Main St’, “city’: "Anytown" ntps:iPprojcts.100xevs.com/pathit-ntontroto-HTTP-1 78‘12024, 925 4M Projects | 100xDeve "phoneNumbers’: ["123-456-7890", "987-654-3210"] =_IntrotoH}TTP of 14 Status codes HTTP status codes are three-digit numbers returned by a server to indicate the outcome of a client's request. They provide information about the status of the request and the server's response. 200 series (Success) * 200 OK: The request was successful, and the server returned the requested resource. * 204 No Content: The request was successful, but there is no content to send in the response 300 series (Redirection) * 301 Moved Permanently: The requested resource has been moved to a new URL permanently. The client should use the new URL provided in the response. * 304 Not Modified: The resource has not been modified since the last request. The client can use the cached version. ntps:iPprojcts.100xevs.com/pathit-ntontroto-HTTP-1 ans‘972924, 9:25 AM Projects | 100xDevs 400 series (Client Error) =) IntrotoHTTP lofl4 be server could not understand the request due to invalid syntax. * 401 Unauthorized: The request requires user authentication. The client must provide credentials, * 403 Forbidden: The server understood the request but refuses to authorize it. * 404 Not Found: The requested resource could not be found on the server. 500 series (Server Error) ¢ §00 Internal Server Error: The server encountered an unexpected condition that prevented it from fulfilling the request. * 502 Bad Gateway: The server received an invalid response from an upstream server while acting as a gateway or proxy, Meme section ntps:iPprojcts.100xevs.com/pathit-ntontroto-HTTP-1‘972924, 9:25 AM Projects | 100xDevs poadu = _IntrotoH}TTP lof la In HTTP communications, the body (or payload) refers to the part of an HTTP message that contains the actual data being sent to the server. It is usually JSON data that is transferred to the server. For example - { © todo: "Go to the gym” } ntps:iPprojcts.100xevs.com/pathit-ntontroto-HTTP-1 sons‘972924, 9:25 AM Projects | 100xDevs Poe itac = IntrotoHTTP 1of14 In the context of HTTP, routes are paths or endpoints that define how incoming requests are handled by a server. Routing is a mechanism used to direct incoming HTTP requests to the appropriate handler functions or resources based on the URL path. ntps:iPprojcts.100xevs.com/pathit-ntontroto-HTTP-1 as‘972924, 9:25 AM Projects | 100xDevs andare = © IntrotoHTTP tofia HTTP headers are key-value pairs included in HTTP requests and responses that provide metadata about the message. Why not use body? Even though you can use body for everything, it is a good idea to use headers for sending data that isn’t directly related with the application logic . For example, if you want to create a new TODO, you will send the TODO payload in the body { © description: "Go to gym" } But the Authorization information in the headers a Authorization: harkirat ntps:iPprojcts.100xevs.com/pathit-ntontroto-HTTP-1 2s‘was, 92 Projects | 100x005 "= J aswnn ne derstand the following now? /embeds ntps:iPprojcts.100xevs.com/pathit-ntontroto-HTTP-1 13s‘972924, 9:25 AM Projects | 100xDevs = i Intro to HTTP 1ofl4 (Postman/curl/browser) Postman lets you send HTTP requests to a server, just like your browser. It gives you a prettier interface to send requests and play with them. You can send a request from various clients , Postman being one of them. Installing postman - https://www.postman.com/downloads/ curl Browser Postman ntps:iPprojcts.100xevs.com/pathit-ntontroto-HTTP-1 sans‘972924, 9:25 AM Projects | 100xDevs = | neowerr os TTP COde in js ntps:iPprojcts.100xevs.com/pathit-ntontroto-HTTP-1 sss
You might also like
HTTP in Detail
PDF
No ratings yet
HTTP in Detail
15 pages
CE303 Lecture 5
PDF
No ratings yet
CE303 Lecture 5
43 pages
HTTP Protocol
PDF
No ratings yet
HTTP Protocol
10 pages
Hands-On Python Programming With HTTPX
PDF
No ratings yet
Hands-On Python Programming With HTTPX
46 pages
ASP 02 HTTP
PDF
No ratings yet
ASP 02 HTTP
10 pages
Hypertext Transfer Protocol Basics
PDF
No ratings yet
Hypertext Transfer Protocol Basics
36 pages
Overview of HTTP
PDF
No ratings yet
Overview of HTTP
4 pages
HTTP Protocol
PDF
No ratings yet
HTTP Protocol
26 pages
CH 6_160955aebd50928518aeec8a2960345f
PDF
No ratings yet
CH 6_160955aebd50928518aeec8a2960345f
60 pages
HTTP (1)
PDF
No ratings yet
HTTP (1)
9 pages
CCIT25 - WS_1.1
PDF
No ratings yet
CCIT25 - WS_1.1
37 pages
Fsa CS4.1 HTTP
PDF
No ratings yet
Fsa CS4.1 HTTP
31 pages
Web Security (CAT-309) - Unit 1 Lecture 3
PDF
No ratings yet
Web Security (CAT-309) - Unit 1 Lecture 3
13 pages
HTTP Protocol
PDF
No ratings yet
HTTP Protocol
10 pages
What Is HTTP
PDF
No ratings yet
What Is HTTP
4 pages
HTTP Protocol
PDF
No ratings yet
HTTP Protocol
2 pages
Unit 2 - HTTP
PDF
No ratings yet
Unit 2 - HTTP
46 pages
HTTP Overview
PDF
No ratings yet
HTTP Overview
14 pages
Introduction To HTTP - Understanding HTTP Basics
PDF
No ratings yet
Introduction To HTTP - Understanding HTTP Basics
1 page
Intro To Nodejs
PDF
No ratings yet
Intro To Nodejs
6 pages
Hypertext Transfer Protocol: Request Methods
PDF
No ratings yet
Hypertext Transfer Protocol: Request Methods
2 pages
Backend-Turing-Edu
PDF
No ratings yet
Backend-Turing-Edu
5 pages
A Practical Guide To Writing Clients and Servers: Go To Table of Contents Go To Footnotes Go To Other Tutorials
PDF
No ratings yet
A Practical Guide To Writing Clients and Servers: Go To Table of Contents Go To Footnotes Go To Other Tutorials
18 pages
DE - 2.5.2.1 - Rest APIs and HTTP Requests - Part 1-En
PDF
No ratings yet
DE - 2.5.2.1 - Rest APIs and HTTP Requests - Part 1-En
2 pages
[CyberSec'24] Lab02 - Student Version
PDF
No ratings yet
[CyberSec'24] Lab02 - Student Version
49 pages
Module 07 : Introduction to Web Fundamentals
PDF
No ratings yet
Module 07 : Introduction to Web Fundamentals
18 pages
KHKJH
PDF
No ratings yet
KHKJH
38 pages
HTTP by Talha
PDF
No ratings yet
HTTP by Talha
4 pages
Protocolo HTTP
PDF
No ratings yet
Protocolo HTTP
6 pages
HTTP_in_Detail_1690850720
PDF
No ratings yet
HTTP_in_Detail_1690850720
17 pages
Network
PDF
No ratings yet
Network
19 pages
In Introduction To HTTP Basics
PDF
No ratings yet
In Introduction To HTTP Basics
21 pages
HTTP
PDF
No ratings yet
HTTP
4 pages
HTTP Presentation
PDF
No ratings yet
HTTP Presentation
92 pages
WT - ASSIGNMENT 01
PDF
No ratings yet
WT - ASSIGNMENT 01
18 pages
3.5 HTTTP
PDF
No ratings yet
3.5 HTTTP
16 pages
Lecture_7 (1)
PDF
No ratings yet
Lecture_7 (1)
10 pages
Web essentials_unit3_IT
PDF
No ratings yet
Web essentials_unit3_IT
55 pages
Quick Guide To HTTP Requests Breaking Things Down Faster With Python
PDF
No ratings yet
Quick Guide To HTTP Requests Breaking Things Down Faster With Python
10 pages
HTTP - HyperText Transfer Protocol - Javatpoint
PDF
No ratings yet
HTTP - HyperText Transfer Protocol - Javatpoint
4 pages
2 HTTP2
PDF
No ratings yet
2 HTTP2
104 pages
AL Protocol HTTP
PDF
No ratings yet
AL Protocol HTTP
22 pages
Full Stack Development Unit-1
PDF
No ratings yet
Full Stack Development Unit-1
18 pages
UNIT V
PDF
No ratings yet
UNIT V
9 pages
Nodejs Web Application Notes Part 1
PDF
No ratings yet
Nodejs Web Application Notes Part 1
133 pages
Web and HTTP
PDF
No ratings yet
Web and HTTP
13 pages
Interaction Between Client and Server: INF 335 Web Server Technologies
PDF
No ratings yet
Interaction Between Client and Server: INF 335 Web Server Technologies
43 pages
HTTP Packet Flow
PDF
No ratings yet
HTTP Packet Flow
5 pages
HTTP Request Response
PDF
No ratings yet
HTTP Request Response
35 pages
An Introduction To HTTP Basics
PDF
No ratings yet
An Introduction To HTTP Basics
22 pages
Hyper Text Transfer Protocol (HTTP)
PDF
No ratings yet
Hyper Text Transfer Protocol (HTTP)
21 pages
Network Computing (Rt605) : Hyper Text Transfer Protocol
PDF
No ratings yet
Network Computing (Rt605) : Hyper Text Transfer Protocol
19 pages
Application Protocol HTTP
PDF
No ratings yet
Application Protocol HTTP
31 pages
11.2.2-HTTP
PDF
No ratings yet
11.2.2-HTTP
8 pages
HTTP
PDF
No ratings yet
HTTP
3 pages
EContent 11 2023 03 01 18 07 21 02Unit2ApplicationLayerpptx 2023 01 31 08 52 45
PDF
No ratings yet
EContent 11 2023 03 01 18 07 21 02Unit2ApplicationLayerpptx 2023 01 31 08 52 45
83 pages
Http
PDF
No ratings yet
Http
15 pages
April 5th Lecture Presentation
PDF
No ratings yet
April 5th Lecture Presentation
40 pages