Skip to content

Instantly share code, notes, and snippets.

@wcandillon
Created September 30, 2011 09:42
Show Gist options
  • Save wcandillon/1253275 to your computer and use it in GitHub Desktop.
Save wcandillon/1253275 to your computer and use it in GitHub Desktop.
http:set-status(400);
(: with the content-type "application/json" the json xml is automatically serialized to JSON :)
http:set-content-type("application/json");
(: this is the xml representation of JSON which makes it easy to generate it, and work with it within sausalito :)
<json type="object">
<pair name="status" type="number">400</pair>
<pair name="statusmessage" type="string">Bad Request</pair>
<pair name="message" type="string">Please, enter a search term</pair>
</json>;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment