This file contains 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
Запрос: | |
$ telnet kontur.ru 80 | |
Trying 46.17.203.102... | |
Connected to kontur.ru. | |
Escape character is '^]'. | |
GET /products/actions HTTP/1.1 | |
Host: kontur.ru | |
User-Agent: Mozilla/5.0 (X11; U; Linux i686; ru; rv:1.9b5) Gecko/2008050509 Firefox/3.0b5 | |
Accept: text/html | |
Connection: close |
This file contains 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
Запрос № 1: | |
$ telnet httpbin.org 80 | |
Trying 54.243.67.94... | |
Connected to httpbin.org. | |
Escape character is '^]'. | |
GET /ip HTTP/1.1 | |
Host: httpbin.org | |
Accept: */* | |
Ответ № 1: |
This file contains 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
Файл с формой form.html: | |
<!DOCTYPE HTML> | |
<html> | |
<head> | |
<title>Задание 4</title> | |
</head> | |
<body> | |
<form name="Task 1.4" action="http://httpbin.org/post" method="POST" и enctype="multipart/form-data"> | |
<div> |
This file contains 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
Исходный код: | |
<html> | |
<head> | |
<title>Реализация сокетов на PHP</title> | |
</head> | |
<body> | |
<pre> | |
<?php | |
$host = "kontur.ru"; |
This file contains 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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import socket | |
# Данные для подключения к серверу | |
HOST = "127.0.0.1" | |
PORT = 8080 | |
# Статусы ответа сервера | |
STATUS = { | |
200 : b"HTTP/1.1 200 OK\nContent-Type: text/html; charset=utf-8\n\n\n", |
This file contains 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
0. Запрос к urfu.ru | |
import socket | |
# Данные о подключении | |
HOST = 'urfu.ru' | |
PORT = 80 | |
# Создание сокета | |
s = socket.socket() |
This file contains 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
0. Запрос к urfu.ru | |
import http.client | |
# Данные о подключении | |
HOST = 'urfu.ru' | |
PORT = 80 | |
# Инициализация HTTP-подключения | |
connection = http.client.HTTPConnection(HOST, PORT) |
This file contains 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 requests | |
import json | |
request = { | |
"github": "a-chabin", | |
"Name": "Alexander", | |
"Surname": "Chabin" | |
} | |
json_request = json.dumps(request) |
This file contains 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
ФО-350005 | |
Васильев А.М. | |
Чабин А.С. | |
Презентация: | |
bit.ly/urfu_botapi | |
Доклад по созданию бота в Telegram на базе API УрФУ. | |
-------------------------------------- |
This file contains 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
from wsgiref.simple_server import make_server | |
# Исходный список подключаемых файлов в HTML | |
INCLUDES = [ | |
'app.js', | |
'react.js', | |
'leaflet.js', | |
'D3.js', | |
'moment.js', | |
'math.js', |
OlderNewer