Class: Wrest::Native::PutMultipart

Inherits:
Request
  • Object
show all
Defined in:
lib/wrest/native/put_multipart.rb

Instance Attribute Summary

Attributes inherited from Request

#body, #ca_path, #cache_store, #connection, #follow_redirects, #follow_redirects_count, #follow_redirects_limit, #headers, #http_request, #options, #parameters, #password, #timeout, #uri, #username, #verify_mode

Instance Method Summary (collapse)

Methods inherited from Request

#execute_callback_if_any, #invoke

Constructor Details

- (PutMultipart) initialize(wrest_uri, parameters = {}, headers = {}, options = {})

Returns a new instance of PutMultipart



13
14
15
16
17
18
19
20
21
22
# File 'lib/wrest/native/put_multipart.rb', line 13

def initialize(wrest_uri, parameters = {}, headers = {}, options = {})
  super(
    wrest_uri,
    Net::HTTP::Put::Multipart,
    parameters,
    nil,
    headers,
    options
  )
end

Instance Method Details

- (Object) build_request(request_klass, uri, parameters, headers)



24
25
26
# File 'lib/wrest/native/put_multipart.rb', line 24

def build_request(request_klass, uri, parameters, headers)
  request_klass.new(uri.full_path, parameters, headers)
end

- (Object) do_request



28
29
30
# File 'lib/wrest/native/put_multipart.rb', line 28

def do_request
  @connection.request(@http_request)
end