Simple (fab) app to respond to Accept HTTP headers
JavaScript
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
lib
README
package.json

README

Ternary for streaming based on Accept HTTP header.

  ( route, /^\/status/ )
    ( accept, "text/html" )
      ( PRE )
        ( player_status )
      ()
    ()
    (accept, "text/plain")
      (undefined, {headers: { "Content-Type": "text/plain"}})
      ( player_status )
    ()
  ()


Notes / TODOs:

 * Does not account for q-factor (not sure that's possible in fab).
 * Need to implement RegExp matching to make more useful.