examples/async_upload.rb in goliath-0.9.1 vs examples/async_upload.rb in goliath-0.9.2
- old
+ new
@@ -5,11 +5,10 @@
require 'yajl'
class AsyncUpload < Goliath::API
use Goliath::Rack::Params # parse & merge query and body parameters
use Goliath::Rack::DefaultMimeType # cleanup accepted media types
- use Goliath::Rack::Formatters::JSON # JSON output formatter
- use Goliath::Rack::Render # auto-negotiate response format
+ use Goliath::Rack::Render, 'json' # auto-negotiate response format
def on_headers(env, headers)
env.logger.info 'received headers: ' + headers.inspect
env['async-headers'] = headers
end
\ No newline at end of file