Class: Multipart::Post

Inherits:
Object
  • Object
show all
Defined in:
lib/multipart/post.rb

Constant Summary collapse

DEFAULT_OPTIONS =
{
  :boundary => '0123456789RUBYRUBYRUBYRUBY9876543210',
  :headers  => {}
}

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(params, options = {}) ⇒ Post

Returns a new instance of Post.



17
18
19
20
21
22
# File 'lib/multipart/post.rb', line 17

def initialize(params, options={})
  @options = DEFAULT_OPTIONS.merge(options)
  @params = params
  
  prepare_query
end

Instance Attribute Details

#bodyObject (readonly)

Returns the value of attribute body.



10
11
12
# File 'lib/multipart/post.rb', line 10

def body
  @body
end

#headersObject (readonly)

Returns the value of attribute headers.



10
11
12
# File 'lib/multipart/post.rb', line 10

def headers
  @headers
end