Class: Google::Apis::Core::RawUploadCommand
- Inherits:
-
BaseUploadCommand
- Object
- HttpCommand
- ApiCommand
- BaseUploadCommand
- Google::Apis::Core::RawUploadCommand
- 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
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
-
#prepare!
Ensure the content is readable and wrapped in an {Google{Google::Apis{Google::Apis::Core{Google::Apis::Core::UploadIO} instance.
Methods inherited from ApiCommand
#allow_form_encoding?, #check_status, #decode_response_body
Methods inherited from HttpCommand
#allow_form_encoding?, #apply_request_options, #authorization_refreshable?, #check_status, #decode_response_body, #error, #execute, #initialize, #process_response, #success
Methods included from Logging
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.
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 |