I have a curl request (to upload a file) which is running weel in the
console

$curl -H "X-TrackerToken: xxxxxxx" -X POST -F
Filedata=@/Developpement/Projects/TESTS/pictures/Glen.gif
http://www.pivotaltracker.com/services/v3/projects/999999/stories/999999/attachments

I tried to mimic it in my ruby script  (1.9.2)

----
...
attachment = "Filedata=@/Developpement/Projects/TESTS/pictures/Glen.gif"

uri =
URI.parse("http://www.pivotaltracker.com/services/v3/projects/999999/stories/999999/attachments")

response = Net::HTTP.start(uri.host, uri.port) do |http|
     http.post(uri.path, attachment, {'X-TrackerToken' => xxxxxxx})
 end

but this doesn't work and gave me an Internal Server Error

is my http.post wrong ??
-- 
Posted via http://www.ruby-forum.com/.