Class: Google::Apis::Core::RawUploadCommand

Inherits:
BaseUploadCommand show all
Defined in:
lib/google/apis/core/upload.rb

Overview

Implementation of the raw upload protocol

Constant Summary collapse

RAW_PROTOCOL =
'raw'

Constants inherited from ApiCommand

ApiCommand::FIELDS_PARAM, ApiCommand::JSON_CONTENT_TYPE, ApiCommand::RATE_LIMIT_ERRORS

Constants inherited from HttpCommand

HttpCommand::RETRIABLE_ERRORS

Instance Attribute Summary

Attributes inherited from ApiCommand

#request_object, #request_representation, #response_class, #response_representation

Attributes inherited from HttpCommand

#body, #connection, #header, #method, #options, #params, #query, #url

Instance Method Summary collapse

Methods inherited from ApiCommand

#check_status, #decode_response_body

Methods inherited from HttpCommand

#apply_request_options, #authorization_refreshable?, #check_status, #decode_response_body, #error, #execute, #initialize, #process_response, #success

Methods included from Logging

#logger

Constructor Details

This class inherits a constructor from Google::Apis::Core::HttpCommand

Instance Method Details

#prepare!

This method returns an undefined value.

Ensure the content is readable and wrapped in an Google::Apis::Core::RawUploadCommand.{Google{Google::Apis{Google::Apis::Core{Google::Apis::Core::UploadIO} instance.

Raises:



123
124
125
126
127
128
# File 'lib/google/apis/core/upload.rb', line 123

def prepare!
  super
  self.body = upload_io
  header[UPLOAD_PROTOCOL_HEADER] = RAW_PROTOCOL
  header[UPLOAD_CONTENT_TYPE_HEADER] = upload_io.content_type
end