Class: RExchange::DavMoveRequest

Inherits:
ExchangeRequest show all
Defined in:
lib/rexchange/dav_move_request.rb

Overview

Used to move entities to different locations in the accessable mailbox.

Constant Summary collapse

METHOD =
'MOVE'
REQUEST_HAS_BODY =
false
RESPONSE_HAS_BODY =
false

Class Method Summary collapse

Methods inherited from ExchangeRequest

authenticate, exchange_request

Class Method Details

.execute(credentials, source, destination, &b) ⇒ Object



10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# File 'lib/rexchange/dav_move_request.rb', line 10

def self.execute(credentials, source, destination, &b)
  begin
    options = {
            :headers => {
                    'Destination' => destination
            },
            :path => source
    }

    response = super credentials, options
    yield response if b
    response
  rescue RException => e
    raise e
  rescue Exception => e
    raise RException.new(options[:request], response, e)
  end
end