Skip to content

Instantly share code, notes, and snippets.

View psylone's full-sized avatar
💭
Be kind; everyone you meet is fighting a hard battle

Evgeniy Fateev psylone

💭
Be kind; everyone you meet is fighting a hard battle
View GitHub Profile
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
@ruuke
ruuke / GET method
Created October 16, 2018 08:55
Part 1 - task1
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
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,
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
psql slq@slq-home
psql (9.6.10)
Введите "help", чтобы получить справку.
Создайте базу данных test_guru
CREATE DATABASE test_guru;
CREATE DATABASE
===================================================
@Lokideos
Lokideos / gist:2d2422ea77827e08a0192bf549c71306
Created October 9, 2018 17:59
Thinknetica SQL queries task
# 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);
@hookbil
hookbil / lesson_1
Last active October 10, 2018 11:39
- Пустой 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
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

1. Сформируйте и отправьте по указанному выше url:

1.1 GET запрос без параметров

~|⇒  ncat -C httpbin.org 80
 
GET /anything HTTP/1.1
Host: httpbin.org
-- Создайте базу данных test_guru
CREATE DATABASE test_guru;
-- Таблицу categories с атрибутом title
CREATE TABLE categories(
id SERIAL PRIMARY KEY,
title VARCHAR(50) NOT NULL
);
-- Таблицу tests в которой должны быть атрибуты title, level, внешний ключ к таблице categories