Class: Chef::HTTP::RemoteRequestID

Inherits:
Object
  • Object
show all
Defined in:
lib/chef/http/remote_request_id.rb

Instance Method Summary collapse

Constructor Details

#initialize(opts = {}) ⇒ RemoteRequestID


24
25
# File 'lib/chef/http/remote_request_id.rb', line 24

def initialize(opts = {})
end

Instance Method Details

#handle_request(method, url, headers = {}, data = false) ⇒ Object


27
28
29
30
# File 'lib/chef/http/remote_request_id.rb', line 27

def handle_request(method, url, headers = {}, data = false)
  headers["X-REMOTE-REQUEST-ID"] = Chef::RequestID.instance.request_id
  [method, url, headers, data]
end

#handle_response(http_response, rest_request, return_value) ⇒ Object


32
33
34
# File 'lib/chef/http/remote_request_id.rb', line 32

def handle_response(http_response, rest_request, return_value)
  [http_response, rest_request, return_value]
end

#handle_stream_complete(http_response, rest_request, return_value) ⇒ Object


40
41
42
# File 'lib/chef/http/remote_request_id.rb', line 40

def handle_stream_complete(http_response, rest_request, return_value)
  [http_response, rest_request, return_value]
end

#stream_response_handler(response) ⇒ Object


36
37
38
# File 'lib/chef/http/remote_request_id.rb', line 36

def stream_response_handler(response)
  nil
end