Module: CloudFoundry::Client::Request

Included in:
CloudFoundry::Client
Defined in:
lib/cloudfoundry/client/request.rb

Overview

CloudFoundry API Request Methods.

Instance Method Summary collapse

Instance Method Details

#delete(path, options = {}) ⇒ Object

Performs an HTTP DELETE request to the target cloud.

Parameters:

  • path (String)

    Path to request at target cloud.

  • options (Hash) (defaults to: {})

Options Hash (options):

  • :raw (Boolean)

    true if response must not be parsed.



40
41
42
# File 'lib/cloudfoundry/client/request.rb', line 40

def delete(path, options = {})
  request(:delete, path, options)
end

#get(path, options = {}) ⇒ Object

Performs an HTTP GET request to the target cloud.

Parameters:

  • path (String)

    Path to request at target cloud.

  • options (Hash) (defaults to: {})

Options Hash (options):

  • :raw (Boolean)

    true if response must not be parsed.



11
12
13
# File 'lib/cloudfoundry/client/request.rb', line 11

def get(path, options = {})
  request(:get, path, options)
end

#post(path, body = {}, options = {}) ⇒ Object

Performs an HTTP POST request to the target cloud.

Parameters:

  • path (String)

    Path to request at target cloud.

  • body (Hash) (defaults to: {})

    Body of the request to the target cloud.

  • options (Hash) (defaults to: {})

Options Hash (options):

  • :raw (Boolean)

    true if response must not be parsed.



21
22
23
# File 'lib/cloudfoundry/client/request.rb', line 21

def post(path, body = {}, options = {})
  request(:post, path, options, body)
end

#put(path, body = {}, options = {}) ⇒ Object

Performs an HTTP PUT request to the target cloud.

Parameters:

  • path (String)

    Path to request at target cloud.

  • body (Hash) (defaults to: {})

    Body of the request to the target cloud.

  • options (Hash) (defaults to: {})

Options Hash (options):

  • :raw (Boolean)

    true if response must not be parsed.



31
32
33
# File 'lib/cloudfoundry/client/request.rb', line 31

def put(path, body = {}, options = {})
  request(:put, path, options, body)
end