Am 05.04.2013 06:19, schrieb David Bigelow:
> Ok - I am soooooooo close to figuring this out...  But I am stumped.
> 
> I have a simple service that reads data from a database and generates
> JSON so an AJAX request can query it.  All looks good except for ONE THING.
> 
> Rivet appears to be automatically adding HTML and BODY tags around my
> content:
> 
> <html>
> <head></head>
> <body>
> <pre>{"results":[{"optionValue":1,"optionDisplay":"Automotive"},{"optionValue":2,"optionDisplay":"Generator
> Drive"},{"optionValue":3,"optionDisplay":"Industrial"},{"optionValue":4,"optionDisplay":"Marine"}]}
> </pre>
> </body>
> </html>
> 
> I DON'T want the HTML tags -- I just need the JSON to be supplied like this:
> 
>  
> {"results":[{"optionValue":1,"optionDisplay":"Automotive"},{"optionValue":2,"optionDisplay":"Generator
> Drive"},{"optionValue":3,"optionDisplay":"Industrial"},{"optionValue":4,"optionDisplay":"Marine"}]}
> 
> 
> I have even tried to force the header content type to be
> "application/json" -- and I STILL get the HTML/BODY tags around my content.
> 
> Is there ANY way to prevent Rivet from doing this?!

Dear David,
Thank you for the message.
For me, this does not happen.
So a file like:
---test.rvt----
<?
headers type "application/json;charset=UTF-8"
puts
{"results":[{"optionValue":1,"optionDisplay":"Automotive"},{"optionValue":2,"optionDisplay":"Generator
Drive"},{"optionValue":3,"optionDisplay":"Industrial"},{"optionValue":4,"optionDisplay":"Marine"}]}

?>
---eof---
would just deliver the json object.
Could you try this ?
Thank you,
Harald



---------------------------------------------------------------------
To unsubscribe, e-mail: rivet-dev-unsubscr...@tcl.apache.org
For additional commands, e-mail: rivet-dev-h...@tcl.apache.org

Reply via email to