Presentation is loading. Please wait.

Presentation is loading. Please wait.

Content from Python Docs.

Similar presentations


Presentation on theme: "Content from Python Docs."— Presentation transcript:

1 Content from Python Docs.
Recitation Week 5 Pranut jain Content from Python Docs.

2 Content from Python Docs.
Plan for today Last 2 questions of the Week 4 quiz Assignment 2 common questions! HTTP discussion Introduction to Python No Quiz today! Content from Python Docs.

3 Content from Python Docs.
Assignment 1 stats AVG: 98.07 MEDIAN: 100 MODE: 100 Content from Python Docs.

4 What is HTTP? The Hypertext Transfer Protocol (HTTP) is designed to enable communications between clients and servers. HTTP works as a request-response protocol between a client and server. W3schools and web docs

5 Content from Python Docs.
HTTP Request Methods Two commonly used methods for a request-response are: GET and POST. Content from Python Docs.

6 Content from Python Docs.
The GET Method The query string is sent in the URL of a GET request: /test/demo_form.php?name1=value1&name2=value2 GET requests have length restrictions GET requests should be used only to retrieve data Content from Python Docs.

7 Content from Python Docs.
The POST Method The query string is sent in the HTTP message body of a POST request: POST /test/demo_form.php HTTP/1.1 Host: abc123.com name1=value1&name2=value2 POST requests have no restrictions on data length Content from Python Docs.

8 Other HTTP Request Methods
Description HEAD Same as GET but returns only HTTP headers and no document body PUT Uploads a representation of the specified URI DELETE Deletes the specified resource OPTIONS Returns the HTTP methods that the server supports CONNECT Converts the request connection to a transparent TCP/IP tunnel Content from Python Docs.

9 Content from Python Docs.
HTTP Status Messages 1xx: Information 100 Continue, 101 Switching Protocols, 103 Checkpoint 2xx: Successful 200 OK, 201 Created, 202 Accepted 3xx: Redirection 301 Moved Permanently, Temp Redirection Content from Python Docs.

10 Content from Python Docs.
Errors 4xx: Client Error bad syntax, Unauthorized, 404 Not Found 5xx: Server Error The server is currently unavailable (overloaded or down), The server does not support the HTTP protocol version used in the request, The client needs to authenticate to gain network access Content from Python Docs.

11 Getting started with Python
Download Python from here: Follow instructions to install set it up for your preferred choice of terminal. Content from Python Docs.

12 Content from Python Docs.
Intro To Python Python is an interpreted language, which can save you considerable time during program development because no compilation and linking is necessary. The interpreter can be used interactively, which makes it easy to experiment with features of the language, to write throw-away programs, or to test functions during bottom-up program development. Python programs are more readable*, compared to most of the other programming languages. Other programming Languages can be WRAPPED by Python! Content from Python Docs.


Download ppt "Content from Python Docs."

Similar presentations


Ads by Google