Changeset 209 for multipart-post

Show
Ignore:
Timestamp:
08/12/08 17:27:36 (2 years ago)
Author:
nick
Message:

Dust off the multipart form post package

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • multipart-post

    • Property svn:ignore set to
      pkg
  • multipart-post/Manifest.txt

    r28 r209  
    44Rakefile 
    55README.txt 
    6 test/composite_io_test.rb 
    7 test/net/http/post/multipart_test.rb 
     6test/test_composite_io.rb 
     7test/net/http/post/test_multipart.rb 
  • multipart-post/README.txt

    r28 r209  
     1= multipart-post 
     2 
     3* http://svn.caldersphere.net/svn/main/multipart-post 
     4 
     5== DESCRIPTION: 
     6 
    17Adds a multipart form post capability to Net::HTTP. 
     8 
     9== FEATURES/PROBLEMS: 
     10 
     11I wrote this a while ago and never ended up using it. It appears to work, 
     12but I don't know for sure. If you find any bugs or improvements, please  
     13let me know! 
     14 
     15== SYNOPSIS: 
     16 
     17    require 'net/http/post/multipart' 
     18 
     19    url = URI.parse('http://www.example.com/upload') 
     20    req = File.open("./image.jpg") do |jpg| 
     21      Net::HTTP::Post::Multipart.new(url.path, { 
     22        "file" => UploadIO.convert!(jpg, "image/jpeg", "image.jpg", "./image.jpg")}) 
     23    end 
     24    res = Net::HTTP.start(url.host, url.port) do |http| 
     25      http.request(req) 
     26    end 
     27 
     28== REQUIREMENTS: 
     29 
     30None 
     31 
     32== INSTALL: 
     33 
     34 
     35== LICENSE: 
     36 
     37(The MIT License) 
     38 
     39Copyright (c) 2007-2008 Nick Sieger <nick@nicksieger.com> 
     40 
     41Permission is hereby granted, free of charge, to any person obtaining 
     42a copy of this software and associated documentation files (the 
     43'Software'), to deal in the Software without restriction, including 
     44without limitation the rights to use, copy, modify, merge, publish, 
     45distribute, sublicense, and/or sell copies of the Software, and to 
     46permit persons to whom the Software is furnished to do so, subject to 
     47the following conditions: 
     48 
     49The above copyright notice and this permission notice shall be 
     50included in all copies or substantial portions of the Software. 
     51 
     52THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, 
     53EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 
     54MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 
     55IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 
     56CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 
     57TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 
     58SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.