Metadata-Version: 1.0
Name: repoze.bfg.httprequest
Version: 0.1
Summary: Adaptable request interfaces.
Home-page: UNKNOWN
Author: UNKNOWN
Author-email: UNKNOWN
License: ZPL 2.1
Description: Overview
        ========
        
        The motivation for this package is to encourage the use of request
        type adaptation instead of depending on packages with request type
        definitions.
        
        Instead of subclassing the request interface, we encourage an
        adaptation pattern:
        
        >>> from repoze.bfg.interfaces import IRequest
        >>> IGZipRequest = IRequest({'Accept-Encoding': 'gzip'})
        
        An event handler listens for the ``INewRequest`` event and
        automatically marks the request with interfaces as needed to adapt the
        request to the request types that it may apply for.
        
        To complete the example above, a request would come in with an HTTP
        environment like the following:
        
        {'Accept-Encoding': 'compress, gzip'}
        
        Since we've previouly adapted the request to an accept-encoding of
        'gzip', the adaptation machinery will mark the interface such that
        this environment will match the ``IGZipRequest`` interface.
        
        This would be an alternative to subclassing, where we would manually
        have to set up an event listener that interprets the request
        environment and marks the request with the interface.
        
        >>> class IGZipRequest(IRequest):
        ...     """Marker interface for requests for gzipped response."""
        
        Credits
        -------
        
        Stefan Eletzhofer <stefan.eletzhofer@inquant.de> and Malthe Borch
        <mborch@gmail.com>.
        
Keywords: zope3 repoze bfg
Platform: UNKNOWN
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Web Environment
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: Zope Public License
Classifier: Programming Language :: Python
Classifier: Natural Language :: English
Classifier: Operating System :: OS Independent
Classifier: Topic :: Internet :: WWW/HTTP
Classifier: Framework :: Zope3
