开发者

Great difficulty interacting with a RESTful storage server via Ruby

I am using an S3-like storage server EMC called ATMOS. I have tried to access this server following examples in both the multipart-post gem and the rest_client gem.

The only response I am ever able to receive is "400 - bad request". The server is active and my headers at least appear to be in or开发者_如何学运维der.

I just don't know where to turn to troubleshoot this after trying for 16 hours. I am very, very frustrated.


For Google's sake: there is a proper Ruby wrapper for Atmos now.


Finally, some actual information. After trying a bunch of different things, very complicated things, I found this post.

require 'rest_client' RestClient.post "http://myserver.com", headers.merge(:file => File.new('/Users/me/sample.jpg'))

I am going to pin a medal on this guy. Ping me if you're experiencing similar problems, I feel like I wrote Net::Http by now.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜