1ファイルフレームワークBottleは気軽にWebAPIなどを実装する際に便利ですね。ResponseとRequestオブジェクトの使い方についてメモしておきます。 Request bottle.requestにアクセスすると、現在処理しているリクエストにアクセスできます。以下の例ではbottle.を省略します。 GETリクエストの場合のフォームパラメータ: request.query POST/PUTリクエストの場合のフォームパラメータ: request.forms GET/POST/PUT全部まぜこぜのフォームパラメータ request.params HTTPヘッダの取得: request.get_header('User-Agent') HTTPメソッド: request.method リクエスト本文(body): request.body アクセスされたURL: request.u
Recipes¶ This is a collection of code snippets and examples for common use cases. Keeping track of Sessions¶ There is no built-in support for sessions because there is no right way to do it (in a micro framework). Depending on requirements and environment you could use beaker middleware with a fitting backend or implement it yourself. Here is an example for beaker sessions with a file-based backen
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く