Sha256: cebf7f73aeab130ee9cbe67f47a2195c970f51e8142e8d67ecd9100d772c0867
Contents?: true
Size: 708 Bytes
Versions: 8
Compression:
Stored size: 708 Bytes
Contents
module DropboxApi::Endpoints class ContentUpload < DropboxApi::Endpoints::Base def initialize(builder) @connection = builder.build("https://content.dropboxapi.com") do |c| c.response :decode_result end end def build_request(params, content) # TODO: It would be better to have a stream object on which we can call # #read, rather than the full file content. body = content headers = { 'Dropbox-API-Arg' => JSON.dump(params), 'Content-Type' => 'application/octet-stream' } return body, headers end def perform_request(params, content) process_response(get_response(params, content)) end end end
Version data entries
8 entries across 8 versions & 1 rubygems