Class: Blix::Rest::XmlFormatParser
- Inherits:
-
FormatParser
- Object
- FormatParser
- Blix::Rest::XmlFormatParser
- Defined in:
- lib/blix/rest/format_parser.rb
Overview
the default xml format parser
Instance Attribute Summary
Attributes inherited from FormatParser
#__custom_headers, #_format, #_options
Instance Method Summary collapse
- #format_error(message) ⇒ Object
- #format_response(value, response) ⇒ Object
- #set_default_headers(headers) ⇒ Object
Methods inherited from FormatParser
Instance Method Details
#format_error(message) ⇒ Object
129 130 131 |
# File 'lib/blix/rest/format_parser.rb', line 129 def format_error() "<error>#{}</error>" end |
#format_response(value, response) ⇒ Object
133 134 135 |
# File 'lib/blix/rest/format_parser.rb', line 133 def format_response(value, response) response.content = [value.to_s] end |
#set_default_headers(headers) ⇒ Object
123 124 125 126 127 |
# File 'lib/blix/rest/format_parser.rb', line 123 def set_default_headers(headers) headers[CACHE_CONTROL] = CACHE_NO_STORE headers[PRAGMA] = NO_CACHE headers[CONTENT_TYPE] = CONTENT_TYPE_XML end |