Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8064443
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T11:21:57+00:00 2026-06-05T11:21:57+00:00

How do I do a POST control request to the Amazon cloudfront API? In

  • 0

How do I do a POST control request to the Amazon cloudfront API? In the docs it says:

Send a CloudFront control API request that is similar to the following example.

POST /2012-05-05/origin-access-identity/cloudfront HTTP/1.1
[Required headers]  

<?xml version="1.0" encoding="UTF-8"?>
<CloudFrontOriginAccessIdentityConfig xmlns="http://cloudfront.amazonaws.com/doc/2012-05-05/">
  <CallerReference>20120229090000</CallerReference>   
  <Comment>Your comments here</Comment>
</CloudFrontOriginAccessIdentityConfig>

I looked around for some information, and I am not sure how to do it. Is it something I can do via a Curl Request like here?

Any help very appreciated! I feel a little lost at the moment.

Many thanks!

Update

I do something like this now, still not working.. Any help?

<?php
$xml = 'POST /2012-05-05/origin-access-identity/cloudfront HTTP/1.1
Host: cloudfront.amazonaws.com
Authorization: [AWS authentication string]
Date: [time stamp]
[Other required headers]    

<?xml version="1.0" encoding="UTF-8"?>
<CloudFrontOriginAccessIdentityConfig xmlns="http://cloudfront.amazonaws.com/doc/2012-05-05/">
   <CallerReference>ref</CallerReference>
   <Comment>The comment.</Comment>
</CloudFrontOriginAccessIdentityConfig>
';

$opts = array(
    'http'=>array(
        'method'=>'POST',
        'header'=>"Content-Type: text/plain\r\n" .
            $auth."\r\n",
        'content'=>$xml
    )
);

$context = stream_context_create($opts);
$url = 'https://cloudfront.amazonaws.com/2012-05-05/origin-access-identity/cloudfront';
$fp = fopen($url, 'r', false, $context);
fpassthru($fp);
$response = stream_get_contents($fp);
print_r($response);
fclose($fp);
?>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T11:21:59+00:00Added an answer on June 5, 2026 at 11:21 am

    FireFox add-on Poster must help.
    https://addons.mozilla.org/en-US/firefox/addon/poster/
    Other similar tools:
    Are there Firefox extension (or any other browser) that allow to send arbitrary POST data to a webpage?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following headers set on the server response.addHeader(Access-Control-Allow-Origin, *); response.addHeader(Access-Control-Allow-Methods, GET, POST,
I have a method to construct a post request. That request may have x
While trying to send a POST request via xmlhttp.open(POST, url, true) (javascript) to the
The PayPal IPN Guide documentation says clearly Post the request to www.paypal.com or www.sandbox.paypal.com,
I am trying to send a post request through ajax to another domain and
I was trying to call eBay FindProducts API using AJAX ( post request) but
I'm not being able to obtain an edit token for MediaWiki: Request POST /w/api.php
I could just create a form and use that to do a POST request
I'm making a cross domain POST request. I added Access-Control-* headers to the web
As per title really I'm wanting to send a custom HTTP post request to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.