Skip to content

Instantly share code, notes, and snippets.

@kgrz
Created July 7, 2012 14:51
Show Gist options
  • Select an option

  • Save kgrz/3066759 to your computer and use it in GitHub Desktop.

Select an option

Save kgrz/3066759 to your computer and use it in GitHub Desktop.
binary post
require 'sinatra'
post '/post' do
response.body.inspect # This returns [] with the curl command given below
end
__END__
Curl command used is:
curl --data-binary @"test.jpg" http://localhost:9393/post
or
curl --data-binary @test.jpg http://localhost:9393/post
I'm using Shotgun via thin.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment