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::ERROR_REASON_MAPPING, ApiCommand::FIELDS_PARAM, ApiCommand::JSON_CONTENT_TYPE

Constants inherited from HttpCommand

HttpCommand::RETRIABLE_ERRORS

Instance Attribute Summary

Attributes inherited from ApiCommand

#client_version, #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

#allow_form_encoding?, #check_status, #decode_response_body, #initialize

Methods inherited from HttpCommand

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

Methods included from Logging

#logger

Constructor Details

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

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:



90
91
92
93
94
95
# File 'lib/google/apis/core/upload.rb', line 90

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