Skip to content

Commit

Permalink
Update README
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewschaaf committed Feb 10, 2014
1 parent a45f093 commit 574f6bb
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions README.md
Expand Up @@ -33,16 +33,19 @@ intervalSet = (x, y) -> setInterval y, x

read_stream stream, (data) ->
read_fixed_size_chunks stream, chunk_size, (data) ->

copy_buffer buf
````


### HTTP responding
```coffee
respond_plain res, code, text # text/plain
respond_js res, code, js # application/javascript
respond_json res, code, value # application/json, pretty-printed JSON of value
respond_plain res, code, text # text/plain
respond_js res, code, js # text/javascript
respond_json res, code, value # application/json, pretty-printed JSON of value
respond_jsonp res, code, value # text/javascript, "#{callback}(#{json})"
respond_storage_file {req, res, storage, key, mime} # supports partial content!
respond_error res, e # res.status(500).render('500') and console.log
Expand Down

0 comments on commit 574f6bb

Please sign in to comment.