Amazon Kinesis Firehose
POST
CreateDeliveryStream
{{baseUrl}}/#X-Amz-Target=Firehose_20150804.CreateDeliveryStream
HEADERS
X-Amz-Target
BODY json
{
"DeliveryStreamName": "",
"DeliveryStreamType": "",
"KinesisStreamSourceConfiguration": "",
"DeliveryStreamEncryptionConfigurationInput": "",
"S3DestinationConfiguration": "",
"ExtendedS3DestinationConfiguration": "",
"RedshiftDestinationConfiguration": "",
"ElasticsearchDestinationConfiguration": "",
"AmazonopensearchserviceDestinationConfiguration": "",
"SplunkDestinationConfiguration": "",
"HttpEndpointDestinationConfiguration": "",
"Tags": "",
"AmazonOpenSearchServerlessDestinationConfiguration": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/#X-Amz-Target=Firehose_20150804.CreateDeliveryStream");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-amz-target: ");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"DeliveryStreamName\": \"\",\n \"DeliveryStreamType\": \"\",\n \"KinesisStreamSourceConfiguration\": \"\",\n \"DeliveryStreamEncryptionConfigurationInput\": \"\",\n \"S3DestinationConfiguration\": \"\",\n \"ExtendedS3DestinationConfiguration\": \"\",\n \"RedshiftDestinationConfiguration\": \"\",\n \"ElasticsearchDestinationConfiguration\": \"\",\n \"AmazonopensearchserviceDestinationConfiguration\": \"\",\n \"SplunkDestinationConfiguration\": \"\",\n \"HttpEndpointDestinationConfiguration\": \"\",\n \"Tags\": \"\",\n \"AmazonOpenSearchServerlessDestinationConfiguration\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/#X-Amz-Target=Firehose_20150804.CreateDeliveryStream" {:headers {:x-amz-target ""}
:content-type :json
:form-params {:DeliveryStreamName ""
:DeliveryStreamType ""
:KinesisStreamSourceConfiguration ""
:DeliveryStreamEncryptionConfigurationInput ""
:S3DestinationConfiguration ""
:ExtendedS3DestinationConfiguration ""
:RedshiftDestinationConfiguration ""
:ElasticsearchDestinationConfiguration ""
:AmazonopensearchserviceDestinationConfiguration ""
:SplunkDestinationConfiguration ""
:HttpEndpointDestinationConfiguration ""
:Tags ""
:AmazonOpenSearchServerlessDestinationConfiguration ""}})
require "http/client"
url = "{{baseUrl}}/#X-Amz-Target=Firehose_20150804.CreateDeliveryStream"
headers = HTTP::Headers{
"x-amz-target" => ""
"content-type" => "application/json"
}
reqBody = "{\n \"DeliveryStreamName\": \"\",\n \"DeliveryStreamType\": \"\",\n \"KinesisStreamSourceConfiguration\": \"\",\n \"DeliveryStreamEncryptionConfigurationInput\": \"\",\n \"S3DestinationConfiguration\": \"\",\n \"ExtendedS3DestinationConfiguration\": \"\",\n \"RedshiftDestinationConfiguration\": \"\",\n \"ElasticsearchDestinationConfiguration\": \"\",\n \"AmazonopensearchserviceDestinationConfiguration\": \"\",\n \"SplunkDestinationConfiguration\": \"\",\n \"HttpEndpointDestinationConfiguration\": \"\",\n \"Tags\": \"\",\n \"AmazonOpenSearchServerlessDestinationConfiguration\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/#X-Amz-Target=Firehose_20150804.CreateDeliveryStream"),
Headers =
{
{ "x-amz-target", "" },
},
Content = new StringContent("{\n \"DeliveryStreamName\": \"\",\n \"DeliveryStreamType\": \"\",\n \"KinesisStreamSourceConfiguration\": \"\",\n \"DeliveryStreamEncryptionConfigurationInput\": \"\",\n \"S3DestinationConfiguration\": \"\",\n \"ExtendedS3DestinationConfiguration\": \"\",\n \"RedshiftDestinationConfiguration\": \"\",\n \"ElasticsearchDestinationConfiguration\": \"\",\n \"AmazonopensearchserviceDestinationConfiguration\": \"\",\n \"SplunkDestinationConfiguration\": \"\",\n \"HttpEndpointDestinationConfiguration\": \"\",\n \"Tags\": \"\",\n \"AmazonOpenSearchServerlessDestinationConfiguration\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/#X-Amz-Target=Firehose_20150804.CreateDeliveryStream");
var request = new RestRequest("", Method.Post);
request.AddHeader("x-amz-target", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"DeliveryStreamName\": \"\",\n \"DeliveryStreamType\": \"\",\n \"KinesisStreamSourceConfiguration\": \"\",\n \"DeliveryStreamEncryptionConfigurationInput\": \"\",\n \"S3DestinationConfiguration\": \"\",\n \"ExtendedS3DestinationConfiguration\": \"\",\n \"RedshiftDestinationConfiguration\": \"\",\n \"ElasticsearchDestinationConfiguration\": \"\",\n \"AmazonopensearchserviceDestinationConfiguration\": \"\",\n \"SplunkDestinationConfiguration\": \"\",\n \"HttpEndpointDestinationConfiguration\": \"\",\n \"Tags\": \"\",\n \"AmazonOpenSearchServerlessDestinationConfiguration\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/#X-Amz-Target=Firehose_20150804.CreateDeliveryStream"
payload := strings.NewReader("{\n \"DeliveryStreamName\": \"\",\n \"DeliveryStreamType\": \"\",\n \"KinesisStreamSourceConfiguration\": \"\",\n \"DeliveryStreamEncryptionConfigurationInput\": \"\",\n \"S3DestinationConfiguration\": \"\",\n \"ExtendedS3DestinationConfiguration\": \"\",\n \"RedshiftDestinationConfiguration\": \"\",\n \"ElasticsearchDestinationConfiguration\": \"\",\n \"AmazonopensearchserviceDestinationConfiguration\": \"\",\n \"SplunkDestinationConfiguration\": \"\",\n \"HttpEndpointDestinationConfiguration\": \"\",\n \"Tags\": \"\",\n \"AmazonOpenSearchServerlessDestinationConfiguration\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-amz-target", "")
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/ HTTP/1.1
X-Amz-Target:
Content-Type: application/json
Host: example.com
Content-Length: 538
{
"DeliveryStreamName": "",
"DeliveryStreamType": "",
"KinesisStreamSourceConfiguration": "",
"DeliveryStreamEncryptionConfigurationInput": "",
"S3DestinationConfiguration": "",
"ExtendedS3DestinationConfiguration": "",
"RedshiftDestinationConfiguration": "",
"ElasticsearchDestinationConfiguration": "",
"AmazonopensearchserviceDestinationConfiguration": "",
"SplunkDestinationConfiguration": "",
"HttpEndpointDestinationConfiguration": "",
"Tags": "",
"AmazonOpenSearchServerlessDestinationConfiguration": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/#X-Amz-Target=Firehose_20150804.CreateDeliveryStream")
.setHeader("x-amz-target", "")
.setHeader("content-type", "application/json")
.setBody("{\n \"DeliveryStreamName\": \"\",\n \"DeliveryStreamType\": \"\",\n \"KinesisStreamSourceConfiguration\": \"\",\n \"DeliveryStreamEncryptionConfigurationInput\": \"\",\n \"S3DestinationConfiguration\": \"\",\n \"ExtendedS3DestinationConfiguration\": \"\",\n \"RedshiftDestinationConfiguration\": \"\",\n \"ElasticsearchDestinationConfiguration\": \"\",\n \"AmazonopensearchserviceDestinationConfiguration\": \"\",\n \"SplunkDestinationConfiguration\": \"\",\n \"HttpEndpointDestinationConfiguration\": \"\",\n \"Tags\": \"\",\n \"AmazonOpenSearchServerlessDestinationConfiguration\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/#X-Amz-Target=Firehose_20150804.CreateDeliveryStream"))
.header("x-amz-target", "")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"DeliveryStreamName\": \"\",\n \"DeliveryStreamType\": \"\",\n \"KinesisStreamSourceConfiguration\": \"\",\n \"DeliveryStreamEncryptionConfigurationInput\": \"\",\n \"S3DestinationConfiguration\": \"\",\n \"ExtendedS3DestinationConfiguration\": \"\",\n \"RedshiftDestinationConfiguration\": \"\",\n \"ElasticsearchDestinationConfiguration\": \"\",\n \"AmazonopensearchserviceDestinationConfiguration\": \"\",\n \"SplunkDestinationConfiguration\": \"\",\n \"HttpEndpointDestinationConfiguration\": \"\",\n \"Tags\": \"\",\n \"AmazonOpenSearchServerlessDestinationConfiguration\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"DeliveryStreamName\": \"\",\n \"DeliveryStreamType\": \"\",\n \"KinesisStreamSourceConfiguration\": \"\",\n \"DeliveryStreamEncryptionConfigurationInput\": \"\",\n \"S3DestinationConfiguration\": \"\",\n \"ExtendedS3DestinationConfiguration\": \"\",\n \"RedshiftDestinationConfiguration\": \"\",\n \"ElasticsearchDestinationConfiguration\": \"\",\n \"AmazonopensearchserviceDestinationConfiguration\": \"\",\n \"SplunkDestinationConfiguration\": \"\",\n \"HttpEndpointDestinationConfiguration\": \"\",\n \"Tags\": \"\",\n \"AmazonOpenSearchServerlessDestinationConfiguration\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=Firehose_20150804.CreateDeliveryStream")
.post(body)
.addHeader("x-amz-target", "")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/#X-Amz-Target=Firehose_20150804.CreateDeliveryStream")
.header("x-amz-target", "")
.header("content-type", "application/json")
.body("{\n \"DeliveryStreamName\": \"\",\n \"DeliveryStreamType\": \"\",\n \"KinesisStreamSourceConfiguration\": \"\",\n \"DeliveryStreamEncryptionConfigurationInput\": \"\",\n \"S3DestinationConfiguration\": \"\",\n \"ExtendedS3DestinationConfiguration\": \"\",\n \"RedshiftDestinationConfiguration\": \"\",\n \"ElasticsearchDestinationConfiguration\": \"\",\n \"AmazonopensearchserviceDestinationConfiguration\": \"\",\n \"SplunkDestinationConfiguration\": \"\",\n \"HttpEndpointDestinationConfiguration\": \"\",\n \"Tags\": \"\",\n \"AmazonOpenSearchServerlessDestinationConfiguration\": \"\"\n}")
.asString();
const data = JSON.stringify({
DeliveryStreamName: '',
DeliveryStreamType: '',
KinesisStreamSourceConfiguration: '',
DeliveryStreamEncryptionConfigurationInput: '',
S3DestinationConfiguration: '',
ExtendedS3DestinationConfiguration: '',
RedshiftDestinationConfiguration: '',
ElasticsearchDestinationConfiguration: '',
AmazonopensearchserviceDestinationConfiguration: '',
SplunkDestinationConfiguration: '',
HttpEndpointDestinationConfiguration: '',
Tags: '',
AmazonOpenSearchServerlessDestinationConfiguration: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/#X-Amz-Target=Firehose_20150804.CreateDeliveryStream');
xhr.setRequestHeader('x-amz-target', '');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=Firehose_20150804.CreateDeliveryStream',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {
DeliveryStreamName: '',
DeliveryStreamType: '',
KinesisStreamSourceConfiguration: '',
DeliveryStreamEncryptionConfigurationInput: '',
S3DestinationConfiguration: '',
ExtendedS3DestinationConfiguration: '',
RedshiftDestinationConfiguration: '',
ElasticsearchDestinationConfiguration: '',
AmazonopensearchserviceDestinationConfiguration: '',
SplunkDestinationConfiguration: '',
HttpEndpointDestinationConfiguration: '',
Tags: '',
AmazonOpenSearchServerlessDestinationConfiguration: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/#X-Amz-Target=Firehose_20150804.CreateDeliveryStream';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"DeliveryStreamName":"","DeliveryStreamType":"","KinesisStreamSourceConfiguration":"","DeliveryStreamEncryptionConfigurationInput":"","S3DestinationConfiguration":"","ExtendedS3DestinationConfiguration":"","RedshiftDestinationConfiguration":"","ElasticsearchDestinationConfiguration":"","AmazonopensearchserviceDestinationConfiguration":"","SplunkDestinationConfiguration":"","HttpEndpointDestinationConfiguration":"","Tags":"","AmazonOpenSearchServerlessDestinationConfiguration":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/#X-Amz-Target=Firehose_20150804.CreateDeliveryStream',
method: 'POST',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
},
processData: false,
data: '{\n "DeliveryStreamName": "",\n "DeliveryStreamType": "",\n "KinesisStreamSourceConfiguration": "",\n "DeliveryStreamEncryptionConfigurationInput": "",\n "S3DestinationConfiguration": "",\n "ExtendedS3DestinationConfiguration": "",\n "RedshiftDestinationConfiguration": "",\n "ElasticsearchDestinationConfiguration": "",\n "AmazonopensearchserviceDestinationConfiguration": "",\n "SplunkDestinationConfiguration": "",\n "HttpEndpointDestinationConfiguration": "",\n "Tags": "",\n "AmazonOpenSearchServerlessDestinationConfiguration": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"DeliveryStreamName\": \"\",\n \"DeliveryStreamType\": \"\",\n \"KinesisStreamSourceConfiguration\": \"\",\n \"DeliveryStreamEncryptionConfigurationInput\": \"\",\n \"S3DestinationConfiguration\": \"\",\n \"ExtendedS3DestinationConfiguration\": \"\",\n \"RedshiftDestinationConfiguration\": \"\",\n \"ElasticsearchDestinationConfiguration\": \"\",\n \"AmazonopensearchserviceDestinationConfiguration\": \"\",\n \"SplunkDestinationConfiguration\": \"\",\n \"HttpEndpointDestinationConfiguration\": \"\",\n \"Tags\": \"\",\n \"AmazonOpenSearchServerlessDestinationConfiguration\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=Firehose_20150804.CreateDeliveryStream")
.post(body)
.addHeader("x-amz-target", "")
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
DeliveryStreamName: '',
DeliveryStreamType: '',
KinesisStreamSourceConfiguration: '',
DeliveryStreamEncryptionConfigurationInput: '',
S3DestinationConfiguration: '',
ExtendedS3DestinationConfiguration: '',
RedshiftDestinationConfiguration: '',
ElasticsearchDestinationConfiguration: '',
AmazonopensearchserviceDestinationConfiguration: '',
SplunkDestinationConfiguration: '',
HttpEndpointDestinationConfiguration: '',
Tags: '',
AmazonOpenSearchServerlessDestinationConfiguration: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=Firehose_20150804.CreateDeliveryStream',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: {
DeliveryStreamName: '',
DeliveryStreamType: '',
KinesisStreamSourceConfiguration: '',
DeliveryStreamEncryptionConfigurationInput: '',
S3DestinationConfiguration: '',
ExtendedS3DestinationConfiguration: '',
RedshiftDestinationConfiguration: '',
ElasticsearchDestinationConfiguration: '',
AmazonopensearchserviceDestinationConfiguration: '',
SplunkDestinationConfiguration: '',
HttpEndpointDestinationConfiguration: '',
Tags: '',
AmazonOpenSearchServerlessDestinationConfiguration: ''
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/#X-Amz-Target=Firehose_20150804.CreateDeliveryStream');
req.headers({
'x-amz-target': '',
'content-type': 'application/json'
});
req.type('json');
req.send({
DeliveryStreamName: '',
DeliveryStreamType: '',
KinesisStreamSourceConfiguration: '',
DeliveryStreamEncryptionConfigurationInput: '',
S3DestinationConfiguration: '',
ExtendedS3DestinationConfiguration: '',
RedshiftDestinationConfiguration: '',
ElasticsearchDestinationConfiguration: '',
AmazonopensearchserviceDestinationConfiguration: '',
SplunkDestinationConfiguration: '',
HttpEndpointDestinationConfiguration: '',
Tags: '',
AmazonOpenSearchServerlessDestinationConfiguration: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=Firehose_20150804.CreateDeliveryStream',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {
DeliveryStreamName: '',
DeliveryStreamType: '',
KinesisStreamSourceConfiguration: '',
DeliveryStreamEncryptionConfigurationInput: '',
S3DestinationConfiguration: '',
ExtendedS3DestinationConfiguration: '',
RedshiftDestinationConfiguration: '',
ElasticsearchDestinationConfiguration: '',
AmazonopensearchserviceDestinationConfiguration: '',
SplunkDestinationConfiguration: '',
HttpEndpointDestinationConfiguration: '',
Tags: '',
AmazonOpenSearchServerlessDestinationConfiguration: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/#X-Amz-Target=Firehose_20150804.CreateDeliveryStream';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"DeliveryStreamName":"","DeliveryStreamType":"","KinesisStreamSourceConfiguration":"","DeliveryStreamEncryptionConfigurationInput":"","S3DestinationConfiguration":"","ExtendedS3DestinationConfiguration":"","RedshiftDestinationConfiguration":"","ElasticsearchDestinationConfiguration":"","AmazonopensearchserviceDestinationConfiguration":"","SplunkDestinationConfiguration":"","HttpEndpointDestinationConfiguration":"","Tags":"","AmazonOpenSearchServerlessDestinationConfiguration":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"x-amz-target": @"",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"DeliveryStreamName": @"",
@"DeliveryStreamType": @"",
@"KinesisStreamSourceConfiguration": @"",
@"DeliveryStreamEncryptionConfigurationInput": @"",
@"S3DestinationConfiguration": @"",
@"ExtendedS3DestinationConfiguration": @"",
@"RedshiftDestinationConfiguration": @"",
@"ElasticsearchDestinationConfiguration": @"",
@"AmazonopensearchserviceDestinationConfiguration": @"",
@"SplunkDestinationConfiguration": @"",
@"HttpEndpointDestinationConfiguration": @"",
@"Tags": @"",
@"AmazonOpenSearchServerlessDestinationConfiguration": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/#X-Amz-Target=Firehose_20150804.CreateDeliveryStream"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/#X-Amz-Target=Firehose_20150804.CreateDeliveryStream" in
let headers = Header.add_list (Header.init ()) [
("x-amz-target", "");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"DeliveryStreamName\": \"\",\n \"DeliveryStreamType\": \"\",\n \"KinesisStreamSourceConfiguration\": \"\",\n \"DeliveryStreamEncryptionConfigurationInput\": \"\",\n \"S3DestinationConfiguration\": \"\",\n \"ExtendedS3DestinationConfiguration\": \"\",\n \"RedshiftDestinationConfiguration\": \"\",\n \"ElasticsearchDestinationConfiguration\": \"\",\n \"AmazonopensearchserviceDestinationConfiguration\": \"\",\n \"SplunkDestinationConfiguration\": \"\",\n \"HttpEndpointDestinationConfiguration\": \"\",\n \"Tags\": \"\",\n \"AmazonOpenSearchServerlessDestinationConfiguration\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/#X-Amz-Target=Firehose_20150804.CreateDeliveryStream",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'DeliveryStreamName' => '',
'DeliveryStreamType' => '',
'KinesisStreamSourceConfiguration' => '',
'DeliveryStreamEncryptionConfigurationInput' => '',
'S3DestinationConfiguration' => '',
'ExtendedS3DestinationConfiguration' => '',
'RedshiftDestinationConfiguration' => '',
'ElasticsearchDestinationConfiguration' => '',
'AmazonopensearchserviceDestinationConfiguration' => '',
'SplunkDestinationConfiguration' => '',
'HttpEndpointDestinationConfiguration' => '',
'Tags' => '',
'AmazonOpenSearchServerlessDestinationConfiguration' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json",
"x-amz-target: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/#X-Amz-Target=Firehose_20150804.CreateDeliveryStream', [
'body' => '{
"DeliveryStreamName": "",
"DeliveryStreamType": "",
"KinesisStreamSourceConfiguration": "",
"DeliveryStreamEncryptionConfigurationInput": "",
"S3DestinationConfiguration": "",
"ExtendedS3DestinationConfiguration": "",
"RedshiftDestinationConfiguration": "",
"ElasticsearchDestinationConfiguration": "",
"AmazonopensearchserviceDestinationConfiguration": "",
"SplunkDestinationConfiguration": "",
"HttpEndpointDestinationConfiguration": "",
"Tags": "",
"AmazonOpenSearchServerlessDestinationConfiguration": ""
}',
'headers' => [
'content-type' => 'application/json',
'x-amz-target' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/#X-Amz-Target=Firehose_20150804.CreateDeliveryStream');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'DeliveryStreamName' => '',
'DeliveryStreamType' => '',
'KinesisStreamSourceConfiguration' => '',
'DeliveryStreamEncryptionConfigurationInput' => '',
'S3DestinationConfiguration' => '',
'ExtendedS3DestinationConfiguration' => '',
'RedshiftDestinationConfiguration' => '',
'ElasticsearchDestinationConfiguration' => '',
'AmazonopensearchserviceDestinationConfiguration' => '',
'SplunkDestinationConfiguration' => '',
'HttpEndpointDestinationConfiguration' => '',
'Tags' => '',
'AmazonOpenSearchServerlessDestinationConfiguration' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'DeliveryStreamName' => '',
'DeliveryStreamType' => '',
'KinesisStreamSourceConfiguration' => '',
'DeliveryStreamEncryptionConfigurationInput' => '',
'S3DestinationConfiguration' => '',
'ExtendedS3DestinationConfiguration' => '',
'RedshiftDestinationConfiguration' => '',
'ElasticsearchDestinationConfiguration' => '',
'AmazonopensearchserviceDestinationConfiguration' => '',
'SplunkDestinationConfiguration' => '',
'HttpEndpointDestinationConfiguration' => '',
'Tags' => '',
'AmazonOpenSearchServerlessDestinationConfiguration' => ''
]));
$request->setRequestUrl('{{baseUrl}}/#X-Amz-Target=Firehose_20150804.CreateDeliveryStream');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/#X-Amz-Target=Firehose_20150804.CreateDeliveryStream' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"DeliveryStreamName": "",
"DeliveryStreamType": "",
"KinesisStreamSourceConfiguration": "",
"DeliveryStreamEncryptionConfigurationInput": "",
"S3DestinationConfiguration": "",
"ExtendedS3DestinationConfiguration": "",
"RedshiftDestinationConfiguration": "",
"ElasticsearchDestinationConfiguration": "",
"AmazonopensearchserviceDestinationConfiguration": "",
"SplunkDestinationConfiguration": "",
"HttpEndpointDestinationConfiguration": "",
"Tags": "",
"AmazonOpenSearchServerlessDestinationConfiguration": ""
}'
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/#X-Amz-Target=Firehose_20150804.CreateDeliveryStream' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"DeliveryStreamName": "",
"DeliveryStreamType": "",
"KinesisStreamSourceConfiguration": "",
"DeliveryStreamEncryptionConfigurationInput": "",
"S3DestinationConfiguration": "",
"ExtendedS3DestinationConfiguration": "",
"RedshiftDestinationConfiguration": "",
"ElasticsearchDestinationConfiguration": "",
"AmazonopensearchserviceDestinationConfiguration": "",
"SplunkDestinationConfiguration": "",
"HttpEndpointDestinationConfiguration": "",
"Tags": "",
"AmazonOpenSearchServerlessDestinationConfiguration": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"DeliveryStreamName\": \"\",\n \"DeliveryStreamType\": \"\",\n \"KinesisStreamSourceConfiguration\": \"\",\n \"DeliveryStreamEncryptionConfigurationInput\": \"\",\n \"S3DestinationConfiguration\": \"\",\n \"ExtendedS3DestinationConfiguration\": \"\",\n \"RedshiftDestinationConfiguration\": \"\",\n \"ElasticsearchDestinationConfiguration\": \"\",\n \"AmazonopensearchserviceDestinationConfiguration\": \"\",\n \"SplunkDestinationConfiguration\": \"\",\n \"HttpEndpointDestinationConfiguration\": \"\",\n \"Tags\": \"\",\n \"AmazonOpenSearchServerlessDestinationConfiguration\": \"\"\n}"
headers = {
'x-amz-target': "",
'content-type': "application/json"
}
conn.request("POST", "/baseUrl/", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/#X-Amz-Target=Firehose_20150804.CreateDeliveryStream"
payload = {
"DeliveryStreamName": "",
"DeliveryStreamType": "",
"KinesisStreamSourceConfiguration": "",
"DeliveryStreamEncryptionConfigurationInput": "",
"S3DestinationConfiguration": "",
"ExtendedS3DestinationConfiguration": "",
"RedshiftDestinationConfiguration": "",
"ElasticsearchDestinationConfiguration": "",
"AmazonopensearchserviceDestinationConfiguration": "",
"SplunkDestinationConfiguration": "",
"HttpEndpointDestinationConfiguration": "",
"Tags": "",
"AmazonOpenSearchServerlessDestinationConfiguration": ""
}
headers = {
"x-amz-target": "",
"content-type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/#X-Amz-Target=Firehose_20150804.CreateDeliveryStream"
payload <- "{\n \"DeliveryStreamName\": \"\",\n \"DeliveryStreamType\": \"\",\n \"KinesisStreamSourceConfiguration\": \"\",\n \"DeliveryStreamEncryptionConfigurationInput\": \"\",\n \"S3DestinationConfiguration\": \"\",\n \"ExtendedS3DestinationConfiguration\": \"\",\n \"RedshiftDestinationConfiguration\": \"\",\n \"ElasticsearchDestinationConfiguration\": \"\",\n \"AmazonopensearchserviceDestinationConfiguration\": \"\",\n \"SplunkDestinationConfiguration\": \"\",\n \"HttpEndpointDestinationConfiguration\": \"\",\n \"Tags\": \"\",\n \"AmazonOpenSearchServerlessDestinationConfiguration\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, add_headers('x-amz-target' = ''), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/#X-Amz-Target=Firehose_20150804.CreateDeliveryStream")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-amz-target"] = ''
request["content-type"] = 'application/json'
request.body = "{\n \"DeliveryStreamName\": \"\",\n \"DeliveryStreamType\": \"\",\n \"KinesisStreamSourceConfiguration\": \"\",\n \"DeliveryStreamEncryptionConfigurationInput\": \"\",\n \"S3DestinationConfiguration\": \"\",\n \"ExtendedS3DestinationConfiguration\": \"\",\n \"RedshiftDestinationConfiguration\": \"\",\n \"ElasticsearchDestinationConfiguration\": \"\",\n \"AmazonopensearchserviceDestinationConfiguration\": \"\",\n \"SplunkDestinationConfiguration\": \"\",\n \"HttpEndpointDestinationConfiguration\": \"\",\n \"Tags\": \"\",\n \"AmazonOpenSearchServerlessDestinationConfiguration\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/') do |req|
req.headers['x-amz-target'] = ''
req.body = "{\n \"DeliveryStreamName\": \"\",\n \"DeliveryStreamType\": \"\",\n \"KinesisStreamSourceConfiguration\": \"\",\n \"DeliveryStreamEncryptionConfigurationInput\": \"\",\n \"S3DestinationConfiguration\": \"\",\n \"ExtendedS3DestinationConfiguration\": \"\",\n \"RedshiftDestinationConfiguration\": \"\",\n \"ElasticsearchDestinationConfiguration\": \"\",\n \"AmazonopensearchserviceDestinationConfiguration\": \"\",\n \"SplunkDestinationConfiguration\": \"\",\n \"HttpEndpointDestinationConfiguration\": \"\",\n \"Tags\": \"\",\n \"AmazonOpenSearchServerlessDestinationConfiguration\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/#X-Amz-Target=Firehose_20150804.CreateDeliveryStream";
let payload = json!({
"DeliveryStreamName": "",
"DeliveryStreamType": "",
"KinesisStreamSourceConfiguration": "",
"DeliveryStreamEncryptionConfigurationInput": "",
"S3DestinationConfiguration": "",
"ExtendedS3DestinationConfiguration": "",
"RedshiftDestinationConfiguration": "",
"ElasticsearchDestinationConfiguration": "",
"AmazonopensearchserviceDestinationConfiguration": "",
"SplunkDestinationConfiguration": "",
"HttpEndpointDestinationConfiguration": "",
"Tags": "",
"AmazonOpenSearchServerlessDestinationConfiguration": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("x-amz-target", "".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url '{{baseUrl}}/#X-Amz-Target=Firehose_20150804.CreateDeliveryStream' \
--header 'content-type: application/json' \
--header 'x-amz-target: ' \
--data '{
"DeliveryStreamName": "",
"DeliveryStreamType": "",
"KinesisStreamSourceConfiguration": "",
"DeliveryStreamEncryptionConfigurationInput": "",
"S3DestinationConfiguration": "",
"ExtendedS3DestinationConfiguration": "",
"RedshiftDestinationConfiguration": "",
"ElasticsearchDestinationConfiguration": "",
"AmazonopensearchserviceDestinationConfiguration": "",
"SplunkDestinationConfiguration": "",
"HttpEndpointDestinationConfiguration": "",
"Tags": "",
"AmazonOpenSearchServerlessDestinationConfiguration": ""
}'
echo '{
"DeliveryStreamName": "",
"DeliveryStreamType": "",
"KinesisStreamSourceConfiguration": "",
"DeliveryStreamEncryptionConfigurationInput": "",
"S3DestinationConfiguration": "",
"ExtendedS3DestinationConfiguration": "",
"RedshiftDestinationConfiguration": "",
"ElasticsearchDestinationConfiguration": "",
"AmazonopensearchserviceDestinationConfiguration": "",
"SplunkDestinationConfiguration": "",
"HttpEndpointDestinationConfiguration": "",
"Tags": "",
"AmazonOpenSearchServerlessDestinationConfiguration": ""
}' | \
http POST '{{baseUrl}}/#X-Amz-Target=Firehose_20150804.CreateDeliveryStream' \
content-type:application/json \
x-amz-target:''
wget --quiet \
--method POST \
--header 'x-amz-target: ' \
--header 'content-type: application/json' \
--body-data '{\n "DeliveryStreamName": "",\n "DeliveryStreamType": "",\n "KinesisStreamSourceConfiguration": "",\n "DeliveryStreamEncryptionConfigurationInput": "",\n "S3DestinationConfiguration": "",\n "ExtendedS3DestinationConfiguration": "",\n "RedshiftDestinationConfiguration": "",\n "ElasticsearchDestinationConfiguration": "",\n "AmazonopensearchserviceDestinationConfiguration": "",\n "SplunkDestinationConfiguration": "",\n "HttpEndpointDestinationConfiguration": "",\n "Tags": "",\n "AmazonOpenSearchServerlessDestinationConfiguration": ""\n}' \
--output-document \
- '{{baseUrl}}/#X-Amz-Target=Firehose_20150804.CreateDeliveryStream'
import Foundation
let headers = [
"x-amz-target": "",
"content-type": "application/json"
]
let parameters = [
"DeliveryStreamName": "",
"DeliveryStreamType": "",
"KinesisStreamSourceConfiguration": "",
"DeliveryStreamEncryptionConfigurationInput": "",
"S3DestinationConfiguration": "",
"ExtendedS3DestinationConfiguration": "",
"RedshiftDestinationConfiguration": "",
"ElasticsearchDestinationConfiguration": "",
"AmazonopensearchserviceDestinationConfiguration": "",
"SplunkDestinationConfiguration": "",
"HttpEndpointDestinationConfiguration": "",
"Tags": "",
"AmazonOpenSearchServerlessDestinationConfiguration": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/#X-Amz-Target=Firehose_20150804.CreateDeliveryStream")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
DeleteDeliveryStream
{{baseUrl}}/#X-Amz-Target=Firehose_20150804.DeleteDeliveryStream
HEADERS
X-Amz-Target
BODY json
{
"DeliveryStreamName": "",
"AllowForceDelete": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/#X-Amz-Target=Firehose_20150804.DeleteDeliveryStream");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-amz-target: ");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"DeliveryStreamName\": \"\",\n \"AllowForceDelete\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/#X-Amz-Target=Firehose_20150804.DeleteDeliveryStream" {:headers {:x-amz-target ""}
:content-type :json
:form-params {:DeliveryStreamName ""
:AllowForceDelete ""}})
require "http/client"
url = "{{baseUrl}}/#X-Amz-Target=Firehose_20150804.DeleteDeliveryStream"
headers = HTTP::Headers{
"x-amz-target" => ""
"content-type" => "application/json"
}
reqBody = "{\n \"DeliveryStreamName\": \"\",\n \"AllowForceDelete\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/#X-Amz-Target=Firehose_20150804.DeleteDeliveryStream"),
Headers =
{
{ "x-amz-target", "" },
},
Content = new StringContent("{\n \"DeliveryStreamName\": \"\",\n \"AllowForceDelete\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/#X-Amz-Target=Firehose_20150804.DeleteDeliveryStream");
var request = new RestRequest("", Method.Post);
request.AddHeader("x-amz-target", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"DeliveryStreamName\": \"\",\n \"AllowForceDelete\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/#X-Amz-Target=Firehose_20150804.DeleteDeliveryStream"
payload := strings.NewReader("{\n \"DeliveryStreamName\": \"\",\n \"AllowForceDelete\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-amz-target", "")
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/ HTTP/1.1
X-Amz-Target:
Content-Type: application/json
Host: example.com
Content-Length: 56
{
"DeliveryStreamName": "",
"AllowForceDelete": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/#X-Amz-Target=Firehose_20150804.DeleteDeliveryStream")
.setHeader("x-amz-target", "")
.setHeader("content-type", "application/json")
.setBody("{\n \"DeliveryStreamName\": \"\",\n \"AllowForceDelete\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/#X-Amz-Target=Firehose_20150804.DeleteDeliveryStream"))
.header("x-amz-target", "")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"DeliveryStreamName\": \"\",\n \"AllowForceDelete\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"DeliveryStreamName\": \"\",\n \"AllowForceDelete\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=Firehose_20150804.DeleteDeliveryStream")
.post(body)
.addHeader("x-amz-target", "")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/#X-Amz-Target=Firehose_20150804.DeleteDeliveryStream")
.header("x-amz-target", "")
.header("content-type", "application/json")
.body("{\n \"DeliveryStreamName\": \"\",\n \"AllowForceDelete\": \"\"\n}")
.asString();
const data = JSON.stringify({
DeliveryStreamName: '',
AllowForceDelete: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/#X-Amz-Target=Firehose_20150804.DeleteDeliveryStream');
xhr.setRequestHeader('x-amz-target', '');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=Firehose_20150804.DeleteDeliveryStream',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {DeliveryStreamName: '', AllowForceDelete: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/#X-Amz-Target=Firehose_20150804.DeleteDeliveryStream';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"DeliveryStreamName":"","AllowForceDelete":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/#X-Amz-Target=Firehose_20150804.DeleteDeliveryStream',
method: 'POST',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
},
processData: false,
data: '{\n "DeliveryStreamName": "",\n "AllowForceDelete": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"DeliveryStreamName\": \"\",\n \"AllowForceDelete\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=Firehose_20150804.DeleteDeliveryStream")
.post(body)
.addHeader("x-amz-target", "")
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({DeliveryStreamName: '', AllowForceDelete: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=Firehose_20150804.DeleteDeliveryStream',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: {DeliveryStreamName: '', AllowForceDelete: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/#X-Amz-Target=Firehose_20150804.DeleteDeliveryStream');
req.headers({
'x-amz-target': '',
'content-type': 'application/json'
});
req.type('json');
req.send({
DeliveryStreamName: '',
AllowForceDelete: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=Firehose_20150804.DeleteDeliveryStream',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {DeliveryStreamName: '', AllowForceDelete: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/#X-Amz-Target=Firehose_20150804.DeleteDeliveryStream';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"DeliveryStreamName":"","AllowForceDelete":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"x-amz-target": @"",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"DeliveryStreamName": @"",
@"AllowForceDelete": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/#X-Amz-Target=Firehose_20150804.DeleteDeliveryStream"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/#X-Amz-Target=Firehose_20150804.DeleteDeliveryStream" in
let headers = Header.add_list (Header.init ()) [
("x-amz-target", "");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"DeliveryStreamName\": \"\",\n \"AllowForceDelete\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/#X-Amz-Target=Firehose_20150804.DeleteDeliveryStream",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'DeliveryStreamName' => '',
'AllowForceDelete' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json",
"x-amz-target: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/#X-Amz-Target=Firehose_20150804.DeleteDeliveryStream', [
'body' => '{
"DeliveryStreamName": "",
"AllowForceDelete": ""
}',
'headers' => [
'content-type' => 'application/json',
'x-amz-target' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/#X-Amz-Target=Firehose_20150804.DeleteDeliveryStream');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'DeliveryStreamName' => '',
'AllowForceDelete' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'DeliveryStreamName' => '',
'AllowForceDelete' => ''
]));
$request->setRequestUrl('{{baseUrl}}/#X-Amz-Target=Firehose_20150804.DeleteDeliveryStream');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/#X-Amz-Target=Firehose_20150804.DeleteDeliveryStream' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"DeliveryStreamName": "",
"AllowForceDelete": ""
}'
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/#X-Amz-Target=Firehose_20150804.DeleteDeliveryStream' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"DeliveryStreamName": "",
"AllowForceDelete": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"DeliveryStreamName\": \"\",\n \"AllowForceDelete\": \"\"\n}"
headers = {
'x-amz-target': "",
'content-type': "application/json"
}
conn.request("POST", "/baseUrl/", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/#X-Amz-Target=Firehose_20150804.DeleteDeliveryStream"
payload = {
"DeliveryStreamName": "",
"AllowForceDelete": ""
}
headers = {
"x-amz-target": "",
"content-type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/#X-Amz-Target=Firehose_20150804.DeleteDeliveryStream"
payload <- "{\n \"DeliveryStreamName\": \"\",\n \"AllowForceDelete\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, add_headers('x-amz-target' = ''), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/#X-Amz-Target=Firehose_20150804.DeleteDeliveryStream")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-amz-target"] = ''
request["content-type"] = 'application/json'
request.body = "{\n \"DeliveryStreamName\": \"\",\n \"AllowForceDelete\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/') do |req|
req.headers['x-amz-target'] = ''
req.body = "{\n \"DeliveryStreamName\": \"\",\n \"AllowForceDelete\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/#X-Amz-Target=Firehose_20150804.DeleteDeliveryStream";
let payload = json!({
"DeliveryStreamName": "",
"AllowForceDelete": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("x-amz-target", "".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url '{{baseUrl}}/#X-Amz-Target=Firehose_20150804.DeleteDeliveryStream' \
--header 'content-type: application/json' \
--header 'x-amz-target: ' \
--data '{
"DeliveryStreamName": "",
"AllowForceDelete": ""
}'
echo '{
"DeliveryStreamName": "",
"AllowForceDelete": ""
}' | \
http POST '{{baseUrl}}/#X-Amz-Target=Firehose_20150804.DeleteDeliveryStream' \
content-type:application/json \
x-amz-target:''
wget --quiet \
--method POST \
--header 'x-amz-target: ' \
--header 'content-type: application/json' \
--body-data '{\n "DeliveryStreamName": "",\n "AllowForceDelete": ""\n}' \
--output-document \
- '{{baseUrl}}/#X-Amz-Target=Firehose_20150804.DeleteDeliveryStream'
import Foundation
let headers = [
"x-amz-target": "",
"content-type": "application/json"
]
let parameters = [
"DeliveryStreamName": "",
"AllowForceDelete": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/#X-Amz-Target=Firehose_20150804.DeleteDeliveryStream")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
DescribeDeliveryStream
{{baseUrl}}/#X-Amz-Target=Firehose_20150804.DescribeDeliveryStream
HEADERS
X-Amz-Target
BODY json
{
"DeliveryStreamName": "",
"Limit": "",
"ExclusiveStartDestinationId": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/#X-Amz-Target=Firehose_20150804.DescribeDeliveryStream");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-amz-target: ");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"DeliveryStreamName\": \"\",\n \"Limit\": \"\",\n \"ExclusiveStartDestinationId\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/#X-Amz-Target=Firehose_20150804.DescribeDeliveryStream" {:headers {:x-amz-target ""}
:content-type :json
:form-params {:DeliveryStreamName ""
:Limit ""
:ExclusiveStartDestinationId ""}})
require "http/client"
url = "{{baseUrl}}/#X-Amz-Target=Firehose_20150804.DescribeDeliveryStream"
headers = HTTP::Headers{
"x-amz-target" => ""
"content-type" => "application/json"
}
reqBody = "{\n \"DeliveryStreamName\": \"\",\n \"Limit\": \"\",\n \"ExclusiveStartDestinationId\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/#X-Amz-Target=Firehose_20150804.DescribeDeliveryStream"),
Headers =
{
{ "x-amz-target", "" },
},
Content = new StringContent("{\n \"DeliveryStreamName\": \"\",\n \"Limit\": \"\",\n \"ExclusiveStartDestinationId\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/#X-Amz-Target=Firehose_20150804.DescribeDeliveryStream");
var request = new RestRequest("", Method.Post);
request.AddHeader("x-amz-target", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"DeliveryStreamName\": \"\",\n \"Limit\": \"\",\n \"ExclusiveStartDestinationId\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/#X-Amz-Target=Firehose_20150804.DescribeDeliveryStream"
payload := strings.NewReader("{\n \"DeliveryStreamName\": \"\",\n \"Limit\": \"\",\n \"ExclusiveStartDestinationId\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-amz-target", "")
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/ HTTP/1.1
X-Amz-Target:
Content-Type: application/json
Host: example.com
Content-Length: 82
{
"DeliveryStreamName": "",
"Limit": "",
"ExclusiveStartDestinationId": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/#X-Amz-Target=Firehose_20150804.DescribeDeliveryStream")
.setHeader("x-amz-target", "")
.setHeader("content-type", "application/json")
.setBody("{\n \"DeliveryStreamName\": \"\",\n \"Limit\": \"\",\n \"ExclusiveStartDestinationId\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/#X-Amz-Target=Firehose_20150804.DescribeDeliveryStream"))
.header("x-amz-target", "")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"DeliveryStreamName\": \"\",\n \"Limit\": \"\",\n \"ExclusiveStartDestinationId\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"DeliveryStreamName\": \"\",\n \"Limit\": \"\",\n \"ExclusiveStartDestinationId\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=Firehose_20150804.DescribeDeliveryStream")
.post(body)
.addHeader("x-amz-target", "")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/#X-Amz-Target=Firehose_20150804.DescribeDeliveryStream")
.header("x-amz-target", "")
.header("content-type", "application/json")
.body("{\n \"DeliveryStreamName\": \"\",\n \"Limit\": \"\",\n \"ExclusiveStartDestinationId\": \"\"\n}")
.asString();
const data = JSON.stringify({
DeliveryStreamName: '',
Limit: '',
ExclusiveStartDestinationId: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/#X-Amz-Target=Firehose_20150804.DescribeDeliveryStream');
xhr.setRequestHeader('x-amz-target', '');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=Firehose_20150804.DescribeDeliveryStream',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {DeliveryStreamName: '', Limit: '', ExclusiveStartDestinationId: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/#X-Amz-Target=Firehose_20150804.DescribeDeliveryStream';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"DeliveryStreamName":"","Limit":"","ExclusiveStartDestinationId":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/#X-Amz-Target=Firehose_20150804.DescribeDeliveryStream',
method: 'POST',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
},
processData: false,
data: '{\n "DeliveryStreamName": "",\n "Limit": "",\n "ExclusiveStartDestinationId": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"DeliveryStreamName\": \"\",\n \"Limit\": \"\",\n \"ExclusiveStartDestinationId\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=Firehose_20150804.DescribeDeliveryStream")
.post(body)
.addHeader("x-amz-target", "")
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({DeliveryStreamName: '', Limit: '', ExclusiveStartDestinationId: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=Firehose_20150804.DescribeDeliveryStream',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: {DeliveryStreamName: '', Limit: '', ExclusiveStartDestinationId: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/#X-Amz-Target=Firehose_20150804.DescribeDeliveryStream');
req.headers({
'x-amz-target': '',
'content-type': 'application/json'
});
req.type('json');
req.send({
DeliveryStreamName: '',
Limit: '',
ExclusiveStartDestinationId: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=Firehose_20150804.DescribeDeliveryStream',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {DeliveryStreamName: '', Limit: '', ExclusiveStartDestinationId: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/#X-Amz-Target=Firehose_20150804.DescribeDeliveryStream';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"DeliveryStreamName":"","Limit":"","ExclusiveStartDestinationId":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"x-amz-target": @"",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"DeliveryStreamName": @"",
@"Limit": @"",
@"ExclusiveStartDestinationId": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/#X-Amz-Target=Firehose_20150804.DescribeDeliveryStream"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/#X-Amz-Target=Firehose_20150804.DescribeDeliveryStream" in
let headers = Header.add_list (Header.init ()) [
("x-amz-target", "");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"DeliveryStreamName\": \"\",\n \"Limit\": \"\",\n \"ExclusiveStartDestinationId\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/#X-Amz-Target=Firehose_20150804.DescribeDeliveryStream",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'DeliveryStreamName' => '',
'Limit' => '',
'ExclusiveStartDestinationId' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json",
"x-amz-target: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/#X-Amz-Target=Firehose_20150804.DescribeDeliveryStream', [
'body' => '{
"DeliveryStreamName": "",
"Limit": "",
"ExclusiveStartDestinationId": ""
}',
'headers' => [
'content-type' => 'application/json',
'x-amz-target' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/#X-Amz-Target=Firehose_20150804.DescribeDeliveryStream');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'DeliveryStreamName' => '',
'Limit' => '',
'ExclusiveStartDestinationId' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'DeliveryStreamName' => '',
'Limit' => '',
'ExclusiveStartDestinationId' => ''
]));
$request->setRequestUrl('{{baseUrl}}/#X-Amz-Target=Firehose_20150804.DescribeDeliveryStream');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/#X-Amz-Target=Firehose_20150804.DescribeDeliveryStream' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"DeliveryStreamName": "",
"Limit": "",
"ExclusiveStartDestinationId": ""
}'
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/#X-Amz-Target=Firehose_20150804.DescribeDeliveryStream' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"DeliveryStreamName": "",
"Limit": "",
"ExclusiveStartDestinationId": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"DeliveryStreamName\": \"\",\n \"Limit\": \"\",\n \"ExclusiveStartDestinationId\": \"\"\n}"
headers = {
'x-amz-target': "",
'content-type': "application/json"
}
conn.request("POST", "/baseUrl/", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/#X-Amz-Target=Firehose_20150804.DescribeDeliveryStream"
payload = {
"DeliveryStreamName": "",
"Limit": "",
"ExclusiveStartDestinationId": ""
}
headers = {
"x-amz-target": "",
"content-type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/#X-Amz-Target=Firehose_20150804.DescribeDeliveryStream"
payload <- "{\n \"DeliveryStreamName\": \"\",\n \"Limit\": \"\",\n \"ExclusiveStartDestinationId\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, add_headers('x-amz-target' = ''), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/#X-Amz-Target=Firehose_20150804.DescribeDeliveryStream")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-amz-target"] = ''
request["content-type"] = 'application/json'
request.body = "{\n \"DeliveryStreamName\": \"\",\n \"Limit\": \"\",\n \"ExclusiveStartDestinationId\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/') do |req|
req.headers['x-amz-target'] = ''
req.body = "{\n \"DeliveryStreamName\": \"\",\n \"Limit\": \"\",\n \"ExclusiveStartDestinationId\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/#X-Amz-Target=Firehose_20150804.DescribeDeliveryStream";
let payload = json!({
"DeliveryStreamName": "",
"Limit": "",
"ExclusiveStartDestinationId": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("x-amz-target", "".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url '{{baseUrl}}/#X-Amz-Target=Firehose_20150804.DescribeDeliveryStream' \
--header 'content-type: application/json' \
--header 'x-amz-target: ' \
--data '{
"DeliveryStreamName": "",
"Limit": "",
"ExclusiveStartDestinationId": ""
}'
echo '{
"DeliveryStreamName": "",
"Limit": "",
"ExclusiveStartDestinationId": ""
}' | \
http POST '{{baseUrl}}/#X-Amz-Target=Firehose_20150804.DescribeDeliveryStream' \
content-type:application/json \
x-amz-target:''
wget --quiet \
--method POST \
--header 'x-amz-target: ' \
--header 'content-type: application/json' \
--body-data '{\n "DeliveryStreamName": "",\n "Limit": "",\n "ExclusiveStartDestinationId": ""\n}' \
--output-document \
- '{{baseUrl}}/#X-Amz-Target=Firehose_20150804.DescribeDeliveryStream'
import Foundation
let headers = [
"x-amz-target": "",
"content-type": "application/json"
]
let parameters = [
"DeliveryStreamName": "",
"Limit": "",
"ExclusiveStartDestinationId": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/#X-Amz-Target=Firehose_20150804.DescribeDeliveryStream")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
ListDeliveryStreams
{{baseUrl}}/#X-Amz-Target=Firehose_20150804.ListDeliveryStreams
HEADERS
X-Amz-Target
BODY json
{
"Limit": "",
"DeliveryStreamType": "",
"ExclusiveStartDeliveryStreamName": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/#X-Amz-Target=Firehose_20150804.ListDeliveryStreams");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-amz-target: ");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"Limit\": \"\",\n \"DeliveryStreamType\": \"\",\n \"ExclusiveStartDeliveryStreamName\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/#X-Amz-Target=Firehose_20150804.ListDeliveryStreams" {:headers {:x-amz-target ""}
:content-type :json
:form-params {:Limit ""
:DeliveryStreamType ""
:ExclusiveStartDeliveryStreamName ""}})
require "http/client"
url = "{{baseUrl}}/#X-Amz-Target=Firehose_20150804.ListDeliveryStreams"
headers = HTTP::Headers{
"x-amz-target" => ""
"content-type" => "application/json"
}
reqBody = "{\n \"Limit\": \"\",\n \"DeliveryStreamType\": \"\",\n \"ExclusiveStartDeliveryStreamName\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/#X-Amz-Target=Firehose_20150804.ListDeliveryStreams"),
Headers =
{
{ "x-amz-target", "" },
},
Content = new StringContent("{\n \"Limit\": \"\",\n \"DeliveryStreamType\": \"\",\n \"ExclusiveStartDeliveryStreamName\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/#X-Amz-Target=Firehose_20150804.ListDeliveryStreams");
var request = new RestRequest("", Method.Post);
request.AddHeader("x-amz-target", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"Limit\": \"\",\n \"DeliveryStreamType\": \"\",\n \"ExclusiveStartDeliveryStreamName\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/#X-Amz-Target=Firehose_20150804.ListDeliveryStreams"
payload := strings.NewReader("{\n \"Limit\": \"\",\n \"DeliveryStreamType\": \"\",\n \"ExclusiveStartDeliveryStreamName\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-amz-target", "")
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/ HTTP/1.1
X-Amz-Target:
Content-Type: application/json
Host: example.com
Content-Length: 87
{
"Limit": "",
"DeliveryStreamType": "",
"ExclusiveStartDeliveryStreamName": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/#X-Amz-Target=Firehose_20150804.ListDeliveryStreams")
.setHeader("x-amz-target", "")
.setHeader("content-type", "application/json")
.setBody("{\n \"Limit\": \"\",\n \"DeliveryStreamType\": \"\",\n \"ExclusiveStartDeliveryStreamName\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/#X-Amz-Target=Firehose_20150804.ListDeliveryStreams"))
.header("x-amz-target", "")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"Limit\": \"\",\n \"DeliveryStreamType\": \"\",\n \"ExclusiveStartDeliveryStreamName\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"Limit\": \"\",\n \"DeliveryStreamType\": \"\",\n \"ExclusiveStartDeliveryStreamName\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=Firehose_20150804.ListDeliveryStreams")
.post(body)
.addHeader("x-amz-target", "")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/#X-Amz-Target=Firehose_20150804.ListDeliveryStreams")
.header("x-amz-target", "")
.header("content-type", "application/json")
.body("{\n \"Limit\": \"\",\n \"DeliveryStreamType\": \"\",\n \"ExclusiveStartDeliveryStreamName\": \"\"\n}")
.asString();
const data = JSON.stringify({
Limit: '',
DeliveryStreamType: '',
ExclusiveStartDeliveryStreamName: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/#X-Amz-Target=Firehose_20150804.ListDeliveryStreams');
xhr.setRequestHeader('x-amz-target', '');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=Firehose_20150804.ListDeliveryStreams',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {Limit: '', DeliveryStreamType: '', ExclusiveStartDeliveryStreamName: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/#X-Amz-Target=Firehose_20150804.ListDeliveryStreams';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"Limit":"","DeliveryStreamType":"","ExclusiveStartDeliveryStreamName":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/#X-Amz-Target=Firehose_20150804.ListDeliveryStreams',
method: 'POST',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
},
processData: false,
data: '{\n "Limit": "",\n "DeliveryStreamType": "",\n "ExclusiveStartDeliveryStreamName": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"Limit\": \"\",\n \"DeliveryStreamType\": \"\",\n \"ExclusiveStartDeliveryStreamName\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=Firehose_20150804.ListDeliveryStreams")
.post(body)
.addHeader("x-amz-target", "")
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({Limit: '', DeliveryStreamType: '', ExclusiveStartDeliveryStreamName: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=Firehose_20150804.ListDeliveryStreams',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: {Limit: '', DeliveryStreamType: '', ExclusiveStartDeliveryStreamName: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/#X-Amz-Target=Firehose_20150804.ListDeliveryStreams');
req.headers({
'x-amz-target': '',
'content-type': 'application/json'
});
req.type('json');
req.send({
Limit: '',
DeliveryStreamType: '',
ExclusiveStartDeliveryStreamName: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=Firehose_20150804.ListDeliveryStreams',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {Limit: '', DeliveryStreamType: '', ExclusiveStartDeliveryStreamName: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/#X-Amz-Target=Firehose_20150804.ListDeliveryStreams';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"Limit":"","DeliveryStreamType":"","ExclusiveStartDeliveryStreamName":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"x-amz-target": @"",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"Limit": @"",
@"DeliveryStreamType": @"",
@"ExclusiveStartDeliveryStreamName": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/#X-Amz-Target=Firehose_20150804.ListDeliveryStreams"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/#X-Amz-Target=Firehose_20150804.ListDeliveryStreams" in
let headers = Header.add_list (Header.init ()) [
("x-amz-target", "");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"Limit\": \"\",\n \"DeliveryStreamType\": \"\",\n \"ExclusiveStartDeliveryStreamName\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/#X-Amz-Target=Firehose_20150804.ListDeliveryStreams",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'Limit' => '',
'DeliveryStreamType' => '',
'ExclusiveStartDeliveryStreamName' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json",
"x-amz-target: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/#X-Amz-Target=Firehose_20150804.ListDeliveryStreams', [
'body' => '{
"Limit": "",
"DeliveryStreamType": "",
"ExclusiveStartDeliveryStreamName": ""
}',
'headers' => [
'content-type' => 'application/json',
'x-amz-target' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/#X-Amz-Target=Firehose_20150804.ListDeliveryStreams');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'Limit' => '',
'DeliveryStreamType' => '',
'ExclusiveStartDeliveryStreamName' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'Limit' => '',
'DeliveryStreamType' => '',
'ExclusiveStartDeliveryStreamName' => ''
]));
$request->setRequestUrl('{{baseUrl}}/#X-Amz-Target=Firehose_20150804.ListDeliveryStreams');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/#X-Amz-Target=Firehose_20150804.ListDeliveryStreams' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"Limit": "",
"DeliveryStreamType": "",
"ExclusiveStartDeliveryStreamName": ""
}'
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/#X-Amz-Target=Firehose_20150804.ListDeliveryStreams' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"Limit": "",
"DeliveryStreamType": "",
"ExclusiveStartDeliveryStreamName": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"Limit\": \"\",\n \"DeliveryStreamType\": \"\",\n \"ExclusiveStartDeliveryStreamName\": \"\"\n}"
headers = {
'x-amz-target': "",
'content-type': "application/json"
}
conn.request("POST", "/baseUrl/", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/#X-Amz-Target=Firehose_20150804.ListDeliveryStreams"
payload = {
"Limit": "",
"DeliveryStreamType": "",
"ExclusiveStartDeliveryStreamName": ""
}
headers = {
"x-amz-target": "",
"content-type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/#X-Amz-Target=Firehose_20150804.ListDeliveryStreams"
payload <- "{\n \"Limit\": \"\",\n \"DeliveryStreamType\": \"\",\n \"ExclusiveStartDeliveryStreamName\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, add_headers('x-amz-target' = ''), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/#X-Amz-Target=Firehose_20150804.ListDeliveryStreams")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-amz-target"] = ''
request["content-type"] = 'application/json'
request.body = "{\n \"Limit\": \"\",\n \"DeliveryStreamType\": \"\",\n \"ExclusiveStartDeliveryStreamName\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/') do |req|
req.headers['x-amz-target'] = ''
req.body = "{\n \"Limit\": \"\",\n \"DeliveryStreamType\": \"\",\n \"ExclusiveStartDeliveryStreamName\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/#X-Amz-Target=Firehose_20150804.ListDeliveryStreams";
let payload = json!({
"Limit": "",
"DeliveryStreamType": "",
"ExclusiveStartDeliveryStreamName": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("x-amz-target", "".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url '{{baseUrl}}/#X-Amz-Target=Firehose_20150804.ListDeliveryStreams' \
--header 'content-type: application/json' \
--header 'x-amz-target: ' \
--data '{
"Limit": "",
"DeliveryStreamType": "",
"ExclusiveStartDeliveryStreamName": ""
}'
echo '{
"Limit": "",
"DeliveryStreamType": "",
"ExclusiveStartDeliveryStreamName": ""
}' | \
http POST '{{baseUrl}}/#X-Amz-Target=Firehose_20150804.ListDeliveryStreams' \
content-type:application/json \
x-amz-target:''
wget --quiet \
--method POST \
--header 'x-amz-target: ' \
--header 'content-type: application/json' \
--body-data '{\n "Limit": "",\n "DeliveryStreamType": "",\n "ExclusiveStartDeliveryStreamName": ""\n}' \
--output-document \
- '{{baseUrl}}/#X-Amz-Target=Firehose_20150804.ListDeliveryStreams'
import Foundation
let headers = [
"x-amz-target": "",
"content-type": "application/json"
]
let parameters = [
"Limit": "",
"DeliveryStreamType": "",
"ExclusiveStartDeliveryStreamName": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/#X-Amz-Target=Firehose_20150804.ListDeliveryStreams")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
ListTagsForDeliveryStream
{{baseUrl}}/#X-Amz-Target=Firehose_20150804.ListTagsForDeliveryStream
HEADERS
X-Amz-Target
BODY json
{
"DeliveryStreamName": "",
"ExclusiveStartTagKey": "",
"Limit": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/#X-Amz-Target=Firehose_20150804.ListTagsForDeliveryStream");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-amz-target: ");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"DeliveryStreamName\": \"\",\n \"ExclusiveStartTagKey\": \"\",\n \"Limit\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/#X-Amz-Target=Firehose_20150804.ListTagsForDeliveryStream" {:headers {:x-amz-target ""}
:content-type :json
:form-params {:DeliveryStreamName ""
:ExclusiveStartTagKey ""
:Limit ""}})
require "http/client"
url = "{{baseUrl}}/#X-Amz-Target=Firehose_20150804.ListTagsForDeliveryStream"
headers = HTTP::Headers{
"x-amz-target" => ""
"content-type" => "application/json"
}
reqBody = "{\n \"DeliveryStreamName\": \"\",\n \"ExclusiveStartTagKey\": \"\",\n \"Limit\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/#X-Amz-Target=Firehose_20150804.ListTagsForDeliveryStream"),
Headers =
{
{ "x-amz-target", "" },
},
Content = new StringContent("{\n \"DeliveryStreamName\": \"\",\n \"ExclusiveStartTagKey\": \"\",\n \"Limit\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/#X-Amz-Target=Firehose_20150804.ListTagsForDeliveryStream");
var request = new RestRequest("", Method.Post);
request.AddHeader("x-amz-target", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"DeliveryStreamName\": \"\",\n \"ExclusiveStartTagKey\": \"\",\n \"Limit\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/#X-Amz-Target=Firehose_20150804.ListTagsForDeliveryStream"
payload := strings.NewReader("{\n \"DeliveryStreamName\": \"\",\n \"ExclusiveStartTagKey\": \"\",\n \"Limit\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-amz-target", "")
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/ HTTP/1.1
X-Amz-Target:
Content-Type: application/json
Host: example.com
Content-Length: 75
{
"DeliveryStreamName": "",
"ExclusiveStartTagKey": "",
"Limit": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/#X-Amz-Target=Firehose_20150804.ListTagsForDeliveryStream")
.setHeader("x-amz-target", "")
.setHeader("content-type", "application/json")
.setBody("{\n \"DeliveryStreamName\": \"\",\n \"ExclusiveStartTagKey\": \"\",\n \"Limit\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/#X-Amz-Target=Firehose_20150804.ListTagsForDeliveryStream"))
.header("x-amz-target", "")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"DeliveryStreamName\": \"\",\n \"ExclusiveStartTagKey\": \"\",\n \"Limit\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"DeliveryStreamName\": \"\",\n \"ExclusiveStartTagKey\": \"\",\n \"Limit\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=Firehose_20150804.ListTagsForDeliveryStream")
.post(body)
.addHeader("x-amz-target", "")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/#X-Amz-Target=Firehose_20150804.ListTagsForDeliveryStream")
.header("x-amz-target", "")
.header("content-type", "application/json")
.body("{\n \"DeliveryStreamName\": \"\",\n \"ExclusiveStartTagKey\": \"\",\n \"Limit\": \"\"\n}")
.asString();
const data = JSON.stringify({
DeliveryStreamName: '',
ExclusiveStartTagKey: '',
Limit: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/#X-Amz-Target=Firehose_20150804.ListTagsForDeliveryStream');
xhr.setRequestHeader('x-amz-target', '');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=Firehose_20150804.ListTagsForDeliveryStream',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {DeliveryStreamName: '', ExclusiveStartTagKey: '', Limit: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/#X-Amz-Target=Firehose_20150804.ListTagsForDeliveryStream';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"DeliveryStreamName":"","ExclusiveStartTagKey":"","Limit":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/#X-Amz-Target=Firehose_20150804.ListTagsForDeliveryStream',
method: 'POST',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
},
processData: false,
data: '{\n "DeliveryStreamName": "",\n "ExclusiveStartTagKey": "",\n "Limit": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"DeliveryStreamName\": \"\",\n \"ExclusiveStartTagKey\": \"\",\n \"Limit\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=Firehose_20150804.ListTagsForDeliveryStream")
.post(body)
.addHeader("x-amz-target", "")
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({DeliveryStreamName: '', ExclusiveStartTagKey: '', Limit: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=Firehose_20150804.ListTagsForDeliveryStream',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: {DeliveryStreamName: '', ExclusiveStartTagKey: '', Limit: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/#X-Amz-Target=Firehose_20150804.ListTagsForDeliveryStream');
req.headers({
'x-amz-target': '',
'content-type': 'application/json'
});
req.type('json');
req.send({
DeliveryStreamName: '',
ExclusiveStartTagKey: '',
Limit: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=Firehose_20150804.ListTagsForDeliveryStream',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {DeliveryStreamName: '', ExclusiveStartTagKey: '', Limit: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/#X-Amz-Target=Firehose_20150804.ListTagsForDeliveryStream';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"DeliveryStreamName":"","ExclusiveStartTagKey":"","Limit":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"x-amz-target": @"",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"DeliveryStreamName": @"",
@"ExclusiveStartTagKey": @"",
@"Limit": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/#X-Amz-Target=Firehose_20150804.ListTagsForDeliveryStream"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/#X-Amz-Target=Firehose_20150804.ListTagsForDeliveryStream" in
let headers = Header.add_list (Header.init ()) [
("x-amz-target", "");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"DeliveryStreamName\": \"\",\n \"ExclusiveStartTagKey\": \"\",\n \"Limit\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/#X-Amz-Target=Firehose_20150804.ListTagsForDeliveryStream",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'DeliveryStreamName' => '',
'ExclusiveStartTagKey' => '',
'Limit' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json",
"x-amz-target: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/#X-Amz-Target=Firehose_20150804.ListTagsForDeliveryStream', [
'body' => '{
"DeliveryStreamName": "",
"ExclusiveStartTagKey": "",
"Limit": ""
}',
'headers' => [
'content-type' => 'application/json',
'x-amz-target' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/#X-Amz-Target=Firehose_20150804.ListTagsForDeliveryStream');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'DeliveryStreamName' => '',
'ExclusiveStartTagKey' => '',
'Limit' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'DeliveryStreamName' => '',
'ExclusiveStartTagKey' => '',
'Limit' => ''
]));
$request->setRequestUrl('{{baseUrl}}/#X-Amz-Target=Firehose_20150804.ListTagsForDeliveryStream');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/#X-Amz-Target=Firehose_20150804.ListTagsForDeliveryStream' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"DeliveryStreamName": "",
"ExclusiveStartTagKey": "",
"Limit": ""
}'
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/#X-Amz-Target=Firehose_20150804.ListTagsForDeliveryStream' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"DeliveryStreamName": "",
"ExclusiveStartTagKey": "",
"Limit": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"DeliveryStreamName\": \"\",\n \"ExclusiveStartTagKey\": \"\",\n \"Limit\": \"\"\n}"
headers = {
'x-amz-target': "",
'content-type': "application/json"
}
conn.request("POST", "/baseUrl/", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/#X-Amz-Target=Firehose_20150804.ListTagsForDeliveryStream"
payload = {
"DeliveryStreamName": "",
"ExclusiveStartTagKey": "",
"Limit": ""
}
headers = {
"x-amz-target": "",
"content-type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/#X-Amz-Target=Firehose_20150804.ListTagsForDeliveryStream"
payload <- "{\n \"DeliveryStreamName\": \"\",\n \"ExclusiveStartTagKey\": \"\",\n \"Limit\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, add_headers('x-amz-target' = ''), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/#X-Amz-Target=Firehose_20150804.ListTagsForDeliveryStream")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-amz-target"] = ''
request["content-type"] = 'application/json'
request.body = "{\n \"DeliveryStreamName\": \"\",\n \"ExclusiveStartTagKey\": \"\",\n \"Limit\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/') do |req|
req.headers['x-amz-target'] = ''
req.body = "{\n \"DeliveryStreamName\": \"\",\n \"ExclusiveStartTagKey\": \"\",\n \"Limit\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/#X-Amz-Target=Firehose_20150804.ListTagsForDeliveryStream";
let payload = json!({
"DeliveryStreamName": "",
"ExclusiveStartTagKey": "",
"Limit": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("x-amz-target", "".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url '{{baseUrl}}/#X-Amz-Target=Firehose_20150804.ListTagsForDeliveryStream' \
--header 'content-type: application/json' \
--header 'x-amz-target: ' \
--data '{
"DeliveryStreamName": "",
"ExclusiveStartTagKey": "",
"Limit": ""
}'
echo '{
"DeliveryStreamName": "",
"ExclusiveStartTagKey": "",
"Limit": ""
}' | \
http POST '{{baseUrl}}/#X-Amz-Target=Firehose_20150804.ListTagsForDeliveryStream' \
content-type:application/json \
x-amz-target:''
wget --quiet \
--method POST \
--header 'x-amz-target: ' \
--header 'content-type: application/json' \
--body-data '{\n "DeliveryStreamName": "",\n "ExclusiveStartTagKey": "",\n "Limit": ""\n}' \
--output-document \
- '{{baseUrl}}/#X-Amz-Target=Firehose_20150804.ListTagsForDeliveryStream'
import Foundation
let headers = [
"x-amz-target": "",
"content-type": "application/json"
]
let parameters = [
"DeliveryStreamName": "",
"ExclusiveStartTagKey": "",
"Limit": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/#X-Amz-Target=Firehose_20150804.ListTagsForDeliveryStream")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
PutRecord
{{baseUrl}}/#X-Amz-Target=Firehose_20150804.PutRecord
HEADERS
X-Amz-Target
BODY json
{
"DeliveryStreamName": "",
"Record": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/#X-Amz-Target=Firehose_20150804.PutRecord");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-amz-target: ");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"DeliveryStreamName\": \"\",\n \"Record\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/#X-Amz-Target=Firehose_20150804.PutRecord" {:headers {:x-amz-target ""}
:content-type :json
:form-params {:DeliveryStreamName ""
:Record ""}})
require "http/client"
url = "{{baseUrl}}/#X-Amz-Target=Firehose_20150804.PutRecord"
headers = HTTP::Headers{
"x-amz-target" => ""
"content-type" => "application/json"
}
reqBody = "{\n \"DeliveryStreamName\": \"\",\n \"Record\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/#X-Amz-Target=Firehose_20150804.PutRecord"),
Headers =
{
{ "x-amz-target", "" },
},
Content = new StringContent("{\n \"DeliveryStreamName\": \"\",\n \"Record\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/#X-Amz-Target=Firehose_20150804.PutRecord");
var request = new RestRequest("", Method.Post);
request.AddHeader("x-amz-target", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"DeliveryStreamName\": \"\",\n \"Record\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/#X-Amz-Target=Firehose_20150804.PutRecord"
payload := strings.NewReader("{\n \"DeliveryStreamName\": \"\",\n \"Record\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-amz-target", "")
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/ HTTP/1.1
X-Amz-Target:
Content-Type: application/json
Host: example.com
Content-Length: 46
{
"DeliveryStreamName": "",
"Record": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/#X-Amz-Target=Firehose_20150804.PutRecord")
.setHeader("x-amz-target", "")
.setHeader("content-type", "application/json")
.setBody("{\n \"DeliveryStreamName\": \"\",\n \"Record\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/#X-Amz-Target=Firehose_20150804.PutRecord"))
.header("x-amz-target", "")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"DeliveryStreamName\": \"\",\n \"Record\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"DeliveryStreamName\": \"\",\n \"Record\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=Firehose_20150804.PutRecord")
.post(body)
.addHeader("x-amz-target", "")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/#X-Amz-Target=Firehose_20150804.PutRecord")
.header("x-amz-target", "")
.header("content-type", "application/json")
.body("{\n \"DeliveryStreamName\": \"\",\n \"Record\": \"\"\n}")
.asString();
const data = JSON.stringify({
DeliveryStreamName: '',
Record: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/#X-Amz-Target=Firehose_20150804.PutRecord');
xhr.setRequestHeader('x-amz-target', '');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=Firehose_20150804.PutRecord',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {DeliveryStreamName: '', Record: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/#X-Amz-Target=Firehose_20150804.PutRecord';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"DeliveryStreamName":"","Record":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/#X-Amz-Target=Firehose_20150804.PutRecord',
method: 'POST',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
},
processData: false,
data: '{\n "DeliveryStreamName": "",\n "Record": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"DeliveryStreamName\": \"\",\n \"Record\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=Firehose_20150804.PutRecord")
.post(body)
.addHeader("x-amz-target", "")
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({DeliveryStreamName: '', Record: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=Firehose_20150804.PutRecord',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: {DeliveryStreamName: '', Record: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/#X-Amz-Target=Firehose_20150804.PutRecord');
req.headers({
'x-amz-target': '',
'content-type': 'application/json'
});
req.type('json');
req.send({
DeliveryStreamName: '',
Record: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=Firehose_20150804.PutRecord',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {DeliveryStreamName: '', Record: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/#X-Amz-Target=Firehose_20150804.PutRecord';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"DeliveryStreamName":"","Record":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"x-amz-target": @"",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"DeliveryStreamName": @"",
@"Record": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/#X-Amz-Target=Firehose_20150804.PutRecord"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/#X-Amz-Target=Firehose_20150804.PutRecord" in
let headers = Header.add_list (Header.init ()) [
("x-amz-target", "");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"DeliveryStreamName\": \"\",\n \"Record\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/#X-Amz-Target=Firehose_20150804.PutRecord",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'DeliveryStreamName' => '',
'Record' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json",
"x-amz-target: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/#X-Amz-Target=Firehose_20150804.PutRecord', [
'body' => '{
"DeliveryStreamName": "",
"Record": ""
}',
'headers' => [
'content-type' => 'application/json',
'x-amz-target' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/#X-Amz-Target=Firehose_20150804.PutRecord');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'DeliveryStreamName' => '',
'Record' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'DeliveryStreamName' => '',
'Record' => ''
]));
$request->setRequestUrl('{{baseUrl}}/#X-Amz-Target=Firehose_20150804.PutRecord');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/#X-Amz-Target=Firehose_20150804.PutRecord' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"DeliveryStreamName": "",
"Record": ""
}'
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/#X-Amz-Target=Firehose_20150804.PutRecord' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"DeliveryStreamName": "",
"Record": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"DeliveryStreamName\": \"\",\n \"Record\": \"\"\n}"
headers = {
'x-amz-target': "",
'content-type': "application/json"
}
conn.request("POST", "/baseUrl/", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/#X-Amz-Target=Firehose_20150804.PutRecord"
payload = {
"DeliveryStreamName": "",
"Record": ""
}
headers = {
"x-amz-target": "",
"content-type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/#X-Amz-Target=Firehose_20150804.PutRecord"
payload <- "{\n \"DeliveryStreamName\": \"\",\n \"Record\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, add_headers('x-amz-target' = ''), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/#X-Amz-Target=Firehose_20150804.PutRecord")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-amz-target"] = ''
request["content-type"] = 'application/json'
request.body = "{\n \"DeliveryStreamName\": \"\",\n \"Record\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/') do |req|
req.headers['x-amz-target'] = ''
req.body = "{\n \"DeliveryStreamName\": \"\",\n \"Record\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/#X-Amz-Target=Firehose_20150804.PutRecord";
let payload = json!({
"DeliveryStreamName": "",
"Record": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("x-amz-target", "".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url '{{baseUrl}}/#X-Amz-Target=Firehose_20150804.PutRecord' \
--header 'content-type: application/json' \
--header 'x-amz-target: ' \
--data '{
"DeliveryStreamName": "",
"Record": ""
}'
echo '{
"DeliveryStreamName": "",
"Record": ""
}' | \
http POST '{{baseUrl}}/#X-Amz-Target=Firehose_20150804.PutRecord' \
content-type:application/json \
x-amz-target:''
wget --quiet \
--method POST \
--header 'x-amz-target: ' \
--header 'content-type: application/json' \
--body-data '{\n "DeliveryStreamName": "",\n "Record": ""\n}' \
--output-document \
- '{{baseUrl}}/#X-Amz-Target=Firehose_20150804.PutRecord'
import Foundation
let headers = [
"x-amz-target": "",
"content-type": "application/json"
]
let parameters = [
"DeliveryStreamName": "",
"Record": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/#X-Amz-Target=Firehose_20150804.PutRecord")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
PutRecordBatch
{{baseUrl}}/#X-Amz-Target=Firehose_20150804.PutRecordBatch
HEADERS
X-Amz-Target
BODY json
{
"DeliveryStreamName": "",
"Records": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/#X-Amz-Target=Firehose_20150804.PutRecordBatch");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-amz-target: ");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"DeliveryStreamName\": \"\",\n \"Records\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/#X-Amz-Target=Firehose_20150804.PutRecordBatch" {:headers {:x-amz-target ""}
:content-type :json
:form-params {:DeliveryStreamName ""
:Records ""}})
require "http/client"
url = "{{baseUrl}}/#X-Amz-Target=Firehose_20150804.PutRecordBatch"
headers = HTTP::Headers{
"x-amz-target" => ""
"content-type" => "application/json"
}
reqBody = "{\n \"DeliveryStreamName\": \"\",\n \"Records\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/#X-Amz-Target=Firehose_20150804.PutRecordBatch"),
Headers =
{
{ "x-amz-target", "" },
},
Content = new StringContent("{\n \"DeliveryStreamName\": \"\",\n \"Records\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/#X-Amz-Target=Firehose_20150804.PutRecordBatch");
var request = new RestRequest("", Method.Post);
request.AddHeader("x-amz-target", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"DeliveryStreamName\": \"\",\n \"Records\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/#X-Amz-Target=Firehose_20150804.PutRecordBatch"
payload := strings.NewReader("{\n \"DeliveryStreamName\": \"\",\n \"Records\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-amz-target", "")
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/ HTTP/1.1
X-Amz-Target:
Content-Type: application/json
Host: example.com
Content-Length: 47
{
"DeliveryStreamName": "",
"Records": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/#X-Amz-Target=Firehose_20150804.PutRecordBatch")
.setHeader("x-amz-target", "")
.setHeader("content-type", "application/json")
.setBody("{\n \"DeliveryStreamName\": \"\",\n \"Records\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/#X-Amz-Target=Firehose_20150804.PutRecordBatch"))
.header("x-amz-target", "")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"DeliveryStreamName\": \"\",\n \"Records\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"DeliveryStreamName\": \"\",\n \"Records\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=Firehose_20150804.PutRecordBatch")
.post(body)
.addHeader("x-amz-target", "")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/#X-Amz-Target=Firehose_20150804.PutRecordBatch")
.header("x-amz-target", "")
.header("content-type", "application/json")
.body("{\n \"DeliveryStreamName\": \"\",\n \"Records\": \"\"\n}")
.asString();
const data = JSON.stringify({
DeliveryStreamName: '',
Records: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/#X-Amz-Target=Firehose_20150804.PutRecordBatch');
xhr.setRequestHeader('x-amz-target', '');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=Firehose_20150804.PutRecordBatch',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {DeliveryStreamName: '', Records: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/#X-Amz-Target=Firehose_20150804.PutRecordBatch';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"DeliveryStreamName":"","Records":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/#X-Amz-Target=Firehose_20150804.PutRecordBatch',
method: 'POST',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
},
processData: false,
data: '{\n "DeliveryStreamName": "",\n "Records": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"DeliveryStreamName\": \"\",\n \"Records\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=Firehose_20150804.PutRecordBatch")
.post(body)
.addHeader("x-amz-target", "")
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({DeliveryStreamName: '', Records: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=Firehose_20150804.PutRecordBatch',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: {DeliveryStreamName: '', Records: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/#X-Amz-Target=Firehose_20150804.PutRecordBatch');
req.headers({
'x-amz-target': '',
'content-type': 'application/json'
});
req.type('json');
req.send({
DeliveryStreamName: '',
Records: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=Firehose_20150804.PutRecordBatch',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {DeliveryStreamName: '', Records: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/#X-Amz-Target=Firehose_20150804.PutRecordBatch';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"DeliveryStreamName":"","Records":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"x-amz-target": @"",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"DeliveryStreamName": @"",
@"Records": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/#X-Amz-Target=Firehose_20150804.PutRecordBatch"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/#X-Amz-Target=Firehose_20150804.PutRecordBatch" in
let headers = Header.add_list (Header.init ()) [
("x-amz-target", "");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"DeliveryStreamName\": \"\",\n \"Records\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/#X-Amz-Target=Firehose_20150804.PutRecordBatch",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'DeliveryStreamName' => '',
'Records' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json",
"x-amz-target: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/#X-Amz-Target=Firehose_20150804.PutRecordBatch', [
'body' => '{
"DeliveryStreamName": "",
"Records": ""
}',
'headers' => [
'content-type' => 'application/json',
'x-amz-target' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/#X-Amz-Target=Firehose_20150804.PutRecordBatch');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'DeliveryStreamName' => '',
'Records' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'DeliveryStreamName' => '',
'Records' => ''
]));
$request->setRequestUrl('{{baseUrl}}/#X-Amz-Target=Firehose_20150804.PutRecordBatch');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/#X-Amz-Target=Firehose_20150804.PutRecordBatch' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"DeliveryStreamName": "",
"Records": ""
}'
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/#X-Amz-Target=Firehose_20150804.PutRecordBatch' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"DeliveryStreamName": "",
"Records": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"DeliveryStreamName\": \"\",\n \"Records\": \"\"\n}"
headers = {
'x-amz-target': "",
'content-type': "application/json"
}
conn.request("POST", "/baseUrl/", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/#X-Amz-Target=Firehose_20150804.PutRecordBatch"
payload = {
"DeliveryStreamName": "",
"Records": ""
}
headers = {
"x-amz-target": "",
"content-type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/#X-Amz-Target=Firehose_20150804.PutRecordBatch"
payload <- "{\n \"DeliveryStreamName\": \"\",\n \"Records\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, add_headers('x-amz-target' = ''), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/#X-Amz-Target=Firehose_20150804.PutRecordBatch")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-amz-target"] = ''
request["content-type"] = 'application/json'
request.body = "{\n \"DeliveryStreamName\": \"\",\n \"Records\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/') do |req|
req.headers['x-amz-target'] = ''
req.body = "{\n \"DeliveryStreamName\": \"\",\n \"Records\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/#X-Amz-Target=Firehose_20150804.PutRecordBatch";
let payload = json!({
"DeliveryStreamName": "",
"Records": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("x-amz-target", "".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url '{{baseUrl}}/#X-Amz-Target=Firehose_20150804.PutRecordBatch' \
--header 'content-type: application/json' \
--header 'x-amz-target: ' \
--data '{
"DeliveryStreamName": "",
"Records": ""
}'
echo '{
"DeliveryStreamName": "",
"Records": ""
}' | \
http POST '{{baseUrl}}/#X-Amz-Target=Firehose_20150804.PutRecordBatch' \
content-type:application/json \
x-amz-target:''
wget --quiet \
--method POST \
--header 'x-amz-target: ' \
--header 'content-type: application/json' \
--body-data '{\n "DeliveryStreamName": "",\n "Records": ""\n}' \
--output-document \
- '{{baseUrl}}/#X-Amz-Target=Firehose_20150804.PutRecordBatch'
import Foundation
let headers = [
"x-amz-target": "",
"content-type": "application/json"
]
let parameters = [
"DeliveryStreamName": "",
"Records": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/#X-Amz-Target=Firehose_20150804.PutRecordBatch")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
StartDeliveryStreamEncryption
{{baseUrl}}/#X-Amz-Target=Firehose_20150804.StartDeliveryStreamEncryption
HEADERS
X-Amz-Target
BODY json
{
"DeliveryStreamName": "",
"DeliveryStreamEncryptionConfigurationInput": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/#X-Amz-Target=Firehose_20150804.StartDeliveryStreamEncryption");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-amz-target: ");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"DeliveryStreamName\": \"\",\n \"DeliveryStreamEncryptionConfigurationInput\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/#X-Amz-Target=Firehose_20150804.StartDeliveryStreamEncryption" {:headers {:x-amz-target ""}
:content-type :json
:form-params {:DeliveryStreamName ""
:DeliveryStreamEncryptionConfigurationInput ""}})
require "http/client"
url = "{{baseUrl}}/#X-Amz-Target=Firehose_20150804.StartDeliveryStreamEncryption"
headers = HTTP::Headers{
"x-amz-target" => ""
"content-type" => "application/json"
}
reqBody = "{\n \"DeliveryStreamName\": \"\",\n \"DeliveryStreamEncryptionConfigurationInput\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/#X-Amz-Target=Firehose_20150804.StartDeliveryStreamEncryption"),
Headers =
{
{ "x-amz-target", "" },
},
Content = new StringContent("{\n \"DeliveryStreamName\": \"\",\n \"DeliveryStreamEncryptionConfigurationInput\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/#X-Amz-Target=Firehose_20150804.StartDeliveryStreamEncryption");
var request = new RestRequest("", Method.Post);
request.AddHeader("x-amz-target", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"DeliveryStreamName\": \"\",\n \"DeliveryStreamEncryptionConfigurationInput\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/#X-Amz-Target=Firehose_20150804.StartDeliveryStreamEncryption"
payload := strings.NewReader("{\n \"DeliveryStreamName\": \"\",\n \"DeliveryStreamEncryptionConfigurationInput\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-amz-target", "")
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/ HTTP/1.1
X-Amz-Target:
Content-Type: application/json
Host: example.com
Content-Length: 82
{
"DeliveryStreamName": "",
"DeliveryStreamEncryptionConfigurationInput": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/#X-Amz-Target=Firehose_20150804.StartDeliveryStreamEncryption")
.setHeader("x-amz-target", "")
.setHeader("content-type", "application/json")
.setBody("{\n \"DeliveryStreamName\": \"\",\n \"DeliveryStreamEncryptionConfigurationInput\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/#X-Amz-Target=Firehose_20150804.StartDeliveryStreamEncryption"))
.header("x-amz-target", "")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"DeliveryStreamName\": \"\",\n \"DeliveryStreamEncryptionConfigurationInput\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"DeliveryStreamName\": \"\",\n \"DeliveryStreamEncryptionConfigurationInput\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=Firehose_20150804.StartDeliveryStreamEncryption")
.post(body)
.addHeader("x-amz-target", "")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/#X-Amz-Target=Firehose_20150804.StartDeliveryStreamEncryption")
.header("x-amz-target", "")
.header("content-type", "application/json")
.body("{\n \"DeliveryStreamName\": \"\",\n \"DeliveryStreamEncryptionConfigurationInput\": \"\"\n}")
.asString();
const data = JSON.stringify({
DeliveryStreamName: '',
DeliveryStreamEncryptionConfigurationInput: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/#X-Amz-Target=Firehose_20150804.StartDeliveryStreamEncryption');
xhr.setRequestHeader('x-amz-target', '');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=Firehose_20150804.StartDeliveryStreamEncryption',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {DeliveryStreamName: '', DeliveryStreamEncryptionConfigurationInput: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/#X-Amz-Target=Firehose_20150804.StartDeliveryStreamEncryption';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"DeliveryStreamName":"","DeliveryStreamEncryptionConfigurationInput":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/#X-Amz-Target=Firehose_20150804.StartDeliveryStreamEncryption',
method: 'POST',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
},
processData: false,
data: '{\n "DeliveryStreamName": "",\n "DeliveryStreamEncryptionConfigurationInput": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"DeliveryStreamName\": \"\",\n \"DeliveryStreamEncryptionConfigurationInput\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=Firehose_20150804.StartDeliveryStreamEncryption")
.post(body)
.addHeader("x-amz-target", "")
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({DeliveryStreamName: '', DeliveryStreamEncryptionConfigurationInput: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=Firehose_20150804.StartDeliveryStreamEncryption',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: {DeliveryStreamName: '', DeliveryStreamEncryptionConfigurationInput: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/#X-Amz-Target=Firehose_20150804.StartDeliveryStreamEncryption');
req.headers({
'x-amz-target': '',
'content-type': 'application/json'
});
req.type('json');
req.send({
DeliveryStreamName: '',
DeliveryStreamEncryptionConfigurationInput: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=Firehose_20150804.StartDeliveryStreamEncryption',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {DeliveryStreamName: '', DeliveryStreamEncryptionConfigurationInput: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/#X-Amz-Target=Firehose_20150804.StartDeliveryStreamEncryption';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"DeliveryStreamName":"","DeliveryStreamEncryptionConfigurationInput":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"x-amz-target": @"",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"DeliveryStreamName": @"",
@"DeliveryStreamEncryptionConfigurationInput": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/#X-Amz-Target=Firehose_20150804.StartDeliveryStreamEncryption"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/#X-Amz-Target=Firehose_20150804.StartDeliveryStreamEncryption" in
let headers = Header.add_list (Header.init ()) [
("x-amz-target", "");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"DeliveryStreamName\": \"\",\n \"DeliveryStreamEncryptionConfigurationInput\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/#X-Amz-Target=Firehose_20150804.StartDeliveryStreamEncryption",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'DeliveryStreamName' => '',
'DeliveryStreamEncryptionConfigurationInput' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json",
"x-amz-target: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/#X-Amz-Target=Firehose_20150804.StartDeliveryStreamEncryption', [
'body' => '{
"DeliveryStreamName": "",
"DeliveryStreamEncryptionConfigurationInput": ""
}',
'headers' => [
'content-type' => 'application/json',
'x-amz-target' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/#X-Amz-Target=Firehose_20150804.StartDeliveryStreamEncryption');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'DeliveryStreamName' => '',
'DeliveryStreamEncryptionConfigurationInput' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'DeliveryStreamName' => '',
'DeliveryStreamEncryptionConfigurationInput' => ''
]));
$request->setRequestUrl('{{baseUrl}}/#X-Amz-Target=Firehose_20150804.StartDeliveryStreamEncryption');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/#X-Amz-Target=Firehose_20150804.StartDeliveryStreamEncryption' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"DeliveryStreamName": "",
"DeliveryStreamEncryptionConfigurationInput": ""
}'
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/#X-Amz-Target=Firehose_20150804.StartDeliveryStreamEncryption' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"DeliveryStreamName": "",
"DeliveryStreamEncryptionConfigurationInput": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"DeliveryStreamName\": \"\",\n \"DeliveryStreamEncryptionConfigurationInput\": \"\"\n}"
headers = {
'x-amz-target': "",
'content-type': "application/json"
}
conn.request("POST", "/baseUrl/", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/#X-Amz-Target=Firehose_20150804.StartDeliveryStreamEncryption"
payload = {
"DeliveryStreamName": "",
"DeliveryStreamEncryptionConfigurationInput": ""
}
headers = {
"x-amz-target": "",
"content-type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/#X-Amz-Target=Firehose_20150804.StartDeliveryStreamEncryption"
payload <- "{\n \"DeliveryStreamName\": \"\",\n \"DeliveryStreamEncryptionConfigurationInput\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, add_headers('x-amz-target' = ''), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/#X-Amz-Target=Firehose_20150804.StartDeliveryStreamEncryption")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-amz-target"] = ''
request["content-type"] = 'application/json'
request.body = "{\n \"DeliveryStreamName\": \"\",\n \"DeliveryStreamEncryptionConfigurationInput\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/') do |req|
req.headers['x-amz-target'] = ''
req.body = "{\n \"DeliveryStreamName\": \"\",\n \"DeliveryStreamEncryptionConfigurationInput\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/#X-Amz-Target=Firehose_20150804.StartDeliveryStreamEncryption";
let payload = json!({
"DeliveryStreamName": "",
"DeliveryStreamEncryptionConfigurationInput": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("x-amz-target", "".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url '{{baseUrl}}/#X-Amz-Target=Firehose_20150804.StartDeliveryStreamEncryption' \
--header 'content-type: application/json' \
--header 'x-amz-target: ' \
--data '{
"DeliveryStreamName": "",
"DeliveryStreamEncryptionConfigurationInput": ""
}'
echo '{
"DeliveryStreamName": "",
"DeliveryStreamEncryptionConfigurationInput": ""
}' | \
http POST '{{baseUrl}}/#X-Amz-Target=Firehose_20150804.StartDeliveryStreamEncryption' \
content-type:application/json \
x-amz-target:''
wget --quiet \
--method POST \
--header 'x-amz-target: ' \
--header 'content-type: application/json' \
--body-data '{\n "DeliveryStreamName": "",\n "DeliveryStreamEncryptionConfigurationInput": ""\n}' \
--output-document \
- '{{baseUrl}}/#X-Amz-Target=Firehose_20150804.StartDeliveryStreamEncryption'
import Foundation
let headers = [
"x-amz-target": "",
"content-type": "application/json"
]
let parameters = [
"DeliveryStreamName": "",
"DeliveryStreamEncryptionConfigurationInput": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/#X-Amz-Target=Firehose_20150804.StartDeliveryStreamEncryption")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
StopDeliveryStreamEncryption
{{baseUrl}}/#X-Amz-Target=Firehose_20150804.StopDeliveryStreamEncryption
HEADERS
X-Amz-Target
BODY json
{
"DeliveryStreamName": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/#X-Amz-Target=Firehose_20150804.StopDeliveryStreamEncryption");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-amz-target: ");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"DeliveryStreamName\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/#X-Amz-Target=Firehose_20150804.StopDeliveryStreamEncryption" {:headers {:x-amz-target ""}
:content-type :json
:form-params {:DeliveryStreamName ""}})
require "http/client"
url = "{{baseUrl}}/#X-Amz-Target=Firehose_20150804.StopDeliveryStreamEncryption"
headers = HTTP::Headers{
"x-amz-target" => ""
"content-type" => "application/json"
}
reqBody = "{\n \"DeliveryStreamName\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/#X-Amz-Target=Firehose_20150804.StopDeliveryStreamEncryption"),
Headers =
{
{ "x-amz-target", "" },
},
Content = new StringContent("{\n \"DeliveryStreamName\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/#X-Amz-Target=Firehose_20150804.StopDeliveryStreamEncryption");
var request = new RestRequest("", Method.Post);
request.AddHeader("x-amz-target", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"DeliveryStreamName\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/#X-Amz-Target=Firehose_20150804.StopDeliveryStreamEncryption"
payload := strings.NewReader("{\n \"DeliveryStreamName\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-amz-target", "")
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/ HTTP/1.1
X-Amz-Target:
Content-Type: application/json
Host: example.com
Content-Length: 30
{
"DeliveryStreamName": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/#X-Amz-Target=Firehose_20150804.StopDeliveryStreamEncryption")
.setHeader("x-amz-target", "")
.setHeader("content-type", "application/json")
.setBody("{\n \"DeliveryStreamName\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/#X-Amz-Target=Firehose_20150804.StopDeliveryStreamEncryption"))
.header("x-amz-target", "")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"DeliveryStreamName\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"DeliveryStreamName\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=Firehose_20150804.StopDeliveryStreamEncryption")
.post(body)
.addHeader("x-amz-target", "")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/#X-Amz-Target=Firehose_20150804.StopDeliveryStreamEncryption")
.header("x-amz-target", "")
.header("content-type", "application/json")
.body("{\n \"DeliveryStreamName\": \"\"\n}")
.asString();
const data = JSON.stringify({
DeliveryStreamName: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/#X-Amz-Target=Firehose_20150804.StopDeliveryStreamEncryption');
xhr.setRequestHeader('x-amz-target', '');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=Firehose_20150804.StopDeliveryStreamEncryption',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {DeliveryStreamName: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/#X-Amz-Target=Firehose_20150804.StopDeliveryStreamEncryption';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"DeliveryStreamName":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/#X-Amz-Target=Firehose_20150804.StopDeliveryStreamEncryption',
method: 'POST',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
},
processData: false,
data: '{\n "DeliveryStreamName": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"DeliveryStreamName\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=Firehose_20150804.StopDeliveryStreamEncryption")
.post(body)
.addHeader("x-amz-target", "")
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({DeliveryStreamName: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=Firehose_20150804.StopDeliveryStreamEncryption',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: {DeliveryStreamName: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/#X-Amz-Target=Firehose_20150804.StopDeliveryStreamEncryption');
req.headers({
'x-amz-target': '',
'content-type': 'application/json'
});
req.type('json');
req.send({
DeliveryStreamName: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=Firehose_20150804.StopDeliveryStreamEncryption',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {DeliveryStreamName: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/#X-Amz-Target=Firehose_20150804.StopDeliveryStreamEncryption';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"DeliveryStreamName":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"x-amz-target": @"",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"DeliveryStreamName": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/#X-Amz-Target=Firehose_20150804.StopDeliveryStreamEncryption"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/#X-Amz-Target=Firehose_20150804.StopDeliveryStreamEncryption" in
let headers = Header.add_list (Header.init ()) [
("x-amz-target", "");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"DeliveryStreamName\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/#X-Amz-Target=Firehose_20150804.StopDeliveryStreamEncryption",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'DeliveryStreamName' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json",
"x-amz-target: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/#X-Amz-Target=Firehose_20150804.StopDeliveryStreamEncryption', [
'body' => '{
"DeliveryStreamName": ""
}',
'headers' => [
'content-type' => 'application/json',
'x-amz-target' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/#X-Amz-Target=Firehose_20150804.StopDeliveryStreamEncryption');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'DeliveryStreamName' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'DeliveryStreamName' => ''
]));
$request->setRequestUrl('{{baseUrl}}/#X-Amz-Target=Firehose_20150804.StopDeliveryStreamEncryption');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/#X-Amz-Target=Firehose_20150804.StopDeliveryStreamEncryption' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"DeliveryStreamName": ""
}'
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/#X-Amz-Target=Firehose_20150804.StopDeliveryStreamEncryption' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"DeliveryStreamName": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"DeliveryStreamName\": \"\"\n}"
headers = {
'x-amz-target': "",
'content-type': "application/json"
}
conn.request("POST", "/baseUrl/", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/#X-Amz-Target=Firehose_20150804.StopDeliveryStreamEncryption"
payload = { "DeliveryStreamName": "" }
headers = {
"x-amz-target": "",
"content-type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/#X-Amz-Target=Firehose_20150804.StopDeliveryStreamEncryption"
payload <- "{\n \"DeliveryStreamName\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, add_headers('x-amz-target' = ''), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/#X-Amz-Target=Firehose_20150804.StopDeliveryStreamEncryption")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-amz-target"] = ''
request["content-type"] = 'application/json'
request.body = "{\n \"DeliveryStreamName\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/') do |req|
req.headers['x-amz-target'] = ''
req.body = "{\n \"DeliveryStreamName\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/#X-Amz-Target=Firehose_20150804.StopDeliveryStreamEncryption";
let payload = json!({"DeliveryStreamName": ""});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("x-amz-target", "".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url '{{baseUrl}}/#X-Amz-Target=Firehose_20150804.StopDeliveryStreamEncryption' \
--header 'content-type: application/json' \
--header 'x-amz-target: ' \
--data '{
"DeliveryStreamName": ""
}'
echo '{
"DeliveryStreamName": ""
}' | \
http POST '{{baseUrl}}/#X-Amz-Target=Firehose_20150804.StopDeliveryStreamEncryption' \
content-type:application/json \
x-amz-target:''
wget --quiet \
--method POST \
--header 'x-amz-target: ' \
--header 'content-type: application/json' \
--body-data '{\n "DeliveryStreamName": ""\n}' \
--output-document \
- '{{baseUrl}}/#X-Amz-Target=Firehose_20150804.StopDeliveryStreamEncryption'
import Foundation
let headers = [
"x-amz-target": "",
"content-type": "application/json"
]
let parameters = ["DeliveryStreamName": ""] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/#X-Amz-Target=Firehose_20150804.StopDeliveryStreamEncryption")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
TagDeliveryStream
{{baseUrl}}/#X-Amz-Target=Firehose_20150804.TagDeliveryStream
HEADERS
X-Amz-Target
BODY json
{
"DeliveryStreamName": "",
"Tags": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/#X-Amz-Target=Firehose_20150804.TagDeliveryStream");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-amz-target: ");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"DeliveryStreamName\": \"\",\n \"Tags\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/#X-Amz-Target=Firehose_20150804.TagDeliveryStream" {:headers {:x-amz-target ""}
:content-type :json
:form-params {:DeliveryStreamName ""
:Tags ""}})
require "http/client"
url = "{{baseUrl}}/#X-Amz-Target=Firehose_20150804.TagDeliveryStream"
headers = HTTP::Headers{
"x-amz-target" => ""
"content-type" => "application/json"
}
reqBody = "{\n \"DeliveryStreamName\": \"\",\n \"Tags\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/#X-Amz-Target=Firehose_20150804.TagDeliveryStream"),
Headers =
{
{ "x-amz-target", "" },
},
Content = new StringContent("{\n \"DeliveryStreamName\": \"\",\n \"Tags\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/#X-Amz-Target=Firehose_20150804.TagDeliveryStream");
var request = new RestRequest("", Method.Post);
request.AddHeader("x-amz-target", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"DeliveryStreamName\": \"\",\n \"Tags\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/#X-Amz-Target=Firehose_20150804.TagDeliveryStream"
payload := strings.NewReader("{\n \"DeliveryStreamName\": \"\",\n \"Tags\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-amz-target", "")
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/ HTTP/1.1
X-Amz-Target:
Content-Type: application/json
Host: example.com
Content-Length: 44
{
"DeliveryStreamName": "",
"Tags": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/#X-Amz-Target=Firehose_20150804.TagDeliveryStream")
.setHeader("x-amz-target", "")
.setHeader("content-type", "application/json")
.setBody("{\n \"DeliveryStreamName\": \"\",\n \"Tags\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/#X-Amz-Target=Firehose_20150804.TagDeliveryStream"))
.header("x-amz-target", "")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"DeliveryStreamName\": \"\",\n \"Tags\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"DeliveryStreamName\": \"\",\n \"Tags\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=Firehose_20150804.TagDeliveryStream")
.post(body)
.addHeader("x-amz-target", "")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/#X-Amz-Target=Firehose_20150804.TagDeliveryStream")
.header("x-amz-target", "")
.header("content-type", "application/json")
.body("{\n \"DeliveryStreamName\": \"\",\n \"Tags\": \"\"\n}")
.asString();
const data = JSON.stringify({
DeliveryStreamName: '',
Tags: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/#X-Amz-Target=Firehose_20150804.TagDeliveryStream');
xhr.setRequestHeader('x-amz-target', '');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=Firehose_20150804.TagDeliveryStream',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {DeliveryStreamName: '', Tags: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/#X-Amz-Target=Firehose_20150804.TagDeliveryStream';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"DeliveryStreamName":"","Tags":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/#X-Amz-Target=Firehose_20150804.TagDeliveryStream',
method: 'POST',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
},
processData: false,
data: '{\n "DeliveryStreamName": "",\n "Tags": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"DeliveryStreamName\": \"\",\n \"Tags\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=Firehose_20150804.TagDeliveryStream")
.post(body)
.addHeader("x-amz-target", "")
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({DeliveryStreamName: '', Tags: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=Firehose_20150804.TagDeliveryStream',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: {DeliveryStreamName: '', Tags: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/#X-Amz-Target=Firehose_20150804.TagDeliveryStream');
req.headers({
'x-amz-target': '',
'content-type': 'application/json'
});
req.type('json');
req.send({
DeliveryStreamName: '',
Tags: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=Firehose_20150804.TagDeliveryStream',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {DeliveryStreamName: '', Tags: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/#X-Amz-Target=Firehose_20150804.TagDeliveryStream';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"DeliveryStreamName":"","Tags":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"x-amz-target": @"",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"DeliveryStreamName": @"",
@"Tags": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/#X-Amz-Target=Firehose_20150804.TagDeliveryStream"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/#X-Amz-Target=Firehose_20150804.TagDeliveryStream" in
let headers = Header.add_list (Header.init ()) [
("x-amz-target", "");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"DeliveryStreamName\": \"\",\n \"Tags\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/#X-Amz-Target=Firehose_20150804.TagDeliveryStream",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'DeliveryStreamName' => '',
'Tags' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json",
"x-amz-target: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/#X-Amz-Target=Firehose_20150804.TagDeliveryStream', [
'body' => '{
"DeliveryStreamName": "",
"Tags": ""
}',
'headers' => [
'content-type' => 'application/json',
'x-amz-target' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/#X-Amz-Target=Firehose_20150804.TagDeliveryStream');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'DeliveryStreamName' => '',
'Tags' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'DeliveryStreamName' => '',
'Tags' => ''
]));
$request->setRequestUrl('{{baseUrl}}/#X-Amz-Target=Firehose_20150804.TagDeliveryStream');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/#X-Amz-Target=Firehose_20150804.TagDeliveryStream' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"DeliveryStreamName": "",
"Tags": ""
}'
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/#X-Amz-Target=Firehose_20150804.TagDeliveryStream' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"DeliveryStreamName": "",
"Tags": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"DeliveryStreamName\": \"\",\n \"Tags\": \"\"\n}"
headers = {
'x-amz-target': "",
'content-type': "application/json"
}
conn.request("POST", "/baseUrl/", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/#X-Amz-Target=Firehose_20150804.TagDeliveryStream"
payload = {
"DeliveryStreamName": "",
"Tags": ""
}
headers = {
"x-amz-target": "",
"content-type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/#X-Amz-Target=Firehose_20150804.TagDeliveryStream"
payload <- "{\n \"DeliveryStreamName\": \"\",\n \"Tags\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, add_headers('x-amz-target' = ''), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/#X-Amz-Target=Firehose_20150804.TagDeliveryStream")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-amz-target"] = ''
request["content-type"] = 'application/json'
request.body = "{\n \"DeliveryStreamName\": \"\",\n \"Tags\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/') do |req|
req.headers['x-amz-target'] = ''
req.body = "{\n \"DeliveryStreamName\": \"\",\n \"Tags\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/#X-Amz-Target=Firehose_20150804.TagDeliveryStream";
let payload = json!({
"DeliveryStreamName": "",
"Tags": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("x-amz-target", "".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url '{{baseUrl}}/#X-Amz-Target=Firehose_20150804.TagDeliveryStream' \
--header 'content-type: application/json' \
--header 'x-amz-target: ' \
--data '{
"DeliveryStreamName": "",
"Tags": ""
}'
echo '{
"DeliveryStreamName": "",
"Tags": ""
}' | \
http POST '{{baseUrl}}/#X-Amz-Target=Firehose_20150804.TagDeliveryStream' \
content-type:application/json \
x-amz-target:''
wget --quiet \
--method POST \
--header 'x-amz-target: ' \
--header 'content-type: application/json' \
--body-data '{\n "DeliveryStreamName": "",\n "Tags": ""\n}' \
--output-document \
- '{{baseUrl}}/#X-Amz-Target=Firehose_20150804.TagDeliveryStream'
import Foundation
let headers = [
"x-amz-target": "",
"content-type": "application/json"
]
let parameters = [
"DeliveryStreamName": "",
"Tags": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/#X-Amz-Target=Firehose_20150804.TagDeliveryStream")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
UntagDeliveryStream
{{baseUrl}}/#X-Amz-Target=Firehose_20150804.UntagDeliveryStream
HEADERS
X-Amz-Target
BODY json
{
"DeliveryStreamName": "",
"TagKeys": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/#X-Amz-Target=Firehose_20150804.UntagDeliveryStream");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-amz-target: ");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"DeliveryStreamName\": \"\",\n \"TagKeys\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/#X-Amz-Target=Firehose_20150804.UntagDeliveryStream" {:headers {:x-amz-target ""}
:content-type :json
:form-params {:DeliveryStreamName ""
:TagKeys ""}})
require "http/client"
url = "{{baseUrl}}/#X-Amz-Target=Firehose_20150804.UntagDeliveryStream"
headers = HTTP::Headers{
"x-amz-target" => ""
"content-type" => "application/json"
}
reqBody = "{\n \"DeliveryStreamName\": \"\",\n \"TagKeys\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/#X-Amz-Target=Firehose_20150804.UntagDeliveryStream"),
Headers =
{
{ "x-amz-target", "" },
},
Content = new StringContent("{\n \"DeliveryStreamName\": \"\",\n \"TagKeys\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/#X-Amz-Target=Firehose_20150804.UntagDeliveryStream");
var request = new RestRequest("", Method.Post);
request.AddHeader("x-amz-target", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"DeliveryStreamName\": \"\",\n \"TagKeys\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/#X-Amz-Target=Firehose_20150804.UntagDeliveryStream"
payload := strings.NewReader("{\n \"DeliveryStreamName\": \"\",\n \"TagKeys\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-amz-target", "")
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/ HTTP/1.1
X-Amz-Target:
Content-Type: application/json
Host: example.com
Content-Length: 47
{
"DeliveryStreamName": "",
"TagKeys": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/#X-Amz-Target=Firehose_20150804.UntagDeliveryStream")
.setHeader("x-amz-target", "")
.setHeader("content-type", "application/json")
.setBody("{\n \"DeliveryStreamName\": \"\",\n \"TagKeys\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/#X-Amz-Target=Firehose_20150804.UntagDeliveryStream"))
.header("x-amz-target", "")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"DeliveryStreamName\": \"\",\n \"TagKeys\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"DeliveryStreamName\": \"\",\n \"TagKeys\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=Firehose_20150804.UntagDeliveryStream")
.post(body)
.addHeader("x-amz-target", "")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/#X-Amz-Target=Firehose_20150804.UntagDeliveryStream")
.header("x-amz-target", "")
.header("content-type", "application/json")
.body("{\n \"DeliveryStreamName\": \"\",\n \"TagKeys\": \"\"\n}")
.asString();
const data = JSON.stringify({
DeliveryStreamName: '',
TagKeys: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/#X-Amz-Target=Firehose_20150804.UntagDeliveryStream');
xhr.setRequestHeader('x-amz-target', '');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=Firehose_20150804.UntagDeliveryStream',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {DeliveryStreamName: '', TagKeys: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/#X-Amz-Target=Firehose_20150804.UntagDeliveryStream';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"DeliveryStreamName":"","TagKeys":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/#X-Amz-Target=Firehose_20150804.UntagDeliveryStream',
method: 'POST',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
},
processData: false,
data: '{\n "DeliveryStreamName": "",\n "TagKeys": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"DeliveryStreamName\": \"\",\n \"TagKeys\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=Firehose_20150804.UntagDeliveryStream")
.post(body)
.addHeader("x-amz-target", "")
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({DeliveryStreamName: '', TagKeys: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=Firehose_20150804.UntagDeliveryStream',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: {DeliveryStreamName: '', TagKeys: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/#X-Amz-Target=Firehose_20150804.UntagDeliveryStream');
req.headers({
'x-amz-target': '',
'content-type': 'application/json'
});
req.type('json');
req.send({
DeliveryStreamName: '',
TagKeys: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=Firehose_20150804.UntagDeliveryStream',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {DeliveryStreamName: '', TagKeys: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/#X-Amz-Target=Firehose_20150804.UntagDeliveryStream';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"DeliveryStreamName":"","TagKeys":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"x-amz-target": @"",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"DeliveryStreamName": @"",
@"TagKeys": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/#X-Amz-Target=Firehose_20150804.UntagDeliveryStream"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/#X-Amz-Target=Firehose_20150804.UntagDeliveryStream" in
let headers = Header.add_list (Header.init ()) [
("x-amz-target", "");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"DeliveryStreamName\": \"\",\n \"TagKeys\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/#X-Amz-Target=Firehose_20150804.UntagDeliveryStream",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'DeliveryStreamName' => '',
'TagKeys' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json",
"x-amz-target: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/#X-Amz-Target=Firehose_20150804.UntagDeliveryStream', [
'body' => '{
"DeliveryStreamName": "",
"TagKeys": ""
}',
'headers' => [
'content-type' => 'application/json',
'x-amz-target' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/#X-Amz-Target=Firehose_20150804.UntagDeliveryStream');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'DeliveryStreamName' => '',
'TagKeys' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'DeliveryStreamName' => '',
'TagKeys' => ''
]));
$request->setRequestUrl('{{baseUrl}}/#X-Amz-Target=Firehose_20150804.UntagDeliveryStream');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/#X-Amz-Target=Firehose_20150804.UntagDeliveryStream' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"DeliveryStreamName": "",
"TagKeys": ""
}'
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/#X-Amz-Target=Firehose_20150804.UntagDeliveryStream' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"DeliveryStreamName": "",
"TagKeys": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"DeliveryStreamName\": \"\",\n \"TagKeys\": \"\"\n}"
headers = {
'x-amz-target': "",
'content-type': "application/json"
}
conn.request("POST", "/baseUrl/", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/#X-Amz-Target=Firehose_20150804.UntagDeliveryStream"
payload = {
"DeliveryStreamName": "",
"TagKeys": ""
}
headers = {
"x-amz-target": "",
"content-type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/#X-Amz-Target=Firehose_20150804.UntagDeliveryStream"
payload <- "{\n \"DeliveryStreamName\": \"\",\n \"TagKeys\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, add_headers('x-amz-target' = ''), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/#X-Amz-Target=Firehose_20150804.UntagDeliveryStream")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-amz-target"] = ''
request["content-type"] = 'application/json'
request.body = "{\n \"DeliveryStreamName\": \"\",\n \"TagKeys\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/') do |req|
req.headers['x-amz-target'] = ''
req.body = "{\n \"DeliveryStreamName\": \"\",\n \"TagKeys\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/#X-Amz-Target=Firehose_20150804.UntagDeliveryStream";
let payload = json!({
"DeliveryStreamName": "",
"TagKeys": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("x-amz-target", "".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url '{{baseUrl}}/#X-Amz-Target=Firehose_20150804.UntagDeliveryStream' \
--header 'content-type: application/json' \
--header 'x-amz-target: ' \
--data '{
"DeliveryStreamName": "",
"TagKeys": ""
}'
echo '{
"DeliveryStreamName": "",
"TagKeys": ""
}' | \
http POST '{{baseUrl}}/#X-Amz-Target=Firehose_20150804.UntagDeliveryStream' \
content-type:application/json \
x-amz-target:''
wget --quiet \
--method POST \
--header 'x-amz-target: ' \
--header 'content-type: application/json' \
--body-data '{\n "DeliveryStreamName": "",\n "TagKeys": ""\n}' \
--output-document \
- '{{baseUrl}}/#X-Amz-Target=Firehose_20150804.UntagDeliveryStream'
import Foundation
let headers = [
"x-amz-target": "",
"content-type": "application/json"
]
let parameters = [
"DeliveryStreamName": "",
"TagKeys": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/#X-Amz-Target=Firehose_20150804.UntagDeliveryStream")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
UpdateDestination
{{baseUrl}}/#X-Amz-Target=Firehose_20150804.UpdateDestination
HEADERS
X-Amz-Target
BODY json
{
"DeliveryStreamName": "",
"CurrentDeliveryStreamVersionId": "",
"DestinationId": "",
"S3DestinationUpdate": "",
"ExtendedS3DestinationUpdate": "",
"RedshiftDestinationUpdate": "",
"ElasticsearchDestinationUpdate": "",
"AmazonopensearchserviceDestinationUpdate": "",
"SplunkDestinationUpdate": "",
"HttpEndpointDestinationUpdate": "",
"AmazonOpenSearchServerlessDestinationUpdate": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/#X-Amz-Target=Firehose_20150804.UpdateDestination");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-amz-target: ");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"DeliveryStreamName\": \"\",\n \"CurrentDeliveryStreamVersionId\": \"\",\n \"DestinationId\": \"\",\n \"S3DestinationUpdate\": \"\",\n \"ExtendedS3DestinationUpdate\": \"\",\n \"RedshiftDestinationUpdate\": \"\",\n \"ElasticsearchDestinationUpdate\": \"\",\n \"AmazonopensearchserviceDestinationUpdate\": \"\",\n \"SplunkDestinationUpdate\": \"\",\n \"HttpEndpointDestinationUpdate\": \"\",\n \"AmazonOpenSearchServerlessDestinationUpdate\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/#X-Amz-Target=Firehose_20150804.UpdateDestination" {:headers {:x-amz-target ""}
:content-type :json
:form-params {:DeliveryStreamName ""
:CurrentDeliveryStreamVersionId ""
:DestinationId ""
:S3DestinationUpdate ""
:ExtendedS3DestinationUpdate ""
:RedshiftDestinationUpdate ""
:ElasticsearchDestinationUpdate ""
:AmazonopensearchserviceDestinationUpdate ""
:SplunkDestinationUpdate ""
:HttpEndpointDestinationUpdate ""
:AmazonOpenSearchServerlessDestinationUpdate ""}})
require "http/client"
url = "{{baseUrl}}/#X-Amz-Target=Firehose_20150804.UpdateDestination"
headers = HTTP::Headers{
"x-amz-target" => ""
"content-type" => "application/json"
}
reqBody = "{\n \"DeliveryStreamName\": \"\",\n \"CurrentDeliveryStreamVersionId\": \"\",\n \"DestinationId\": \"\",\n \"S3DestinationUpdate\": \"\",\n \"ExtendedS3DestinationUpdate\": \"\",\n \"RedshiftDestinationUpdate\": \"\",\n \"ElasticsearchDestinationUpdate\": \"\",\n \"AmazonopensearchserviceDestinationUpdate\": \"\",\n \"SplunkDestinationUpdate\": \"\",\n \"HttpEndpointDestinationUpdate\": \"\",\n \"AmazonOpenSearchServerlessDestinationUpdate\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/#X-Amz-Target=Firehose_20150804.UpdateDestination"),
Headers =
{
{ "x-amz-target", "" },
},
Content = new StringContent("{\n \"DeliveryStreamName\": \"\",\n \"CurrentDeliveryStreamVersionId\": \"\",\n \"DestinationId\": \"\",\n \"S3DestinationUpdate\": \"\",\n \"ExtendedS3DestinationUpdate\": \"\",\n \"RedshiftDestinationUpdate\": \"\",\n \"ElasticsearchDestinationUpdate\": \"\",\n \"AmazonopensearchserviceDestinationUpdate\": \"\",\n \"SplunkDestinationUpdate\": \"\",\n \"HttpEndpointDestinationUpdate\": \"\",\n \"AmazonOpenSearchServerlessDestinationUpdate\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/#X-Amz-Target=Firehose_20150804.UpdateDestination");
var request = new RestRequest("", Method.Post);
request.AddHeader("x-amz-target", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"DeliveryStreamName\": \"\",\n \"CurrentDeliveryStreamVersionId\": \"\",\n \"DestinationId\": \"\",\n \"S3DestinationUpdate\": \"\",\n \"ExtendedS3DestinationUpdate\": \"\",\n \"RedshiftDestinationUpdate\": \"\",\n \"ElasticsearchDestinationUpdate\": \"\",\n \"AmazonopensearchserviceDestinationUpdate\": \"\",\n \"SplunkDestinationUpdate\": \"\",\n \"HttpEndpointDestinationUpdate\": \"\",\n \"AmazonOpenSearchServerlessDestinationUpdate\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/#X-Amz-Target=Firehose_20150804.UpdateDestination"
payload := strings.NewReader("{\n \"DeliveryStreamName\": \"\",\n \"CurrentDeliveryStreamVersionId\": \"\",\n \"DestinationId\": \"\",\n \"S3DestinationUpdate\": \"\",\n \"ExtendedS3DestinationUpdate\": \"\",\n \"RedshiftDestinationUpdate\": \"\",\n \"ElasticsearchDestinationUpdate\": \"\",\n \"AmazonopensearchserviceDestinationUpdate\": \"\",\n \"SplunkDestinationUpdate\": \"\",\n \"HttpEndpointDestinationUpdate\": \"\",\n \"AmazonOpenSearchServerlessDestinationUpdate\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-amz-target", "")
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/ HTTP/1.1
X-Amz-Target:
Content-Type: application/json
Host: example.com
Content-Length: 409
{
"DeliveryStreamName": "",
"CurrentDeliveryStreamVersionId": "",
"DestinationId": "",
"S3DestinationUpdate": "",
"ExtendedS3DestinationUpdate": "",
"RedshiftDestinationUpdate": "",
"ElasticsearchDestinationUpdate": "",
"AmazonopensearchserviceDestinationUpdate": "",
"SplunkDestinationUpdate": "",
"HttpEndpointDestinationUpdate": "",
"AmazonOpenSearchServerlessDestinationUpdate": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/#X-Amz-Target=Firehose_20150804.UpdateDestination")
.setHeader("x-amz-target", "")
.setHeader("content-type", "application/json")
.setBody("{\n \"DeliveryStreamName\": \"\",\n \"CurrentDeliveryStreamVersionId\": \"\",\n \"DestinationId\": \"\",\n \"S3DestinationUpdate\": \"\",\n \"ExtendedS3DestinationUpdate\": \"\",\n \"RedshiftDestinationUpdate\": \"\",\n \"ElasticsearchDestinationUpdate\": \"\",\n \"AmazonopensearchserviceDestinationUpdate\": \"\",\n \"SplunkDestinationUpdate\": \"\",\n \"HttpEndpointDestinationUpdate\": \"\",\n \"AmazonOpenSearchServerlessDestinationUpdate\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/#X-Amz-Target=Firehose_20150804.UpdateDestination"))
.header("x-amz-target", "")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"DeliveryStreamName\": \"\",\n \"CurrentDeliveryStreamVersionId\": \"\",\n \"DestinationId\": \"\",\n \"S3DestinationUpdate\": \"\",\n \"ExtendedS3DestinationUpdate\": \"\",\n \"RedshiftDestinationUpdate\": \"\",\n \"ElasticsearchDestinationUpdate\": \"\",\n \"AmazonopensearchserviceDestinationUpdate\": \"\",\n \"SplunkDestinationUpdate\": \"\",\n \"HttpEndpointDestinationUpdate\": \"\",\n \"AmazonOpenSearchServerlessDestinationUpdate\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"DeliveryStreamName\": \"\",\n \"CurrentDeliveryStreamVersionId\": \"\",\n \"DestinationId\": \"\",\n \"S3DestinationUpdate\": \"\",\n \"ExtendedS3DestinationUpdate\": \"\",\n \"RedshiftDestinationUpdate\": \"\",\n \"ElasticsearchDestinationUpdate\": \"\",\n \"AmazonopensearchserviceDestinationUpdate\": \"\",\n \"SplunkDestinationUpdate\": \"\",\n \"HttpEndpointDestinationUpdate\": \"\",\n \"AmazonOpenSearchServerlessDestinationUpdate\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=Firehose_20150804.UpdateDestination")
.post(body)
.addHeader("x-amz-target", "")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/#X-Amz-Target=Firehose_20150804.UpdateDestination")
.header("x-amz-target", "")
.header("content-type", "application/json")
.body("{\n \"DeliveryStreamName\": \"\",\n \"CurrentDeliveryStreamVersionId\": \"\",\n \"DestinationId\": \"\",\n \"S3DestinationUpdate\": \"\",\n \"ExtendedS3DestinationUpdate\": \"\",\n \"RedshiftDestinationUpdate\": \"\",\n \"ElasticsearchDestinationUpdate\": \"\",\n \"AmazonopensearchserviceDestinationUpdate\": \"\",\n \"SplunkDestinationUpdate\": \"\",\n \"HttpEndpointDestinationUpdate\": \"\",\n \"AmazonOpenSearchServerlessDestinationUpdate\": \"\"\n}")
.asString();
const data = JSON.stringify({
DeliveryStreamName: '',
CurrentDeliveryStreamVersionId: '',
DestinationId: '',
S3DestinationUpdate: '',
ExtendedS3DestinationUpdate: '',
RedshiftDestinationUpdate: '',
ElasticsearchDestinationUpdate: '',
AmazonopensearchserviceDestinationUpdate: '',
SplunkDestinationUpdate: '',
HttpEndpointDestinationUpdate: '',
AmazonOpenSearchServerlessDestinationUpdate: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/#X-Amz-Target=Firehose_20150804.UpdateDestination');
xhr.setRequestHeader('x-amz-target', '');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=Firehose_20150804.UpdateDestination',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {
DeliveryStreamName: '',
CurrentDeliveryStreamVersionId: '',
DestinationId: '',
S3DestinationUpdate: '',
ExtendedS3DestinationUpdate: '',
RedshiftDestinationUpdate: '',
ElasticsearchDestinationUpdate: '',
AmazonopensearchserviceDestinationUpdate: '',
SplunkDestinationUpdate: '',
HttpEndpointDestinationUpdate: '',
AmazonOpenSearchServerlessDestinationUpdate: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/#X-Amz-Target=Firehose_20150804.UpdateDestination';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"DeliveryStreamName":"","CurrentDeliveryStreamVersionId":"","DestinationId":"","S3DestinationUpdate":"","ExtendedS3DestinationUpdate":"","RedshiftDestinationUpdate":"","ElasticsearchDestinationUpdate":"","AmazonopensearchserviceDestinationUpdate":"","SplunkDestinationUpdate":"","HttpEndpointDestinationUpdate":"","AmazonOpenSearchServerlessDestinationUpdate":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/#X-Amz-Target=Firehose_20150804.UpdateDestination',
method: 'POST',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
},
processData: false,
data: '{\n "DeliveryStreamName": "",\n "CurrentDeliveryStreamVersionId": "",\n "DestinationId": "",\n "S3DestinationUpdate": "",\n "ExtendedS3DestinationUpdate": "",\n "RedshiftDestinationUpdate": "",\n "ElasticsearchDestinationUpdate": "",\n "AmazonopensearchserviceDestinationUpdate": "",\n "SplunkDestinationUpdate": "",\n "HttpEndpointDestinationUpdate": "",\n "AmazonOpenSearchServerlessDestinationUpdate": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"DeliveryStreamName\": \"\",\n \"CurrentDeliveryStreamVersionId\": \"\",\n \"DestinationId\": \"\",\n \"S3DestinationUpdate\": \"\",\n \"ExtendedS3DestinationUpdate\": \"\",\n \"RedshiftDestinationUpdate\": \"\",\n \"ElasticsearchDestinationUpdate\": \"\",\n \"AmazonopensearchserviceDestinationUpdate\": \"\",\n \"SplunkDestinationUpdate\": \"\",\n \"HttpEndpointDestinationUpdate\": \"\",\n \"AmazonOpenSearchServerlessDestinationUpdate\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=Firehose_20150804.UpdateDestination")
.post(body)
.addHeader("x-amz-target", "")
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
DeliveryStreamName: '',
CurrentDeliveryStreamVersionId: '',
DestinationId: '',
S3DestinationUpdate: '',
ExtendedS3DestinationUpdate: '',
RedshiftDestinationUpdate: '',
ElasticsearchDestinationUpdate: '',
AmazonopensearchserviceDestinationUpdate: '',
SplunkDestinationUpdate: '',
HttpEndpointDestinationUpdate: '',
AmazonOpenSearchServerlessDestinationUpdate: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=Firehose_20150804.UpdateDestination',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: {
DeliveryStreamName: '',
CurrentDeliveryStreamVersionId: '',
DestinationId: '',
S3DestinationUpdate: '',
ExtendedS3DestinationUpdate: '',
RedshiftDestinationUpdate: '',
ElasticsearchDestinationUpdate: '',
AmazonopensearchserviceDestinationUpdate: '',
SplunkDestinationUpdate: '',
HttpEndpointDestinationUpdate: '',
AmazonOpenSearchServerlessDestinationUpdate: ''
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/#X-Amz-Target=Firehose_20150804.UpdateDestination');
req.headers({
'x-amz-target': '',
'content-type': 'application/json'
});
req.type('json');
req.send({
DeliveryStreamName: '',
CurrentDeliveryStreamVersionId: '',
DestinationId: '',
S3DestinationUpdate: '',
ExtendedS3DestinationUpdate: '',
RedshiftDestinationUpdate: '',
ElasticsearchDestinationUpdate: '',
AmazonopensearchserviceDestinationUpdate: '',
SplunkDestinationUpdate: '',
HttpEndpointDestinationUpdate: '',
AmazonOpenSearchServerlessDestinationUpdate: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=Firehose_20150804.UpdateDestination',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {
DeliveryStreamName: '',
CurrentDeliveryStreamVersionId: '',
DestinationId: '',
S3DestinationUpdate: '',
ExtendedS3DestinationUpdate: '',
RedshiftDestinationUpdate: '',
ElasticsearchDestinationUpdate: '',
AmazonopensearchserviceDestinationUpdate: '',
SplunkDestinationUpdate: '',
HttpEndpointDestinationUpdate: '',
AmazonOpenSearchServerlessDestinationUpdate: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/#X-Amz-Target=Firehose_20150804.UpdateDestination';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"DeliveryStreamName":"","CurrentDeliveryStreamVersionId":"","DestinationId":"","S3DestinationUpdate":"","ExtendedS3DestinationUpdate":"","RedshiftDestinationUpdate":"","ElasticsearchDestinationUpdate":"","AmazonopensearchserviceDestinationUpdate":"","SplunkDestinationUpdate":"","HttpEndpointDestinationUpdate":"","AmazonOpenSearchServerlessDestinationUpdate":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"x-amz-target": @"",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"DeliveryStreamName": @"",
@"CurrentDeliveryStreamVersionId": @"",
@"DestinationId": @"",
@"S3DestinationUpdate": @"",
@"ExtendedS3DestinationUpdate": @"",
@"RedshiftDestinationUpdate": @"",
@"ElasticsearchDestinationUpdate": @"",
@"AmazonopensearchserviceDestinationUpdate": @"",
@"SplunkDestinationUpdate": @"",
@"HttpEndpointDestinationUpdate": @"",
@"AmazonOpenSearchServerlessDestinationUpdate": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/#X-Amz-Target=Firehose_20150804.UpdateDestination"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/#X-Amz-Target=Firehose_20150804.UpdateDestination" in
let headers = Header.add_list (Header.init ()) [
("x-amz-target", "");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"DeliveryStreamName\": \"\",\n \"CurrentDeliveryStreamVersionId\": \"\",\n \"DestinationId\": \"\",\n \"S3DestinationUpdate\": \"\",\n \"ExtendedS3DestinationUpdate\": \"\",\n \"RedshiftDestinationUpdate\": \"\",\n \"ElasticsearchDestinationUpdate\": \"\",\n \"AmazonopensearchserviceDestinationUpdate\": \"\",\n \"SplunkDestinationUpdate\": \"\",\n \"HttpEndpointDestinationUpdate\": \"\",\n \"AmazonOpenSearchServerlessDestinationUpdate\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/#X-Amz-Target=Firehose_20150804.UpdateDestination",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'DeliveryStreamName' => '',
'CurrentDeliveryStreamVersionId' => '',
'DestinationId' => '',
'S3DestinationUpdate' => '',
'ExtendedS3DestinationUpdate' => '',
'RedshiftDestinationUpdate' => '',
'ElasticsearchDestinationUpdate' => '',
'AmazonopensearchserviceDestinationUpdate' => '',
'SplunkDestinationUpdate' => '',
'HttpEndpointDestinationUpdate' => '',
'AmazonOpenSearchServerlessDestinationUpdate' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json",
"x-amz-target: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/#X-Amz-Target=Firehose_20150804.UpdateDestination', [
'body' => '{
"DeliveryStreamName": "",
"CurrentDeliveryStreamVersionId": "",
"DestinationId": "",
"S3DestinationUpdate": "",
"ExtendedS3DestinationUpdate": "",
"RedshiftDestinationUpdate": "",
"ElasticsearchDestinationUpdate": "",
"AmazonopensearchserviceDestinationUpdate": "",
"SplunkDestinationUpdate": "",
"HttpEndpointDestinationUpdate": "",
"AmazonOpenSearchServerlessDestinationUpdate": ""
}',
'headers' => [
'content-type' => 'application/json',
'x-amz-target' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/#X-Amz-Target=Firehose_20150804.UpdateDestination');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'DeliveryStreamName' => '',
'CurrentDeliveryStreamVersionId' => '',
'DestinationId' => '',
'S3DestinationUpdate' => '',
'ExtendedS3DestinationUpdate' => '',
'RedshiftDestinationUpdate' => '',
'ElasticsearchDestinationUpdate' => '',
'AmazonopensearchserviceDestinationUpdate' => '',
'SplunkDestinationUpdate' => '',
'HttpEndpointDestinationUpdate' => '',
'AmazonOpenSearchServerlessDestinationUpdate' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'DeliveryStreamName' => '',
'CurrentDeliveryStreamVersionId' => '',
'DestinationId' => '',
'S3DestinationUpdate' => '',
'ExtendedS3DestinationUpdate' => '',
'RedshiftDestinationUpdate' => '',
'ElasticsearchDestinationUpdate' => '',
'AmazonopensearchserviceDestinationUpdate' => '',
'SplunkDestinationUpdate' => '',
'HttpEndpointDestinationUpdate' => '',
'AmazonOpenSearchServerlessDestinationUpdate' => ''
]));
$request->setRequestUrl('{{baseUrl}}/#X-Amz-Target=Firehose_20150804.UpdateDestination');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/#X-Amz-Target=Firehose_20150804.UpdateDestination' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"DeliveryStreamName": "",
"CurrentDeliveryStreamVersionId": "",
"DestinationId": "",
"S3DestinationUpdate": "",
"ExtendedS3DestinationUpdate": "",
"RedshiftDestinationUpdate": "",
"ElasticsearchDestinationUpdate": "",
"AmazonopensearchserviceDestinationUpdate": "",
"SplunkDestinationUpdate": "",
"HttpEndpointDestinationUpdate": "",
"AmazonOpenSearchServerlessDestinationUpdate": ""
}'
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/#X-Amz-Target=Firehose_20150804.UpdateDestination' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"DeliveryStreamName": "",
"CurrentDeliveryStreamVersionId": "",
"DestinationId": "",
"S3DestinationUpdate": "",
"ExtendedS3DestinationUpdate": "",
"RedshiftDestinationUpdate": "",
"ElasticsearchDestinationUpdate": "",
"AmazonopensearchserviceDestinationUpdate": "",
"SplunkDestinationUpdate": "",
"HttpEndpointDestinationUpdate": "",
"AmazonOpenSearchServerlessDestinationUpdate": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"DeliveryStreamName\": \"\",\n \"CurrentDeliveryStreamVersionId\": \"\",\n \"DestinationId\": \"\",\n \"S3DestinationUpdate\": \"\",\n \"ExtendedS3DestinationUpdate\": \"\",\n \"RedshiftDestinationUpdate\": \"\",\n \"ElasticsearchDestinationUpdate\": \"\",\n \"AmazonopensearchserviceDestinationUpdate\": \"\",\n \"SplunkDestinationUpdate\": \"\",\n \"HttpEndpointDestinationUpdate\": \"\",\n \"AmazonOpenSearchServerlessDestinationUpdate\": \"\"\n}"
headers = {
'x-amz-target': "",
'content-type': "application/json"
}
conn.request("POST", "/baseUrl/", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/#X-Amz-Target=Firehose_20150804.UpdateDestination"
payload = {
"DeliveryStreamName": "",
"CurrentDeliveryStreamVersionId": "",
"DestinationId": "",
"S3DestinationUpdate": "",
"ExtendedS3DestinationUpdate": "",
"RedshiftDestinationUpdate": "",
"ElasticsearchDestinationUpdate": "",
"AmazonopensearchserviceDestinationUpdate": "",
"SplunkDestinationUpdate": "",
"HttpEndpointDestinationUpdate": "",
"AmazonOpenSearchServerlessDestinationUpdate": ""
}
headers = {
"x-amz-target": "",
"content-type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/#X-Amz-Target=Firehose_20150804.UpdateDestination"
payload <- "{\n \"DeliveryStreamName\": \"\",\n \"CurrentDeliveryStreamVersionId\": \"\",\n \"DestinationId\": \"\",\n \"S3DestinationUpdate\": \"\",\n \"ExtendedS3DestinationUpdate\": \"\",\n \"RedshiftDestinationUpdate\": \"\",\n \"ElasticsearchDestinationUpdate\": \"\",\n \"AmazonopensearchserviceDestinationUpdate\": \"\",\n \"SplunkDestinationUpdate\": \"\",\n \"HttpEndpointDestinationUpdate\": \"\",\n \"AmazonOpenSearchServerlessDestinationUpdate\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, add_headers('x-amz-target' = ''), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/#X-Amz-Target=Firehose_20150804.UpdateDestination")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-amz-target"] = ''
request["content-type"] = 'application/json'
request.body = "{\n \"DeliveryStreamName\": \"\",\n \"CurrentDeliveryStreamVersionId\": \"\",\n \"DestinationId\": \"\",\n \"S3DestinationUpdate\": \"\",\n \"ExtendedS3DestinationUpdate\": \"\",\n \"RedshiftDestinationUpdate\": \"\",\n \"ElasticsearchDestinationUpdate\": \"\",\n \"AmazonopensearchserviceDestinationUpdate\": \"\",\n \"SplunkDestinationUpdate\": \"\",\n \"HttpEndpointDestinationUpdate\": \"\",\n \"AmazonOpenSearchServerlessDestinationUpdate\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/') do |req|
req.headers['x-amz-target'] = ''
req.body = "{\n \"DeliveryStreamName\": \"\",\n \"CurrentDeliveryStreamVersionId\": \"\",\n \"DestinationId\": \"\",\n \"S3DestinationUpdate\": \"\",\n \"ExtendedS3DestinationUpdate\": \"\",\n \"RedshiftDestinationUpdate\": \"\",\n \"ElasticsearchDestinationUpdate\": \"\",\n \"AmazonopensearchserviceDestinationUpdate\": \"\",\n \"SplunkDestinationUpdate\": \"\",\n \"HttpEndpointDestinationUpdate\": \"\",\n \"AmazonOpenSearchServerlessDestinationUpdate\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/#X-Amz-Target=Firehose_20150804.UpdateDestination";
let payload = json!({
"DeliveryStreamName": "",
"CurrentDeliveryStreamVersionId": "",
"DestinationId": "",
"S3DestinationUpdate": "",
"ExtendedS3DestinationUpdate": "",
"RedshiftDestinationUpdate": "",
"ElasticsearchDestinationUpdate": "",
"AmazonopensearchserviceDestinationUpdate": "",
"SplunkDestinationUpdate": "",
"HttpEndpointDestinationUpdate": "",
"AmazonOpenSearchServerlessDestinationUpdate": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("x-amz-target", "".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url '{{baseUrl}}/#X-Amz-Target=Firehose_20150804.UpdateDestination' \
--header 'content-type: application/json' \
--header 'x-amz-target: ' \
--data '{
"DeliveryStreamName": "",
"CurrentDeliveryStreamVersionId": "",
"DestinationId": "",
"S3DestinationUpdate": "",
"ExtendedS3DestinationUpdate": "",
"RedshiftDestinationUpdate": "",
"ElasticsearchDestinationUpdate": "",
"AmazonopensearchserviceDestinationUpdate": "",
"SplunkDestinationUpdate": "",
"HttpEndpointDestinationUpdate": "",
"AmazonOpenSearchServerlessDestinationUpdate": ""
}'
echo '{
"DeliveryStreamName": "",
"CurrentDeliveryStreamVersionId": "",
"DestinationId": "",
"S3DestinationUpdate": "",
"ExtendedS3DestinationUpdate": "",
"RedshiftDestinationUpdate": "",
"ElasticsearchDestinationUpdate": "",
"AmazonopensearchserviceDestinationUpdate": "",
"SplunkDestinationUpdate": "",
"HttpEndpointDestinationUpdate": "",
"AmazonOpenSearchServerlessDestinationUpdate": ""
}' | \
http POST '{{baseUrl}}/#X-Amz-Target=Firehose_20150804.UpdateDestination' \
content-type:application/json \
x-amz-target:''
wget --quiet \
--method POST \
--header 'x-amz-target: ' \
--header 'content-type: application/json' \
--body-data '{\n "DeliveryStreamName": "",\n "CurrentDeliveryStreamVersionId": "",\n "DestinationId": "",\n "S3DestinationUpdate": "",\n "ExtendedS3DestinationUpdate": "",\n "RedshiftDestinationUpdate": "",\n "ElasticsearchDestinationUpdate": "",\n "AmazonopensearchserviceDestinationUpdate": "",\n "SplunkDestinationUpdate": "",\n "HttpEndpointDestinationUpdate": "",\n "AmazonOpenSearchServerlessDestinationUpdate": ""\n}' \
--output-document \
- '{{baseUrl}}/#X-Amz-Target=Firehose_20150804.UpdateDestination'
import Foundation
let headers = [
"x-amz-target": "",
"content-type": "application/json"
]
let parameters = [
"DeliveryStreamName": "",
"CurrentDeliveryStreamVersionId": "",
"DestinationId": "",
"S3DestinationUpdate": "",
"ExtendedS3DestinationUpdate": "",
"RedshiftDestinationUpdate": "",
"ElasticsearchDestinationUpdate": "",
"AmazonopensearchserviceDestinationUpdate": "",
"SplunkDestinationUpdate": "",
"HttpEndpointDestinationUpdate": "",
"AmazonOpenSearchServerlessDestinationUpdate": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/#X-Amz-Target=Firehose_20150804.UpdateDestination")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()