Changeset 29275
- Timestamp:
- 01/30/09 13:55:41 (4 years ago)
- Files:
-
- 1 modified
-
lang/ruby/hatena/api_branch/haiku.rb (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
lang/ruby/hatena/api_branch/haiku.rb
r29272 r29275 265 265 uri = URI.parse(uri) 266 266 Net::HTTP.start(uri.host) do |http| 267 if options[:params] [:file]267 if options[:params] && options[:params][:file] 268 268 boundary = "--------------------" + Time.now.to_f.to_s.tr('.', '') 269 269 header = { … … 272 272 body = build_form_data( 273 273 boundary, 274 options[:params] || {}274 options[:params] 275 275 ) 276 276 else 277 body = options[:params].map{|k,v| "#{k}=#{URI.encode v.to_s}" }.join("&") 277 if options[:params] 278 body = options[:params].map{|k,v| "#{k}=#{URI.encode v.to_s}" }.join("&") 279 else 280 body = "" 281 end 278 282 header = { 279 283 'Content-Length' => body.bytesize.to_s
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)