HTTP送受信をSQLで行う仮想テーブルモジュールがあったらいいな。
要望
これはただの要望であり妄想。このように実装できるかどうかもわからない。
構文
select http('GET', 'https://...'); select http('POST', 'https://...', 'データ'); select http('HEAD', 'https://...'); select http('DELETE', 'https://...'); select http('PUT', 'https://...');
create table url_query_parameter( key text, value text ); create table http_headers( key text, value text ); create table http_request( id integer primary key, runed text current_timestamp, method text, url text, header text, cookie text ); create table http_response( req_id integer references http_request(id), header text, code integer, result text, -- MIMEタイプがテキストなら result blob, -- MIMEタイプがバイナリなら );
対象環境
- Raspbierry pi 3 Model B+
- Raspbian stretch 9.0 2018-11-13
- bash 4.4.12(1)-release
- SQLite 3.29.0
- MeCab 0.996ユーザ辞書
$ uname -a Linux raspberrypi 4.19.42-v7+ #1218 SMP Tue May 14 00:48:17 BST 2019 armv7l GNU/Linux