TIL

Today I Learned. 知ったこと、学んだことを書いていく

2017-08-20から1日間の記事一覧

リクエストのJSONデータを受け取る - Bottle

リクエストでJSONを送信してきた場合の処理 from bottle import route, run, request @route("/hello") def hello(): contentType = request.get_header('Content-Type') print(f"header Content-Type: {contentType}") if contentType == "application/json…