mardi 22 septembre 2015

REST Request CloudFront

Is it possible to call a REST request in the cloudfront url of my S3 bucket?

According to this article, CloudFront supports POST, PUT, DELETE, OPTIONS and PATCH. But I'm trying to create a request using the code below

Dim xhttp: Set xhttp = CreateObject("MSXML2.ServerXMLHTTP")
    xhttp.open "DELETE", "http://ift.tt/1LN7bjJ" & file_name, False
    xhttp.setRequestHeader "Content-Type", "text/xml"
    xhttp.setRequestHeader "Date", timeStamp 
    xhttp.setRequestHeader "Authorization", authorizationCode
    xhttp.send()

and I'm getting an error saying

This distribution is not configured to allow the HTTP request method that was used for this request. The distribution supports only cachable requests.

Any idea what's wrong with my request?

Aucun commentaire:

Enregistrer un commentaire