Login

    Register

Managed Hosting

PROJECT CATEGORIES

 

PowerNap
Project Home Blog Forums Known Issues Contact Project

PowerNap Issue: simpleRepresentation only returns text

Name: simpleRepresentation only returns text
ID: 3
Project: PowerNap
Type: Enhancement
Area: Code
Severity: Normal
Status: Open
Related URL:
Creator: Ryan McIlmoyl
Created: 02/22/10 3:08 PM
Updated: 02/24/10 11:02 AM
Description: Currently, simpleRepresentation always use the getAsPlainText method for all return formats. This causes XML to break, as the text provided is not always XML and doesn't parse properly. I have created a patch to cause getAsJSON, getAsXML and getAsHTML to return the content as valid JSON, XML and HTML accordingly. Email me and I can provide the patch file
History: Created by ryan.mcilmoyl (Ryan McIlmoyl) : 02/22/10 3:08 PM

Comment by mrmarbles (Brian Carr) : 02/24/10 11:02 AM
The SimpleRepresentation type was only intended to handle simple text responses - if you need to represent a resource in some other format, then you'll need to create a custom representation with the appropriate 'getAs' method.

To add a comment to this bug, please login using the link above.