This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| https://help.github.com/articles/working-with-forks/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # -------------------------------- | |
| # NOTICE: all tasks except "Final Exam" should execute in Sliderepl presentation | |
| # -------------------------------- | |
| +-----------------------------------------------------------------------------------+ | |
| | Assuming this table: | | |
| | | | |
| | CREATE TABLE employee ( | | |
| | emp_id INTEGER PRIMARY KEY, | | |
| | emp_name VARCHAR(30) | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import socket | |
| import http.client | |
| import urllib.parse | |
| HOST = 'e1.ru' | |
| PORT = 80 | |
| BUFFER_SIZE = 1024 | |
| # Request by socket |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Request 1: | |
| GET /ip HTTP/1.1 | |
| Host: httpbin.org | |
| Accept: */* | |
| Response 1: | |
| HTTP/1.1 200 OK | |
| Server: nginx | |
| Date: Sat, 27 Feb 2016 14:15:44 GMT | |
| Content-Type: application/json |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Посылается запрос на сервер с "просьбой" отобразить страницу по адресу e1.ru/news/ | |
| // В заголовках запроса указываются юзер-агент клиента (OS и браузер), | |
| // также задается тип соединения при котором сервер не будет ждать от клиента следующих запросов и закроет соединение после ответа | |
| Request: | |
| GET /news/ HTTP/1.1 | |
| Host: www.e1.ru | |
| User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux i686; rv:44.0) Gecko/20100101 Firefox/44.0 | |
| Accept: text/html | |
| Connection: close |