Skip to content
This repository has been archived by the owner on Feb 21, 2020. It is now read-only.

Implement a media type "proxy" resource #1

Open
bruth opened this issue Jan 3, 2013 · 0 comments
Open

Implement a media type "proxy" resource #1

bruth opened this issue Jan 3, 2013 · 0 comments
Labels

Comments

@bruth
Copy link
Owner

bruth commented Jan 3, 2013

There are subtle differences between representations for a resource, namely an HTML vs. JSON representation. An HTML representation may contain implementation specific components while a JSON representation may be agnostic to a particular implementation.

This proxy resource would act as the default, but would check for registered resources that provide the requested representation.

# hypothetically..
class Resource(ProxyResource):
    media_types = {
        'application/json': JSONResource,
        'text/html': HTMLResource,
    }
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

1 participant