Ruby Net::HTTP 示例的集合。
Net::HTTP cheat sheetA bunch of examples of various use cases, implemented with Ruby's Net::HTTP library.
Net::HTTPThis cheat sheet was created many years ago, when invoking Net::HTTP directly was common. These days, there are better alternatives around, with much nicer APIs.
Compare multipart file uploads with Net::HTTP:
BOUNDARY = "AaB03x"
uri = URI.parse("http://something.com/uploads")
file = "/path/to/your/testfile.txt"
post_body = []
post_body File.new("/path/to/image.jpg", 'rb')
Check out RestClient! https://github.com/rest-client/rest-client
暂无开放 Issues,或尚未同步最近议题。