以前、wsgi-interceptを使った時に、PythonのHTTPライブラリとして、Requestsを使いました。 Requests: HTTP for Humans — Requests 2.13.0 documentation 使っている中で、RequestのCookieの使い方について迷ったことがあったため、メモを残します。 環境 Mac OS X 10.11.6 Python 3.6.1 Requests 2.13.0 Bottle 0.12.13 Requestsを試すためのアプリ pytest 3.0.7 テストランナー Requestsを試すための用意したBottleアプリ CookieをセットするだけのBottleアプリを用意しました。 仕様は /へアクセス Cookieにrootをセット /redirectへアクセス Cookieにredirectをセット /ヘリダイ