anchor.diff:  %-define(DEBUG, 1).
   -include("debug.hrl").
   
  -
  -% XXX: or use "application/octet-stream" Content-Type instead of
  -% "application/protobuf"?
   
   % XXX: set charset=UTF-8 in "Content-Type" response header for text (Piq), Json
   % and XML responses?
  
positive.code:                 [
                      {"text/plain", get_piqi_piq},
                      {"application/json", get_piqi_json},
                      {"application/protobuf", get_piqi_pb}
                  ];
              'POST' ->
                  [
                      {"application/json", unused_value},
                      {"application/protobuf", unused_value},
                      {"text/plain", unused_value}
                  ]
          end,
  
negative.code: % Utility functions
  %
  
  format_to_content_type('pb') -> "application/x-protobuf";
  format_to_content_type('json') -> "application/json";
  format_to_content_type('piq') -> "text/plain".
  
  
  content_type_to_format("application/x-protobuf") -> 'pb';
  content_type_to_format("application/json") -> 'json';
  content_type_to_format("text/plain") -> 'piq';
  content_type_to_format(_) -> 'undefined'.
  