Class: ConfigureS3Website::HttpHelper

Inherits:
Object
  • Object
show all
Defined in:
lib/configure-s3-website/http_helper.rb

Class Method Summary collapse

Class Method Details

.call_cloudfront_api(path, method, body, config_source, headers = {}) ⇒ Object



3
4
5
6
7
8
9
10
11
12
13
14
15
16
# File 'lib/configure-s3-website/http_helper.rb', line 3

def self.call_cloudfront_api(path, method, body, config_source, headers = {})
  date = Time.now.utc.strftime("%a, %d %b %Y %H:%M:%S %Z")
  digest = create_cloudfront_digest(config_source, date)
  self.call_api(
    path,
    method,
    body,
    config_source,
    'cloudfront.amazonaws.com',
    digest,
    date,
    headers
  )
end