Skip to content

Instantly share code, notes, and snippets.

View secretpray's full-sized avatar
🎯
Focusing

Aleksander secretpray

🎯
Focusing
View GitHub Profile
1) GET запрос без параметров (httpbin.org)
Запрос:
ncat -C httpbin.org
GET / HTTP/1.1
Host: httpbin.org
Ответ:
HTTP/1.1 200 OK
Date: Mon, 14 Sep 2020 12:26:03 GMT
Запрос:
ncat -C httpbin.org 80
GET /user HTTP/1.1
Host: httpbin.org
Ответ:
HTTP/1.1 404 NOT FOUND
Date: Mon, 14 Sep 2020 12:35:30 GMT
Content-Type: text/html
POST запрос с любыми параметрами
ncat -c httpbin.org 80
POST /user?admin=1 HTTP/1.1
Content-Length: 7
admin=1
Ответ
HTTP/1.1 400 Bad Request
Server: awselb/2.0
Date: Mon, 14 Sep 2020 12:46:33 GMT
GET запрос с любыми параметрами строки URL
ncat -C httpbin.org 80
GET /user?admin=1 HTTP/1.1
Host: httpbin.org
Ответ:
HTTP/1.1 404 NOT FOUND
Date: Mon, 14 Sep 2020 12:49:49 GMT
Content-Type: text/html
Content-Length: 233
1.1 GET запрос без параметров
httpbin.org 80
GET /anything HTTP/1.1
Host: httpbin.org
HTTP/1.1 200 OK
Date: Mon, 14 Sep 2020 13:19:27 GMT
Content-Type: application/json
Content-Length: 285
Connection: keep-alive
1. С помощью SQL (DDL):
1.1 Создайте базу данных test_guru (PostgreSQL)
postgres=# CREATE DATABASE test_guru;
=> CREATE DATABASE
postgres=# \c test_guru;
You are now connected to database "test_guru" as user "secretpray".
test_guru=# \l
List of databases
var fragmentQueryParameters = {};
window.location.hash.slice(1).replace(
new RegExp("([^?=&]+)(=([^&]*))?", "g"),
function($0, $1, $2, $3) { fragmentQueryParameters[$1] = $3; }
);
// Access fragment query parameters in fragmentQueryParameters object, e.g. fragmentQueryParameters.access_token
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>Dynamic Gist Embedding</title>
</head>
<body>
<p>
<script type="application/javascript">
function resizeIFrameToFitContent( iFrame ) {
iFrame.width = iFrame.contentWindow.document.body.scrollWidth;
iFrame.height = iFrame.contentWindow.document.body.scrollHeight;
}
window.addEventListener('DOMContentLoaded', function(e) {