Amazon Kinesis
POST
AddTagsToStream
{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.AddTagsToStream
HEADERS
X-Amz-Target
BODY json
{
"StreamName": "",
"Tags": "",
"StreamARN": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.AddTagsToStream");
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 \"StreamName\": \"\",\n \"Tags\": \"\",\n \"StreamARN\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.AddTagsToStream" {:headers {:x-amz-target ""}
:content-type :json
:form-params {:StreamName ""
:Tags ""
:StreamARN ""}})
require "http/client"
url = "{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.AddTagsToStream"
headers = HTTP::Headers{
"x-amz-target" => ""
"content-type" => "application/json"
}
reqBody = "{\n \"StreamName\": \"\",\n \"Tags\": \"\",\n \"StreamARN\": \"\"\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=Kinesis_20131202.AddTagsToStream"),
Headers =
{
{ "x-amz-target", "" },
},
Content = new StringContent("{\n \"StreamName\": \"\",\n \"Tags\": \"\",\n \"StreamARN\": \"\"\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=Kinesis_20131202.AddTagsToStream");
var request = new RestRequest("", Method.Post);
request.AddHeader("x-amz-target", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"StreamName\": \"\",\n \"Tags\": \"\",\n \"StreamARN\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.AddTagsToStream"
payload := strings.NewReader("{\n \"StreamName\": \"\",\n \"Tags\": \"\",\n \"StreamARN\": \"\"\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: 55
{
"StreamName": "",
"Tags": "",
"StreamARN": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.AddTagsToStream")
.setHeader("x-amz-target", "")
.setHeader("content-type", "application/json")
.setBody("{\n \"StreamName\": \"\",\n \"Tags\": \"\",\n \"StreamARN\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.AddTagsToStream"))
.header("x-amz-target", "")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"StreamName\": \"\",\n \"Tags\": \"\",\n \"StreamARN\": \"\"\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 \"StreamName\": \"\",\n \"Tags\": \"\",\n \"StreamARN\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.AddTagsToStream")
.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=Kinesis_20131202.AddTagsToStream")
.header("x-amz-target", "")
.header("content-type", "application/json")
.body("{\n \"StreamName\": \"\",\n \"Tags\": \"\",\n \"StreamARN\": \"\"\n}")
.asString();
const data = JSON.stringify({
StreamName: '',
Tags: '',
StreamARN: ''
});
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=Kinesis_20131202.AddTagsToStream');
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=Kinesis_20131202.AddTagsToStream',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {StreamName: '', Tags: '', StreamARN: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.AddTagsToStream';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"StreamName":"","Tags":"","StreamARN":""}'
};
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=Kinesis_20131202.AddTagsToStream',
method: 'POST',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
},
processData: false,
data: '{\n "StreamName": "",\n "Tags": "",\n "StreamARN": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"StreamName\": \"\",\n \"Tags\": \"\",\n \"StreamARN\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.AddTagsToStream")
.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({StreamName: '', Tags: '', StreamARN: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.AddTagsToStream',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: {StreamName: '', Tags: '', StreamARN: ''},
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=Kinesis_20131202.AddTagsToStream');
req.headers({
'x-amz-target': '',
'content-type': 'application/json'
});
req.type('json');
req.send({
StreamName: '',
Tags: '',
StreamARN: ''
});
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=Kinesis_20131202.AddTagsToStream',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {StreamName: '', Tags: '', StreamARN: ''}
};
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=Kinesis_20131202.AddTagsToStream';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"StreamName":"","Tags":"","StreamARN":""}'
};
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 = @{ @"StreamName": @"",
@"Tags": @"",
@"StreamARN": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.AddTagsToStream"]
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=Kinesis_20131202.AddTagsToStream" in
let headers = Header.add_list (Header.init ()) [
("x-amz-target", "");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"StreamName\": \"\",\n \"Tags\": \"\",\n \"StreamARN\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.AddTagsToStream",
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([
'StreamName' => '',
'Tags' => '',
'StreamARN' => ''
]),
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=Kinesis_20131202.AddTagsToStream', [
'body' => '{
"StreamName": "",
"Tags": "",
"StreamARN": ""
}',
'headers' => [
'content-type' => 'application/json',
'x-amz-target' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.AddTagsToStream');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'StreamName' => '',
'Tags' => '',
'StreamARN' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'StreamName' => '',
'Tags' => '',
'StreamARN' => ''
]));
$request->setRequestUrl('{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.AddTagsToStream');
$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=Kinesis_20131202.AddTagsToStream' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"StreamName": "",
"Tags": "",
"StreamARN": ""
}'
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.AddTagsToStream' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"StreamName": "",
"Tags": "",
"StreamARN": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"StreamName\": \"\",\n \"Tags\": \"\",\n \"StreamARN\": \"\"\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=Kinesis_20131202.AddTagsToStream"
payload = {
"StreamName": "",
"Tags": "",
"StreamARN": ""
}
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=Kinesis_20131202.AddTagsToStream"
payload <- "{\n \"StreamName\": \"\",\n \"Tags\": \"\",\n \"StreamARN\": \"\"\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=Kinesis_20131202.AddTagsToStream")
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 \"StreamName\": \"\",\n \"Tags\": \"\",\n \"StreamARN\": \"\"\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 \"StreamName\": \"\",\n \"Tags\": \"\",\n \"StreamARN\": \"\"\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=Kinesis_20131202.AddTagsToStream";
let payload = json!({
"StreamName": "",
"Tags": "",
"StreamARN": ""
});
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=Kinesis_20131202.AddTagsToStream' \
--header 'content-type: application/json' \
--header 'x-amz-target: ' \
--data '{
"StreamName": "",
"Tags": "",
"StreamARN": ""
}'
echo '{
"StreamName": "",
"Tags": "",
"StreamARN": ""
}' | \
http POST '{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.AddTagsToStream' \
content-type:application/json \
x-amz-target:''
wget --quiet \
--method POST \
--header 'x-amz-target: ' \
--header 'content-type: application/json' \
--body-data '{\n "StreamName": "",\n "Tags": "",\n "StreamARN": ""\n}' \
--output-document \
- '{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.AddTagsToStream'
import Foundation
let headers = [
"x-amz-target": "",
"content-type": "application/json"
]
let parameters = [
"StreamName": "",
"Tags": "",
"StreamARN": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.AddTagsToStream")! 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
CreateStream
{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.CreateStream
HEADERS
X-Amz-Target
BODY json
{
"StreamName": "",
"ShardCount": "",
"StreamModeDetails": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.CreateStream");
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 \"StreamName\": \"\",\n \"ShardCount\": \"\",\n \"StreamModeDetails\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.CreateStream" {:headers {:x-amz-target ""}
:content-type :json
:form-params {:StreamName ""
:ShardCount ""
:StreamModeDetails ""}})
require "http/client"
url = "{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.CreateStream"
headers = HTTP::Headers{
"x-amz-target" => ""
"content-type" => "application/json"
}
reqBody = "{\n \"StreamName\": \"\",\n \"ShardCount\": \"\",\n \"StreamModeDetails\": \"\"\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=Kinesis_20131202.CreateStream"),
Headers =
{
{ "x-amz-target", "" },
},
Content = new StringContent("{\n \"StreamName\": \"\",\n \"ShardCount\": \"\",\n \"StreamModeDetails\": \"\"\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=Kinesis_20131202.CreateStream");
var request = new RestRequest("", Method.Post);
request.AddHeader("x-amz-target", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"StreamName\": \"\",\n \"ShardCount\": \"\",\n \"StreamModeDetails\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.CreateStream"
payload := strings.NewReader("{\n \"StreamName\": \"\",\n \"ShardCount\": \"\",\n \"StreamModeDetails\": \"\"\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: 69
{
"StreamName": "",
"ShardCount": "",
"StreamModeDetails": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.CreateStream")
.setHeader("x-amz-target", "")
.setHeader("content-type", "application/json")
.setBody("{\n \"StreamName\": \"\",\n \"ShardCount\": \"\",\n \"StreamModeDetails\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.CreateStream"))
.header("x-amz-target", "")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"StreamName\": \"\",\n \"ShardCount\": \"\",\n \"StreamModeDetails\": \"\"\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 \"StreamName\": \"\",\n \"ShardCount\": \"\",\n \"StreamModeDetails\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.CreateStream")
.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=Kinesis_20131202.CreateStream")
.header("x-amz-target", "")
.header("content-type", "application/json")
.body("{\n \"StreamName\": \"\",\n \"ShardCount\": \"\",\n \"StreamModeDetails\": \"\"\n}")
.asString();
const data = JSON.stringify({
StreamName: '',
ShardCount: '',
StreamModeDetails: ''
});
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=Kinesis_20131202.CreateStream');
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=Kinesis_20131202.CreateStream',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {StreamName: '', ShardCount: '', StreamModeDetails: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.CreateStream';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"StreamName":"","ShardCount":"","StreamModeDetails":""}'
};
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=Kinesis_20131202.CreateStream',
method: 'POST',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
},
processData: false,
data: '{\n "StreamName": "",\n "ShardCount": "",\n "StreamModeDetails": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"StreamName\": \"\",\n \"ShardCount\": \"\",\n \"StreamModeDetails\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.CreateStream")
.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({StreamName: '', ShardCount: '', StreamModeDetails: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.CreateStream',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: {StreamName: '', ShardCount: '', StreamModeDetails: ''},
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=Kinesis_20131202.CreateStream');
req.headers({
'x-amz-target': '',
'content-type': 'application/json'
});
req.type('json');
req.send({
StreamName: '',
ShardCount: '',
StreamModeDetails: ''
});
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=Kinesis_20131202.CreateStream',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {StreamName: '', ShardCount: '', StreamModeDetails: ''}
};
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=Kinesis_20131202.CreateStream';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"StreamName":"","ShardCount":"","StreamModeDetails":""}'
};
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 = @{ @"StreamName": @"",
@"ShardCount": @"",
@"StreamModeDetails": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.CreateStream"]
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=Kinesis_20131202.CreateStream" in
let headers = Header.add_list (Header.init ()) [
("x-amz-target", "");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"StreamName\": \"\",\n \"ShardCount\": \"\",\n \"StreamModeDetails\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.CreateStream",
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([
'StreamName' => '',
'ShardCount' => '',
'StreamModeDetails' => ''
]),
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=Kinesis_20131202.CreateStream', [
'body' => '{
"StreamName": "",
"ShardCount": "",
"StreamModeDetails": ""
}',
'headers' => [
'content-type' => 'application/json',
'x-amz-target' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.CreateStream');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'StreamName' => '',
'ShardCount' => '',
'StreamModeDetails' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'StreamName' => '',
'ShardCount' => '',
'StreamModeDetails' => ''
]));
$request->setRequestUrl('{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.CreateStream');
$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=Kinesis_20131202.CreateStream' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"StreamName": "",
"ShardCount": "",
"StreamModeDetails": ""
}'
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.CreateStream' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"StreamName": "",
"ShardCount": "",
"StreamModeDetails": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"StreamName\": \"\",\n \"ShardCount\": \"\",\n \"StreamModeDetails\": \"\"\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=Kinesis_20131202.CreateStream"
payload = {
"StreamName": "",
"ShardCount": "",
"StreamModeDetails": ""
}
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=Kinesis_20131202.CreateStream"
payload <- "{\n \"StreamName\": \"\",\n \"ShardCount\": \"\",\n \"StreamModeDetails\": \"\"\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=Kinesis_20131202.CreateStream")
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 \"StreamName\": \"\",\n \"ShardCount\": \"\",\n \"StreamModeDetails\": \"\"\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 \"StreamName\": \"\",\n \"ShardCount\": \"\",\n \"StreamModeDetails\": \"\"\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=Kinesis_20131202.CreateStream";
let payload = json!({
"StreamName": "",
"ShardCount": "",
"StreamModeDetails": ""
});
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=Kinesis_20131202.CreateStream' \
--header 'content-type: application/json' \
--header 'x-amz-target: ' \
--data '{
"StreamName": "",
"ShardCount": "",
"StreamModeDetails": ""
}'
echo '{
"StreamName": "",
"ShardCount": "",
"StreamModeDetails": ""
}' | \
http POST '{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.CreateStream' \
content-type:application/json \
x-amz-target:''
wget --quiet \
--method POST \
--header 'x-amz-target: ' \
--header 'content-type: application/json' \
--body-data '{\n "StreamName": "",\n "ShardCount": "",\n "StreamModeDetails": ""\n}' \
--output-document \
- '{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.CreateStream'
import Foundation
let headers = [
"x-amz-target": "",
"content-type": "application/json"
]
let parameters = [
"StreamName": "",
"ShardCount": "",
"StreamModeDetails": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.CreateStream")! 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
DecreaseStreamRetentionPeriod
{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.DecreaseStreamRetentionPeriod
HEADERS
X-Amz-Target
BODY json
{
"StreamName": "",
"RetentionPeriodHours": "",
"StreamARN": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.DecreaseStreamRetentionPeriod");
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 \"StreamName\": \"\",\n \"RetentionPeriodHours\": \"\",\n \"StreamARN\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.DecreaseStreamRetentionPeriod" {:headers {:x-amz-target ""}
:content-type :json
:form-params {:StreamName ""
:RetentionPeriodHours ""
:StreamARN ""}})
require "http/client"
url = "{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.DecreaseStreamRetentionPeriod"
headers = HTTP::Headers{
"x-amz-target" => ""
"content-type" => "application/json"
}
reqBody = "{\n \"StreamName\": \"\",\n \"RetentionPeriodHours\": \"\",\n \"StreamARN\": \"\"\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=Kinesis_20131202.DecreaseStreamRetentionPeriod"),
Headers =
{
{ "x-amz-target", "" },
},
Content = new StringContent("{\n \"StreamName\": \"\",\n \"RetentionPeriodHours\": \"\",\n \"StreamARN\": \"\"\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=Kinesis_20131202.DecreaseStreamRetentionPeriod");
var request = new RestRequest("", Method.Post);
request.AddHeader("x-amz-target", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"StreamName\": \"\",\n \"RetentionPeriodHours\": \"\",\n \"StreamARN\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.DecreaseStreamRetentionPeriod"
payload := strings.NewReader("{\n \"StreamName\": \"\",\n \"RetentionPeriodHours\": \"\",\n \"StreamARN\": \"\"\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: 71
{
"StreamName": "",
"RetentionPeriodHours": "",
"StreamARN": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.DecreaseStreamRetentionPeriod")
.setHeader("x-amz-target", "")
.setHeader("content-type", "application/json")
.setBody("{\n \"StreamName\": \"\",\n \"RetentionPeriodHours\": \"\",\n \"StreamARN\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.DecreaseStreamRetentionPeriod"))
.header("x-amz-target", "")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"StreamName\": \"\",\n \"RetentionPeriodHours\": \"\",\n \"StreamARN\": \"\"\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 \"StreamName\": \"\",\n \"RetentionPeriodHours\": \"\",\n \"StreamARN\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.DecreaseStreamRetentionPeriod")
.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=Kinesis_20131202.DecreaseStreamRetentionPeriod")
.header("x-amz-target", "")
.header("content-type", "application/json")
.body("{\n \"StreamName\": \"\",\n \"RetentionPeriodHours\": \"\",\n \"StreamARN\": \"\"\n}")
.asString();
const data = JSON.stringify({
StreamName: '',
RetentionPeriodHours: '',
StreamARN: ''
});
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=Kinesis_20131202.DecreaseStreamRetentionPeriod');
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=Kinesis_20131202.DecreaseStreamRetentionPeriod',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {StreamName: '', RetentionPeriodHours: '', StreamARN: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.DecreaseStreamRetentionPeriod';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"StreamName":"","RetentionPeriodHours":"","StreamARN":""}'
};
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=Kinesis_20131202.DecreaseStreamRetentionPeriod',
method: 'POST',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
},
processData: false,
data: '{\n "StreamName": "",\n "RetentionPeriodHours": "",\n "StreamARN": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"StreamName\": \"\",\n \"RetentionPeriodHours\": \"\",\n \"StreamARN\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.DecreaseStreamRetentionPeriod")
.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({StreamName: '', RetentionPeriodHours: '', StreamARN: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.DecreaseStreamRetentionPeriod',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: {StreamName: '', RetentionPeriodHours: '', StreamARN: ''},
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=Kinesis_20131202.DecreaseStreamRetentionPeriod');
req.headers({
'x-amz-target': '',
'content-type': 'application/json'
});
req.type('json');
req.send({
StreamName: '',
RetentionPeriodHours: '',
StreamARN: ''
});
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=Kinesis_20131202.DecreaseStreamRetentionPeriod',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {StreamName: '', RetentionPeriodHours: '', StreamARN: ''}
};
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=Kinesis_20131202.DecreaseStreamRetentionPeriod';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"StreamName":"","RetentionPeriodHours":"","StreamARN":""}'
};
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 = @{ @"StreamName": @"",
@"RetentionPeriodHours": @"",
@"StreamARN": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.DecreaseStreamRetentionPeriod"]
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=Kinesis_20131202.DecreaseStreamRetentionPeriod" in
let headers = Header.add_list (Header.init ()) [
("x-amz-target", "");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"StreamName\": \"\",\n \"RetentionPeriodHours\": \"\",\n \"StreamARN\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.DecreaseStreamRetentionPeriod",
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([
'StreamName' => '',
'RetentionPeriodHours' => '',
'StreamARN' => ''
]),
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=Kinesis_20131202.DecreaseStreamRetentionPeriod', [
'body' => '{
"StreamName": "",
"RetentionPeriodHours": "",
"StreamARN": ""
}',
'headers' => [
'content-type' => 'application/json',
'x-amz-target' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.DecreaseStreamRetentionPeriod');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'StreamName' => '',
'RetentionPeriodHours' => '',
'StreamARN' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'StreamName' => '',
'RetentionPeriodHours' => '',
'StreamARN' => ''
]));
$request->setRequestUrl('{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.DecreaseStreamRetentionPeriod');
$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=Kinesis_20131202.DecreaseStreamRetentionPeriod' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"StreamName": "",
"RetentionPeriodHours": "",
"StreamARN": ""
}'
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.DecreaseStreamRetentionPeriod' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"StreamName": "",
"RetentionPeriodHours": "",
"StreamARN": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"StreamName\": \"\",\n \"RetentionPeriodHours\": \"\",\n \"StreamARN\": \"\"\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=Kinesis_20131202.DecreaseStreamRetentionPeriod"
payload = {
"StreamName": "",
"RetentionPeriodHours": "",
"StreamARN": ""
}
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=Kinesis_20131202.DecreaseStreamRetentionPeriod"
payload <- "{\n \"StreamName\": \"\",\n \"RetentionPeriodHours\": \"\",\n \"StreamARN\": \"\"\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=Kinesis_20131202.DecreaseStreamRetentionPeriod")
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 \"StreamName\": \"\",\n \"RetentionPeriodHours\": \"\",\n \"StreamARN\": \"\"\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 \"StreamName\": \"\",\n \"RetentionPeriodHours\": \"\",\n \"StreamARN\": \"\"\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=Kinesis_20131202.DecreaseStreamRetentionPeriod";
let payload = json!({
"StreamName": "",
"RetentionPeriodHours": "",
"StreamARN": ""
});
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=Kinesis_20131202.DecreaseStreamRetentionPeriod' \
--header 'content-type: application/json' \
--header 'x-amz-target: ' \
--data '{
"StreamName": "",
"RetentionPeriodHours": "",
"StreamARN": ""
}'
echo '{
"StreamName": "",
"RetentionPeriodHours": "",
"StreamARN": ""
}' | \
http POST '{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.DecreaseStreamRetentionPeriod' \
content-type:application/json \
x-amz-target:''
wget --quiet \
--method POST \
--header 'x-amz-target: ' \
--header 'content-type: application/json' \
--body-data '{\n "StreamName": "",\n "RetentionPeriodHours": "",\n "StreamARN": ""\n}' \
--output-document \
- '{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.DecreaseStreamRetentionPeriod'
import Foundation
let headers = [
"x-amz-target": "",
"content-type": "application/json"
]
let parameters = [
"StreamName": "",
"RetentionPeriodHours": "",
"StreamARN": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.DecreaseStreamRetentionPeriod")! 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
DeleteStream
{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.DeleteStream
HEADERS
X-Amz-Target
BODY json
{
"StreamName": "",
"EnforceConsumerDeletion": "",
"StreamARN": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.DeleteStream");
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 \"StreamName\": \"\",\n \"EnforceConsumerDeletion\": \"\",\n \"StreamARN\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.DeleteStream" {:headers {:x-amz-target ""}
:content-type :json
:form-params {:StreamName ""
:EnforceConsumerDeletion ""
:StreamARN ""}})
require "http/client"
url = "{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.DeleteStream"
headers = HTTP::Headers{
"x-amz-target" => ""
"content-type" => "application/json"
}
reqBody = "{\n \"StreamName\": \"\",\n \"EnforceConsumerDeletion\": \"\",\n \"StreamARN\": \"\"\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=Kinesis_20131202.DeleteStream"),
Headers =
{
{ "x-amz-target", "" },
},
Content = new StringContent("{\n \"StreamName\": \"\",\n \"EnforceConsumerDeletion\": \"\",\n \"StreamARN\": \"\"\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=Kinesis_20131202.DeleteStream");
var request = new RestRequest("", Method.Post);
request.AddHeader("x-amz-target", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"StreamName\": \"\",\n \"EnforceConsumerDeletion\": \"\",\n \"StreamARN\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.DeleteStream"
payload := strings.NewReader("{\n \"StreamName\": \"\",\n \"EnforceConsumerDeletion\": \"\",\n \"StreamARN\": \"\"\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: 74
{
"StreamName": "",
"EnforceConsumerDeletion": "",
"StreamARN": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.DeleteStream")
.setHeader("x-amz-target", "")
.setHeader("content-type", "application/json")
.setBody("{\n \"StreamName\": \"\",\n \"EnforceConsumerDeletion\": \"\",\n \"StreamARN\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.DeleteStream"))
.header("x-amz-target", "")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"StreamName\": \"\",\n \"EnforceConsumerDeletion\": \"\",\n \"StreamARN\": \"\"\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 \"StreamName\": \"\",\n \"EnforceConsumerDeletion\": \"\",\n \"StreamARN\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.DeleteStream")
.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=Kinesis_20131202.DeleteStream")
.header("x-amz-target", "")
.header("content-type", "application/json")
.body("{\n \"StreamName\": \"\",\n \"EnforceConsumerDeletion\": \"\",\n \"StreamARN\": \"\"\n}")
.asString();
const data = JSON.stringify({
StreamName: '',
EnforceConsumerDeletion: '',
StreamARN: ''
});
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=Kinesis_20131202.DeleteStream');
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=Kinesis_20131202.DeleteStream',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {StreamName: '', EnforceConsumerDeletion: '', StreamARN: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.DeleteStream';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"StreamName":"","EnforceConsumerDeletion":"","StreamARN":""}'
};
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=Kinesis_20131202.DeleteStream',
method: 'POST',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
},
processData: false,
data: '{\n "StreamName": "",\n "EnforceConsumerDeletion": "",\n "StreamARN": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"StreamName\": \"\",\n \"EnforceConsumerDeletion\": \"\",\n \"StreamARN\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.DeleteStream")
.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({StreamName: '', EnforceConsumerDeletion: '', StreamARN: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.DeleteStream',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: {StreamName: '', EnforceConsumerDeletion: '', StreamARN: ''},
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=Kinesis_20131202.DeleteStream');
req.headers({
'x-amz-target': '',
'content-type': 'application/json'
});
req.type('json');
req.send({
StreamName: '',
EnforceConsumerDeletion: '',
StreamARN: ''
});
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=Kinesis_20131202.DeleteStream',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {StreamName: '', EnforceConsumerDeletion: '', StreamARN: ''}
};
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=Kinesis_20131202.DeleteStream';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"StreamName":"","EnforceConsumerDeletion":"","StreamARN":""}'
};
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 = @{ @"StreamName": @"",
@"EnforceConsumerDeletion": @"",
@"StreamARN": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.DeleteStream"]
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=Kinesis_20131202.DeleteStream" in
let headers = Header.add_list (Header.init ()) [
("x-amz-target", "");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"StreamName\": \"\",\n \"EnforceConsumerDeletion\": \"\",\n \"StreamARN\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.DeleteStream",
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([
'StreamName' => '',
'EnforceConsumerDeletion' => '',
'StreamARN' => ''
]),
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=Kinesis_20131202.DeleteStream', [
'body' => '{
"StreamName": "",
"EnforceConsumerDeletion": "",
"StreamARN": ""
}',
'headers' => [
'content-type' => 'application/json',
'x-amz-target' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.DeleteStream');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'StreamName' => '',
'EnforceConsumerDeletion' => '',
'StreamARN' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'StreamName' => '',
'EnforceConsumerDeletion' => '',
'StreamARN' => ''
]));
$request->setRequestUrl('{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.DeleteStream');
$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=Kinesis_20131202.DeleteStream' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"StreamName": "",
"EnforceConsumerDeletion": "",
"StreamARN": ""
}'
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.DeleteStream' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"StreamName": "",
"EnforceConsumerDeletion": "",
"StreamARN": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"StreamName\": \"\",\n \"EnforceConsumerDeletion\": \"\",\n \"StreamARN\": \"\"\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=Kinesis_20131202.DeleteStream"
payload = {
"StreamName": "",
"EnforceConsumerDeletion": "",
"StreamARN": ""
}
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=Kinesis_20131202.DeleteStream"
payload <- "{\n \"StreamName\": \"\",\n \"EnforceConsumerDeletion\": \"\",\n \"StreamARN\": \"\"\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=Kinesis_20131202.DeleteStream")
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 \"StreamName\": \"\",\n \"EnforceConsumerDeletion\": \"\",\n \"StreamARN\": \"\"\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 \"StreamName\": \"\",\n \"EnforceConsumerDeletion\": \"\",\n \"StreamARN\": \"\"\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=Kinesis_20131202.DeleteStream";
let payload = json!({
"StreamName": "",
"EnforceConsumerDeletion": "",
"StreamARN": ""
});
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=Kinesis_20131202.DeleteStream' \
--header 'content-type: application/json' \
--header 'x-amz-target: ' \
--data '{
"StreamName": "",
"EnforceConsumerDeletion": "",
"StreamARN": ""
}'
echo '{
"StreamName": "",
"EnforceConsumerDeletion": "",
"StreamARN": ""
}' | \
http POST '{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.DeleteStream' \
content-type:application/json \
x-amz-target:''
wget --quiet \
--method POST \
--header 'x-amz-target: ' \
--header 'content-type: application/json' \
--body-data '{\n "StreamName": "",\n "EnforceConsumerDeletion": "",\n "StreamARN": ""\n}' \
--output-document \
- '{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.DeleteStream'
import Foundation
let headers = [
"x-amz-target": "",
"content-type": "application/json"
]
let parameters = [
"StreamName": "",
"EnforceConsumerDeletion": "",
"StreamARN": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.DeleteStream")! 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
DeregisterStreamConsumer
{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.DeregisterStreamConsumer
HEADERS
X-Amz-Target
BODY json
{
"StreamARN": "",
"ConsumerName": "",
"ConsumerARN": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.DeregisterStreamConsumer");
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 \"StreamARN\": \"\",\n \"ConsumerName\": \"\",\n \"ConsumerARN\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.DeregisterStreamConsumer" {:headers {:x-amz-target ""}
:content-type :json
:form-params {:StreamARN ""
:ConsumerName ""
:ConsumerARN ""}})
require "http/client"
url = "{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.DeregisterStreamConsumer"
headers = HTTP::Headers{
"x-amz-target" => ""
"content-type" => "application/json"
}
reqBody = "{\n \"StreamARN\": \"\",\n \"ConsumerName\": \"\",\n \"ConsumerARN\": \"\"\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=Kinesis_20131202.DeregisterStreamConsumer"),
Headers =
{
{ "x-amz-target", "" },
},
Content = new StringContent("{\n \"StreamARN\": \"\",\n \"ConsumerName\": \"\",\n \"ConsumerARN\": \"\"\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=Kinesis_20131202.DeregisterStreamConsumer");
var request = new RestRequest("", Method.Post);
request.AddHeader("x-amz-target", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"StreamARN\": \"\",\n \"ConsumerName\": \"\",\n \"ConsumerARN\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.DeregisterStreamConsumer"
payload := strings.NewReader("{\n \"StreamARN\": \"\",\n \"ConsumerName\": \"\",\n \"ConsumerARN\": \"\"\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: 64
{
"StreamARN": "",
"ConsumerName": "",
"ConsumerARN": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.DeregisterStreamConsumer")
.setHeader("x-amz-target", "")
.setHeader("content-type", "application/json")
.setBody("{\n \"StreamARN\": \"\",\n \"ConsumerName\": \"\",\n \"ConsumerARN\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.DeregisterStreamConsumer"))
.header("x-amz-target", "")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"StreamARN\": \"\",\n \"ConsumerName\": \"\",\n \"ConsumerARN\": \"\"\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 \"StreamARN\": \"\",\n \"ConsumerName\": \"\",\n \"ConsumerARN\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.DeregisterStreamConsumer")
.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=Kinesis_20131202.DeregisterStreamConsumer")
.header("x-amz-target", "")
.header("content-type", "application/json")
.body("{\n \"StreamARN\": \"\",\n \"ConsumerName\": \"\",\n \"ConsumerARN\": \"\"\n}")
.asString();
const data = JSON.stringify({
StreamARN: '',
ConsumerName: '',
ConsumerARN: ''
});
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=Kinesis_20131202.DeregisterStreamConsumer');
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=Kinesis_20131202.DeregisterStreamConsumer',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {StreamARN: '', ConsumerName: '', ConsumerARN: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.DeregisterStreamConsumer';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"StreamARN":"","ConsumerName":"","ConsumerARN":""}'
};
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=Kinesis_20131202.DeregisterStreamConsumer',
method: 'POST',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
},
processData: false,
data: '{\n "StreamARN": "",\n "ConsumerName": "",\n "ConsumerARN": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"StreamARN\": \"\",\n \"ConsumerName\": \"\",\n \"ConsumerARN\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.DeregisterStreamConsumer")
.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({StreamARN: '', ConsumerName: '', ConsumerARN: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.DeregisterStreamConsumer',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: {StreamARN: '', ConsumerName: '', ConsumerARN: ''},
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=Kinesis_20131202.DeregisterStreamConsumer');
req.headers({
'x-amz-target': '',
'content-type': 'application/json'
});
req.type('json');
req.send({
StreamARN: '',
ConsumerName: '',
ConsumerARN: ''
});
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=Kinesis_20131202.DeregisterStreamConsumer',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {StreamARN: '', ConsumerName: '', ConsumerARN: ''}
};
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=Kinesis_20131202.DeregisterStreamConsumer';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"StreamARN":"","ConsumerName":"","ConsumerARN":""}'
};
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 = @{ @"StreamARN": @"",
@"ConsumerName": @"",
@"ConsumerARN": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.DeregisterStreamConsumer"]
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=Kinesis_20131202.DeregisterStreamConsumer" in
let headers = Header.add_list (Header.init ()) [
("x-amz-target", "");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"StreamARN\": \"\",\n \"ConsumerName\": \"\",\n \"ConsumerARN\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.DeregisterStreamConsumer",
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([
'StreamARN' => '',
'ConsumerName' => '',
'ConsumerARN' => ''
]),
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=Kinesis_20131202.DeregisterStreamConsumer', [
'body' => '{
"StreamARN": "",
"ConsumerName": "",
"ConsumerARN": ""
}',
'headers' => [
'content-type' => 'application/json',
'x-amz-target' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.DeregisterStreamConsumer');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'StreamARN' => '',
'ConsumerName' => '',
'ConsumerARN' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'StreamARN' => '',
'ConsumerName' => '',
'ConsumerARN' => ''
]));
$request->setRequestUrl('{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.DeregisterStreamConsumer');
$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=Kinesis_20131202.DeregisterStreamConsumer' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"StreamARN": "",
"ConsumerName": "",
"ConsumerARN": ""
}'
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.DeregisterStreamConsumer' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"StreamARN": "",
"ConsumerName": "",
"ConsumerARN": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"StreamARN\": \"\",\n \"ConsumerName\": \"\",\n \"ConsumerARN\": \"\"\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=Kinesis_20131202.DeregisterStreamConsumer"
payload = {
"StreamARN": "",
"ConsumerName": "",
"ConsumerARN": ""
}
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=Kinesis_20131202.DeregisterStreamConsumer"
payload <- "{\n \"StreamARN\": \"\",\n \"ConsumerName\": \"\",\n \"ConsumerARN\": \"\"\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=Kinesis_20131202.DeregisterStreamConsumer")
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 \"StreamARN\": \"\",\n \"ConsumerName\": \"\",\n \"ConsumerARN\": \"\"\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 \"StreamARN\": \"\",\n \"ConsumerName\": \"\",\n \"ConsumerARN\": \"\"\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=Kinesis_20131202.DeregisterStreamConsumer";
let payload = json!({
"StreamARN": "",
"ConsumerName": "",
"ConsumerARN": ""
});
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=Kinesis_20131202.DeregisterStreamConsumer' \
--header 'content-type: application/json' \
--header 'x-amz-target: ' \
--data '{
"StreamARN": "",
"ConsumerName": "",
"ConsumerARN": ""
}'
echo '{
"StreamARN": "",
"ConsumerName": "",
"ConsumerARN": ""
}' | \
http POST '{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.DeregisterStreamConsumer' \
content-type:application/json \
x-amz-target:''
wget --quiet \
--method POST \
--header 'x-amz-target: ' \
--header 'content-type: application/json' \
--body-data '{\n "StreamARN": "",\n "ConsumerName": "",\n "ConsumerARN": ""\n}' \
--output-document \
- '{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.DeregisterStreamConsumer'
import Foundation
let headers = [
"x-amz-target": "",
"content-type": "application/json"
]
let parameters = [
"StreamARN": "",
"ConsumerName": "",
"ConsumerARN": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.DeregisterStreamConsumer")! 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
DescribeLimits
{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.DescribeLimits
HEADERS
X-Amz-Target
BODY json
{}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.DescribeLimits");
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, "{}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.DescribeLimits" {:headers {:x-amz-target ""}
:content-type :json})
require "http/client"
url = "{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.DescribeLimits"
headers = HTTP::Headers{
"x-amz-target" => ""
"content-type" => "application/json"
}
reqBody = "{}"
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=Kinesis_20131202.DescribeLimits"),
Headers =
{
{ "x-amz-target", "" },
},
Content = new StringContent("{}")
{
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=Kinesis_20131202.DescribeLimits");
var request = new RestRequest("", Method.Post);
request.AddHeader("x-amz-target", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.DescribeLimits"
payload := strings.NewReader("{}")
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: 2
{}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.DescribeLimits")
.setHeader("x-amz-target", "")
.setHeader("content-type", "application/json")
.setBody("{}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.DescribeLimits"))
.header("x-amz-target", "")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{}"))
.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, "{}");
Request request = new Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.DescribeLimits")
.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=Kinesis_20131202.DescribeLimits")
.header("x-amz-target", "")
.header("content-type", "application/json")
.body("{}")
.asString();
const data = JSON.stringify({});
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=Kinesis_20131202.DescribeLimits');
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=Kinesis_20131202.DescribeLimits',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.DescribeLimits';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{}'
};
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=Kinesis_20131202.DescribeLimits',
method: 'POST',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
},
processData: false,
data: '{}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{}")
val request = Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.DescribeLimits")
.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({}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.DescribeLimits',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: {},
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=Kinesis_20131202.DescribeLimits');
req.headers({
'x-amz-target': '',
'content-type': 'application/json'
});
req.type('json');
req.send({});
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=Kinesis_20131202.DescribeLimits',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {}
};
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=Kinesis_20131202.DescribeLimits';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{}'
};
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 = @{ };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.DescribeLimits"]
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=Kinesis_20131202.DescribeLimits" in
let headers = Header.add_list (Header.init ()) [
("x-amz-target", "");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.DescribeLimits",
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([
]),
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=Kinesis_20131202.DescribeLimits', [
'body' => '{}',
'headers' => [
'content-type' => 'application/json',
'x-amz-target' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.DescribeLimits');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
]));
$request->setRequestUrl('{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.DescribeLimits');
$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=Kinesis_20131202.DescribeLimits' -Method POST -Headers $headers -ContentType 'application/json' -Body '{}'
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.DescribeLimits' -Method POST -Headers $headers -ContentType 'application/json' -Body '{}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{}"
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=Kinesis_20131202.DescribeLimits"
payload = {}
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=Kinesis_20131202.DescribeLimits"
payload <- "{}"
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=Kinesis_20131202.DescribeLimits")
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 = "{}"
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 = "{}"
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=Kinesis_20131202.DescribeLimits";
let payload = json!({});
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=Kinesis_20131202.DescribeLimits' \
--header 'content-type: application/json' \
--header 'x-amz-target: ' \
--data '{}'
echo '{}' | \
http POST '{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.DescribeLimits' \
content-type:application/json \
x-amz-target:''
wget --quiet \
--method POST \
--header 'x-amz-target: ' \
--header 'content-type: application/json' \
--body-data '{}' \
--output-document \
- '{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.DescribeLimits'
import Foundation
let headers = [
"x-amz-target": "",
"content-type": "application/json"
]
let parameters = [] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.DescribeLimits")! 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
DescribeStream
{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.DescribeStream
HEADERS
X-Amz-Target
BODY json
{
"StreamName": "",
"Limit": "",
"ExclusiveStartShardId": "",
"StreamARN": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.DescribeStream");
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 \"StreamName\": \"\",\n \"Limit\": \"\",\n \"ExclusiveStartShardId\": \"\",\n \"StreamARN\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.DescribeStream" {:headers {:x-amz-target ""}
:content-type :json
:form-params {:StreamName ""
:Limit ""
:ExclusiveStartShardId ""
:StreamARN ""}})
require "http/client"
url = "{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.DescribeStream"
headers = HTTP::Headers{
"x-amz-target" => ""
"content-type" => "application/json"
}
reqBody = "{\n \"StreamName\": \"\",\n \"Limit\": \"\",\n \"ExclusiveStartShardId\": \"\",\n \"StreamARN\": \"\"\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=Kinesis_20131202.DescribeStream"),
Headers =
{
{ "x-amz-target", "" },
},
Content = new StringContent("{\n \"StreamName\": \"\",\n \"Limit\": \"\",\n \"ExclusiveStartShardId\": \"\",\n \"StreamARN\": \"\"\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=Kinesis_20131202.DescribeStream");
var request = new RestRequest("", Method.Post);
request.AddHeader("x-amz-target", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"StreamName\": \"\",\n \"Limit\": \"\",\n \"ExclusiveStartShardId\": \"\",\n \"StreamARN\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.DescribeStream"
payload := strings.NewReader("{\n \"StreamName\": \"\",\n \"Limit\": \"\",\n \"ExclusiveStartShardId\": \"\",\n \"StreamARN\": \"\"\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
{
"StreamName": "",
"Limit": "",
"ExclusiveStartShardId": "",
"StreamARN": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.DescribeStream")
.setHeader("x-amz-target", "")
.setHeader("content-type", "application/json")
.setBody("{\n \"StreamName\": \"\",\n \"Limit\": \"\",\n \"ExclusiveStartShardId\": \"\",\n \"StreamARN\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.DescribeStream"))
.header("x-amz-target", "")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"StreamName\": \"\",\n \"Limit\": \"\",\n \"ExclusiveStartShardId\": \"\",\n \"StreamARN\": \"\"\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 \"StreamName\": \"\",\n \"Limit\": \"\",\n \"ExclusiveStartShardId\": \"\",\n \"StreamARN\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.DescribeStream")
.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=Kinesis_20131202.DescribeStream")
.header("x-amz-target", "")
.header("content-type", "application/json")
.body("{\n \"StreamName\": \"\",\n \"Limit\": \"\",\n \"ExclusiveStartShardId\": \"\",\n \"StreamARN\": \"\"\n}")
.asString();
const data = JSON.stringify({
StreamName: '',
Limit: '',
ExclusiveStartShardId: '',
StreamARN: ''
});
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=Kinesis_20131202.DescribeStream');
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=Kinesis_20131202.DescribeStream',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {StreamName: '', Limit: '', ExclusiveStartShardId: '', StreamARN: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.DescribeStream';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"StreamName":"","Limit":"","ExclusiveStartShardId":"","StreamARN":""}'
};
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=Kinesis_20131202.DescribeStream',
method: 'POST',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
},
processData: false,
data: '{\n "StreamName": "",\n "Limit": "",\n "ExclusiveStartShardId": "",\n "StreamARN": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"StreamName\": \"\",\n \"Limit\": \"\",\n \"ExclusiveStartShardId\": \"\",\n \"StreamARN\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.DescribeStream")
.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({StreamName: '', Limit: '', ExclusiveStartShardId: '', StreamARN: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.DescribeStream',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: {StreamName: '', Limit: '', ExclusiveStartShardId: '', StreamARN: ''},
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=Kinesis_20131202.DescribeStream');
req.headers({
'x-amz-target': '',
'content-type': 'application/json'
});
req.type('json');
req.send({
StreamName: '',
Limit: '',
ExclusiveStartShardId: '',
StreamARN: ''
});
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=Kinesis_20131202.DescribeStream',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {StreamName: '', Limit: '', ExclusiveStartShardId: '', StreamARN: ''}
};
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=Kinesis_20131202.DescribeStream';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"StreamName":"","Limit":"","ExclusiveStartShardId":"","StreamARN":""}'
};
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 = @{ @"StreamName": @"",
@"Limit": @"",
@"ExclusiveStartShardId": @"",
@"StreamARN": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.DescribeStream"]
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=Kinesis_20131202.DescribeStream" in
let headers = Header.add_list (Header.init ()) [
("x-amz-target", "");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"StreamName\": \"\",\n \"Limit\": \"\",\n \"ExclusiveStartShardId\": \"\",\n \"StreamARN\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.DescribeStream",
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([
'StreamName' => '',
'Limit' => '',
'ExclusiveStartShardId' => '',
'StreamARN' => ''
]),
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=Kinesis_20131202.DescribeStream', [
'body' => '{
"StreamName": "",
"Limit": "",
"ExclusiveStartShardId": "",
"StreamARN": ""
}',
'headers' => [
'content-type' => 'application/json',
'x-amz-target' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.DescribeStream');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'StreamName' => '',
'Limit' => '',
'ExclusiveStartShardId' => '',
'StreamARN' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'StreamName' => '',
'Limit' => '',
'ExclusiveStartShardId' => '',
'StreamARN' => ''
]));
$request->setRequestUrl('{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.DescribeStream');
$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=Kinesis_20131202.DescribeStream' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"StreamName": "",
"Limit": "",
"ExclusiveStartShardId": "",
"StreamARN": ""
}'
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.DescribeStream' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"StreamName": "",
"Limit": "",
"ExclusiveStartShardId": "",
"StreamARN": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"StreamName\": \"\",\n \"Limit\": \"\",\n \"ExclusiveStartShardId\": \"\",\n \"StreamARN\": \"\"\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=Kinesis_20131202.DescribeStream"
payload = {
"StreamName": "",
"Limit": "",
"ExclusiveStartShardId": "",
"StreamARN": ""
}
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=Kinesis_20131202.DescribeStream"
payload <- "{\n \"StreamName\": \"\",\n \"Limit\": \"\",\n \"ExclusiveStartShardId\": \"\",\n \"StreamARN\": \"\"\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=Kinesis_20131202.DescribeStream")
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 \"StreamName\": \"\",\n \"Limit\": \"\",\n \"ExclusiveStartShardId\": \"\",\n \"StreamARN\": \"\"\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 \"StreamName\": \"\",\n \"Limit\": \"\",\n \"ExclusiveStartShardId\": \"\",\n \"StreamARN\": \"\"\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=Kinesis_20131202.DescribeStream";
let payload = json!({
"StreamName": "",
"Limit": "",
"ExclusiveStartShardId": "",
"StreamARN": ""
});
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=Kinesis_20131202.DescribeStream' \
--header 'content-type: application/json' \
--header 'x-amz-target: ' \
--data '{
"StreamName": "",
"Limit": "",
"ExclusiveStartShardId": "",
"StreamARN": ""
}'
echo '{
"StreamName": "",
"Limit": "",
"ExclusiveStartShardId": "",
"StreamARN": ""
}' | \
http POST '{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.DescribeStream' \
content-type:application/json \
x-amz-target:''
wget --quiet \
--method POST \
--header 'x-amz-target: ' \
--header 'content-type: application/json' \
--body-data '{\n "StreamName": "",\n "Limit": "",\n "ExclusiveStartShardId": "",\n "StreamARN": ""\n}' \
--output-document \
- '{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.DescribeStream'
import Foundation
let headers = [
"x-amz-target": "",
"content-type": "application/json"
]
let parameters = [
"StreamName": "",
"Limit": "",
"ExclusiveStartShardId": "",
"StreamARN": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.DescribeStream")! 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
DescribeStreamConsumer
{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.DescribeStreamConsumer
HEADERS
X-Amz-Target
BODY json
{
"StreamARN": "",
"ConsumerName": "",
"ConsumerARN": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.DescribeStreamConsumer");
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 \"StreamARN\": \"\",\n \"ConsumerName\": \"\",\n \"ConsumerARN\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.DescribeStreamConsumer" {:headers {:x-amz-target ""}
:content-type :json
:form-params {:StreamARN ""
:ConsumerName ""
:ConsumerARN ""}})
require "http/client"
url = "{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.DescribeStreamConsumer"
headers = HTTP::Headers{
"x-amz-target" => ""
"content-type" => "application/json"
}
reqBody = "{\n \"StreamARN\": \"\",\n \"ConsumerName\": \"\",\n \"ConsumerARN\": \"\"\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=Kinesis_20131202.DescribeStreamConsumer"),
Headers =
{
{ "x-amz-target", "" },
},
Content = new StringContent("{\n \"StreamARN\": \"\",\n \"ConsumerName\": \"\",\n \"ConsumerARN\": \"\"\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=Kinesis_20131202.DescribeStreamConsumer");
var request = new RestRequest("", Method.Post);
request.AddHeader("x-amz-target", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"StreamARN\": \"\",\n \"ConsumerName\": \"\",\n \"ConsumerARN\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.DescribeStreamConsumer"
payload := strings.NewReader("{\n \"StreamARN\": \"\",\n \"ConsumerName\": \"\",\n \"ConsumerARN\": \"\"\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: 64
{
"StreamARN": "",
"ConsumerName": "",
"ConsumerARN": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.DescribeStreamConsumer")
.setHeader("x-amz-target", "")
.setHeader("content-type", "application/json")
.setBody("{\n \"StreamARN\": \"\",\n \"ConsumerName\": \"\",\n \"ConsumerARN\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.DescribeStreamConsumer"))
.header("x-amz-target", "")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"StreamARN\": \"\",\n \"ConsumerName\": \"\",\n \"ConsumerARN\": \"\"\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 \"StreamARN\": \"\",\n \"ConsumerName\": \"\",\n \"ConsumerARN\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.DescribeStreamConsumer")
.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=Kinesis_20131202.DescribeStreamConsumer")
.header("x-amz-target", "")
.header("content-type", "application/json")
.body("{\n \"StreamARN\": \"\",\n \"ConsumerName\": \"\",\n \"ConsumerARN\": \"\"\n}")
.asString();
const data = JSON.stringify({
StreamARN: '',
ConsumerName: '',
ConsumerARN: ''
});
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=Kinesis_20131202.DescribeStreamConsumer');
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=Kinesis_20131202.DescribeStreamConsumer',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {StreamARN: '', ConsumerName: '', ConsumerARN: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.DescribeStreamConsumer';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"StreamARN":"","ConsumerName":"","ConsumerARN":""}'
};
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=Kinesis_20131202.DescribeStreamConsumer',
method: 'POST',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
},
processData: false,
data: '{\n "StreamARN": "",\n "ConsumerName": "",\n "ConsumerARN": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"StreamARN\": \"\",\n \"ConsumerName\": \"\",\n \"ConsumerARN\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.DescribeStreamConsumer")
.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({StreamARN: '', ConsumerName: '', ConsumerARN: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.DescribeStreamConsumer',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: {StreamARN: '', ConsumerName: '', ConsumerARN: ''},
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=Kinesis_20131202.DescribeStreamConsumer');
req.headers({
'x-amz-target': '',
'content-type': 'application/json'
});
req.type('json');
req.send({
StreamARN: '',
ConsumerName: '',
ConsumerARN: ''
});
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=Kinesis_20131202.DescribeStreamConsumer',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {StreamARN: '', ConsumerName: '', ConsumerARN: ''}
};
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=Kinesis_20131202.DescribeStreamConsumer';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"StreamARN":"","ConsumerName":"","ConsumerARN":""}'
};
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 = @{ @"StreamARN": @"",
@"ConsumerName": @"",
@"ConsumerARN": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.DescribeStreamConsumer"]
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=Kinesis_20131202.DescribeStreamConsumer" in
let headers = Header.add_list (Header.init ()) [
("x-amz-target", "");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"StreamARN\": \"\",\n \"ConsumerName\": \"\",\n \"ConsumerARN\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.DescribeStreamConsumer",
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([
'StreamARN' => '',
'ConsumerName' => '',
'ConsumerARN' => ''
]),
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=Kinesis_20131202.DescribeStreamConsumer', [
'body' => '{
"StreamARN": "",
"ConsumerName": "",
"ConsumerARN": ""
}',
'headers' => [
'content-type' => 'application/json',
'x-amz-target' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.DescribeStreamConsumer');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'StreamARN' => '',
'ConsumerName' => '',
'ConsumerARN' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'StreamARN' => '',
'ConsumerName' => '',
'ConsumerARN' => ''
]));
$request->setRequestUrl('{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.DescribeStreamConsumer');
$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=Kinesis_20131202.DescribeStreamConsumer' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"StreamARN": "",
"ConsumerName": "",
"ConsumerARN": ""
}'
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.DescribeStreamConsumer' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"StreamARN": "",
"ConsumerName": "",
"ConsumerARN": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"StreamARN\": \"\",\n \"ConsumerName\": \"\",\n \"ConsumerARN\": \"\"\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=Kinesis_20131202.DescribeStreamConsumer"
payload = {
"StreamARN": "",
"ConsumerName": "",
"ConsumerARN": ""
}
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=Kinesis_20131202.DescribeStreamConsumer"
payload <- "{\n \"StreamARN\": \"\",\n \"ConsumerName\": \"\",\n \"ConsumerARN\": \"\"\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=Kinesis_20131202.DescribeStreamConsumer")
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 \"StreamARN\": \"\",\n \"ConsumerName\": \"\",\n \"ConsumerARN\": \"\"\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 \"StreamARN\": \"\",\n \"ConsumerName\": \"\",\n \"ConsumerARN\": \"\"\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=Kinesis_20131202.DescribeStreamConsumer";
let payload = json!({
"StreamARN": "",
"ConsumerName": "",
"ConsumerARN": ""
});
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=Kinesis_20131202.DescribeStreamConsumer' \
--header 'content-type: application/json' \
--header 'x-amz-target: ' \
--data '{
"StreamARN": "",
"ConsumerName": "",
"ConsumerARN": ""
}'
echo '{
"StreamARN": "",
"ConsumerName": "",
"ConsumerARN": ""
}' | \
http POST '{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.DescribeStreamConsumer' \
content-type:application/json \
x-amz-target:''
wget --quiet \
--method POST \
--header 'x-amz-target: ' \
--header 'content-type: application/json' \
--body-data '{\n "StreamARN": "",\n "ConsumerName": "",\n "ConsumerARN": ""\n}' \
--output-document \
- '{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.DescribeStreamConsumer'
import Foundation
let headers = [
"x-amz-target": "",
"content-type": "application/json"
]
let parameters = [
"StreamARN": "",
"ConsumerName": "",
"ConsumerARN": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.DescribeStreamConsumer")! 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
DescribeStreamSummary
{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.DescribeStreamSummary
HEADERS
X-Amz-Target
BODY json
{
"StreamName": "",
"StreamARN": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.DescribeStreamSummary");
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 \"StreamName\": \"\",\n \"StreamARN\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.DescribeStreamSummary" {:headers {:x-amz-target ""}
:content-type :json
:form-params {:StreamName ""
:StreamARN ""}})
require "http/client"
url = "{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.DescribeStreamSummary"
headers = HTTP::Headers{
"x-amz-target" => ""
"content-type" => "application/json"
}
reqBody = "{\n \"StreamName\": \"\",\n \"StreamARN\": \"\"\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=Kinesis_20131202.DescribeStreamSummary"),
Headers =
{
{ "x-amz-target", "" },
},
Content = new StringContent("{\n \"StreamName\": \"\",\n \"StreamARN\": \"\"\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=Kinesis_20131202.DescribeStreamSummary");
var request = new RestRequest("", Method.Post);
request.AddHeader("x-amz-target", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"StreamName\": \"\",\n \"StreamARN\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.DescribeStreamSummary"
payload := strings.NewReader("{\n \"StreamName\": \"\",\n \"StreamARN\": \"\"\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: 41
{
"StreamName": "",
"StreamARN": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.DescribeStreamSummary")
.setHeader("x-amz-target", "")
.setHeader("content-type", "application/json")
.setBody("{\n \"StreamName\": \"\",\n \"StreamARN\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.DescribeStreamSummary"))
.header("x-amz-target", "")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"StreamName\": \"\",\n \"StreamARN\": \"\"\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 \"StreamName\": \"\",\n \"StreamARN\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.DescribeStreamSummary")
.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=Kinesis_20131202.DescribeStreamSummary")
.header("x-amz-target", "")
.header("content-type", "application/json")
.body("{\n \"StreamName\": \"\",\n \"StreamARN\": \"\"\n}")
.asString();
const data = JSON.stringify({
StreamName: '',
StreamARN: ''
});
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=Kinesis_20131202.DescribeStreamSummary');
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=Kinesis_20131202.DescribeStreamSummary',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {StreamName: '', StreamARN: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.DescribeStreamSummary';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"StreamName":"","StreamARN":""}'
};
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=Kinesis_20131202.DescribeStreamSummary',
method: 'POST',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
},
processData: false,
data: '{\n "StreamName": "",\n "StreamARN": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"StreamName\": \"\",\n \"StreamARN\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.DescribeStreamSummary")
.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({StreamName: '', StreamARN: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.DescribeStreamSummary',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: {StreamName: '', StreamARN: ''},
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=Kinesis_20131202.DescribeStreamSummary');
req.headers({
'x-amz-target': '',
'content-type': 'application/json'
});
req.type('json');
req.send({
StreamName: '',
StreamARN: ''
});
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=Kinesis_20131202.DescribeStreamSummary',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {StreamName: '', StreamARN: ''}
};
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=Kinesis_20131202.DescribeStreamSummary';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"StreamName":"","StreamARN":""}'
};
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 = @{ @"StreamName": @"",
@"StreamARN": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.DescribeStreamSummary"]
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=Kinesis_20131202.DescribeStreamSummary" in
let headers = Header.add_list (Header.init ()) [
("x-amz-target", "");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"StreamName\": \"\",\n \"StreamARN\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.DescribeStreamSummary",
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([
'StreamName' => '',
'StreamARN' => ''
]),
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=Kinesis_20131202.DescribeStreamSummary', [
'body' => '{
"StreamName": "",
"StreamARN": ""
}',
'headers' => [
'content-type' => 'application/json',
'x-amz-target' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.DescribeStreamSummary');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'StreamName' => '',
'StreamARN' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'StreamName' => '',
'StreamARN' => ''
]));
$request->setRequestUrl('{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.DescribeStreamSummary');
$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=Kinesis_20131202.DescribeStreamSummary' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"StreamName": "",
"StreamARN": ""
}'
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.DescribeStreamSummary' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"StreamName": "",
"StreamARN": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"StreamName\": \"\",\n \"StreamARN\": \"\"\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=Kinesis_20131202.DescribeStreamSummary"
payload = {
"StreamName": "",
"StreamARN": ""
}
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=Kinesis_20131202.DescribeStreamSummary"
payload <- "{\n \"StreamName\": \"\",\n \"StreamARN\": \"\"\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=Kinesis_20131202.DescribeStreamSummary")
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 \"StreamName\": \"\",\n \"StreamARN\": \"\"\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 \"StreamName\": \"\",\n \"StreamARN\": \"\"\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=Kinesis_20131202.DescribeStreamSummary";
let payload = json!({
"StreamName": "",
"StreamARN": ""
});
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=Kinesis_20131202.DescribeStreamSummary' \
--header 'content-type: application/json' \
--header 'x-amz-target: ' \
--data '{
"StreamName": "",
"StreamARN": ""
}'
echo '{
"StreamName": "",
"StreamARN": ""
}' | \
http POST '{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.DescribeStreamSummary' \
content-type:application/json \
x-amz-target:''
wget --quiet \
--method POST \
--header 'x-amz-target: ' \
--header 'content-type: application/json' \
--body-data '{\n "StreamName": "",\n "StreamARN": ""\n}' \
--output-document \
- '{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.DescribeStreamSummary'
import Foundation
let headers = [
"x-amz-target": "",
"content-type": "application/json"
]
let parameters = [
"StreamName": "",
"StreamARN": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.DescribeStreamSummary")! 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
DisableEnhancedMonitoring
{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.DisableEnhancedMonitoring
HEADERS
X-Amz-Target
BODY json
{
"StreamName": "",
"ShardLevelMetrics": "",
"StreamARN": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.DisableEnhancedMonitoring");
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 \"StreamName\": \"\",\n \"ShardLevelMetrics\": \"\",\n \"StreamARN\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.DisableEnhancedMonitoring" {:headers {:x-amz-target ""}
:content-type :json
:form-params {:StreamName ""
:ShardLevelMetrics ""
:StreamARN ""}})
require "http/client"
url = "{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.DisableEnhancedMonitoring"
headers = HTTP::Headers{
"x-amz-target" => ""
"content-type" => "application/json"
}
reqBody = "{\n \"StreamName\": \"\",\n \"ShardLevelMetrics\": \"\",\n \"StreamARN\": \"\"\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=Kinesis_20131202.DisableEnhancedMonitoring"),
Headers =
{
{ "x-amz-target", "" },
},
Content = new StringContent("{\n \"StreamName\": \"\",\n \"ShardLevelMetrics\": \"\",\n \"StreamARN\": \"\"\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=Kinesis_20131202.DisableEnhancedMonitoring");
var request = new RestRequest("", Method.Post);
request.AddHeader("x-amz-target", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"StreamName\": \"\",\n \"ShardLevelMetrics\": \"\",\n \"StreamARN\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.DisableEnhancedMonitoring"
payload := strings.NewReader("{\n \"StreamName\": \"\",\n \"ShardLevelMetrics\": \"\",\n \"StreamARN\": \"\"\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: 68
{
"StreamName": "",
"ShardLevelMetrics": "",
"StreamARN": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.DisableEnhancedMonitoring")
.setHeader("x-amz-target", "")
.setHeader("content-type", "application/json")
.setBody("{\n \"StreamName\": \"\",\n \"ShardLevelMetrics\": \"\",\n \"StreamARN\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.DisableEnhancedMonitoring"))
.header("x-amz-target", "")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"StreamName\": \"\",\n \"ShardLevelMetrics\": \"\",\n \"StreamARN\": \"\"\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 \"StreamName\": \"\",\n \"ShardLevelMetrics\": \"\",\n \"StreamARN\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.DisableEnhancedMonitoring")
.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=Kinesis_20131202.DisableEnhancedMonitoring")
.header("x-amz-target", "")
.header("content-type", "application/json")
.body("{\n \"StreamName\": \"\",\n \"ShardLevelMetrics\": \"\",\n \"StreamARN\": \"\"\n}")
.asString();
const data = JSON.stringify({
StreamName: '',
ShardLevelMetrics: '',
StreamARN: ''
});
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=Kinesis_20131202.DisableEnhancedMonitoring');
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=Kinesis_20131202.DisableEnhancedMonitoring',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {StreamName: '', ShardLevelMetrics: '', StreamARN: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.DisableEnhancedMonitoring';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"StreamName":"","ShardLevelMetrics":"","StreamARN":""}'
};
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=Kinesis_20131202.DisableEnhancedMonitoring',
method: 'POST',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
},
processData: false,
data: '{\n "StreamName": "",\n "ShardLevelMetrics": "",\n "StreamARN": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"StreamName\": \"\",\n \"ShardLevelMetrics\": \"\",\n \"StreamARN\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.DisableEnhancedMonitoring")
.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({StreamName: '', ShardLevelMetrics: '', StreamARN: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.DisableEnhancedMonitoring',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: {StreamName: '', ShardLevelMetrics: '', StreamARN: ''},
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=Kinesis_20131202.DisableEnhancedMonitoring');
req.headers({
'x-amz-target': '',
'content-type': 'application/json'
});
req.type('json');
req.send({
StreamName: '',
ShardLevelMetrics: '',
StreamARN: ''
});
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=Kinesis_20131202.DisableEnhancedMonitoring',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {StreamName: '', ShardLevelMetrics: '', StreamARN: ''}
};
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=Kinesis_20131202.DisableEnhancedMonitoring';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"StreamName":"","ShardLevelMetrics":"","StreamARN":""}'
};
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 = @{ @"StreamName": @"",
@"ShardLevelMetrics": @"",
@"StreamARN": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.DisableEnhancedMonitoring"]
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=Kinesis_20131202.DisableEnhancedMonitoring" in
let headers = Header.add_list (Header.init ()) [
("x-amz-target", "");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"StreamName\": \"\",\n \"ShardLevelMetrics\": \"\",\n \"StreamARN\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.DisableEnhancedMonitoring",
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([
'StreamName' => '',
'ShardLevelMetrics' => '',
'StreamARN' => ''
]),
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=Kinesis_20131202.DisableEnhancedMonitoring', [
'body' => '{
"StreamName": "",
"ShardLevelMetrics": "",
"StreamARN": ""
}',
'headers' => [
'content-type' => 'application/json',
'x-amz-target' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.DisableEnhancedMonitoring');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'StreamName' => '',
'ShardLevelMetrics' => '',
'StreamARN' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'StreamName' => '',
'ShardLevelMetrics' => '',
'StreamARN' => ''
]));
$request->setRequestUrl('{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.DisableEnhancedMonitoring');
$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=Kinesis_20131202.DisableEnhancedMonitoring' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"StreamName": "",
"ShardLevelMetrics": "",
"StreamARN": ""
}'
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.DisableEnhancedMonitoring' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"StreamName": "",
"ShardLevelMetrics": "",
"StreamARN": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"StreamName\": \"\",\n \"ShardLevelMetrics\": \"\",\n \"StreamARN\": \"\"\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=Kinesis_20131202.DisableEnhancedMonitoring"
payload = {
"StreamName": "",
"ShardLevelMetrics": "",
"StreamARN": ""
}
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=Kinesis_20131202.DisableEnhancedMonitoring"
payload <- "{\n \"StreamName\": \"\",\n \"ShardLevelMetrics\": \"\",\n \"StreamARN\": \"\"\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=Kinesis_20131202.DisableEnhancedMonitoring")
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 \"StreamName\": \"\",\n \"ShardLevelMetrics\": \"\",\n \"StreamARN\": \"\"\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 \"StreamName\": \"\",\n \"ShardLevelMetrics\": \"\",\n \"StreamARN\": \"\"\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=Kinesis_20131202.DisableEnhancedMonitoring";
let payload = json!({
"StreamName": "",
"ShardLevelMetrics": "",
"StreamARN": ""
});
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=Kinesis_20131202.DisableEnhancedMonitoring' \
--header 'content-type: application/json' \
--header 'x-amz-target: ' \
--data '{
"StreamName": "",
"ShardLevelMetrics": "",
"StreamARN": ""
}'
echo '{
"StreamName": "",
"ShardLevelMetrics": "",
"StreamARN": ""
}' | \
http POST '{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.DisableEnhancedMonitoring' \
content-type:application/json \
x-amz-target:''
wget --quiet \
--method POST \
--header 'x-amz-target: ' \
--header 'content-type: application/json' \
--body-data '{\n "StreamName": "",\n "ShardLevelMetrics": "",\n "StreamARN": ""\n}' \
--output-document \
- '{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.DisableEnhancedMonitoring'
import Foundation
let headers = [
"x-amz-target": "",
"content-type": "application/json"
]
let parameters = [
"StreamName": "",
"ShardLevelMetrics": "",
"StreamARN": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.DisableEnhancedMonitoring")! 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
EnableEnhancedMonitoring
{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.EnableEnhancedMonitoring
HEADERS
X-Amz-Target
BODY json
{
"StreamName": "",
"ShardLevelMetrics": "",
"StreamARN": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.EnableEnhancedMonitoring");
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 \"StreamName\": \"\",\n \"ShardLevelMetrics\": \"\",\n \"StreamARN\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.EnableEnhancedMonitoring" {:headers {:x-amz-target ""}
:content-type :json
:form-params {:StreamName ""
:ShardLevelMetrics ""
:StreamARN ""}})
require "http/client"
url = "{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.EnableEnhancedMonitoring"
headers = HTTP::Headers{
"x-amz-target" => ""
"content-type" => "application/json"
}
reqBody = "{\n \"StreamName\": \"\",\n \"ShardLevelMetrics\": \"\",\n \"StreamARN\": \"\"\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=Kinesis_20131202.EnableEnhancedMonitoring"),
Headers =
{
{ "x-amz-target", "" },
},
Content = new StringContent("{\n \"StreamName\": \"\",\n \"ShardLevelMetrics\": \"\",\n \"StreamARN\": \"\"\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=Kinesis_20131202.EnableEnhancedMonitoring");
var request = new RestRequest("", Method.Post);
request.AddHeader("x-amz-target", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"StreamName\": \"\",\n \"ShardLevelMetrics\": \"\",\n \"StreamARN\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.EnableEnhancedMonitoring"
payload := strings.NewReader("{\n \"StreamName\": \"\",\n \"ShardLevelMetrics\": \"\",\n \"StreamARN\": \"\"\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: 68
{
"StreamName": "",
"ShardLevelMetrics": "",
"StreamARN": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.EnableEnhancedMonitoring")
.setHeader("x-amz-target", "")
.setHeader("content-type", "application/json")
.setBody("{\n \"StreamName\": \"\",\n \"ShardLevelMetrics\": \"\",\n \"StreamARN\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.EnableEnhancedMonitoring"))
.header("x-amz-target", "")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"StreamName\": \"\",\n \"ShardLevelMetrics\": \"\",\n \"StreamARN\": \"\"\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 \"StreamName\": \"\",\n \"ShardLevelMetrics\": \"\",\n \"StreamARN\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.EnableEnhancedMonitoring")
.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=Kinesis_20131202.EnableEnhancedMonitoring")
.header("x-amz-target", "")
.header("content-type", "application/json")
.body("{\n \"StreamName\": \"\",\n \"ShardLevelMetrics\": \"\",\n \"StreamARN\": \"\"\n}")
.asString();
const data = JSON.stringify({
StreamName: '',
ShardLevelMetrics: '',
StreamARN: ''
});
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=Kinesis_20131202.EnableEnhancedMonitoring');
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=Kinesis_20131202.EnableEnhancedMonitoring',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {StreamName: '', ShardLevelMetrics: '', StreamARN: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.EnableEnhancedMonitoring';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"StreamName":"","ShardLevelMetrics":"","StreamARN":""}'
};
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=Kinesis_20131202.EnableEnhancedMonitoring',
method: 'POST',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
},
processData: false,
data: '{\n "StreamName": "",\n "ShardLevelMetrics": "",\n "StreamARN": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"StreamName\": \"\",\n \"ShardLevelMetrics\": \"\",\n \"StreamARN\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.EnableEnhancedMonitoring")
.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({StreamName: '', ShardLevelMetrics: '', StreamARN: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.EnableEnhancedMonitoring',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: {StreamName: '', ShardLevelMetrics: '', StreamARN: ''},
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=Kinesis_20131202.EnableEnhancedMonitoring');
req.headers({
'x-amz-target': '',
'content-type': 'application/json'
});
req.type('json');
req.send({
StreamName: '',
ShardLevelMetrics: '',
StreamARN: ''
});
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=Kinesis_20131202.EnableEnhancedMonitoring',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {StreamName: '', ShardLevelMetrics: '', StreamARN: ''}
};
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=Kinesis_20131202.EnableEnhancedMonitoring';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"StreamName":"","ShardLevelMetrics":"","StreamARN":""}'
};
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 = @{ @"StreamName": @"",
@"ShardLevelMetrics": @"",
@"StreamARN": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.EnableEnhancedMonitoring"]
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=Kinesis_20131202.EnableEnhancedMonitoring" in
let headers = Header.add_list (Header.init ()) [
("x-amz-target", "");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"StreamName\": \"\",\n \"ShardLevelMetrics\": \"\",\n \"StreamARN\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.EnableEnhancedMonitoring",
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([
'StreamName' => '',
'ShardLevelMetrics' => '',
'StreamARN' => ''
]),
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=Kinesis_20131202.EnableEnhancedMonitoring', [
'body' => '{
"StreamName": "",
"ShardLevelMetrics": "",
"StreamARN": ""
}',
'headers' => [
'content-type' => 'application/json',
'x-amz-target' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.EnableEnhancedMonitoring');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'StreamName' => '',
'ShardLevelMetrics' => '',
'StreamARN' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'StreamName' => '',
'ShardLevelMetrics' => '',
'StreamARN' => ''
]));
$request->setRequestUrl('{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.EnableEnhancedMonitoring');
$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=Kinesis_20131202.EnableEnhancedMonitoring' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"StreamName": "",
"ShardLevelMetrics": "",
"StreamARN": ""
}'
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.EnableEnhancedMonitoring' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"StreamName": "",
"ShardLevelMetrics": "",
"StreamARN": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"StreamName\": \"\",\n \"ShardLevelMetrics\": \"\",\n \"StreamARN\": \"\"\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=Kinesis_20131202.EnableEnhancedMonitoring"
payload = {
"StreamName": "",
"ShardLevelMetrics": "",
"StreamARN": ""
}
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=Kinesis_20131202.EnableEnhancedMonitoring"
payload <- "{\n \"StreamName\": \"\",\n \"ShardLevelMetrics\": \"\",\n \"StreamARN\": \"\"\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=Kinesis_20131202.EnableEnhancedMonitoring")
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 \"StreamName\": \"\",\n \"ShardLevelMetrics\": \"\",\n \"StreamARN\": \"\"\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 \"StreamName\": \"\",\n \"ShardLevelMetrics\": \"\",\n \"StreamARN\": \"\"\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=Kinesis_20131202.EnableEnhancedMonitoring";
let payload = json!({
"StreamName": "",
"ShardLevelMetrics": "",
"StreamARN": ""
});
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=Kinesis_20131202.EnableEnhancedMonitoring' \
--header 'content-type: application/json' \
--header 'x-amz-target: ' \
--data '{
"StreamName": "",
"ShardLevelMetrics": "",
"StreamARN": ""
}'
echo '{
"StreamName": "",
"ShardLevelMetrics": "",
"StreamARN": ""
}' | \
http POST '{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.EnableEnhancedMonitoring' \
content-type:application/json \
x-amz-target:''
wget --quiet \
--method POST \
--header 'x-amz-target: ' \
--header 'content-type: application/json' \
--body-data '{\n "StreamName": "",\n "ShardLevelMetrics": "",\n "StreamARN": ""\n}' \
--output-document \
- '{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.EnableEnhancedMonitoring'
import Foundation
let headers = [
"x-amz-target": "",
"content-type": "application/json"
]
let parameters = [
"StreamName": "",
"ShardLevelMetrics": "",
"StreamARN": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.EnableEnhancedMonitoring")! 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
GetRecords
{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.GetRecords
HEADERS
X-Amz-Target
BODY json
{
"ShardIterator": "",
"Limit": "",
"StreamARN": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.GetRecords");
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 \"ShardIterator\": \"\",\n \"Limit\": \"\",\n \"StreamARN\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.GetRecords" {:headers {:x-amz-target ""}
:content-type :json
:form-params {:ShardIterator ""
:Limit ""
:StreamARN ""}})
require "http/client"
url = "{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.GetRecords"
headers = HTTP::Headers{
"x-amz-target" => ""
"content-type" => "application/json"
}
reqBody = "{\n \"ShardIterator\": \"\",\n \"Limit\": \"\",\n \"StreamARN\": \"\"\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=Kinesis_20131202.GetRecords"),
Headers =
{
{ "x-amz-target", "" },
},
Content = new StringContent("{\n \"ShardIterator\": \"\",\n \"Limit\": \"\",\n \"StreamARN\": \"\"\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=Kinesis_20131202.GetRecords");
var request = new RestRequest("", Method.Post);
request.AddHeader("x-amz-target", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"ShardIterator\": \"\",\n \"Limit\": \"\",\n \"StreamARN\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.GetRecords"
payload := strings.NewReader("{\n \"ShardIterator\": \"\",\n \"Limit\": \"\",\n \"StreamARN\": \"\"\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: 59
{
"ShardIterator": "",
"Limit": "",
"StreamARN": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.GetRecords")
.setHeader("x-amz-target", "")
.setHeader("content-type", "application/json")
.setBody("{\n \"ShardIterator\": \"\",\n \"Limit\": \"\",\n \"StreamARN\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.GetRecords"))
.header("x-amz-target", "")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"ShardIterator\": \"\",\n \"Limit\": \"\",\n \"StreamARN\": \"\"\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 \"ShardIterator\": \"\",\n \"Limit\": \"\",\n \"StreamARN\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.GetRecords")
.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=Kinesis_20131202.GetRecords")
.header("x-amz-target", "")
.header("content-type", "application/json")
.body("{\n \"ShardIterator\": \"\",\n \"Limit\": \"\",\n \"StreamARN\": \"\"\n}")
.asString();
const data = JSON.stringify({
ShardIterator: '',
Limit: '',
StreamARN: ''
});
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=Kinesis_20131202.GetRecords');
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=Kinesis_20131202.GetRecords',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {ShardIterator: '', Limit: '', StreamARN: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.GetRecords';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"ShardIterator":"","Limit":"","StreamARN":""}'
};
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=Kinesis_20131202.GetRecords',
method: 'POST',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
},
processData: false,
data: '{\n "ShardIterator": "",\n "Limit": "",\n "StreamARN": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"ShardIterator\": \"\",\n \"Limit\": \"\",\n \"StreamARN\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.GetRecords")
.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({ShardIterator: '', Limit: '', StreamARN: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.GetRecords',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: {ShardIterator: '', Limit: '', StreamARN: ''},
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=Kinesis_20131202.GetRecords');
req.headers({
'x-amz-target': '',
'content-type': 'application/json'
});
req.type('json');
req.send({
ShardIterator: '',
Limit: '',
StreamARN: ''
});
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=Kinesis_20131202.GetRecords',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {ShardIterator: '', Limit: '', StreamARN: ''}
};
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=Kinesis_20131202.GetRecords';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"ShardIterator":"","Limit":"","StreamARN":""}'
};
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 = @{ @"ShardIterator": @"",
@"Limit": @"",
@"StreamARN": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.GetRecords"]
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=Kinesis_20131202.GetRecords" in
let headers = Header.add_list (Header.init ()) [
("x-amz-target", "");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"ShardIterator\": \"\",\n \"Limit\": \"\",\n \"StreamARN\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.GetRecords",
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([
'ShardIterator' => '',
'Limit' => '',
'StreamARN' => ''
]),
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=Kinesis_20131202.GetRecords', [
'body' => '{
"ShardIterator": "",
"Limit": "",
"StreamARN": ""
}',
'headers' => [
'content-type' => 'application/json',
'x-amz-target' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.GetRecords');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'ShardIterator' => '',
'Limit' => '',
'StreamARN' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'ShardIterator' => '',
'Limit' => '',
'StreamARN' => ''
]));
$request->setRequestUrl('{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.GetRecords');
$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=Kinesis_20131202.GetRecords' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"ShardIterator": "",
"Limit": "",
"StreamARN": ""
}'
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.GetRecords' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"ShardIterator": "",
"Limit": "",
"StreamARN": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"ShardIterator\": \"\",\n \"Limit\": \"\",\n \"StreamARN\": \"\"\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=Kinesis_20131202.GetRecords"
payload = {
"ShardIterator": "",
"Limit": "",
"StreamARN": ""
}
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=Kinesis_20131202.GetRecords"
payload <- "{\n \"ShardIterator\": \"\",\n \"Limit\": \"\",\n \"StreamARN\": \"\"\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=Kinesis_20131202.GetRecords")
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 \"ShardIterator\": \"\",\n \"Limit\": \"\",\n \"StreamARN\": \"\"\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 \"ShardIterator\": \"\",\n \"Limit\": \"\",\n \"StreamARN\": \"\"\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=Kinesis_20131202.GetRecords";
let payload = json!({
"ShardIterator": "",
"Limit": "",
"StreamARN": ""
});
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=Kinesis_20131202.GetRecords' \
--header 'content-type: application/json' \
--header 'x-amz-target: ' \
--data '{
"ShardIterator": "",
"Limit": "",
"StreamARN": ""
}'
echo '{
"ShardIterator": "",
"Limit": "",
"StreamARN": ""
}' | \
http POST '{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.GetRecords' \
content-type:application/json \
x-amz-target:''
wget --quiet \
--method POST \
--header 'x-amz-target: ' \
--header 'content-type: application/json' \
--body-data '{\n "ShardIterator": "",\n "Limit": "",\n "StreamARN": ""\n}' \
--output-document \
- '{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.GetRecords'
import Foundation
let headers = [
"x-amz-target": "",
"content-type": "application/json"
]
let parameters = [
"ShardIterator": "",
"Limit": "",
"StreamARN": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.GetRecords")! 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
GetShardIterator
{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.GetShardIterator
HEADERS
X-Amz-Target
BODY json
{
"StreamName": "",
"ShardId": "",
"ShardIteratorType": "",
"StartingSequenceNumber": "",
"Timestamp": "",
"StreamARN": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.GetShardIterator");
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 \"StreamName\": \"\",\n \"ShardId\": \"\",\n \"ShardIteratorType\": \"\",\n \"StartingSequenceNumber\": \"\",\n \"Timestamp\": \"\",\n \"StreamARN\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.GetShardIterator" {:headers {:x-amz-target ""}
:content-type :json
:form-params {:StreamName ""
:ShardId ""
:ShardIteratorType ""
:StartingSequenceNumber ""
:Timestamp ""
:StreamARN ""}})
require "http/client"
url = "{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.GetShardIterator"
headers = HTTP::Headers{
"x-amz-target" => ""
"content-type" => "application/json"
}
reqBody = "{\n \"StreamName\": \"\",\n \"ShardId\": \"\",\n \"ShardIteratorType\": \"\",\n \"StartingSequenceNumber\": \"\",\n \"Timestamp\": \"\",\n \"StreamARN\": \"\"\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=Kinesis_20131202.GetShardIterator"),
Headers =
{
{ "x-amz-target", "" },
},
Content = new StringContent("{\n \"StreamName\": \"\",\n \"ShardId\": \"\",\n \"ShardIteratorType\": \"\",\n \"StartingSequenceNumber\": \"\",\n \"Timestamp\": \"\",\n \"StreamARN\": \"\"\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=Kinesis_20131202.GetShardIterator");
var request = new RestRequest("", Method.Post);
request.AddHeader("x-amz-target", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"StreamName\": \"\",\n \"ShardId\": \"\",\n \"ShardIteratorType\": \"\",\n \"StartingSequenceNumber\": \"\",\n \"Timestamp\": \"\",\n \"StreamARN\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.GetShardIterator"
payload := strings.NewReader("{\n \"StreamName\": \"\",\n \"ShardId\": \"\",\n \"ShardIteratorType\": \"\",\n \"StartingSequenceNumber\": \"\",\n \"Timestamp\": \"\",\n \"StreamARN\": \"\"\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: 136
{
"StreamName": "",
"ShardId": "",
"ShardIteratorType": "",
"StartingSequenceNumber": "",
"Timestamp": "",
"StreamARN": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.GetShardIterator")
.setHeader("x-amz-target", "")
.setHeader("content-type", "application/json")
.setBody("{\n \"StreamName\": \"\",\n \"ShardId\": \"\",\n \"ShardIteratorType\": \"\",\n \"StartingSequenceNumber\": \"\",\n \"Timestamp\": \"\",\n \"StreamARN\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.GetShardIterator"))
.header("x-amz-target", "")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"StreamName\": \"\",\n \"ShardId\": \"\",\n \"ShardIteratorType\": \"\",\n \"StartingSequenceNumber\": \"\",\n \"Timestamp\": \"\",\n \"StreamARN\": \"\"\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 \"StreamName\": \"\",\n \"ShardId\": \"\",\n \"ShardIteratorType\": \"\",\n \"StartingSequenceNumber\": \"\",\n \"Timestamp\": \"\",\n \"StreamARN\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.GetShardIterator")
.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=Kinesis_20131202.GetShardIterator")
.header("x-amz-target", "")
.header("content-type", "application/json")
.body("{\n \"StreamName\": \"\",\n \"ShardId\": \"\",\n \"ShardIteratorType\": \"\",\n \"StartingSequenceNumber\": \"\",\n \"Timestamp\": \"\",\n \"StreamARN\": \"\"\n}")
.asString();
const data = JSON.stringify({
StreamName: '',
ShardId: '',
ShardIteratorType: '',
StartingSequenceNumber: '',
Timestamp: '',
StreamARN: ''
});
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=Kinesis_20131202.GetShardIterator');
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=Kinesis_20131202.GetShardIterator',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {
StreamName: '',
ShardId: '',
ShardIteratorType: '',
StartingSequenceNumber: '',
Timestamp: '',
StreamARN: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.GetShardIterator';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"StreamName":"","ShardId":"","ShardIteratorType":"","StartingSequenceNumber":"","Timestamp":"","StreamARN":""}'
};
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=Kinesis_20131202.GetShardIterator',
method: 'POST',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
},
processData: false,
data: '{\n "StreamName": "",\n "ShardId": "",\n "ShardIteratorType": "",\n "StartingSequenceNumber": "",\n "Timestamp": "",\n "StreamARN": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"StreamName\": \"\",\n \"ShardId\": \"\",\n \"ShardIteratorType\": \"\",\n \"StartingSequenceNumber\": \"\",\n \"Timestamp\": \"\",\n \"StreamARN\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.GetShardIterator")
.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({
StreamName: '',
ShardId: '',
ShardIteratorType: '',
StartingSequenceNumber: '',
Timestamp: '',
StreamARN: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.GetShardIterator',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: {
StreamName: '',
ShardId: '',
ShardIteratorType: '',
StartingSequenceNumber: '',
Timestamp: '',
StreamARN: ''
},
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=Kinesis_20131202.GetShardIterator');
req.headers({
'x-amz-target': '',
'content-type': 'application/json'
});
req.type('json');
req.send({
StreamName: '',
ShardId: '',
ShardIteratorType: '',
StartingSequenceNumber: '',
Timestamp: '',
StreamARN: ''
});
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=Kinesis_20131202.GetShardIterator',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {
StreamName: '',
ShardId: '',
ShardIteratorType: '',
StartingSequenceNumber: '',
Timestamp: '',
StreamARN: ''
}
};
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=Kinesis_20131202.GetShardIterator';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"StreamName":"","ShardId":"","ShardIteratorType":"","StartingSequenceNumber":"","Timestamp":"","StreamARN":""}'
};
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 = @{ @"StreamName": @"",
@"ShardId": @"",
@"ShardIteratorType": @"",
@"StartingSequenceNumber": @"",
@"Timestamp": @"",
@"StreamARN": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.GetShardIterator"]
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=Kinesis_20131202.GetShardIterator" in
let headers = Header.add_list (Header.init ()) [
("x-amz-target", "");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"StreamName\": \"\",\n \"ShardId\": \"\",\n \"ShardIteratorType\": \"\",\n \"StartingSequenceNumber\": \"\",\n \"Timestamp\": \"\",\n \"StreamARN\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.GetShardIterator",
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([
'StreamName' => '',
'ShardId' => '',
'ShardIteratorType' => '',
'StartingSequenceNumber' => '',
'Timestamp' => '',
'StreamARN' => ''
]),
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=Kinesis_20131202.GetShardIterator', [
'body' => '{
"StreamName": "",
"ShardId": "",
"ShardIteratorType": "",
"StartingSequenceNumber": "",
"Timestamp": "",
"StreamARN": ""
}',
'headers' => [
'content-type' => 'application/json',
'x-amz-target' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.GetShardIterator');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'StreamName' => '',
'ShardId' => '',
'ShardIteratorType' => '',
'StartingSequenceNumber' => '',
'Timestamp' => '',
'StreamARN' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'StreamName' => '',
'ShardId' => '',
'ShardIteratorType' => '',
'StartingSequenceNumber' => '',
'Timestamp' => '',
'StreamARN' => ''
]));
$request->setRequestUrl('{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.GetShardIterator');
$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=Kinesis_20131202.GetShardIterator' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"StreamName": "",
"ShardId": "",
"ShardIteratorType": "",
"StartingSequenceNumber": "",
"Timestamp": "",
"StreamARN": ""
}'
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.GetShardIterator' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"StreamName": "",
"ShardId": "",
"ShardIteratorType": "",
"StartingSequenceNumber": "",
"Timestamp": "",
"StreamARN": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"StreamName\": \"\",\n \"ShardId\": \"\",\n \"ShardIteratorType\": \"\",\n \"StartingSequenceNumber\": \"\",\n \"Timestamp\": \"\",\n \"StreamARN\": \"\"\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=Kinesis_20131202.GetShardIterator"
payload = {
"StreamName": "",
"ShardId": "",
"ShardIteratorType": "",
"StartingSequenceNumber": "",
"Timestamp": "",
"StreamARN": ""
}
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=Kinesis_20131202.GetShardIterator"
payload <- "{\n \"StreamName\": \"\",\n \"ShardId\": \"\",\n \"ShardIteratorType\": \"\",\n \"StartingSequenceNumber\": \"\",\n \"Timestamp\": \"\",\n \"StreamARN\": \"\"\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=Kinesis_20131202.GetShardIterator")
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 \"StreamName\": \"\",\n \"ShardId\": \"\",\n \"ShardIteratorType\": \"\",\n \"StartingSequenceNumber\": \"\",\n \"Timestamp\": \"\",\n \"StreamARN\": \"\"\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 \"StreamName\": \"\",\n \"ShardId\": \"\",\n \"ShardIteratorType\": \"\",\n \"StartingSequenceNumber\": \"\",\n \"Timestamp\": \"\",\n \"StreamARN\": \"\"\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=Kinesis_20131202.GetShardIterator";
let payload = json!({
"StreamName": "",
"ShardId": "",
"ShardIteratorType": "",
"StartingSequenceNumber": "",
"Timestamp": "",
"StreamARN": ""
});
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=Kinesis_20131202.GetShardIterator' \
--header 'content-type: application/json' \
--header 'x-amz-target: ' \
--data '{
"StreamName": "",
"ShardId": "",
"ShardIteratorType": "",
"StartingSequenceNumber": "",
"Timestamp": "",
"StreamARN": ""
}'
echo '{
"StreamName": "",
"ShardId": "",
"ShardIteratorType": "",
"StartingSequenceNumber": "",
"Timestamp": "",
"StreamARN": ""
}' | \
http POST '{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.GetShardIterator' \
content-type:application/json \
x-amz-target:''
wget --quiet \
--method POST \
--header 'x-amz-target: ' \
--header 'content-type: application/json' \
--body-data '{\n "StreamName": "",\n "ShardId": "",\n "ShardIteratorType": "",\n "StartingSequenceNumber": "",\n "Timestamp": "",\n "StreamARN": ""\n}' \
--output-document \
- '{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.GetShardIterator'
import Foundation
let headers = [
"x-amz-target": "",
"content-type": "application/json"
]
let parameters = [
"StreamName": "",
"ShardId": "",
"ShardIteratorType": "",
"StartingSequenceNumber": "",
"Timestamp": "",
"StreamARN": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.GetShardIterator")! 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
IncreaseStreamRetentionPeriod
{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.IncreaseStreamRetentionPeriod
HEADERS
X-Amz-Target
BODY json
{
"StreamName": "",
"RetentionPeriodHours": "",
"StreamARN": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.IncreaseStreamRetentionPeriod");
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 \"StreamName\": \"\",\n \"RetentionPeriodHours\": \"\",\n \"StreamARN\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.IncreaseStreamRetentionPeriod" {:headers {:x-amz-target ""}
:content-type :json
:form-params {:StreamName ""
:RetentionPeriodHours ""
:StreamARN ""}})
require "http/client"
url = "{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.IncreaseStreamRetentionPeriod"
headers = HTTP::Headers{
"x-amz-target" => ""
"content-type" => "application/json"
}
reqBody = "{\n \"StreamName\": \"\",\n \"RetentionPeriodHours\": \"\",\n \"StreamARN\": \"\"\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=Kinesis_20131202.IncreaseStreamRetentionPeriod"),
Headers =
{
{ "x-amz-target", "" },
},
Content = new StringContent("{\n \"StreamName\": \"\",\n \"RetentionPeriodHours\": \"\",\n \"StreamARN\": \"\"\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=Kinesis_20131202.IncreaseStreamRetentionPeriod");
var request = new RestRequest("", Method.Post);
request.AddHeader("x-amz-target", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"StreamName\": \"\",\n \"RetentionPeriodHours\": \"\",\n \"StreamARN\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.IncreaseStreamRetentionPeriod"
payload := strings.NewReader("{\n \"StreamName\": \"\",\n \"RetentionPeriodHours\": \"\",\n \"StreamARN\": \"\"\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: 71
{
"StreamName": "",
"RetentionPeriodHours": "",
"StreamARN": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.IncreaseStreamRetentionPeriod")
.setHeader("x-amz-target", "")
.setHeader("content-type", "application/json")
.setBody("{\n \"StreamName\": \"\",\n \"RetentionPeriodHours\": \"\",\n \"StreamARN\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.IncreaseStreamRetentionPeriod"))
.header("x-amz-target", "")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"StreamName\": \"\",\n \"RetentionPeriodHours\": \"\",\n \"StreamARN\": \"\"\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 \"StreamName\": \"\",\n \"RetentionPeriodHours\": \"\",\n \"StreamARN\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.IncreaseStreamRetentionPeriod")
.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=Kinesis_20131202.IncreaseStreamRetentionPeriod")
.header("x-amz-target", "")
.header("content-type", "application/json")
.body("{\n \"StreamName\": \"\",\n \"RetentionPeriodHours\": \"\",\n \"StreamARN\": \"\"\n}")
.asString();
const data = JSON.stringify({
StreamName: '',
RetentionPeriodHours: '',
StreamARN: ''
});
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=Kinesis_20131202.IncreaseStreamRetentionPeriod');
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=Kinesis_20131202.IncreaseStreamRetentionPeriod',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {StreamName: '', RetentionPeriodHours: '', StreamARN: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.IncreaseStreamRetentionPeriod';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"StreamName":"","RetentionPeriodHours":"","StreamARN":""}'
};
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=Kinesis_20131202.IncreaseStreamRetentionPeriod',
method: 'POST',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
},
processData: false,
data: '{\n "StreamName": "",\n "RetentionPeriodHours": "",\n "StreamARN": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"StreamName\": \"\",\n \"RetentionPeriodHours\": \"\",\n \"StreamARN\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.IncreaseStreamRetentionPeriod")
.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({StreamName: '', RetentionPeriodHours: '', StreamARN: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.IncreaseStreamRetentionPeriod',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: {StreamName: '', RetentionPeriodHours: '', StreamARN: ''},
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=Kinesis_20131202.IncreaseStreamRetentionPeriod');
req.headers({
'x-amz-target': '',
'content-type': 'application/json'
});
req.type('json');
req.send({
StreamName: '',
RetentionPeriodHours: '',
StreamARN: ''
});
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=Kinesis_20131202.IncreaseStreamRetentionPeriod',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {StreamName: '', RetentionPeriodHours: '', StreamARN: ''}
};
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=Kinesis_20131202.IncreaseStreamRetentionPeriod';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"StreamName":"","RetentionPeriodHours":"","StreamARN":""}'
};
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 = @{ @"StreamName": @"",
@"RetentionPeriodHours": @"",
@"StreamARN": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.IncreaseStreamRetentionPeriod"]
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=Kinesis_20131202.IncreaseStreamRetentionPeriod" in
let headers = Header.add_list (Header.init ()) [
("x-amz-target", "");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"StreamName\": \"\",\n \"RetentionPeriodHours\": \"\",\n \"StreamARN\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.IncreaseStreamRetentionPeriod",
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([
'StreamName' => '',
'RetentionPeriodHours' => '',
'StreamARN' => ''
]),
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=Kinesis_20131202.IncreaseStreamRetentionPeriod', [
'body' => '{
"StreamName": "",
"RetentionPeriodHours": "",
"StreamARN": ""
}',
'headers' => [
'content-type' => 'application/json',
'x-amz-target' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.IncreaseStreamRetentionPeriod');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'StreamName' => '',
'RetentionPeriodHours' => '',
'StreamARN' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'StreamName' => '',
'RetentionPeriodHours' => '',
'StreamARN' => ''
]));
$request->setRequestUrl('{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.IncreaseStreamRetentionPeriod');
$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=Kinesis_20131202.IncreaseStreamRetentionPeriod' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"StreamName": "",
"RetentionPeriodHours": "",
"StreamARN": ""
}'
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.IncreaseStreamRetentionPeriod' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"StreamName": "",
"RetentionPeriodHours": "",
"StreamARN": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"StreamName\": \"\",\n \"RetentionPeriodHours\": \"\",\n \"StreamARN\": \"\"\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=Kinesis_20131202.IncreaseStreamRetentionPeriod"
payload = {
"StreamName": "",
"RetentionPeriodHours": "",
"StreamARN": ""
}
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=Kinesis_20131202.IncreaseStreamRetentionPeriod"
payload <- "{\n \"StreamName\": \"\",\n \"RetentionPeriodHours\": \"\",\n \"StreamARN\": \"\"\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=Kinesis_20131202.IncreaseStreamRetentionPeriod")
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 \"StreamName\": \"\",\n \"RetentionPeriodHours\": \"\",\n \"StreamARN\": \"\"\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 \"StreamName\": \"\",\n \"RetentionPeriodHours\": \"\",\n \"StreamARN\": \"\"\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=Kinesis_20131202.IncreaseStreamRetentionPeriod";
let payload = json!({
"StreamName": "",
"RetentionPeriodHours": "",
"StreamARN": ""
});
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=Kinesis_20131202.IncreaseStreamRetentionPeriod' \
--header 'content-type: application/json' \
--header 'x-amz-target: ' \
--data '{
"StreamName": "",
"RetentionPeriodHours": "",
"StreamARN": ""
}'
echo '{
"StreamName": "",
"RetentionPeriodHours": "",
"StreamARN": ""
}' | \
http POST '{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.IncreaseStreamRetentionPeriod' \
content-type:application/json \
x-amz-target:''
wget --quiet \
--method POST \
--header 'x-amz-target: ' \
--header 'content-type: application/json' \
--body-data '{\n "StreamName": "",\n "RetentionPeriodHours": "",\n "StreamARN": ""\n}' \
--output-document \
- '{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.IncreaseStreamRetentionPeriod'
import Foundation
let headers = [
"x-amz-target": "",
"content-type": "application/json"
]
let parameters = [
"StreamName": "",
"RetentionPeriodHours": "",
"StreamARN": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.IncreaseStreamRetentionPeriod")! 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
ListShards
{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.ListShards
HEADERS
X-Amz-Target
BODY json
{
"StreamName": "",
"NextToken": "",
"ExclusiveStartShardId": "",
"MaxResults": "",
"StreamCreationTimestamp": "",
"ShardFilter": "",
"StreamARN": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.ListShards");
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 \"StreamName\": \"\",\n \"NextToken\": \"\",\n \"ExclusiveStartShardId\": \"\",\n \"MaxResults\": \"\",\n \"StreamCreationTimestamp\": \"\",\n \"ShardFilter\": \"\",\n \"StreamARN\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.ListShards" {:headers {:x-amz-target ""}
:content-type :json
:form-params {:StreamName ""
:NextToken ""
:ExclusiveStartShardId ""
:MaxResults ""
:StreamCreationTimestamp ""
:ShardFilter ""
:StreamARN ""}})
require "http/client"
url = "{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.ListShards"
headers = HTTP::Headers{
"x-amz-target" => ""
"content-type" => "application/json"
}
reqBody = "{\n \"StreamName\": \"\",\n \"NextToken\": \"\",\n \"ExclusiveStartShardId\": \"\",\n \"MaxResults\": \"\",\n \"StreamCreationTimestamp\": \"\",\n \"ShardFilter\": \"\",\n \"StreamARN\": \"\"\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=Kinesis_20131202.ListShards"),
Headers =
{
{ "x-amz-target", "" },
},
Content = new StringContent("{\n \"StreamName\": \"\",\n \"NextToken\": \"\",\n \"ExclusiveStartShardId\": \"\",\n \"MaxResults\": \"\",\n \"StreamCreationTimestamp\": \"\",\n \"ShardFilter\": \"\",\n \"StreamARN\": \"\"\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=Kinesis_20131202.ListShards");
var request = new RestRequest("", Method.Post);
request.AddHeader("x-amz-target", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"StreamName\": \"\",\n \"NextToken\": \"\",\n \"ExclusiveStartShardId\": \"\",\n \"MaxResults\": \"\",\n \"StreamCreationTimestamp\": \"\",\n \"ShardFilter\": \"\",\n \"StreamARN\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.ListShards"
payload := strings.NewReader("{\n \"StreamName\": \"\",\n \"NextToken\": \"\",\n \"ExclusiveStartShardId\": \"\",\n \"MaxResults\": \"\",\n \"StreamCreationTimestamp\": \"\",\n \"ShardFilter\": \"\",\n \"StreamARN\": \"\"\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: 165
{
"StreamName": "",
"NextToken": "",
"ExclusiveStartShardId": "",
"MaxResults": "",
"StreamCreationTimestamp": "",
"ShardFilter": "",
"StreamARN": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.ListShards")
.setHeader("x-amz-target", "")
.setHeader("content-type", "application/json")
.setBody("{\n \"StreamName\": \"\",\n \"NextToken\": \"\",\n \"ExclusiveStartShardId\": \"\",\n \"MaxResults\": \"\",\n \"StreamCreationTimestamp\": \"\",\n \"ShardFilter\": \"\",\n \"StreamARN\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.ListShards"))
.header("x-amz-target", "")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"StreamName\": \"\",\n \"NextToken\": \"\",\n \"ExclusiveStartShardId\": \"\",\n \"MaxResults\": \"\",\n \"StreamCreationTimestamp\": \"\",\n \"ShardFilter\": \"\",\n \"StreamARN\": \"\"\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 \"StreamName\": \"\",\n \"NextToken\": \"\",\n \"ExclusiveStartShardId\": \"\",\n \"MaxResults\": \"\",\n \"StreamCreationTimestamp\": \"\",\n \"ShardFilter\": \"\",\n \"StreamARN\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.ListShards")
.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=Kinesis_20131202.ListShards")
.header("x-amz-target", "")
.header("content-type", "application/json")
.body("{\n \"StreamName\": \"\",\n \"NextToken\": \"\",\n \"ExclusiveStartShardId\": \"\",\n \"MaxResults\": \"\",\n \"StreamCreationTimestamp\": \"\",\n \"ShardFilter\": \"\",\n \"StreamARN\": \"\"\n}")
.asString();
const data = JSON.stringify({
StreamName: '',
NextToken: '',
ExclusiveStartShardId: '',
MaxResults: '',
StreamCreationTimestamp: '',
ShardFilter: '',
StreamARN: ''
});
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=Kinesis_20131202.ListShards');
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=Kinesis_20131202.ListShards',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {
StreamName: '',
NextToken: '',
ExclusiveStartShardId: '',
MaxResults: '',
StreamCreationTimestamp: '',
ShardFilter: '',
StreamARN: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.ListShards';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"StreamName":"","NextToken":"","ExclusiveStartShardId":"","MaxResults":"","StreamCreationTimestamp":"","ShardFilter":"","StreamARN":""}'
};
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=Kinesis_20131202.ListShards',
method: 'POST',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
},
processData: false,
data: '{\n "StreamName": "",\n "NextToken": "",\n "ExclusiveStartShardId": "",\n "MaxResults": "",\n "StreamCreationTimestamp": "",\n "ShardFilter": "",\n "StreamARN": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"StreamName\": \"\",\n \"NextToken\": \"\",\n \"ExclusiveStartShardId\": \"\",\n \"MaxResults\": \"\",\n \"StreamCreationTimestamp\": \"\",\n \"ShardFilter\": \"\",\n \"StreamARN\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.ListShards")
.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({
StreamName: '',
NextToken: '',
ExclusiveStartShardId: '',
MaxResults: '',
StreamCreationTimestamp: '',
ShardFilter: '',
StreamARN: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.ListShards',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: {
StreamName: '',
NextToken: '',
ExclusiveStartShardId: '',
MaxResults: '',
StreamCreationTimestamp: '',
ShardFilter: '',
StreamARN: ''
},
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=Kinesis_20131202.ListShards');
req.headers({
'x-amz-target': '',
'content-type': 'application/json'
});
req.type('json');
req.send({
StreamName: '',
NextToken: '',
ExclusiveStartShardId: '',
MaxResults: '',
StreamCreationTimestamp: '',
ShardFilter: '',
StreamARN: ''
});
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=Kinesis_20131202.ListShards',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {
StreamName: '',
NextToken: '',
ExclusiveStartShardId: '',
MaxResults: '',
StreamCreationTimestamp: '',
ShardFilter: '',
StreamARN: ''
}
};
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=Kinesis_20131202.ListShards';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"StreamName":"","NextToken":"","ExclusiveStartShardId":"","MaxResults":"","StreamCreationTimestamp":"","ShardFilter":"","StreamARN":""}'
};
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 = @{ @"StreamName": @"",
@"NextToken": @"",
@"ExclusiveStartShardId": @"",
@"MaxResults": @"",
@"StreamCreationTimestamp": @"",
@"ShardFilter": @"",
@"StreamARN": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.ListShards"]
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=Kinesis_20131202.ListShards" in
let headers = Header.add_list (Header.init ()) [
("x-amz-target", "");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"StreamName\": \"\",\n \"NextToken\": \"\",\n \"ExclusiveStartShardId\": \"\",\n \"MaxResults\": \"\",\n \"StreamCreationTimestamp\": \"\",\n \"ShardFilter\": \"\",\n \"StreamARN\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.ListShards",
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([
'StreamName' => '',
'NextToken' => '',
'ExclusiveStartShardId' => '',
'MaxResults' => '',
'StreamCreationTimestamp' => '',
'ShardFilter' => '',
'StreamARN' => ''
]),
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=Kinesis_20131202.ListShards', [
'body' => '{
"StreamName": "",
"NextToken": "",
"ExclusiveStartShardId": "",
"MaxResults": "",
"StreamCreationTimestamp": "",
"ShardFilter": "",
"StreamARN": ""
}',
'headers' => [
'content-type' => 'application/json',
'x-amz-target' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.ListShards');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'StreamName' => '',
'NextToken' => '',
'ExclusiveStartShardId' => '',
'MaxResults' => '',
'StreamCreationTimestamp' => '',
'ShardFilter' => '',
'StreamARN' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'StreamName' => '',
'NextToken' => '',
'ExclusiveStartShardId' => '',
'MaxResults' => '',
'StreamCreationTimestamp' => '',
'ShardFilter' => '',
'StreamARN' => ''
]));
$request->setRequestUrl('{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.ListShards');
$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=Kinesis_20131202.ListShards' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"StreamName": "",
"NextToken": "",
"ExclusiveStartShardId": "",
"MaxResults": "",
"StreamCreationTimestamp": "",
"ShardFilter": "",
"StreamARN": ""
}'
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.ListShards' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"StreamName": "",
"NextToken": "",
"ExclusiveStartShardId": "",
"MaxResults": "",
"StreamCreationTimestamp": "",
"ShardFilter": "",
"StreamARN": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"StreamName\": \"\",\n \"NextToken\": \"\",\n \"ExclusiveStartShardId\": \"\",\n \"MaxResults\": \"\",\n \"StreamCreationTimestamp\": \"\",\n \"ShardFilter\": \"\",\n \"StreamARN\": \"\"\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=Kinesis_20131202.ListShards"
payload = {
"StreamName": "",
"NextToken": "",
"ExclusiveStartShardId": "",
"MaxResults": "",
"StreamCreationTimestamp": "",
"ShardFilter": "",
"StreamARN": ""
}
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=Kinesis_20131202.ListShards"
payload <- "{\n \"StreamName\": \"\",\n \"NextToken\": \"\",\n \"ExclusiveStartShardId\": \"\",\n \"MaxResults\": \"\",\n \"StreamCreationTimestamp\": \"\",\n \"ShardFilter\": \"\",\n \"StreamARN\": \"\"\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=Kinesis_20131202.ListShards")
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 \"StreamName\": \"\",\n \"NextToken\": \"\",\n \"ExclusiveStartShardId\": \"\",\n \"MaxResults\": \"\",\n \"StreamCreationTimestamp\": \"\",\n \"ShardFilter\": \"\",\n \"StreamARN\": \"\"\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 \"StreamName\": \"\",\n \"NextToken\": \"\",\n \"ExclusiveStartShardId\": \"\",\n \"MaxResults\": \"\",\n \"StreamCreationTimestamp\": \"\",\n \"ShardFilter\": \"\",\n \"StreamARN\": \"\"\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=Kinesis_20131202.ListShards";
let payload = json!({
"StreamName": "",
"NextToken": "",
"ExclusiveStartShardId": "",
"MaxResults": "",
"StreamCreationTimestamp": "",
"ShardFilter": "",
"StreamARN": ""
});
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=Kinesis_20131202.ListShards' \
--header 'content-type: application/json' \
--header 'x-amz-target: ' \
--data '{
"StreamName": "",
"NextToken": "",
"ExclusiveStartShardId": "",
"MaxResults": "",
"StreamCreationTimestamp": "",
"ShardFilter": "",
"StreamARN": ""
}'
echo '{
"StreamName": "",
"NextToken": "",
"ExclusiveStartShardId": "",
"MaxResults": "",
"StreamCreationTimestamp": "",
"ShardFilter": "",
"StreamARN": ""
}' | \
http POST '{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.ListShards' \
content-type:application/json \
x-amz-target:''
wget --quiet \
--method POST \
--header 'x-amz-target: ' \
--header 'content-type: application/json' \
--body-data '{\n "StreamName": "",\n "NextToken": "",\n "ExclusiveStartShardId": "",\n "MaxResults": "",\n "StreamCreationTimestamp": "",\n "ShardFilter": "",\n "StreamARN": ""\n}' \
--output-document \
- '{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.ListShards'
import Foundation
let headers = [
"x-amz-target": "",
"content-type": "application/json"
]
let parameters = [
"StreamName": "",
"NextToken": "",
"ExclusiveStartShardId": "",
"MaxResults": "",
"StreamCreationTimestamp": "",
"ShardFilter": "",
"StreamARN": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.ListShards")! 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
ListStreamConsumers
{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.ListStreamConsumers
HEADERS
X-Amz-Target
BODY json
{
"StreamARN": "",
"NextToken": "",
"MaxResults": "",
"StreamCreationTimestamp": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.ListStreamConsumers");
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 \"StreamARN\": \"\",\n \"NextToken\": \"\",\n \"MaxResults\": \"\",\n \"StreamCreationTimestamp\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.ListStreamConsumers" {:headers {:x-amz-target ""}
:content-type :json
:form-params {:StreamARN ""
:NextToken ""
:MaxResults ""
:StreamCreationTimestamp ""}})
require "http/client"
url = "{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.ListStreamConsumers"
headers = HTTP::Headers{
"x-amz-target" => ""
"content-type" => "application/json"
}
reqBody = "{\n \"StreamARN\": \"\",\n \"NextToken\": \"\",\n \"MaxResults\": \"\",\n \"StreamCreationTimestamp\": \"\"\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=Kinesis_20131202.ListStreamConsumers"),
Headers =
{
{ "x-amz-target", "" },
},
Content = new StringContent("{\n \"StreamARN\": \"\",\n \"NextToken\": \"\",\n \"MaxResults\": \"\",\n \"StreamCreationTimestamp\": \"\"\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=Kinesis_20131202.ListStreamConsumers");
var request = new RestRequest("", Method.Post);
request.AddHeader("x-amz-target", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"StreamARN\": \"\",\n \"NextToken\": \"\",\n \"MaxResults\": \"\",\n \"StreamCreationTimestamp\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.ListStreamConsumers"
payload := strings.NewReader("{\n \"StreamARN\": \"\",\n \"NextToken\": \"\",\n \"MaxResults\": \"\",\n \"StreamCreationTimestamp\": \"\"\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: 93
{
"StreamARN": "",
"NextToken": "",
"MaxResults": "",
"StreamCreationTimestamp": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.ListStreamConsumers")
.setHeader("x-amz-target", "")
.setHeader("content-type", "application/json")
.setBody("{\n \"StreamARN\": \"\",\n \"NextToken\": \"\",\n \"MaxResults\": \"\",\n \"StreamCreationTimestamp\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.ListStreamConsumers"))
.header("x-amz-target", "")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"StreamARN\": \"\",\n \"NextToken\": \"\",\n \"MaxResults\": \"\",\n \"StreamCreationTimestamp\": \"\"\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 \"StreamARN\": \"\",\n \"NextToken\": \"\",\n \"MaxResults\": \"\",\n \"StreamCreationTimestamp\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.ListStreamConsumers")
.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=Kinesis_20131202.ListStreamConsumers")
.header("x-amz-target", "")
.header("content-type", "application/json")
.body("{\n \"StreamARN\": \"\",\n \"NextToken\": \"\",\n \"MaxResults\": \"\",\n \"StreamCreationTimestamp\": \"\"\n}")
.asString();
const data = JSON.stringify({
StreamARN: '',
NextToken: '',
MaxResults: '',
StreamCreationTimestamp: ''
});
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=Kinesis_20131202.ListStreamConsumers');
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=Kinesis_20131202.ListStreamConsumers',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {StreamARN: '', NextToken: '', MaxResults: '', StreamCreationTimestamp: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.ListStreamConsumers';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"StreamARN":"","NextToken":"","MaxResults":"","StreamCreationTimestamp":""}'
};
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=Kinesis_20131202.ListStreamConsumers',
method: 'POST',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
},
processData: false,
data: '{\n "StreamARN": "",\n "NextToken": "",\n "MaxResults": "",\n "StreamCreationTimestamp": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"StreamARN\": \"\",\n \"NextToken\": \"\",\n \"MaxResults\": \"\",\n \"StreamCreationTimestamp\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.ListStreamConsumers")
.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({StreamARN: '', NextToken: '', MaxResults: '', StreamCreationTimestamp: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.ListStreamConsumers',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: {StreamARN: '', NextToken: '', MaxResults: '', StreamCreationTimestamp: ''},
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=Kinesis_20131202.ListStreamConsumers');
req.headers({
'x-amz-target': '',
'content-type': 'application/json'
});
req.type('json');
req.send({
StreamARN: '',
NextToken: '',
MaxResults: '',
StreamCreationTimestamp: ''
});
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=Kinesis_20131202.ListStreamConsumers',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {StreamARN: '', NextToken: '', MaxResults: '', StreamCreationTimestamp: ''}
};
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=Kinesis_20131202.ListStreamConsumers';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"StreamARN":"","NextToken":"","MaxResults":"","StreamCreationTimestamp":""}'
};
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 = @{ @"StreamARN": @"",
@"NextToken": @"",
@"MaxResults": @"",
@"StreamCreationTimestamp": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.ListStreamConsumers"]
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=Kinesis_20131202.ListStreamConsumers" in
let headers = Header.add_list (Header.init ()) [
("x-amz-target", "");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"StreamARN\": \"\",\n \"NextToken\": \"\",\n \"MaxResults\": \"\",\n \"StreamCreationTimestamp\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.ListStreamConsumers",
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([
'StreamARN' => '',
'NextToken' => '',
'MaxResults' => '',
'StreamCreationTimestamp' => ''
]),
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=Kinesis_20131202.ListStreamConsumers', [
'body' => '{
"StreamARN": "",
"NextToken": "",
"MaxResults": "",
"StreamCreationTimestamp": ""
}',
'headers' => [
'content-type' => 'application/json',
'x-amz-target' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.ListStreamConsumers');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'StreamARN' => '',
'NextToken' => '',
'MaxResults' => '',
'StreamCreationTimestamp' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'StreamARN' => '',
'NextToken' => '',
'MaxResults' => '',
'StreamCreationTimestamp' => ''
]));
$request->setRequestUrl('{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.ListStreamConsumers');
$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=Kinesis_20131202.ListStreamConsumers' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"StreamARN": "",
"NextToken": "",
"MaxResults": "",
"StreamCreationTimestamp": ""
}'
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.ListStreamConsumers' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"StreamARN": "",
"NextToken": "",
"MaxResults": "",
"StreamCreationTimestamp": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"StreamARN\": \"\",\n \"NextToken\": \"\",\n \"MaxResults\": \"\",\n \"StreamCreationTimestamp\": \"\"\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=Kinesis_20131202.ListStreamConsumers"
payload = {
"StreamARN": "",
"NextToken": "",
"MaxResults": "",
"StreamCreationTimestamp": ""
}
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=Kinesis_20131202.ListStreamConsumers"
payload <- "{\n \"StreamARN\": \"\",\n \"NextToken\": \"\",\n \"MaxResults\": \"\",\n \"StreamCreationTimestamp\": \"\"\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=Kinesis_20131202.ListStreamConsumers")
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 \"StreamARN\": \"\",\n \"NextToken\": \"\",\n \"MaxResults\": \"\",\n \"StreamCreationTimestamp\": \"\"\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 \"StreamARN\": \"\",\n \"NextToken\": \"\",\n \"MaxResults\": \"\",\n \"StreamCreationTimestamp\": \"\"\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=Kinesis_20131202.ListStreamConsumers";
let payload = json!({
"StreamARN": "",
"NextToken": "",
"MaxResults": "",
"StreamCreationTimestamp": ""
});
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=Kinesis_20131202.ListStreamConsumers' \
--header 'content-type: application/json' \
--header 'x-amz-target: ' \
--data '{
"StreamARN": "",
"NextToken": "",
"MaxResults": "",
"StreamCreationTimestamp": ""
}'
echo '{
"StreamARN": "",
"NextToken": "",
"MaxResults": "",
"StreamCreationTimestamp": ""
}' | \
http POST '{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.ListStreamConsumers' \
content-type:application/json \
x-amz-target:''
wget --quiet \
--method POST \
--header 'x-amz-target: ' \
--header 'content-type: application/json' \
--body-data '{\n "StreamARN": "",\n "NextToken": "",\n "MaxResults": "",\n "StreamCreationTimestamp": ""\n}' \
--output-document \
- '{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.ListStreamConsumers'
import Foundation
let headers = [
"x-amz-target": "",
"content-type": "application/json"
]
let parameters = [
"StreamARN": "",
"NextToken": "",
"MaxResults": "",
"StreamCreationTimestamp": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.ListStreamConsumers")! 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
ListStreams
{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.ListStreams
HEADERS
X-Amz-Target
BODY json
{
"Limit": "",
"ExclusiveStartStreamName": "",
"NextToken": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.ListStreams");
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 \"ExclusiveStartStreamName\": \"\",\n \"NextToken\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.ListStreams" {:headers {:x-amz-target ""}
:content-type :json
:form-params {:Limit ""
:ExclusiveStartStreamName ""
:NextToken ""}})
require "http/client"
url = "{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.ListStreams"
headers = HTTP::Headers{
"x-amz-target" => ""
"content-type" => "application/json"
}
reqBody = "{\n \"Limit\": \"\",\n \"ExclusiveStartStreamName\": \"\",\n \"NextToken\": \"\"\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=Kinesis_20131202.ListStreams"),
Headers =
{
{ "x-amz-target", "" },
},
Content = new StringContent("{\n \"Limit\": \"\",\n \"ExclusiveStartStreamName\": \"\",\n \"NextToken\": \"\"\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=Kinesis_20131202.ListStreams");
var request = new RestRequest("", Method.Post);
request.AddHeader("x-amz-target", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"Limit\": \"\",\n \"ExclusiveStartStreamName\": \"\",\n \"NextToken\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.ListStreams"
payload := strings.NewReader("{\n \"Limit\": \"\",\n \"ExclusiveStartStreamName\": \"\",\n \"NextToken\": \"\"\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: 70
{
"Limit": "",
"ExclusiveStartStreamName": "",
"NextToken": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.ListStreams")
.setHeader("x-amz-target", "")
.setHeader("content-type", "application/json")
.setBody("{\n \"Limit\": \"\",\n \"ExclusiveStartStreamName\": \"\",\n \"NextToken\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.ListStreams"))
.header("x-amz-target", "")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"Limit\": \"\",\n \"ExclusiveStartStreamName\": \"\",\n \"NextToken\": \"\"\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 \"ExclusiveStartStreamName\": \"\",\n \"NextToken\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.ListStreams")
.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=Kinesis_20131202.ListStreams")
.header("x-amz-target", "")
.header("content-type", "application/json")
.body("{\n \"Limit\": \"\",\n \"ExclusiveStartStreamName\": \"\",\n \"NextToken\": \"\"\n}")
.asString();
const data = JSON.stringify({
Limit: '',
ExclusiveStartStreamName: '',
NextToken: ''
});
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=Kinesis_20131202.ListStreams');
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=Kinesis_20131202.ListStreams',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {Limit: '', ExclusiveStartStreamName: '', NextToken: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.ListStreams';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"Limit":"","ExclusiveStartStreamName":"","NextToken":""}'
};
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=Kinesis_20131202.ListStreams',
method: 'POST',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
},
processData: false,
data: '{\n "Limit": "",\n "ExclusiveStartStreamName": "",\n "NextToken": ""\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 \"ExclusiveStartStreamName\": \"\",\n \"NextToken\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.ListStreams")
.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: '', ExclusiveStartStreamName: '', NextToken: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.ListStreams',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: {Limit: '', ExclusiveStartStreamName: '', NextToken: ''},
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=Kinesis_20131202.ListStreams');
req.headers({
'x-amz-target': '',
'content-type': 'application/json'
});
req.type('json');
req.send({
Limit: '',
ExclusiveStartStreamName: '',
NextToken: ''
});
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=Kinesis_20131202.ListStreams',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {Limit: '', ExclusiveStartStreamName: '', NextToken: ''}
};
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=Kinesis_20131202.ListStreams';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"Limit":"","ExclusiveStartStreamName":"","NextToken":""}'
};
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": @"",
@"ExclusiveStartStreamName": @"",
@"NextToken": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.ListStreams"]
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=Kinesis_20131202.ListStreams" 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 \"ExclusiveStartStreamName\": \"\",\n \"NextToken\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.ListStreams",
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' => '',
'ExclusiveStartStreamName' => '',
'NextToken' => ''
]),
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=Kinesis_20131202.ListStreams', [
'body' => '{
"Limit": "",
"ExclusiveStartStreamName": "",
"NextToken": ""
}',
'headers' => [
'content-type' => 'application/json',
'x-amz-target' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.ListStreams');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'Limit' => '',
'ExclusiveStartStreamName' => '',
'NextToken' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'Limit' => '',
'ExclusiveStartStreamName' => '',
'NextToken' => ''
]));
$request->setRequestUrl('{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.ListStreams');
$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=Kinesis_20131202.ListStreams' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"Limit": "",
"ExclusiveStartStreamName": "",
"NextToken": ""
}'
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.ListStreams' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"Limit": "",
"ExclusiveStartStreamName": "",
"NextToken": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"Limit\": \"\",\n \"ExclusiveStartStreamName\": \"\",\n \"NextToken\": \"\"\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=Kinesis_20131202.ListStreams"
payload = {
"Limit": "",
"ExclusiveStartStreamName": "",
"NextToken": ""
}
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=Kinesis_20131202.ListStreams"
payload <- "{\n \"Limit\": \"\",\n \"ExclusiveStartStreamName\": \"\",\n \"NextToken\": \"\"\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=Kinesis_20131202.ListStreams")
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 \"ExclusiveStartStreamName\": \"\",\n \"NextToken\": \"\"\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 \"ExclusiveStartStreamName\": \"\",\n \"NextToken\": \"\"\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=Kinesis_20131202.ListStreams";
let payload = json!({
"Limit": "",
"ExclusiveStartStreamName": "",
"NextToken": ""
});
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=Kinesis_20131202.ListStreams' \
--header 'content-type: application/json' \
--header 'x-amz-target: ' \
--data '{
"Limit": "",
"ExclusiveStartStreamName": "",
"NextToken": ""
}'
echo '{
"Limit": "",
"ExclusiveStartStreamName": "",
"NextToken": ""
}' | \
http POST '{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.ListStreams' \
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 "ExclusiveStartStreamName": "",\n "NextToken": ""\n}' \
--output-document \
- '{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.ListStreams'
import Foundation
let headers = [
"x-amz-target": "",
"content-type": "application/json"
]
let parameters = [
"Limit": "",
"ExclusiveStartStreamName": "",
"NextToken": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.ListStreams")! 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
ListTagsForStream
{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.ListTagsForStream
HEADERS
X-Amz-Target
BODY json
{
"StreamName": "",
"ExclusiveStartTagKey": "",
"Limit": "",
"StreamARN": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.ListTagsForStream");
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 \"StreamName\": \"\",\n \"ExclusiveStartTagKey\": \"\",\n \"Limit\": \"\",\n \"StreamARN\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.ListTagsForStream" {:headers {:x-amz-target ""}
:content-type :json
:form-params {:StreamName ""
:ExclusiveStartTagKey ""
:Limit ""
:StreamARN ""}})
require "http/client"
url = "{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.ListTagsForStream"
headers = HTTP::Headers{
"x-amz-target" => ""
"content-type" => "application/json"
}
reqBody = "{\n \"StreamName\": \"\",\n \"ExclusiveStartTagKey\": \"\",\n \"Limit\": \"\",\n \"StreamARN\": \"\"\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=Kinesis_20131202.ListTagsForStream"),
Headers =
{
{ "x-amz-target", "" },
},
Content = new StringContent("{\n \"StreamName\": \"\",\n \"ExclusiveStartTagKey\": \"\",\n \"Limit\": \"\",\n \"StreamARN\": \"\"\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=Kinesis_20131202.ListTagsForStream");
var request = new RestRequest("", Method.Post);
request.AddHeader("x-amz-target", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"StreamName\": \"\",\n \"ExclusiveStartTagKey\": \"\",\n \"Limit\": \"\",\n \"StreamARN\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.ListTagsForStream"
payload := strings.NewReader("{\n \"StreamName\": \"\",\n \"ExclusiveStartTagKey\": \"\",\n \"Limit\": \"\",\n \"StreamARN\": \"\"\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: 86
{
"StreamName": "",
"ExclusiveStartTagKey": "",
"Limit": "",
"StreamARN": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.ListTagsForStream")
.setHeader("x-amz-target", "")
.setHeader("content-type", "application/json")
.setBody("{\n \"StreamName\": \"\",\n \"ExclusiveStartTagKey\": \"\",\n \"Limit\": \"\",\n \"StreamARN\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.ListTagsForStream"))
.header("x-amz-target", "")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"StreamName\": \"\",\n \"ExclusiveStartTagKey\": \"\",\n \"Limit\": \"\",\n \"StreamARN\": \"\"\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 \"StreamName\": \"\",\n \"ExclusiveStartTagKey\": \"\",\n \"Limit\": \"\",\n \"StreamARN\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.ListTagsForStream")
.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=Kinesis_20131202.ListTagsForStream")
.header("x-amz-target", "")
.header("content-type", "application/json")
.body("{\n \"StreamName\": \"\",\n \"ExclusiveStartTagKey\": \"\",\n \"Limit\": \"\",\n \"StreamARN\": \"\"\n}")
.asString();
const data = JSON.stringify({
StreamName: '',
ExclusiveStartTagKey: '',
Limit: '',
StreamARN: ''
});
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=Kinesis_20131202.ListTagsForStream');
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=Kinesis_20131202.ListTagsForStream',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {StreamName: '', ExclusiveStartTagKey: '', Limit: '', StreamARN: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.ListTagsForStream';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"StreamName":"","ExclusiveStartTagKey":"","Limit":"","StreamARN":""}'
};
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=Kinesis_20131202.ListTagsForStream',
method: 'POST',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
},
processData: false,
data: '{\n "StreamName": "",\n "ExclusiveStartTagKey": "",\n "Limit": "",\n "StreamARN": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"StreamName\": \"\",\n \"ExclusiveStartTagKey\": \"\",\n \"Limit\": \"\",\n \"StreamARN\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.ListTagsForStream")
.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({StreamName: '', ExclusiveStartTagKey: '', Limit: '', StreamARN: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.ListTagsForStream',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: {StreamName: '', ExclusiveStartTagKey: '', Limit: '', StreamARN: ''},
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=Kinesis_20131202.ListTagsForStream');
req.headers({
'x-amz-target': '',
'content-type': 'application/json'
});
req.type('json');
req.send({
StreamName: '',
ExclusiveStartTagKey: '',
Limit: '',
StreamARN: ''
});
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=Kinesis_20131202.ListTagsForStream',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {StreamName: '', ExclusiveStartTagKey: '', Limit: '', StreamARN: ''}
};
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=Kinesis_20131202.ListTagsForStream';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"StreamName":"","ExclusiveStartTagKey":"","Limit":"","StreamARN":""}'
};
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 = @{ @"StreamName": @"",
@"ExclusiveStartTagKey": @"",
@"Limit": @"",
@"StreamARN": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.ListTagsForStream"]
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=Kinesis_20131202.ListTagsForStream" in
let headers = Header.add_list (Header.init ()) [
("x-amz-target", "");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"StreamName\": \"\",\n \"ExclusiveStartTagKey\": \"\",\n \"Limit\": \"\",\n \"StreamARN\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.ListTagsForStream",
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([
'StreamName' => '',
'ExclusiveStartTagKey' => '',
'Limit' => '',
'StreamARN' => ''
]),
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=Kinesis_20131202.ListTagsForStream', [
'body' => '{
"StreamName": "",
"ExclusiveStartTagKey": "",
"Limit": "",
"StreamARN": ""
}',
'headers' => [
'content-type' => 'application/json',
'x-amz-target' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.ListTagsForStream');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'StreamName' => '',
'ExclusiveStartTagKey' => '',
'Limit' => '',
'StreamARN' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'StreamName' => '',
'ExclusiveStartTagKey' => '',
'Limit' => '',
'StreamARN' => ''
]));
$request->setRequestUrl('{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.ListTagsForStream');
$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=Kinesis_20131202.ListTagsForStream' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"StreamName": "",
"ExclusiveStartTagKey": "",
"Limit": "",
"StreamARN": ""
}'
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.ListTagsForStream' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"StreamName": "",
"ExclusiveStartTagKey": "",
"Limit": "",
"StreamARN": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"StreamName\": \"\",\n \"ExclusiveStartTagKey\": \"\",\n \"Limit\": \"\",\n \"StreamARN\": \"\"\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=Kinesis_20131202.ListTagsForStream"
payload = {
"StreamName": "",
"ExclusiveStartTagKey": "",
"Limit": "",
"StreamARN": ""
}
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=Kinesis_20131202.ListTagsForStream"
payload <- "{\n \"StreamName\": \"\",\n \"ExclusiveStartTagKey\": \"\",\n \"Limit\": \"\",\n \"StreamARN\": \"\"\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=Kinesis_20131202.ListTagsForStream")
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 \"StreamName\": \"\",\n \"ExclusiveStartTagKey\": \"\",\n \"Limit\": \"\",\n \"StreamARN\": \"\"\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 \"StreamName\": \"\",\n \"ExclusiveStartTagKey\": \"\",\n \"Limit\": \"\",\n \"StreamARN\": \"\"\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=Kinesis_20131202.ListTagsForStream";
let payload = json!({
"StreamName": "",
"ExclusiveStartTagKey": "",
"Limit": "",
"StreamARN": ""
});
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=Kinesis_20131202.ListTagsForStream' \
--header 'content-type: application/json' \
--header 'x-amz-target: ' \
--data '{
"StreamName": "",
"ExclusiveStartTagKey": "",
"Limit": "",
"StreamARN": ""
}'
echo '{
"StreamName": "",
"ExclusiveStartTagKey": "",
"Limit": "",
"StreamARN": ""
}' | \
http POST '{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.ListTagsForStream' \
content-type:application/json \
x-amz-target:''
wget --quiet \
--method POST \
--header 'x-amz-target: ' \
--header 'content-type: application/json' \
--body-data '{\n "StreamName": "",\n "ExclusiveStartTagKey": "",\n "Limit": "",\n "StreamARN": ""\n}' \
--output-document \
- '{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.ListTagsForStream'
import Foundation
let headers = [
"x-amz-target": "",
"content-type": "application/json"
]
let parameters = [
"StreamName": "",
"ExclusiveStartTagKey": "",
"Limit": "",
"StreamARN": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.ListTagsForStream")! 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
MergeShards
{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.MergeShards
HEADERS
X-Amz-Target
BODY json
{
"StreamName": "",
"ShardToMerge": "",
"AdjacentShardToMerge": "",
"StreamARN": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.MergeShards");
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 \"StreamName\": \"\",\n \"ShardToMerge\": \"\",\n \"AdjacentShardToMerge\": \"\",\n \"StreamARN\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.MergeShards" {:headers {:x-amz-target ""}
:content-type :json
:form-params {:StreamName ""
:ShardToMerge ""
:AdjacentShardToMerge ""
:StreamARN ""}})
require "http/client"
url = "{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.MergeShards"
headers = HTTP::Headers{
"x-amz-target" => ""
"content-type" => "application/json"
}
reqBody = "{\n \"StreamName\": \"\",\n \"ShardToMerge\": \"\",\n \"AdjacentShardToMerge\": \"\",\n \"StreamARN\": \"\"\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=Kinesis_20131202.MergeShards"),
Headers =
{
{ "x-amz-target", "" },
},
Content = new StringContent("{\n \"StreamName\": \"\",\n \"ShardToMerge\": \"\",\n \"AdjacentShardToMerge\": \"\",\n \"StreamARN\": \"\"\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=Kinesis_20131202.MergeShards");
var request = new RestRequest("", Method.Post);
request.AddHeader("x-amz-target", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"StreamName\": \"\",\n \"ShardToMerge\": \"\",\n \"AdjacentShardToMerge\": \"\",\n \"StreamARN\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.MergeShards"
payload := strings.NewReader("{\n \"StreamName\": \"\",\n \"ShardToMerge\": \"\",\n \"AdjacentShardToMerge\": \"\",\n \"StreamARN\": \"\"\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: 93
{
"StreamName": "",
"ShardToMerge": "",
"AdjacentShardToMerge": "",
"StreamARN": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.MergeShards")
.setHeader("x-amz-target", "")
.setHeader("content-type", "application/json")
.setBody("{\n \"StreamName\": \"\",\n \"ShardToMerge\": \"\",\n \"AdjacentShardToMerge\": \"\",\n \"StreamARN\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.MergeShards"))
.header("x-amz-target", "")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"StreamName\": \"\",\n \"ShardToMerge\": \"\",\n \"AdjacentShardToMerge\": \"\",\n \"StreamARN\": \"\"\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 \"StreamName\": \"\",\n \"ShardToMerge\": \"\",\n \"AdjacentShardToMerge\": \"\",\n \"StreamARN\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.MergeShards")
.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=Kinesis_20131202.MergeShards")
.header("x-amz-target", "")
.header("content-type", "application/json")
.body("{\n \"StreamName\": \"\",\n \"ShardToMerge\": \"\",\n \"AdjacentShardToMerge\": \"\",\n \"StreamARN\": \"\"\n}")
.asString();
const data = JSON.stringify({
StreamName: '',
ShardToMerge: '',
AdjacentShardToMerge: '',
StreamARN: ''
});
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=Kinesis_20131202.MergeShards');
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=Kinesis_20131202.MergeShards',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {StreamName: '', ShardToMerge: '', AdjacentShardToMerge: '', StreamARN: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.MergeShards';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"StreamName":"","ShardToMerge":"","AdjacentShardToMerge":"","StreamARN":""}'
};
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=Kinesis_20131202.MergeShards',
method: 'POST',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
},
processData: false,
data: '{\n "StreamName": "",\n "ShardToMerge": "",\n "AdjacentShardToMerge": "",\n "StreamARN": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"StreamName\": \"\",\n \"ShardToMerge\": \"\",\n \"AdjacentShardToMerge\": \"\",\n \"StreamARN\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.MergeShards")
.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({StreamName: '', ShardToMerge: '', AdjacentShardToMerge: '', StreamARN: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.MergeShards',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: {StreamName: '', ShardToMerge: '', AdjacentShardToMerge: '', StreamARN: ''},
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=Kinesis_20131202.MergeShards');
req.headers({
'x-amz-target': '',
'content-type': 'application/json'
});
req.type('json');
req.send({
StreamName: '',
ShardToMerge: '',
AdjacentShardToMerge: '',
StreamARN: ''
});
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=Kinesis_20131202.MergeShards',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {StreamName: '', ShardToMerge: '', AdjacentShardToMerge: '', StreamARN: ''}
};
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=Kinesis_20131202.MergeShards';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"StreamName":"","ShardToMerge":"","AdjacentShardToMerge":"","StreamARN":""}'
};
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 = @{ @"StreamName": @"",
@"ShardToMerge": @"",
@"AdjacentShardToMerge": @"",
@"StreamARN": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.MergeShards"]
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=Kinesis_20131202.MergeShards" in
let headers = Header.add_list (Header.init ()) [
("x-amz-target", "");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"StreamName\": \"\",\n \"ShardToMerge\": \"\",\n \"AdjacentShardToMerge\": \"\",\n \"StreamARN\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.MergeShards",
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([
'StreamName' => '',
'ShardToMerge' => '',
'AdjacentShardToMerge' => '',
'StreamARN' => ''
]),
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=Kinesis_20131202.MergeShards', [
'body' => '{
"StreamName": "",
"ShardToMerge": "",
"AdjacentShardToMerge": "",
"StreamARN": ""
}',
'headers' => [
'content-type' => 'application/json',
'x-amz-target' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.MergeShards');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'StreamName' => '',
'ShardToMerge' => '',
'AdjacentShardToMerge' => '',
'StreamARN' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'StreamName' => '',
'ShardToMerge' => '',
'AdjacentShardToMerge' => '',
'StreamARN' => ''
]));
$request->setRequestUrl('{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.MergeShards');
$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=Kinesis_20131202.MergeShards' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"StreamName": "",
"ShardToMerge": "",
"AdjacentShardToMerge": "",
"StreamARN": ""
}'
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.MergeShards' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"StreamName": "",
"ShardToMerge": "",
"AdjacentShardToMerge": "",
"StreamARN": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"StreamName\": \"\",\n \"ShardToMerge\": \"\",\n \"AdjacentShardToMerge\": \"\",\n \"StreamARN\": \"\"\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=Kinesis_20131202.MergeShards"
payload = {
"StreamName": "",
"ShardToMerge": "",
"AdjacentShardToMerge": "",
"StreamARN": ""
}
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=Kinesis_20131202.MergeShards"
payload <- "{\n \"StreamName\": \"\",\n \"ShardToMerge\": \"\",\n \"AdjacentShardToMerge\": \"\",\n \"StreamARN\": \"\"\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=Kinesis_20131202.MergeShards")
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 \"StreamName\": \"\",\n \"ShardToMerge\": \"\",\n \"AdjacentShardToMerge\": \"\",\n \"StreamARN\": \"\"\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 \"StreamName\": \"\",\n \"ShardToMerge\": \"\",\n \"AdjacentShardToMerge\": \"\",\n \"StreamARN\": \"\"\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=Kinesis_20131202.MergeShards";
let payload = json!({
"StreamName": "",
"ShardToMerge": "",
"AdjacentShardToMerge": "",
"StreamARN": ""
});
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=Kinesis_20131202.MergeShards' \
--header 'content-type: application/json' \
--header 'x-amz-target: ' \
--data '{
"StreamName": "",
"ShardToMerge": "",
"AdjacentShardToMerge": "",
"StreamARN": ""
}'
echo '{
"StreamName": "",
"ShardToMerge": "",
"AdjacentShardToMerge": "",
"StreamARN": ""
}' | \
http POST '{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.MergeShards' \
content-type:application/json \
x-amz-target:''
wget --quiet \
--method POST \
--header 'x-amz-target: ' \
--header 'content-type: application/json' \
--body-data '{\n "StreamName": "",\n "ShardToMerge": "",\n "AdjacentShardToMerge": "",\n "StreamARN": ""\n}' \
--output-document \
- '{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.MergeShards'
import Foundation
let headers = [
"x-amz-target": "",
"content-type": "application/json"
]
let parameters = [
"StreamName": "",
"ShardToMerge": "",
"AdjacentShardToMerge": "",
"StreamARN": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.MergeShards")! 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=Kinesis_20131202.PutRecord
HEADERS
X-Amz-Target
BODY json
{
"StreamName": "",
"Data": "",
"PartitionKey": "",
"ExplicitHashKey": "",
"SequenceNumberForOrdering": "",
"StreamARN": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.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 \"StreamName\": \"\",\n \"Data\": \"\",\n \"PartitionKey\": \"\",\n \"ExplicitHashKey\": \"\",\n \"SequenceNumberForOrdering\": \"\",\n \"StreamARN\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.PutRecord" {:headers {:x-amz-target ""}
:content-type :json
:form-params {:StreamName ""
:Data ""
:PartitionKey ""
:ExplicitHashKey ""
:SequenceNumberForOrdering ""
:StreamARN ""}})
require "http/client"
url = "{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.PutRecord"
headers = HTTP::Headers{
"x-amz-target" => ""
"content-type" => "application/json"
}
reqBody = "{\n \"StreamName\": \"\",\n \"Data\": \"\",\n \"PartitionKey\": \"\",\n \"ExplicitHashKey\": \"\",\n \"SequenceNumberForOrdering\": \"\",\n \"StreamARN\": \"\"\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=Kinesis_20131202.PutRecord"),
Headers =
{
{ "x-amz-target", "" },
},
Content = new StringContent("{\n \"StreamName\": \"\",\n \"Data\": \"\",\n \"PartitionKey\": \"\",\n \"ExplicitHashKey\": \"\",\n \"SequenceNumberForOrdering\": \"\",\n \"StreamARN\": \"\"\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=Kinesis_20131202.PutRecord");
var request = new RestRequest("", Method.Post);
request.AddHeader("x-amz-target", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"StreamName\": \"\",\n \"Data\": \"\",\n \"PartitionKey\": \"\",\n \"ExplicitHashKey\": \"\",\n \"SequenceNumberForOrdering\": \"\",\n \"StreamARN\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.PutRecord"
payload := strings.NewReader("{\n \"StreamName\": \"\",\n \"Data\": \"\",\n \"PartitionKey\": \"\",\n \"ExplicitHashKey\": \"\",\n \"SequenceNumberForOrdering\": \"\",\n \"StreamARN\": \"\"\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: 137
{
"StreamName": "",
"Data": "",
"PartitionKey": "",
"ExplicitHashKey": "",
"SequenceNumberForOrdering": "",
"StreamARN": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.PutRecord")
.setHeader("x-amz-target", "")
.setHeader("content-type", "application/json")
.setBody("{\n \"StreamName\": \"\",\n \"Data\": \"\",\n \"PartitionKey\": \"\",\n \"ExplicitHashKey\": \"\",\n \"SequenceNumberForOrdering\": \"\",\n \"StreamARN\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.PutRecord"))
.header("x-amz-target", "")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"StreamName\": \"\",\n \"Data\": \"\",\n \"PartitionKey\": \"\",\n \"ExplicitHashKey\": \"\",\n \"SequenceNumberForOrdering\": \"\",\n \"StreamARN\": \"\"\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 \"StreamName\": \"\",\n \"Data\": \"\",\n \"PartitionKey\": \"\",\n \"ExplicitHashKey\": \"\",\n \"SequenceNumberForOrdering\": \"\",\n \"StreamARN\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.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=Kinesis_20131202.PutRecord")
.header("x-amz-target", "")
.header("content-type", "application/json")
.body("{\n \"StreamName\": \"\",\n \"Data\": \"\",\n \"PartitionKey\": \"\",\n \"ExplicitHashKey\": \"\",\n \"SequenceNumberForOrdering\": \"\",\n \"StreamARN\": \"\"\n}")
.asString();
const data = JSON.stringify({
StreamName: '',
Data: '',
PartitionKey: '',
ExplicitHashKey: '',
SequenceNumberForOrdering: '',
StreamARN: ''
});
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=Kinesis_20131202.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=Kinesis_20131202.PutRecord',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {
StreamName: '',
Data: '',
PartitionKey: '',
ExplicitHashKey: '',
SequenceNumberForOrdering: '',
StreamARN: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.PutRecord';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"StreamName":"","Data":"","PartitionKey":"","ExplicitHashKey":"","SequenceNumberForOrdering":"","StreamARN":""}'
};
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=Kinesis_20131202.PutRecord',
method: 'POST',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
},
processData: false,
data: '{\n "StreamName": "",\n "Data": "",\n "PartitionKey": "",\n "ExplicitHashKey": "",\n "SequenceNumberForOrdering": "",\n "StreamARN": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"StreamName\": \"\",\n \"Data\": \"\",\n \"PartitionKey\": \"\",\n \"ExplicitHashKey\": \"\",\n \"SequenceNumberForOrdering\": \"\",\n \"StreamARN\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.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({
StreamName: '',
Data: '',
PartitionKey: '',
ExplicitHashKey: '',
SequenceNumberForOrdering: '',
StreamARN: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.PutRecord',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: {
StreamName: '',
Data: '',
PartitionKey: '',
ExplicitHashKey: '',
SequenceNumberForOrdering: '',
StreamARN: ''
},
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=Kinesis_20131202.PutRecord');
req.headers({
'x-amz-target': '',
'content-type': 'application/json'
});
req.type('json');
req.send({
StreamName: '',
Data: '',
PartitionKey: '',
ExplicitHashKey: '',
SequenceNumberForOrdering: '',
StreamARN: ''
});
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=Kinesis_20131202.PutRecord',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {
StreamName: '',
Data: '',
PartitionKey: '',
ExplicitHashKey: '',
SequenceNumberForOrdering: '',
StreamARN: ''
}
};
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=Kinesis_20131202.PutRecord';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"StreamName":"","Data":"","PartitionKey":"","ExplicitHashKey":"","SequenceNumberForOrdering":"","StreamARN":""}'
};
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 = @{ @"StreamName": @"",
@"Data": @"",
@"PartitionKey": @"",
@"ExplicitHashKey": @"",
@"SequenceNumberForOrdering": @"",
@"StreamARN": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.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=Kinesis_20131202.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 \"StreamName\": \"\",\n \"Data\": \"\",\n \"PartitionKey\": \"\",\n \"ExplicitHashKey\": \"\",\n \"SequenceNumberForOrdering\": \"\",\n \"StreamARN\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.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([
'StreamName' => '',
'Data' => '',
'PartitionKey' => '',
'ExplicitHashKey' => '',
'SequenceNumberForOrdering' => '',
'StreamARN' => ''
]),
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=Kinesis_20131202.PutRecord', [
'body' => '{
"StreamName": "",
"Data": "",
"PartitionKey": "",
"ExplicitHashKey": "",
"SequenceNumberForOrdering": "",
"StreamARN": ""
}',
'headers' => [
'content-type' => 'application/json',
'x-amz-target' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.PutRecord');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'StreamName' => '',
'Data' => '',
'PartitionKey' => '',
'ExplicitHashKey' => '',
'SequenceNumberForOrdering' => '',
'StreamARN' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'StreamName' => '',
'Data' => '',
'PartitionKey' => '',
'ExplicitHashKey' => '',
'SequenceNumberForOrdering' => '',
'StreamARN' => ''
]));
$request->setRequestUrl('{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.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=Kinesis_20131202.PutRecord' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"StreamName": "",
"Data": "",
"PartitionKey": "",
"ExplicitHashKey": "",
"SequenceNumberForOrdering": "",
"StreamARN": ""
}'
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.PutRecord' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"StreamName": "",
"Data": "",
"PartitionKey": "",
"ExplicitHashKey": "",
"SequenceNumberForOrdering": "",
"StreamARN": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"StreamName\": \"\",\n \"Data\": \"\",\n \"PartitionKey\": \"\",\n \"ExplicitHashKey\": \"\",\n \"SequenceNumberForOrdering\": \"\",\n \"StreamARN\": \"\"\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=Kinesis_20131202.PutRecord"
payload = {
"StreamName": "",
"Data": "",
"PartitionKey": "",
"ExplicitHashKey": "",
"SequenceNumberForOrdering": "",
"StreamARN": ""
}
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=Kinesis_20131202.PutRecord"
payload <- "{\n \"StreamName\": \"\",\n \"Data\": \"\",\n \"PartitionKey\": \"\",\n \"ExplicitHashKey\": \"\",\n \"SequenceNumberForOrdering\": \"\",\n \"StreamARN\": \"\"\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=Kinesis_20131202.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 \"StreamName\": \"\",\n \"Data\": \"\",\n \"PartitionKey\": \"\",\n \"ExplicitHashKey\": \"\",\n \"SequenceNumberForOrdering\": \"\",\n \"StreamARN\": \"\"\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 \"StreamName\": \"\",\n \"Data\": \"\",\n \"PartitionKey\": \"\",\n \"ExplicitHashKey\": \"\",\n \"SequenceNumberForOrdering\": \"\",\n \"StreamARN\": \"\"\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=Kinesis_20131202.PutRecord";
let payload = json!({
"StreamName": "",
"Data": "",
"PartitionKey": "",
"ExplicitHashKey": "",
"SequenceNumberForOrdering": "",
"StreamARN": ""
});
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=Kinesis_20131202.PutRecord' \
--header 'content-type: application/json' \
--header 'x-amz-target: ' \
--data '{
"StreamName": "",
"Data": "",
"PartitionKey": "",
"ExplicitHashKey": "",
"SequenceNumberForOrdering": "",
"StreamARN": ""
}'
echo '{
"StreamName": "",
"Data": "",
"PartitionKey": "",
"ExplicitHashKey": "",
"SequenceNumberForOrdering": "",
"StreamARN": ""
}' | \
http POST '{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.PutRecord' \
content-type:application/json \
x-amz-target:''
wget --quiet \
--method POST \
--header 'x-amz-target: ' \
--header 'content-type: application/json' \
--body-data '{\n "StreamName": "",\n "Data": "",\n "PartitionKey": "",\n "ExplicitHashKey": "",\n "SequenceNumberForOrdering": "",\n "StreamARN": ""\n}' \
--output-document \
- '{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.PutRecord'
import Foundation
let headers = [
"x-amz-target": "",
"content-type": "application/json"
]
let parameters = [
"StreamName": "",
"Data": "",
"PartitionKey": "",
"ExplicitHashKey": "",
"SequenceNumberForOrdering": "",
"StreamARN": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.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
PutRecords
{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.PutRecords
HEADERS
X-Amz-Target
BODY json
{
"Records": "",
"StreamName": "",
"StreamARN": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.PutRecords");
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 \"Records\": \"\",\n \"StreamName\": \"\",\n \"StreamARN\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.PutRecords" {:headers {:x-amz-target ""}
:content-type :json
:form-params {:Records ""
:StreamName ""
:StreamARN ""}})
require "http/client"
url = "{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.PutRecords"
headers = HTTP::Headers{
"x-amz-target" => ""
"content-type" => "application/json"
}
reqBody = "{\n \"Records\": \"\",\n \"StreamName\": \"\",\n \"StreamARN\": \"\"\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=Kinesis_20131202.PutRecords"),
Headers =
{
{ "x-amz-target", "" },
},
Content = new StringContent("{\n \"Records\": \"\",\n \"StreamName\": \"\",\n \"StreamARN\": \"\"\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=Kinesis_20131202.PutRecords");
var request = new RestRequest("", Method.Post);
request.AddHeader("x-amz-target", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"Records\": \"\",\n \"StreamName\": \"\",\n \"StreamARN\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.PutRecords"
payload := strings.NewReader("{\n \"Records\": \"\",\n \"StreamName\": \"\",\n \"StreamARN\": \"\"\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: 58
{
"Records": "",
"StreamName": "",
"StreamARN": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.PutRecords")
.setHeader("x-amz-target", "")
.setHeader("content-type", "application/json")
.setBody("{\n \"Records\": \"\",\n \"StreamName\": \"\",\n \"StreamARN\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.PutRecords"))
.header("x-amz-target", "")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"Records\": \"\",\n \"StreamName\": \"\",\n \"StreamARN\": \"\"\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 \"Records\": \"\",\n \"StreamName\": \"\",\n \"StreamARN\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.PutRecords")
.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=Kinesis_20131202.PutRecords")
.header("x-amz-target", "")
.header("content-type", "application/json")
.body("{\n \"Records\": \"\",\n \"StreamName\": \"\",\n \"StreamARN\": \"\"\n}")
.asString();
const data = JSON.stringify({
Records: '',
StreamName: '',
StreamARN: ''
});
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=Kinesis_20131202.PutRecords');
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=Kinesis_20131202.PutRecords',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {Records: '', StreamName: '', StreamARN: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.PutRecords';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"Records":"","StreamName":"","StreamARN":""}'
};
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=Kinesis_20131202.PutRecords',
method: 'POST',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
},
processData: false,
data: '{\n "Records": "",\n "StreamName": "",\n "StreamARN": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"Records\": \"\",\n \"StreamName\": \"\",\n \"StreamARN\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.PutRecords")
.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({Records: '', StreamName: '', StreamARN: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.PutRecords',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: {Records: '', StreamName: '', StreamARN: ''},
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=Kinesis_20131202.PutRecords');
req.headers({
'x-amz-target': '',
'content-type': 'application/json'
});
req.type('json');
req.send({
Records: '',
StreamName: '',
StreamARN: ''
});
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=Kinesis_20131202.PutRecords',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {Records: '', StreamName: '', StreamARN: ''}
};
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=Kinesis_20131202.PutRecords';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"Records":"","StreamName":"","StreamARN":""}'
};
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 = @{ @"Records": @"",
@"StreamName": @"",
@"StreamARN": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.PutRecords"]
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=Kinesis_20131202.PutRecords" in
let headers = Header.add_list (Header.init ()) [
("x-amz-target", "");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"Records\": \"\",\n \"StreamName\": \"\",\n \"StreamARN\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.PutRecords",
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([
'Records' => '',
'StreamName' => '',
'StreamARN' => ''
]),
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=Kinesis_20131202.PutRecords', [
'body' => '{
"Records": "",
"StreamName": "",
"StreamARN": ""
}',
'headers' => [
'content-type' => 'application/json',
'x-amz-target' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.PutRecords');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'Records' => '',
'StreamName' => '',
'StreamARN' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'Records' => '',
'StreamName' => '',
'StreamARN' => ''
]));
$request->setRequestUrl('{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.PutRecords');
$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=Kinesis_20131202.PutRecords' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"Records": "",
"StreamName": "",
"StreamARN": ""
}'
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.PutRecords' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"Records": "",
"StreamName": "",
"StreamARN": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"Records\": \"\",\n \"StreamName\": \"\",\n \"StreamARN\": \"\"\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=Kinesis_20131202.PutRecords"
payload = {
"Records": "",
"StreamName": "",
"StreamARN": ""
}
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=Kinesis_20131202.PutRecords"
payload <- "{\n \"Records\": \"\",\n \"StreamName\": \"\",\n \"StreamARN\": \"\"\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=Kinesis_20131202.PutRecords")
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 \"Records\": \"\",\n \"StreamName\": \"\",\n \"StreamARN\": \"\"\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 \"Records\": \"\",\n \"StreamName\": \"\",\n \"StreamARN\": \"\"\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=Kinesis_20131202.PutRecords";
let payload = json!({
"Records": "",
"StreamName": "",
"StreamARN": ""
});
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=Kinesis_20131202.PutRecords' \
--header 'content-type: application/json' \
--header 'x-amz-target: ' \
--data '{
"Records": "",
"StreamName": "",
"StreamARN": ""
}'
echo '{
"Records": "",
"StreamName": "",
"StreamARN": ""
}' | \
http POST '{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.PutRecords' \
content-type:application/json \
x-amz-target:''
wget --quiet \
--method POST \
--header 'x-amz-target: ' \
--header 'content-type: application/json' \
--body-data '{\n "Records": "",\n "StreamName": "",\n "StreamARN": ""\n}' \
--output-document \
- '{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.PutRecords'
import Foundation
let headers = [
"x-amz-target": "",
"content-type": "application/json"
]
let parameters = [
"Records": "",
"StreamName": "",
"StreamARN": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.PutRecords")! 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
RegisterStreamConsumer
{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.RegisterStreamConsumer
HEADERS
X-Amz-Target
BODY json
{
"StreamARN": "",
"ConsumerName": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.RegisterStreamConsumer");
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 \"StreamARN\": \"\",\n \"ConsumerName\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.RegisterStreamConsumer" {:headers {:x-amz-target ""}
:content-type :json
:form-params {:StreamARN ""
:ConsumerName ""}})
require "http/client"
url = "{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.RegisterStreamConsumer"
headers = HTTP::Headers{
"x-amz-target" => ""
"content-type" => "application/json"
}
reqBody = "{\n \"StreamARN\": \"\",\n \"ConsumerName\": \"\"\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=Kinesis_20131202.RegisterStreamConsumer"),
Headers =
{
{ "x-amz-target", "" },
},
Content = new StringContent("{\n \"StreamARN\": \"\",\n \"ConsumerName\": \"\"\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=Kinesis_20131202.RegisterStreamConsumer");
var request = new RestRequest("", Method.Post);
request.AddHeader("x-amz-target", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"StreamARN\": \"\",\n \"ConsumerName\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.RegisterStreamConsumer"
payload := strings.NewReader("{\n \"StreamARN\": \"\",\n \"ConsumerName\": \"\"\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: 43
{
"StreamARN": "",
"ConsumerName": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.RegisterStreamConsumer")
.setHeader("x-amz-target", "")
.setHeader("content-type", "application/json")
.setBody("{\n \"StreamARN\": \"\",\n \"ConsumerName\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.RegisterStreamConsumer"))
.header("x-amz-target", "")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"StreamARN\": \"\",\n \"ConsumerName\": \"\"\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 \"StreamARN\": \"\",\n \"ConsumerName\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.RegisterStreamConsumer")
.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=Kinesis_20131202.RegisterStreamConsumer")
.header("x-amz-target", "")
.header("content-type", "application/json")
.body("{\n \"StreamARN\": \"\",\n \"ConsumerName\": \"\"\n}")
.asString();
const data = JSON.stringify({
StreamARN: '',
ConsumerName: ''
});
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=Kinesis_20131202.RegisterStreamConsumer');
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=Kinesis_20131202.RegisterStreamConsumer',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {StreamARN: '', ConsumerName: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.RegisterStreamConsumer';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"StreamARN":"","ConsumerName":""}'
};
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=Kinesis_20131202.RegisterStreamConsumer',
method: 'POST',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
},
processData: false,
data: '{\n "StreamARN": "",\n "ConsumerName": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"StreamARN\": \"\",\n \"ConsumerName\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.RegisterStreamConsumer")
.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({StreamARN: '', ConsumerName: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.RegisterStreamConsumer',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: {StreamARN: '', ConsumerName: ''},
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=Kinesis_20131202.RegisterStreamConsumer');
req.headers({
'x-amz-target': '',
'content-type': 'application/json'
});
req.type('json');
req.send({
StreamARN: '',
ConsumerName: ''
});
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=Kinesis_20131202.RegisterStreamConsumer',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {StreamARN: '', ConsumerName: ''}
};
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=Kinesis_20131202.RegisterStreamConsumer';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"StreamARN":"","ConsumerName":""}'
};
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 = @{ @"StreamARN": @"",
@"ConsumerName": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.RegisterStreamConsumer"]
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=Kinesis_20131202.RegisterStreamConsumer" in
let headers = Header.add_list (Header.init ()) [
("x-amz-target", "");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"StreamARN\": \"\",\n \"ConsumerName\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.RegisterStreamConsumer",
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([
'StreamARN' => '',
'ConsumerName' => ''
]),
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=Kinesis_20131202.RegisterStreamConsumer', [
'body' => '{
"StreamARN": "",
"ConsumerName": ""
}',
'headers' => [
'content-type' => 'application/json',
'x-amz-target' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.RegisterStreamConsumer');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'StreamARN' => '',
'ConsumerName' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'StreamARN' => '',
'ConsumerName' => ''
]));
$request->setRequestUrl('{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.RegisterStreamConsumer');
$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=Kinesis_20131202.RegisterStreamConsumer' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"StreamARN": "",
"ConsumerName": ""
}'
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.RegisterStreamConsumer' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"StreamARN": "",
"ConsumerName": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"StreamARN\": \"\",\n \"ConsumerName\": \"\"\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=Kinesis_20131202.RegisterStreamConsumer"
payload = {
"StreamARN": "",
"ConsumerName": ""
}
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=Kinesis_20131202.RegisterStreamConsumer"
payload <- "{\n \"StreamARN\": \"\",\n \"ConsumerName\": \"\"\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=Kinesis_20131202.RegisterStreamConsumer")
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 \"StreamARN\": \"\",\n \"ConsumerName\": \"\"\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 \"StreamARN\": \"\",\n \"ConsumerName\": \"\"\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=Kinesis_20131202.RegisterStreamConsumer";
let payload = json!({
"StreamARN": "",
"ConsumerName": ""
});
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=Kinesis_20131202.RegisterStreamConsumer' \
--header 'content-type: application/json' \
--header 'x-amz-target: ' \
--data '{
"StreamARN": "",
"ConsumerName": ""
}'
echo '{
"StreamARN": "",
"ConsumerName": ""
}' | \
http POST '{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.RegisterStreamConsumer' \
content-type:application/json \
x-amz-target:''
wget --quiet \
--method POST \
--header 'x-amz-target: ' \
--header 'content-type: application/json' \
--body-data '{\n "StreamARN": "",\n "ConsumerName": ""\n}' \
--output-document \
- '{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.RegisterStreamConsumer'
import Foundation
let headers = [
"x-amz-target": "",
"content-type": "application/json"
]
let parameters = [
"StreamARN": "",
"ConsumerName": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.RegisterStreamConsumer")! 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
RemoveTagsFromStream
{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.RemoveTagsFromStream
HEADERS
X-Amz-Target
BODY json
{
"StreamName": "",
"TagKeys": "",
"StreamARN": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.RemoveTagsFromStream");
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 \"StreamName\": \"\",\n \"TagKeys\": \"\",\n \"StreamARN\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.RemoveTagsFromStream" {:headers {:x-amz-target ""}
:content-type :json
:form-params {:StreamName ""
:TagKeys ""
:StreamARN ""}})
require "http/client"
url = "{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.RemoveTagsFromStream"
headers = HTTP::Headers{
"x-amz-target" => ""
"content-type" => "application/json"
}
reqBody = "{\n \"StreamName\": \"\",\n \"TagKeys\": \"\",\n \"StreamARN\": \"\"\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=Kinesis_20131202.RemoveTagsFromStream"),
Headers =
{
{ "x-amz-target", "" },
},
Content = new StringContent("{\n \"StreamName\": \"\",\n \"TagKeys\": \"\",\n \"StreamARN\": \"\"\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=Kinesis_20131202.RemoveTagsFromStream");
var request = new RestRequest("", Method.Post);
request.AddHeader("x-amz-target", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"StreamName\": \"\",\n \"TagKeys\": \"\",\n \"StreamARN\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.RemoveTagsFromStream"
payload := strings.NewReader("{\n \"StreamName\": \"\",\n \"TagKeys\": \"\",\n \"StreamARN\": \"\"\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: 58
{
"StreamName": "",
"TagKeys": "",
"StreamARN": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.RemoveTagsFromStream")
.setHeader("x-amz-target", "")
.setHeader("content-type", "application/json")
.setBody("{\n \"StreamName\": \"\",\n \"TagKeys\": \"\",\n \"StreamARN\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.RemoveTagsFromStream"))
.header("x-amz-target", "")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"StreamName\": \"\",\n \"TagKeys\": \"\",\n \"StreamARN\": \"\"\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 \"StreamName\": \"\",\n \"TagKeys\": \"\",\n \"StreamARN\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.RemoveTagsFromStream")
.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=Kinesis_20131202.RemoveTagsFromStream")
.header("x-amz-target", "")
.header("content-type", "application/json")
.body("{\n \"StreamName\": \"\",\n \"TagKeys\": \"\",\n \"StreamARN\": \"\"\n}")
.asString();
const data = JSON.stringify({
StreamName: '',
TagKeys: '',
StreamARN: ''
});
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=Kinesis_20131202.RemoveTagsFromStream');
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=Kinesis_20131202.RemoveTagsFromStream',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {StreamName: '', TagKeys: '', StreamARN: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.RemoveTagsFromStream';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"StreamName":"","TagKeys":"","StreamARN":""}'
};
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=Kinesis_20131202.RemoveTagsFromStream',
method: 'POST',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
},
processData: false,
data: '{\n "StreamName": "",\n "TagKeys": "",\n "StreamARN": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"StreamName\": \"\",\n \"TagKeys\": \"\",\n \"StreamARN\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.RemoveTagsFromStream")
.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({StreamName: '', TagKeys: '', StreamARN: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.RemoveTagsFromStream',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: {StreamName: '', TagKeys: '', StreamARN: ''},
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=Kinesis_20131202.RemoveTagsFromStream');
req.headers({
'x-amz-target': '',
'content-type': 'application/json'
});
req.type('json');
req.send({
StreamName: '',
TagKeys: '',
StreamARN: ''
});
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=Kinesis_20131202.RemoveTagsFromStream',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {StreamName: '', TagKeys: '', StreamARN: ''}
};
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=Kinesis_20131202.RemoveTagsFromStream';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"StreamName":"","TagKeys":"","StreamARN":""}'
};
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 = @{ @"StreamName": @"",
@"TagKeys": @"",
@"StreamARN": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.RemoveTagsFromStream"]
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=Kinesis_20131202.RemoveTagsFromStream" in
let headers = Header.add_list (Header.init ()) [
("x-amz-target", "");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"StreamName\": \"\",\n \"TagKeys\": \"\",\n \"StreamARN\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.RemoveTagsFromStream",
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([
'StreamName' => '',
'TagKeys' => '',
'StreamARN' => ''
]),
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=Kinesis_20131202.RemoveTagsFromStream', [
'body' => '{
"StreamName": "",
"TagKeys": "",
"StreamARN": ""
}',
'headers' => [
'content-type' => 'application/json',
'x-amz-target' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.RemoveTagsFromStream');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'StreamName' => '',
'TagKeys' => '',
'StreamARN' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'StreamName' => '',
'TagKeys' => '',
'StreamARN' => ''
]));
$request->setRequestUrl('{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.RemoveTagsFromStream');
$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=Kinesis_20131202.RemoveTagsFromStream' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"StreamName": "",
"TagKeys": "",
"StreamARN": ""
}'
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.RemoveTagsFromStream' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"StreamName": "",
"TagKeys": "",
"StreamARN": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"StreamName\": \"\",\n \"TagKeys\": \"\",\n \"StreamARN\": \"\"\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=Kinesis_20131202.RemoveTagsFromStream"
payload = {
"StreamName": "",
"TagKeys": "",
"StreamARN": ""
}
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=Kinesis_20131202.RemoveTagsFromStream"
payload <- "{\n \"StreamName\": \"\",\n \"TagKeys\": \"\",\n \"StreamARN\": \"\"\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=Kinesis_20131202.RemoveTagsFromStream")
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 \"StreamName\": \"\",\n \"TagKeys\": \"\",\n \"StreamARN\": \"\"\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 \"StreamName\": \"\",\n \"TagKeys\": \"\",\n \"StreamARN\": \"\"\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=Kinesis_20131202.RemoveTagsFromStream";
let payload = json!({
"StreamName": "",
"TagKeys": "",
"StreamARN": ""
});
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=Kinesis_20131202.RemoveTagsFromStream' \
--header 'content-type: application/json' \
--header 'x-amz-target: ' \
--data '{
"StreamName": "",
"TagKeys": "",
"StreamARN": ""
}'
echo '{
"StreamName": "",
"TagKeys": "",
"StreamARN": ""
}' | \
http POST '{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.RemoveTagsFromStream' \
content-type:application/json \
x-amz-target:''
wget --quiet \
--method POST \
--header 'x-amz-target: ' \
--header 'content-type: application/json' \
--body-data '{\n "StreamName": "",\n "TagKeys": "",\n "StreamARN": ""\n}' \
--output-document \
- '{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.RemoveTagsFromStream'
import Foundation
let headers = [
"x-amz-target": "",
"content-type": "application/json"
]
let parameters = [
"StreamName": "",
"TagKeys": "",
"StreamARN": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.RemoveTagsFromStream")! 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
SplitShard
{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.SplitShard
HEADERS
X-Amz-Target
BODY json
{
"StreamName": "",
"ShardToSplit": "",
"NewStartingHashKey": "",
"StreamARN": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.SplitShard");
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 \"StreamName\": \"\",\n \"ShardToSplit\": \"\",\n \"NewStartingHashKey\": \"\",\n \"StreamARN\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.SplitShard" {:headers {:x-amz-target ""}
:content-type :json
:form-params {:StreamName ""
:ShardToSplit ""
:NewStartingHashKey ""
:StreamARN ""}})
require "http/client"
url = "{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.SplitShard"
headers = HTTP::Headers{
"x-amz-target" => ""
"content-type" => "application/json"
}
reqBody = "{\n \"StreamName\": \"\",\n \"ShardToSplit\": \"\",\n \"NewStartingHashKey\": \"\",\n \"StreamARN\": \"\"\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=Kinesis_20131202.SplitShard"),
Headers =
{
{ "x-amz-target", "" },
},
Content = new StringContent("{\n \"StreamName\": \"\",\n \"ShardToSplit\": \"\",\n \"NewStartingHashKey\": \"\",\n \"StreamARN\": \"\"\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=Kinesis_20131202.SplitShard");
var request = new RestRequest("", Method.Post);
request.AddHeader("x-amz-target", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"StreamName\": \"\",\n \"ShardToSplit\": \"\",\n \"NewStartingHashKey\": \"\",\n \"StreamARN\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.SplitShard"
payload := strings.NewReader("{\n \"StreamName\": \"\",\n \"ShardToSplit\": \"\",\n \"NewStartingHashKey\": \"\",\n \"StreamARN\": \"\"\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: 91
{
"StreamName": "",
"ShardToSplit": "",
"NewStartingHashKey": "",
"StreamARN": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.SplitShard")
.setHeader("x-amz-target", "")
.setHeader("content-type", "application/json")
.setBody("{\n \"StreamName\": \"\",\n \"ShardToSplit\": \"\",\n \"NewStartingHashKey\": \"\",\n \"StreamARN\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.SplitShard"))
.header("x-amz-target", "")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"StreamName\": \"\",\n \"ShardToSplit\": \"\",\n \"NewStartingHashKey\": \"\",\n \"StreamARN\": \"\"\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 \"StreamName\": \"\",\n \"ShardToSplit\": \"\",\n \"NewStartingHashKey\": \"\",\n \"StreamARN\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.SplitShard")
.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=Kinesis_20131202.SplitShard")
.header("x-amz-target", "")
.header("content-type", "application/json")
.body("{\n \"StreamName\": \"\",\n \"ShardToSplit\": \"\",\n \"NewStartingHashKey\": \"\",\n \"StreamARN\": \"\"\n}")
.asString();
const data = JSON.stringify({
StreamName: '',
ShardToSplit: '',
NewStartingHashKey: '',
StreamARN: ''
});
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=Kinesis_20131202.SplitShard');
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=Kinesis_20131202.SplitShard',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {StreamName: '', ShardToSplit: '', NewStartingHashKey: '', StreamARN: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.SplitShard';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"StreamName":"","ShardToSplit":"","NewStartingHashKey":"","StreamARN":""}'
};
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=Kinesis_20131202.SplitShard',
method: 'POST',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
},
processData: false,
data: '{\n "StreamName": "",\n "ShardToSplit": "",\n "NewStartingHashKey": "",\n "StreamARN": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"StreamName\": \"\",\n \"ShardToSplit\": \"\",\n \"NewStartingHashKey\": \"\",\n \"StreamARN\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.SplitShard")
.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({StreamName: '', ShardToSplit: '', NewStartingHashKey: '', StreamARN: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.SplitShard',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: {StreamName: '', ShardToSplit: '', NewStartingHashKey: '', StreamARN: ''},
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=Kinesis_20131202.SplitShard');
req.headers({
'x-amz-target': '',
'content-type': 'application/json'
});
req.type('json');
req.send({
StreamName: '',
ShardToSplit: '',
NewStartingHashKey: '',
StreamARN: ''
});
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=Kinesis_20131202.SplitShard',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {StreamName: '', ShardToSplit: '', NewStartingHashKey: '', StreamARN: ''}
};
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=Kinesis_20131202.SplitShard';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"StreamName":"","ShardToSplit":"","NewStartingHashKey":"","StreamARN":""}'
};
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 = @{ @"StreamName": @"",
@"ShardToSplit": @"",
@"NewStartingHashKey": @"",
@"StreamARN": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.SplitShard"]
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=Kinesis_20131202.SplitShard" in
let headers = Header.add_list (Header.init ()) [
("x-amz-target", "");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"StreamName\": \"\",\n \"ShardToSplit\": \"\",\n \"NewStartingHashKey\": \"\",\n \"StreamARN\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.SplitShard",
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([
'StreamName' => '',
'ShardToSplit' => '',
'NewStartingHashKey' => '',
'StreamARN' => ''
]),
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=Kinesis_20131202.SplitShard', [
'body' => '{
"StreamName": "",
"ShardToSplit": "",
"NewStartingHashKey": "",
"StreamARN": ""
}',
'headers' => [
'content-type' => 'application/json',
'x-amz-target' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.SplitShard');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'StreamName' => '',
'ShardToSplit' => '',
'NewStartingHashKey' => '',
'StreamARN' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'StreamName' => '',
'ShardToSplit' => '',
'NewStartingHashKey' => '',
'StreamARN' => ''
]));
$request->setRequestUrl('{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.SplitShard');
$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=Kinesis_20131202.SplitShard' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"StreamName": "",
"ShardToSplit": "",
"NewStartingHashKey": "",
"StreamARN": ""
}'
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.SplitShard' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"StreamName": "",
"ShardToSplit": "",
"NewStartingHashKey": "",
"StreamARN": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"StreamName\": \"\",\n \"ShardToSplit\": \"\",\n \"NewStartingHashKey\": \"\",\n \"StreamARN\": \"\"\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=Kinesis_20131202.SplitShard"
payload = {
"StreamName": "",
"ShardToSplit": "",
"NewStartingHashKey": "",
"StreamARN": ""
}
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=Kinesis_20131202.SplitShard"
payload <- "{\n \"StreamName\": \"\",\n \"ShardToSplit\": \"\",\n \"NewStartingHashKey\": \"\",\n \"StreamARN\": \"\"\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=Kinesis_20131202.SplitShard")
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 \"StreamName\": \"\",\n \"ShardToSplit\": \"\",\n \"NewStartingHashKey\": \"\",\n \"StreamARN\": \"\"\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 \"StreamName\": \"\",\n \"ShardToSplit\": \"\",\n \"NewStartingHashKey\": \"\",\n \"StreamARN\": \"\"\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=Kinesis_20131202.SplitShard";
let payload = json!({
"StreamName": "",
"ShardToSplit": "",
"NewStartingHashKey": "",
"StreamARN": ""
});
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=Kinesis_20131202.SplitShard' \
--header 'content-type: application/json' \
--header 'x-amz-target: ' \
--data '{
"StreamName": "",
"ShardToSplit": "",
"NewStartingHashKey": "",
"StreamARN": ""
}'
echo '{
"StreamName": "",
"ShardToSplit": "",
"NewStartingHashKey": "",
"StreamARN": ""
}' | \
http POST '{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.SplitShard' \
content-type:application/json \
x-amz-target:''
wget --quiet \
--method POST \
--header 'x-amz-target: ' \
--header 'content-type: application/json' \
--body-data '{\n "StreamName": "",\n "ShardToSplit": "",\n "NewStartingHashKey": "",\n "StreamARN": ""\n}' \
--output-document \
- '{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.SplitShard'
import Foundation
let headers = [
"x-amz-target": "",
"content-type": "application/json"
]
let parameters = [
"StreamName": "",
"ShardToSplit": "",
"NewStartingHashKey": "",
"StreamARN": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.SplitShard")! 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
StartStreamEncryption
{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.StartStreamEncryption
HEADERS
X-Amz-Target
BODY json
{
"StreamName": "",
"EncryptionType": "",
"KeyId": "",
"StreamARN": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.StartStreamEncryption");
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 \"StreamName\": \"\",\n \"EncryptionType\": \"\",\n \"KeyId\": \"\",\n \"StreamARN\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.StartStreamEncryption" {:headers {:x-amz-target ""}
:content-type :json
:form-params {:StreamName ""
:EncryptionType ""
:KeyId ""
:StreamARN ""}})
require "http/client"
url = "{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.StartStreamEncryption"
headers = HTTP::Headers{
"x-amz-target" => ""
"content-type" => "application/json"
}
reqBody = "{\n \"StreamName\": \"\",\n \"EncryptionType\": \"\",\n \"KeyId\": \"\",\n \"StreamARN\": \"\"\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=Kinesis_20131202.StartStreamEncryption"),
Headers =
{
{ "x-amz-target", "" },
},
Content = new StringContent("{\n \"StreamName\": \"\",\n \"EncryptionType\": \"\",\n \"KeyId\": \"\",\n \"StreamARN\": \"\"\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=Kinesis_20131202.StartStreamEncryption");
var request = new RestRequest("", Method.Post);
request.AddHeader("x-amz-target", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"StreamName\": \"\",\n \"EncryptionType\": \"\",\n \"KeyId\": \"\",\n \"StreamARN\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.StartStreamEncryption"
payload := strings.NewReader("{\n \"StreamName\": \"\",\n \"EncryptionType\": \"\",\n \"KeyId\": \"\",\n \"StreamARN\": \"\"\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: 80
{
"StreamName": "",
"EncryptionType": "",
"KeyId": "",
"StreamARN": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.StartStreamEncryption")
.setHeader("x-amz-target", "")
.setHeader("content-type", "application/json")
.setBody("{\n \"StreamName\": \"\",\n \"EncryptionType\": \"\",\n \"KeyId\": \"\",\n \"StreamARN\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.StartStreamEncryption"))
.header("x-amz-target", "")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"StreamName\": \"\",\n \"EncryptionType\": \"\",\n \"KeyId\": \"\",\n \"StreamARN\": \"\"\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 \"StreamName\": \"\",\n \"EncryptionType\": \"\",\n \"KeyId\": \"\",\n \"StreamARN\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.StartStreamEncryption")
.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=Kinesis_20131202.StartStreamEncryption")
.header("x-amz-target", "")
.header("content-type", "application/json")
.body("{\n \"StreamName\": \"\",\n \"EncryptionType\": \"\",\n \"KeyId\": \"\",\n \"StreamARN\": \"\"\n}")
.asString();
const data = JSON.stringify({
StreamName: '',
EncryptionType: '',
KeyId: '',
StreamARN: ''
});
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=Kinesis_20131202.StartStreamEncryption');
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=Kinesis_20131202.StartStreamEncryption',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {StreamName: '', EncryptionType: '', KeyId: '', StreamARN: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.StartStreamEncryption';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"StreamName":"","EncryptionType":"","KeyId":"","StreamARN":""}'
};
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=Kinesis_20131202.StartStreamEncryption',
method: 'POST',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
},
processData: false,
data: '{\n "StreamName": "",\n "EncryptionType": "",\n "KeyId": "",\n "StreamARN": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"StreamName\": \"\",\n \"EncryptionType\": \"\",\n \"KeyId\": \"\",\n \"StreamARN\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.StartStreamEncryption")
.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({StreamName: '', EncryptionType: '', KeyId: '', StreamARN: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.StartStreamEncryption',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: {StreamName: '', EncryptionType: '', KeyId: '', StreamARN: ''},
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=Kinesis_20131202.StartStreamEncryption');
req.headers({
'x-amz-target': '',
'content-type': 'application/json'
});
req.type('json');
req.send({
StreamName: '',
EncryptionType: '',
KeyId: '',
StreamARN: ''
});
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=Kinesis_20131202.StartStreamEncryption',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {StreamName: '', EncryptionType: '', KeyId: '', StreamARN: ''}
};
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=Kinesis_20131202.StartStreamEncryption';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"StreamName":"","EncryptionType":"","KeyId":"","StreamARN":""}'
};
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 = @{ @"StreamName": @"",
@"EncryptionType": @"",
@"KeyId": @"",
@"StreamARN": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.StartStreamEncryption"]
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=Kinesis_20131202.StartStreamEncryption" in
let headers = Header.add_list (Header.init ()) [
("x-amz-target", "");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"StreamName\": \"\",\n \"EncryptionType\": \"\",\n \"KeyId\": \"\",\n \"StreamARN\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.StartStreamEncryption",
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([
'StreamName' => '',
'EncryptionType' => '',
'KeyId' => '',
'StreamARN' => ''
]),
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=Kinesis_20131202.StartStreamEncryption', [
'body' => '{
"StreamName": "",
"EncryptionType": "",
"KeyId": "",
"StreamARN": ""
}',
'headers' => [
'content-type' => 'application/json',
'x-amz-target' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.StartStreamEncryption');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'StreamName' => '',
'EncryptionType' => '',
'KeyId' => '',
'StreamARN' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'StreamName' => '',
'EncryptionType' => '',
'KeyId' => '',
'StreamARN' => ''
]));
$request->setRequestUrl('{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.StartStreamEncryption');
$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=Kinesis_20131202.StartStreamEncryption' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"StreamName": "",
"EncryptionType": "",
"KeyId": "",
"StreamARN": ""
}'
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.StartStreamEncryption' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"StreamName": "",
"EncryptionType": "",
"KeyId": "",
"StreamARN": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"StreamName\": \"\",\n \"EncryptionType\": \"\",\n \"KeyId\": \"\",\n \"StreamARN\": \"\"\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=Kinesis_20131202.StartStreamEncryption"
payload = {
"StreamName": "",
"EncryptionType": "",
"KeyId": "",
"StreamARN": ""
}
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=Kinesis_20131202.StartStreamEncryption"
payload <- "{\n \"StreamName\": \"\",\n \"EncryptionType\": \"\",\n \"KeyId\": \"\",\n \"StreamARN\": \"\"\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=Kinesis_20131202.StartStreamEncryption")
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 \"StreamName\": \"\",\n \"EncryptionType\": \"\",\n \"KeyId\": \"\",\n \"StreamARN\": \"\"\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 \"StreamName\": \"\",\n \"EncryptionType\": \"\",\n \"KeyId\": \"\",\n \"StreamARN\": \"\"\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=Kinesis_20131202.StartStreamEncryption";
let payload = json!({
"StreamName": "",
"EncryptionType": "",
"KeyId": "",
"StreamARN": ""
});
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=Kinesis_20131202.StartStreamEncryption' \
--header 'content-type: application/json' \
--header 'x-amz-target: ' \
--data '{
"StreamName": "",
"EncryptionType": "",
"KeyId": "",
"StreamARN": ""
}'
echo '{
"StreamName": "",
"EncryptionType": "",
"KeyId": "",
"StreamARN": ""
}' | \
http POST '{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.StartStreamEncryption' \
content-type:application/json \
x-amz-target:''
wget --quiet \
--method POST \
--header 'x-amz-target: ' \
--header 'content-type: application/json' \
--body-data '{\n "StreamName": "",\n "EncryptionType": "",\n "KeyId": "",\n "StreamARN": ""\n}' \
--output-document \
- '{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.StartStreamEncryption'
import Foundation
let headers = [
"x-amz-target": "",
"content-type": "application/json"
]
let parameters = [
"StreamName": "",
"EncryptionType": "",
"KeyId": "",
"StreamARN": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.StartStreamEncryption")! 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
StopStreamEncryption
{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.StopStreamEncryption
HEADERS
X-Amz-Target
BODY json
{
"StreamName": "",
"EncryptionType": "",
"KeyId": "",
"StreamARN": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.StopStreamEncryption");
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 \"StreamName\": \"\",\n \"EncryptionType\": \"\",\n \"KeyId\": \"\",\n \"StreamARN\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.StopStreamEncryption" {:headers {:x-amz-target ""}
:content-type :json
:form-params {:StreamName ""
:EncryptionType ""
:KeyId ""
:StreamARN ""}})
require "http/client"
url = "{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.StopStreamEncryption"
headers = HTTP::Headers{
"x-amz-target" => ""
"content-type" => "application/json"
}
reqBody = "{\n \"StreamName\": \"\",\n \"EncryptionType\": \"\",\n \"KeyId\": \"\",\n \"StreamARN\": \"\"\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=Kinesis_20131202.StopStreamEncryption"),
Headers =
{
{ "x-amz-target", "" },
},
Content = new StringContent("{\n \"StreamName\": \"\",\n \"EncryptionType\": \"\",\n \"KeyId\": \"\",\n \"StreamARN\": \"\"\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=Kinesis_20131202.StopStreamEncryption");
var request = new RestRequest("", Method.Post);
request.AddHeader("x-amz-target", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"StreamName\": \"\",\n \"EncryptionType\": \"\",\n \"KeyId\": \"\",\n \"StreamARN\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.StopStreamEncryption"
payload := strings.NewReader("{\n \"StreamName\": \"\",\n \"EncryptionType\": \"\",\n \"KeyId\": \"\",\n \"StreamARN\": \"\"\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: 80
{
"StreamName": "",
"EncryptionType": "",
"KeyId": "",
"StreamARN": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.StopStreamEncryption")
.setHeader("x-amz-target", "")
.setHeader("content-type", "application/json")
.setBody("{\n \"StreamName\": \"\",\n \"EncryptionType\": \"\",\n \"KeyId\": \"\",\n \"StreamARN\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.StopStreamEncryption"))
.header("x-amz-target", "")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"StreamName\": \"\",\n \"EncryptionType\": \"\",\n \"KeyId\": \"\",\n \"StreamARN\": \"\"\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 \"StreamName\": \"\",\n \"EncryptionType\": \"\",\n \"KeyId\": \"\",\n \"StreamARN\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.StopStreamEncryption")
.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=Kinesis_20131202.StopStreamEncryption")
.header("x-amz-target", "")
.header("content-type", "application/json")
.body("{\n \"StreamName\": \"\",\n \"EncryptionType\": \"\",\n \"KeyId\": \"\",\n \"StreamARN\": \"\"\n}")
.asString();
const data = JSON.stringify({
StreamName: '',
EncryptionType: '',
KeyId: '',
StreamARN: ''
});
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=Kinesis_20131202.StopStreamEncryption');
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=Kinesis_20131202.StopStreamEncryption',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {StreamName: '', EncryptionType: '', KeyId: '', StreamARN: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.StopStreamEncryption';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"StreamName":"","EncryptionType":"","KeyId":"","StreamARN":""}'
};
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=Kinesis_20131202.StopStreamEncryption',
method: 'POST',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
},
processData: false,
data: '{\n "StreamName": "",\n "EncryptionType": "",\n "KeyId": "",\n "StreamARN": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"StreamName\": \"\",\n \"EncryptionType\": \"\",\n \"KeyId\": \"\",\n \"StreamARN\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.StopStreamEncryption")
.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({StreamName: '', EncryptionType: '', KeyId: '', StreamARN: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.StopStreamEncryption',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: {StreamName: '', EncryptionType: '', KeyId: '', StreamARN: ''},
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=Kinesis_20131202.StopStreamEncryption');
req.headers({
'x-amz-target': '',
'content-type': 'application/json'
});
req.type('json');
req.send({
StreamName: '',
EncryptionType: '',
KeyId: '',
StreamARN: ''
});
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=Kinesis_20131202.StopStreamEncryption',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {StreamName: '', EncryptionType: '', KeyId: '', StreamARN: ''}
};
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=Kinesis_20131202.StopStreamEncryption';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"StreamName":"","EncryptionType":"","KeyId":"","StreamARN":""}'
};
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 = @{ @"StreamName": @"",
@"EncryptionType": @"",
@"KeyId": @"",
@"StreamARN": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.StopStreamEncryption"]
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=Kinesis_20131202.StopStreamEncryption" in
let headers = Header.add_list (Header.init ()) [
("x-amz-target", "");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"StreamName\": \"\",\n \"EncryptionType\": \"\",\n \"KeyId\": \"\",\n \"StreamARN\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.StopStreamEncryption",
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([
'StreamName' => '',
'EncryptionType' => '',
'KeyId' => '',
'StreamARN' => ''
]),
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=Kinesis_20131202.StopStreamEncryption', [
'body' => '{
"StreamName": "",
"EncryptionType": "",
"KeyId": "",
"StreamARN": ""
}',
'headers' => [
'content-type' => 'application/json',
'x-amz-target' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.StopStreamEncryption');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'StreamName' => '',
'EncryptionType' => '',
'KeyId' => '',
'StreamARN' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'StreamName' => '',
'EncryptionType' => '',
'KeyId' => '',
'StreamARN' => ''
]));
$request->setRequestUrl('{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.StopStreamEncryption');
$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=Kinesis_20131202.StopStreamEncryption' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"StreamName": "",
"EncryptionType": "",
"KeyId": "",
"StreamARN": ""
}'
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.StopStreamEncryption' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"StreamName": "",
"EncryptionType": "",
"KeyId": "",
"StreamARN": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"StreamName\": \"\",\n \"EncryptionType\": \"\",\n \"KeyId\": \"\",\n \"StreamARN\": \"\"\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=Kinesis_20131202.StopStreamEncryption"
payload = {
"StreamName": "",
"EncryptionType": "",
"KeyId": "",
"StreamARN": ""
}
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=Kinesis_20131202.StopStreamEncryption"
payload <- "{\n \"StreamName\": \"\",\n \"EncryptionType\": \"\",\n \"KeyId\": \"\",\n \"StreamARN\": \"\"\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=Kinesis_20131202.StopStreamEncryption")
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 \"StreamName\": \"\",\n \"EncryptionType\": \"\",\n \"KeyId\": \"\",\n \"StreamARN\": \"\"\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 \"StreamName\": \"\",\n \"EncryptionType\": \"\",\n \"KeyId\": \"\",\n \"StreamARN\": \"\"\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=Kinesis_20131202.StopStreamEncryption";
let payload = json!({
"StreamName": "",
"EncryptionType": "",
"KeyId": "",
"StreamARN": ""
});
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=Kinesis_20131202.StopStreamEncryption' \
--header 'content-type: application/json' \
--header 'x-amz-target: ' \
--data '{
"StreamName": "",
"EncryptionType": "",
"KeyId": "",
"StreamARN": ""
}'
echo '{
"StreamName": "",
"EncryptionType": "",
"KeyId": "",
"StreamARN": ""
}' | \
http POST '{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.StopStreamEncryption' \
content-type:application/json \
x-amz-target:''
wget --quiet \
--method POST \
--header 'x-amz-target: ' \
--header 'content-type: application/json' \
--body-data '{\n "StreamName": "",\n "EncryptionType": "",\n "KeyId": "",\n "StreamARN": ""\n}' \
--output-document \
- '{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.StopStreamEncryption'
import Foundation
let headers = [
"x-amz-target": "",
"content-type": "application/json"
]
let parameters = [
"StreamName": "",
"EncryptionType": "",
"KeyId": "",
"StreamARN": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.StopStreamEncryption")! 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
UpdateShardCount
{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.UpdateShardCount
HEADERS
X-Amz-Target
BODY json
{
"StreamName": "",
"TargetShardCount": "",
"ScalingType": "",
"StreamARN": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.UpdateShardCount");
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 \"StreamName\": \"\",\n \"TargetShardCount\": \"\",\n \"ScalingType\": \"\",\n \"StreamARN\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.UpdateShardCount" {:headers {:x-amz-target ""}
:content-type :json
:form-params {:StreamName ""
:TargetShardCount ""
:ScalingType ""
:StreamARN ""}})
require "http/client"
url = "{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.UpdateShardCount"
headers = HTTP::Headers{
"x-amz-target" => ""
"content-type" => "application/json"
}
reqBody = "{\n \"StreamName\": \"\",\n \"TargetShardCount\": \"\",\n \"ScalingType\": \"\",\n \"StreamARN\": \"\"\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=Kinesis_20131202.UpdateShardCount"),
Headers =
{
{ "x-amz-target", "" },
},
Content = new StringContent("{\n \"StreamName\": \"\",\n \"TargetShardCount\": \"\",\n \"ScalingType\": \"\",\n \"StreamARN\": \"\"\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=Kinesis_20131202.UpdateShardCount");
var request = new RestRequest("", Method.Post);
request.AddHeader("x-amz-target", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"StreamName\": \"\",\n \"TargetShardCount\": \"\",\n \"ScalingType\": \"\",\n \"StreamARN\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.UpdateShardCount"
payload := strings.NewReader("{\n \"StreamName\": \"\",\n \"TargetShardCount\": \"\",\n \"ScalingType\": \"\",\n \"StreamARN\": \"\"\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: 88
{
"StreamName": "",
"TargetShardCount": "",
"ScalingType": "",
"StreamARN": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.UpdateShardCount")
.setHeader("x-amz-target", "")
.setHeader("content-type", "application/json")
.setBody("{\n \"StreamName\": \"\",\n \"TargetShardCount\": \"\",\n \"ScalingType\": \"\",\n \"StreamARN\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.UpdateShardCount"))
.header("x-amz-target", "")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"StreamName\": \"\",\n \"TargetShardCount\": \"\",\n \"ScalingType\": \"\",\n \"StreamARN\": \"\"\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 \"StreamName\": \"\",\n \"TargetShardCount\": \"\",\n \"ScalingType\": \"\",\n \"StreamARN\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.UpdateShardCount")
.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=Kinesis_20131202.UpdateShardCount")
.header("x-amz-target", "")
.header("content-type", "application/json")
.body("{\n \"StreamName\": \"\",\n \"TargetShardCount\": \"\",\n \"ScalingType\": \"\",\n \"StreamARN\": \"\"\n}")
.asString();
const data = JSON.stringify({
StreamName: '',
TargetShardCount: '',
ScalingType: '',
StreamARN: ''
});
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=Kinesis_20131202.UpdateShardCount');
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=Kinesis_20131202.UpdateShardCount',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {StreamName: '', TargetShardCount: '', ScalingType: '', StreamARN: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.UpdateShardCount';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"StreamName":"","TargetShardCount":"","ScalingType":"","StreamARN":""}'
};
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=Kinesis_20131202.UpdateShardCount',
method: 'POST',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
},
processData: false,
data: '{\n "StreamName": "",\n "TargetShardCount": "",\n "ScalingType": "",\n "StreamARN": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"StreamName\": \"\",\n \"TargetShardCount\": \"\",\n \"ScalingType\": \"\",\n \"StreamARN\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.UpdateShardCount")
.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({StreamName: '', TargetShardCount: '', ScalingType: '', StreamARN: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.UpdateShardCount',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: {StreamName: '', TargetShardCount: '', ScalingType: '', StreamARN: ''},
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=Kinesis_20131202.UpdateShardCount');
req.headers({
'x-amz-target': '',
'content-type': 'application/json'
});
req.type('json');
req.send({
StreamName: '',
TargetShardCount: '',
ScalingType: '',
StreamARN: ''
});
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=Kinesis_20131202.UpdateShardCount',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {StreamName: '', TargetShardCount: '', ScalingType: '', StreamARN: ''}
};
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=Kinesis_20131202.UpdateShardCount';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"StreamName":"","TargetShardCount":"","ScalingType":"","StreamARN":""}'
};
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 = @{ @"StreamName": @"",
@"TargetShardCount": @"",
@"ScalingType": @"",
@"StreamARN": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.UpdateShardCount"]
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=Kinesis_20131202.UpdateShardCount" in
let headers = Header.add_list (Header.init ()) [
("x-amz-target", "");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"StreamName\": \"\",\n \"TargetShardCount\": \"\",\n \"ScalingType\": \"\",\n \"StreamARN\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.UpdateShardCount",
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([
'StreamName' => '',
'TargetShardCount' => '',
'ScalingType' => '',
'StreamARN' => ''
]),
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=Kinesis_20131202.UpdateShardCount', [
'body' => '{
"StreamName": "",
"TargetShardCount": "",
"ScalingType": "",
"StreamARN": ""
}',
'headers' => [
'content-type' => 'application/json',
'x-amz-target' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.UpdateShardCount');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'StreamName' => '',
'TargetShardCount' => '',
'ScalingType' => '',
'StreamARN' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'StreamName' => '',
'TargetShardCount' => '',
'ScalingType' => '',
'StreamARN' => ''
]));
$request->setRequestUrl('{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.UpdateShardCount');
$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=Kinesis_20131202.UpdateShardCount' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"StreamName": "",
"TargetShardCount": "",
"ScalingType": "",
"StreamARN": ""
}'
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.UpdateShardCount' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"StreamName": "",
"TargetShardCount": "",
"ScalingType": "",
"StreamARN": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"StreamName\": \"\",\n \"TargetShardCount\": \"\",\n \"ScalingType\": \"\",\n \"StreamARN\": \"\"\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=Kinesis_20131202.UpdateShardCount"
payload = {
"StreamName": "",
"TargetShardCount": "",
"ScalingType": "",
"StreamARN": ""
}
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=Kinesis_20131202.UpdateShardCount"
payload <- "{\n \"StreamName\": \"\",\n \"TargetShardCount\": \"\",\n \"ScalingType\": \"\",\n \"StreamARN\": \"\"\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=Kinesis_20131202.UpdateShardCount")
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 \"StreamName\": \"\",\n \"TargetShardCount\": \"\",\n \"ScalingType\": \"\",\n \"StreamARN\": \"\"\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 \"StreamName\": \"\",\n \"TargetShardCount\": \"\",\n \"ScalingType\": \"\",\n \"StreamARN\": \"\"\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=Kinesis_20131202.UpdateShardCount";
let payload = json!({
"StreamName": "",
"TargetShardCount": "",
"ScalingType": "",
"StreamARN": ""
});
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=Kinesis_20131202.UpdateShardCount' \
--header 'content-type: application/json' \
--header 'x-amz-target: ' \
--data '{
"StreamName": "",
"TargetShardCount": "",
"ScalingType": "",
"StreamARN": ""
}'
echo '{
"StreamName": "",
"TargetShardCount": "",
"ScalingType": "",
"StreamARN": ""
}' | \
http POST '{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.UpdateShardCount' \
content-type:application/json \
x-amz-target:''
wget --quiet \
--method POST \
--header 'x-amz-target: ' \
--header 'content-type: application/json' \
--body-data '{\n "StreamName": "",\n "TargetShardCount": "",\n "ScalingType": "",\n "StreamARN": ""\n}' \
--output-document \
- '{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.UpdateShardCount'
import Foundation
let headers = [
"x-amz-target": "",
"content-type": "application/json"
]
let parameters = [
"StreamName": "",
"TargetShardCount": "",
"ScalingType": "",
"StreamARN": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.UpdateShardCount")! 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
UpdateStreamMode
{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.UpdateStreamMode
HEADERS
X-Amz-Target
BODY json
{
"StreamARN": "",
"StreamModeDetails": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.UpdateStreamMode");
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 \"StreamARN\": \"\",\n \"StreamModeDetails\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.UpdateStreamMode" {:headers {:x-amz-target ""}
:content-type :json
:form-params {:StreamARN ""
:StreamModeDetails ""}})
require "http/client"
url = "{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.UpdateStreamMode"
headers = HTTP::Headers{
"x-amz-target" => ""
"content-type" => "application/json"
}
reqBody = "{\n \"StreamARN\": \"\",\n \"StreamModeDetails\": \"\"\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=Kinesis_20131202.UpdateStreamMode"),
Headers =
{
{ "x-amz-target", "" },
},
Content = new StringContent("{\n \"StreamARN\": \"\",\n \"StreamModeDetails\": \"\"\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=Kinesis_20131202.UpdateStreamMode");
var request = new RestRequest("", Method.Post);
request.AddHeader("x-amz-target", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"StreamARN\": \"\",\n \"StreamModeDetails\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.UpdateStreamMode"
payload := strings.NewReader("{\n \"StreamARN\": \"\",\n \"StreamModeDetails\": \"\"\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: 48
{
"StreamARN": "",
"StreamModeDetails": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.UpdateStreamMode")
.setHeader("x-amz-target", "")
.setHeader("content-type", "application/json")
.setBody("{\n \"StreamARN\": \"\",\n \"StreamModeDetails\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.UpdateStreamMode"))
.header("x-amz-target", "")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"StreamARN\": \"\",\n \"StreamModeDetails\": \"\"\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 \"StreamARN\": \"\",\n \"StreamModeDetails\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.UpdateStreamMode")
.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=Kinesis_20131202.UpdateStreamMode")
.header("x-amz-target", "")
.header("content-type", "application/json")
.body("{\n \"StreamARN\": \"\",\n \"StreamModeDetails\": \"\"\n}")
.asString();
const data = JSON.stringify({
StreamARN: '',
StreamModeDetails: ''
});
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=Kinesis_20131202.UpdateStreamMode');
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=Kinesis_20131202.UpdateStreamMode',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {StreamARN: '', StreamModeDetails: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.UpdateStreamMode';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"StreamARN":"","StreamModeDetails":""}'
};
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=Kinesis_20131202.UpdateStreamMode',
method: 'POST',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
},
processData: false,
data: '{\n "StreamARN": "",\n "StreamModeDetails": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"StreamARN\": \"\",\n \"StreamModeDetails\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.UpdateStreamMode")
.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({StreamARN: '', StreamModeDetails: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.UpdateStreamMode',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: {StreamARN: '', StreamModeDetails: ''},
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=Kinesis_20131202.UpdateStreamMode');
req.headers({
'x-amz-target': '',
'content-type': 'application/json'
});
req.type('json');
req.send({
StreamARN: '',
StreamModeDetails: ''
});
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=Kinesis_20131202.UpdateStreamMode',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {StreamARN: '', StreamModeDetails: ''}
};
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=Kinesis_20131202.UpdateStreamMode';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"StreamARN":"","StreamModeDetails":""}'
};
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 = @{ @"StreamARN": @"",
@"StreamModeDetails": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.UpdateStreamMode"]
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=Kinesis_20131202.UpdateStreamMode" in
let headers = Header.add_list (Header.init ()) [
("x-amz-target", "");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"StreamARN\": \"\",\n \"StreamModeDetails\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.UpdateStreamMode",
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([
'StreamARN' => '',
'StreamModeDetails' => ''
]),
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=Kinesis_20131202.UpdateStreamMode', [
'body' => '{
"StreamARN": "",
"StreamModeDetails": ""
}',
'headers' => [
'content-type' => 'application/json',
'x-amz-target' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.UpdateStreamMode');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'StreamARN' => '',
'StreamModeDetails' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'StreamARN' => '',
'StreamModeDetails' => ''
]));
$request->setRequestUrl('{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.UpdateStreamMode');
$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=Kinesis_20131202.UpdateStreamMode' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"StreamARN": "",
"StreamModeDetails": ""
}'
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.UpdateStreamMode' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"StreamARN": "",
"StreamModeDetails": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"StreamARN\": \"\",\n \"StreamModeDetails\": \"\"\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=Kinesis_20131202.UpdateStreamMode"
payload = {
"StreamARN": "",
"StreamModeDetails": ""
}
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=Kinesis_20131202.UpdateStreamMode"
payload <- "{\n \"StreamARN\": \"\",\n \"StreamModeDetails\": \"\"\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=Kinesis_20131202.UpdateStreamMode")
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 \"StreamARN\": \"\",\n \"StreamModeDetails\": \"\"\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 \"StreamARN\": \"\",\n \"StreamModeDetails\": \"\"\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=Kinesis_20131202.UpdateStreamMode";
let payload = json!({
"StreamARN": "",
"StreamModeDetails": ""
});
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=Kinesis_20131202.UpdateStreamMode' \
--header 'content-type: application/json' \
--header 'x-amz-target: ' \
--data '{
"StreamARN": "",
"StreamModeDetails": ""
}'
echo '{
"StreamARN": "",
"StreamModeDetails": ""
}' | \
http POST '{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.UpdateStreamMode' \
content-type:application/json \
x-amz-target:''
wget --quiet \
--method POST \
--header 'x-amz-target: ' \
--header 'content-type: application/json' \
--body-data '{\n "StreamARN": "",\n "StreamModeDetails": ""\n}' \
--output-document \
- '{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.UpdateStreamMode'
import Foundation
let headers = [
"x-amz-target": "",
"content-type": "application/json"
]
let parameters = [
"StreamARN": "",
"StreamModeDetails": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/#X-Amz-Target=Kinesis_20131202.UpdateStreamMode")! 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()