このページの翻訳:
- 日本語 (ja)
- English (en)
最近の更新
- 02 Apache2で自己認証ssl [中間証明書の整合性確認]
最近の更新
FlaskでProxyサーバ
api.py
from flask import request from flask import Flask import urllib.request import urllib.parse app = Flask(__name__) @app.route('/') def hello(): return "Hello World" @app.route('/good') def good(): return "Good" # start if __name__ == "__main__": app.run(host='0.0.0.0')
from flask import request import logging logging.basicConfig(level=logging.INFO) werkzeug_logger = logging.getLogger("werkzeug") @app.route('/', methods=['POST', 'GET']) def hello(): params = { 'url' : request.form['url'] , 'hoge1' : request.form['hoge1'] , 'hoge2' : request.form['hoge2'] , 'hoge3' : request.form['hoge3'] } werkzeug_logger.info(params)