Hi,

What needs to be done to properly return a webpage with proper json encoding, 
meaning content type of “application/json"?   The page my application is 
returning seems to be of type “text/html”.  I’m not exactly sure how to see 
what the content type is. my app returns a WOString with the json text in it.  
Is this the correct way to handle this?

I’ve found this example but it didn’t seem to make a difference to my app. (In 
Application.java)

    public void appendToResponse(WOResponse response, WOContext context) {
        super.appendToResponse(response, context);
        if( _NSUtilities.UTF8StringEncoding.equals(response.contentEncoding()))
                response.setHeader("application/json; charset=UTF-8", 
"Content-Type");
    }



Thanks,
Calven
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to