diff options
Diffstat (limited to 'docs/api.rst')
-rwxr-xr-x | docs/api.rst | 29 |
1 files changed, 13 insertions, 16 deletions
diff --git a/docs/api.rst b/docs/api.rst index f2c8129..aeb4ff0 100755 --- a/docs/api.rst +++ b/docs/api.rst @@ -107,16 +107,6 @@ Exceptions .. autoexception:: BottleException :members: -.. autoexception:: HTTPResponse - :members: - -.. autoexception:: HTTPError - :members: - -.. autoexception:: RouteReset - :members: - - The :class:`Bottle` Class @@ -134,18 +124,16 @@ The :class:`Request` Object The :class:`Request` class wraps a WSGI environment and provides helpful methods to parse and access form data, cookies, file uploads and other metadata. Most of the attributes are read-only. -You usually don't instantiate :class:`Request` yourself, but use the module-level :data:`bottle.request` instance. This instance is thread-local and refers to the `current` request, or in other words, the request that is currently processed by the request handler in the current context. `Thread locality` means that you can safely use a global instance in a multithreaded environment. - .. autoclass:: Request :members: -.. autoclass:: LocalRequest - :members: - .. autoclass:: BaseRequest :members: +The module-level :data:`bottle.request` is a proxy object (implemented in :class:`LocalRequest`) and always refers to the `current` request, or in other words, the request that is currently processed by the request handler in the current thread. This `thread locality` ensures that you can safely use a global instance in a multi-threaded environment. +.. autoclass:: LocalRequest + :members: The :class:`Response` Object @@ -156,10 +144,19 @@ The :class:`Response` class stores the HTTP status code as well as headers and c .. autoclass:: Response :members: +.. autoclass:: BaseResponse + :members: + .. autoclass:: LocalResponse :members: -.. autoclass:: BaseResponse + +The following two classes can be raised as an exception. The most noticeable difference is that bottle invokes error handlers for :class:`HTTPError`, but not for :class:`HTTPResponse` or other response types. + +.. autoexception:: HTTPResponse + :members: + +.. autoexception:: HTTPError :members: |