~|⇒ ncat -C httpbin.org 80
GET /anything HTTP/1.1
Host: httpbin.org
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
| GET запрос без параметров | |
| $ncat -C httpbin.org 80 | |
| GET /anything HTTP/1.1 | |
| Host: httpbin.org | |
| HTTP/1.1 200 OK | |
| Connection: keep-alive | |
| Server: gunicorn/19.9.0 | |
| Date: Thu, 18 Oct 2018 06:29:32 GMT |
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
| ruuke@ruuke-VPCEB1M1R:~$ ncat -C httpbin.org 80 | |
| GET /anything HTTP/1.1 | |
| Host:httpbin.org | |
| HTTP/1.1 200 OK | |
| Connection: keep-alive | |
| Server: gunicorn/19.9.0 | |
| Date: Tue, 16 Oct 2018 07:38:20 GMT | |
| Content-Type: application/json | |
| Content-Length: 245 |
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
| I. | |
| # create db test_guru | |
| sqlite3 test_guru.db | |
| # create a table 'categories' with title | |
| CREATE TABLE IF NOT EXISTS categories ( | |
| id INTEGER PRIMARY KEY, |
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
| ncat -C httpbin.org 80 | |
| GET /anything HTTP/1.1 | |
| Host: httpbin.org | |
| HTTP/1.1 200 OK | |
| Connection: keep-alive | |
| Server: gunicorn/19.9.0 | |
| Date: Fri, 12 Oct 2018 14:15:52 GMT | |
| Content-Type: application/json | |
| Content-Length: 246 |
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
| psql slq@slq-home | |
| psql (9.6.10) | |
| Введите "help", чтобы получить справку. | |
| Создайте базу данных test_guru | |
| CREATE DATABASE test_guru; | |
| CREATE DATABASE | |
| =================================================== |
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
| # SQL DDL queries | |
| # Create test_guru database | |
| CREATE DATABASE test_guru; | |
| # Create categories table | |
| CREATE TABLE categories (id serial PRIMARY KEY, title varchar); | |
| # Create tests table | |
| CREATE TABLE tests (id serial PRIMARY KEY, title varchar, level varchar, category_id int); |
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
| - Пустой get запрос: | |
| netcat -C httpbin.org 80 | |
| GET / HTTP/1.1 | |
| Host: httpbin.org | |
| HTTP/1.1 200 OK | |
| Connection: keep-alive | |
| Server: gunicorn/19.9.0 | |
| Date: Tue, 09 Oct 2018 12:15:21 GMT | |
| Content-Type: text/html; charset=utf-8 |
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
| ncat -C httpbin.org 80 slq@slq-home | |
| GET / HTTP/1.1 | |
| Host: httpbin.org | |
| HTTP/1.1 200 OK | |
| Connection: keep-alive | |
| Server: gunicorn/19.9.0 | |
| Date: Mon, 08 Oct 2018 14:43:02 GMT | |
| Content-Type: text/html; charset=utf-8 | |
| Content-Length: 10122 |
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
| -- Создайте базу данных test_guru | |
| CREATE DATABASE test_guru; | |
| -- Таблицу categories с атрибутом title | |
| CREATE TABLE categories( | |
| id SERIAL PRIMARY KEY, | |
| title VARCHAR(50) NOT NULL | |
| ); | |
| -- Таблицу tests в которой должны быть атрибуты title, level, внешний ключ к таблице categories |