Class: Google::Resourcemanager::Network::Put

Inherits:
Base
  • Object
show all
Defined in:
lib/google/resourcemanager/network/put.rb

Overview

A wrapper class for a PUT Request

Instance Method Summary collapse

Methods inherited from Base

#builder, #send

Constructor Details

#initialize(link, cred, type, body) ⇒ Put

Returns a new instance of Put.



35
36
37
38
39
# File 'lib/google/resourcemanager/network/put.rb', line 35

def initialize(link, cred, type, body)
  super(link, cred)
  @type = type
  @body = body
end

Instance Method Details

#transport(request) ⇒ Object



41
42
43
44
45
46
47
# File 'lib/google/resourcemanager/network/put.rb', line 41

def transport(request)
  request.content_type = @type
  request.body = @body
  puts "network(#{request}: body(#{@body}))" \
    unless ENV['GOOGLE_HTTP_VERBOSE'].nil?
  super(request)
end