1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00
fog--fog/lib/fog/rackspace/requests/storage/put_object.rb

35 lines
775 B
Ruby
Raw Normal View History

module Fog
module Rackspace
class Storage
class Real
2009-10-31 13:59:50 -04:00
# Create a new object
#
# ==== Parameters
# * container<~String> - Name for container, should be < 256 bytes and must not contain '/'
#
def put_object(container, object, data)
2010-06-12 18:31:17 -04:00
data = parse_data(data)
2009-10-31 13:59:50 -04:00
response = storage_request(
:body => data[:body],
:expects => 201,
2009-11-04 00:46:27 -05:00
:headers => data[:headers],
2009-10-31 13:59:50 -04:00
:method => 'PUT',
:path => "#{CGI.escape(container)}/#{CGI.escape(object)}"
)
response
end
end
class Mock
2009-10-31 13:59:50 -04:00
def put_object(container, object, data)
Fog::Mock.not_implemented
2009-10-31 13:59:50 -04:00
end
end
end
end
end