POST BatchGetTraces
{{baseUrl}}/Traces
BODY json

{
  "TraceIds": [],
  "NextToken": ""
}
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/Traces");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n  \"TraceIds\": [],\n  \"NextToken\": \"\"\n}");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/post "{{baseUrl}}/Traces" {:content-type :json
                                                   :form-params {:TraceIds []
                                                                 :NextToken ""}})
require "http/client"

url = "{{baseUrl}}/Traces"
headers = HTTP::Headers{
  "content-type" => "application/json"
}
reqBody = "{\n  \"TraceIds\": [],\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}}/Traces"),
    Content = new StringContent("{\n  \"TraceIds\": [],\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}}/Traces");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n  \"TraceIds\": [],\n  \"NextToken\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/Traces"

	payload := strings.NewReader("{\n  \"TraceIds\": [],\n  \"NextToken\": \"\"\n}")

	req, _ := http.NewRequest("POST", url, payload)

	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/Traces HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 39

{
  "TraceIds": [],
  "NextToken": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/Traces")
  .setHeader("content-type", "application/json")
  .setBody("{\n  \"TraceIds\": [],\n  \"NextToken\": \"\"\n}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/Traces"))
    .header("content-type", "application/json")
    .method("POST", HttpRequest.BodyPublishers.ofString("{\n  \"TraceIds\": [],\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  \"TraceIds\": [],\n  \"NextToken\": \"\"\n}");
Request request = new Request.Builder()
  .url("{{baseUrl}}/Traces")
  .post(body)
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/Traces")
  .header("content-type", "application/json")
  .body("{\n  \"TraceIds\": [],\n  \"NextToken\": \"\"\n}")
  .asString();
const data = JSON.stringify({
  TraceIds: [],
  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}}/Traces');
xhr.setRequestHeader('content-type', 'application/json');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'POST',
  url: '{{baseUrl}}/Traces',
  headers: {'content-type': 'application/json'},
  data: {TraceIds: [], NextToken: ''}
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/Traces';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"TraceIds":[],"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}}/Traces',
  method: 'POST',
  headers: {
    'content-type': 'application/json'
  },
  processData: false,
  data: '{\n  "TraceIds": [],\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  \"TraceIds\": [],\n  \"NextToken\": \"\"\n}")
val request = Request.Builder()
  .url("{{baseUrl}}/Traces")
  .post(body)
  .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/Traces',
  headers: {
    '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({TraceIds: [], NextToken: ''}));
req.end();
const request = require('request');

const options = {
  method: 'POST',
  url: '{{baseUrl}}/Traces',
  headers: {'content-type': 'application/json'},
  body: {TraceIds: [], 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}}/Traces');

req.headers({
  'content-type': 'application/json'
});

req.type('json');
req.send({
  TraceIds: [],
  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}}/Traces',
  headers: {'content-type': 'application/json'},
  data: {TraceIds: [], NextToken: ''}
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/Traces';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"TraceIds":[],"NextToken":""}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
#import 

NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"TraceIds": @[  ],
                              @"NextToken": @"" };

NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/Traces"]
                                                       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}}/Traces" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n  \"TraceIds\": [],\n  \"NextToken\": \"\"\n}" in

Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/Traces",
  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([
    'TraceIds' => [
        
    ],
    'NextToken' => ''
  ]),
  CURLOPT_HTTPHEADER => [
    "content-type: application/json"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('POST', '{{baseUrl}}/Traces', [
  'body' => '{
  "TraceIds": [],
  "NextToken": ""
}',
  'headers' => [
    'content-type' => 'application/json',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/Traces');
$request->setMethod(HTTP_METH_POST);

$request->setHeaders([
  'content-type' => 'application/json'
]);

$request->setContentType('application/json');
$request->setBody(json_encode([
  'TraceIds' => [
    
  ],
  'NextToken' => ''
]));

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
append(json_encode([
  'TraceIds' => [
    
  ],
  'NextToken' => ''
]));
$request->setRequestUrl('{{baseUrl}}/Traces');
$request->setRequestMethod('POST');
$request->setBody($body);

$request->setHeaders([
  'content-type' => 'application/json'
]);

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/Traces' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "TraceIds": [],
  "NextToken": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/Traces' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "TraceIds": [],
  "NextToken": ""
}'
import http.client

conn = http.client.HTTPSConnection("example.com")

payload = "{\n  \"TraceIds\": [],\n  \"NextToken\": \"\"\n}"

headers = { 'content-type': "application/json" }

conn.request("POST", "/baseUrl/Traces", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/Traces"

payload = {
    "TraceIds": [],
    "NextToken": ""
}
headers = {"content-type": "application/json"}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
library(httr)

url <- "{{baseUrl}}/Traces"

payload <- "{\n  \"TraceIds\": [],\n  \"NextToken\": \"\"\n}"

encode <- "json"

response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/Traces")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n  \"TraceIds\": [],\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/Traces') do |req|
  req.body = "{\n  \"TraceIds\": [],\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}}/Traces";

    let payload = json!({
        "TraceIds": (),
        "NextToken": ""
    });

    let mut headers = reqwest::header::HeaderMap::new();
    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}}/Traces \
  --header 'content-type: application/json' \
  --data '{
  "TraceIds": [],
  "NextToken": ""
}'
echo '{
  "TraceIds": [],
  "NextToken": ""
}' |  \
  http POST {{baseUrl}}/Traces \
  content-type:application/json
wget --quiet \
  --method POST \
  --header 'content-type: application/json' \
  --body-data '{\n  "TraceIds": [],\n  "NextToken": ""\n}' \
  --output-document \
  - {{baseUrl}}/Traces
import Foundation

let headers = ["content-type": "application/json"]
let parameters = [
  "TraceIds": [],
  "NextToken": ""
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/Traces")! 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 CreateGroup
{{baseUrl}}/CreateGroup
BODY json

{
  "GroupName": "",
  "FilterExpression": "",
  "InsightsConfiguration": {
    "InsightsEnabled": "",
    "NotificationsEnabled": ""
  },
  "Tags": [
    {
      "Key": "",
      "Value": ""
    }
  ]
}
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/CreateGroup");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n  \"GroupName\": \"\",\n  \"FilterExpression\": \"\",\n  \"InsightsConfiguration\": {\n    \"InsightsEnabled\": \"\",\n    \"NotificationsEnabled\": \"\"\n  },\n  \"Tags\": [\n    {\n      \"Key\": \"\",\n      \"Value\": \"\"\n    }\n  ]\n}");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/post "{{baseUrl}}/CreateGroup" {:content-type :json
                                                        :form-params {:GroupName ""
                                                                      :FilterExpression ""
                                                                      :InsightsConfiguration {:InsightsEnabled ""
                                                                                              :NotificationsEnabled ""}
                                                                      :Tags [{:Key ""
                                                                              :Value ""}]}})
require "http/client"

url = "{{baseUrl}}/CreateGroup"
headers = HTTP::Headers{
  "content-type" => "application/json"
}
reqBody = "{\n  \"GroupName\": \"\",\n  \"FilterExpression\": \"\",\n  \"InsightsConfiguration\": {\n    \"InsightsEnabled\": \"\",\n    \"NotificationsEnabled\": \"\"\n  },\n  \"Tags\": [\n    {\n      \"Key\": \"\",\n      \"Value\": \"\"\n    }\n  ]\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}}/CreateGroup"),
    Content = new StringContent("{\n  \"GroupName\": \"\",\n  \"FilterExpression\": \"\",\n  \"InsightsConfiguration\": {\n    \"InsightsEnabled\": \"\",\n    \"NotificationsEnabled\": \"\"\n  },\n  \"Tags\": [\n    {\n      \"Key\": \"\",\n      \"Value\": \"\"\n    }\n  ]\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}}/CreateGroup");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n  \"GroupName\": \"\",\n  \"FilterExpression\": \"\",\n  \"InsightsConfiguration\": {\n    \"InsightsEnabled\": \"\",\n    \"NotificationsEnabled\": \"\"\n  },\n  \"Tags\": [\n    {\n      \"Key\": \"\",\n      \"Value\": \"\"\n    }\n  ]\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/CreateGroup"

	payload := strings.NewReader("{\n  \"GroupName\": \"\",\n  \"FilterExpression\": \"\",\n  \"InsightsConfiguration\": {\n    \"InsightsEnabled\": \"\",\n    \"NotificationsEnabled\": \"\"\n  },\n  \"Tags\": [\n    {\n      \"Key\": \"\",\n      \"Value\": \"\"\n    }\n  ]\n}")

	req, _ := http.NewRequest("POST", url, payload)

	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/CreateGroup HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 203

{
  "GroupName": "",
  "FilterExpression": "",
  "InsightsConfiguration": {
    "InsightsEnabled": "",
    "NotificationsEnabled": ""
  },
  "Tags": [
    {
      "Key": "",
      "Value": ""
    }
  ]
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/CreateGroup")
  .setHeader("content-type", "application/json")
  .setBody("{\n  \"GroupName\": \"\",\n  \"FilterExpression\": \"\",\n  \"InsightsConfiguration\": {\n    \"InsightsEnabled\": \"\",\n    \"NotificationsEnabled\": \"\"\n  },\n  \"Tags\": [\n    {\n      \"Key\": \"\",\n      \"Value\": \"\"\n    }\n  ]\n}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/CreateGroup"))
    .header("content-type", "application/json")
    .method("POST", HttpRequest.BodyPublishers.ofString("{\n  \"GroupName\": \"\",\n  \"FilterExpression\": \"\",\n  \"InsightsConfiguration\": {\n    \"InsightsEnabled\": \"\",\n    \"NotificationsEnabled\": \"\"\n  },\n  \"Tags\": [\n    {\n      \"Key\": \"\",\n      \"Value\": \"\"\n    }\n  ]\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  \"GroupName\": \"\",\n  \"FilterExpression\": \"\",\n  \"InsightsConfiguration\": {\n    \"InsightsEnabled\": \"\",\n    \"NotificationsEnabled\": \"\"\n  },\n  \"Tags\": [\n    {\n      \"Key\": \"\",\n      \"Value\": \"\"\n    }\n  ]\n}");
Request request = new Request.Builder()
  .url("{{baseUrl}}/CreateGroup")
  .post(body)
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/CreateGroup")
  .header("content-type", "application/json")
  .body("{\n  \"GroupName\": \"\",\n  \"FilterExpression\": \"\",\n  \"InsightsConfiguration\": {\n    \"InsightsEnabled\": \"\",\n    \"NotificationsEnabled\": \"\"\n  },\n  \"Tags\": [\n    {\n      \"Key\": \"\",\n      \"Value\": \"\"\n    }\n  ]\n}")
  .asString();
const data = JSON.stringify({
  GroupName: '',
  FilterExpression: '',
  InsightsConfiguration: {
    InsightsEnabled: '',
    NotificationsEnabled: ''
  },
  Tags: [
    {
      Key: '',
      Value: ''
    }
  ]
});

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener('readystatechange', function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open('POST', '{{baseUrl}}/CreateGroup');
xhr.setRequestHeader('content-type', 'application/json');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'POST',
  url: '{{baseUrl}}/CreateGroup',
  headers: {'content-type': 'application/json'},
  data: {
    GroupName: '',
    FilterExpression: '',
    InsightsConfiguration: {InsightsEnabled: '', NotificationsEnabled: ''},
    Tags: [{Key: '', Value: ''}]
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/CreateGroup';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"GroupName":"","FilterExpression":"","InsightsConfiguration":{"InsightsEnabled":"","NotificationsEnabled":""},"Tags":[{"Key":"","Value":""}]}'
};

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}}/CreateGroup',
  method: 'POST',
  headers: {
    'content-type': 'application/json'
  },
  processData: false,
  data: '{\n  "GroupName": "",\n  "FilterExpression": "",\n  "InsightsConfiguration": {\n    "InsightsEnabled": "",\n    "NotificationsEnabled": ""\n  },\n  "Tags": [\n    {\n      "Key": "",\n      "Value": ""\n    }\n  ]\n}'
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n  \"GroupName\": \"\",\n  \"FilterExpression\": \"\",\n  \"InsightsConfiguration\": {\n    \"InsightsEnabled\": \"\",\n    \"NotificationsEnabled\": \"\"\n  },\n  \"Tags\": [\n    {\n      \"Key\": \"\",\n      \"Value\": \"\"\n    }\n  ]\n}")
val request = Request.Builder()
  .url("{{baseUrl}}/CreateGroup")
  .post(body)
  .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/CreateGroup',
  headers: {
    '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({
  GroupName: '',
  FilterExpression: '',
  InsightsConfiguration: {InsightsEnabled: '', NotificationsEnabled: ''},
  Tags: [{Key: '', Value: ''}]
}));
req.end();
const request = require('request');

const options = {
  method: 'POST',
  url: '{{baseUrl}}/CreateGroup',
  headers: {'content-type': 'application/json'},
  body: {
    GroupName: '',
    FilterExpression: '',
    InsightsConfiguration: {InsightsEnabled: '', NotificationsEnabled: ''},
    Tags: [{Key: '', Value: ''}]
  },
  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}}/CreateGroup');

req.headers({
  'content-type': 'application/json'
});

req.type('json');
req.send({
  GroupName: '',
  FilterExpression: '',
  InsightsConfiguration: {
    InsightsEnabled: '',
    NotificationsEnabled: ''
  },
  Tags: [
    {
      Key: '',
      Value: ''
    }
  ]
});

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}}/CreateGroup',
  headers: {'content-type': 'application/json'},
  data: {
    GroupName: '',
    FilterExpression: '',
    InsightsConfiguration: {InsightsEnabled: '', NotificationsEnabled: ''},
    Tags: [{Key: '', Value: ''}]
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/CreateGroup';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"GroupName":"","FilterExpression":"","InsightsConfiguration":{"InsightsEnabled":"","NotificationsEnabled":""},"Tags":[{"Key":"","Value":""}]}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
#import 

NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"GroupName": @"",
                              @"FilterExpression": @"",
                              @"InsightsConfiguration": @{ @"InsightsEnabled": @"", @"NotificationsEnabled": @"" },
                              @"Tags": @[ @{ @"Key": @"", @"Value": @"" } ] };

NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/CreateGroup"]
                                                       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}}/CreateGroup" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n  \"GroupName\": \"\",\n  \"FilterExpression\": \"\",\n  \"InsightsConfiguration\": {\n    \"InsightsEnabled\": \"\",\n    \"NotificationsEnabled\": \"\"\n  },\n  \"Tags\": [\n    {\n      \"Key\": \"\",\n      \"Value\": \"\"\n    }\n  ]\n}" in

Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/CreateGroup",
  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([
    'GroupName' => '',
    'FilterExpression' => '',
    'InsightsConfiguration' => [
        'InsightsEnabled' => '',
        'NotificationsEnabled' => ''
    ],
    'Tags' => [
        [
                'Key' => '',
                'Value' => ''
        ]
    ]
  ]),
  CURLOPT_HTTPHEADER => [
    "content-type: application/json"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('POST', '{{baseUrl}}/CreateGroup', [
  'body' => '{
  "GroupName": "",
  "FilterExpression": "",
  "InsightsConfiguration": {
    "InsightsEnabled": "",
    "NotificationsEnabled": ""
  },
  "Tags": [
    {
      "Key": "",
      "Value": ""
    }
  ]
}',
  'headers' => [
    'content-type' => 'application/json',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/CreateGroup');
$request->setMethod(HTTP_METH_POST);

$request->setHeaders([
  'content-type' => 'application/json'
]);

$request->setContentType('application/json');
$request->setBody(json_encode([
  'GroupName' => '',
  'FilterExpression' => '',
  'InsightsConfiguration' => [
    'InsightsEnabled' => '',
    'NotificationsEnabled' => ''
  ],
  'Tags' => [
    [
        'Key' => '',
        'Value' => ''
    ]
  ]
]));

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
append(json_encode([
  'GroupName' => '',
  'FilterExpression' => '',
  'InsightsConfiguration' => [
    'InsightsEnabled' => '',
    'NotificationsEnabled' => ''
  ],
  'Tags' => [
    [
        'Key' => '',
        'Value' => ''
    ]
  ]
]));
$request->setRequestUrl('{{baseUrl}}/CreateGroup');
$request->setRequestMethod('POST');
$request->setBody($body);

$request->setHeaders([
  'content-type' => 'application/json'
]);

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/CreateGroup' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "GroupName": "",
  "FilterExpression": "",
  "InsightsConfiguration": {
    "InsightsEnabled": "",
    "NotificationsEnabled": ""
  },
  "Tags": [
    {
      "Key": "",
      "Value": ""
    }
  ]
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/CreateGroup' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "GroupName": "",
  "FilterExpression": "",
  "InsightsConfiguration": {
    "InsightsEnabled": "",
    "NotificationsEnabled": ""
  },
  "Tags": [
    {
      "Key": "",
      "Value": ""
    }
  ]
}'
import http.client

conn = http.client.HTTPSConnection("example.com")

payload = "{\n  \"GroupName\": \"\",\n  \"FilterExpression\": \"\",\n  \"InsightsConfiguration\": {\n    \"InsightsEnabled\": \"\",\n    \"NotificationsEnabled\": \"\"\n  },\n  \"Tags\": [\n    {\n      \"Key\": \"\",\n      \"Value\": \"\"\n    }\n  ]\n}"

headers = { 'content-type': "application/json" }

conn.request("POST", "/baseUrl/CreateGroup", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/CreateGroup"

payload = {
    "GroupName": "",
    "FilterExpression": "",
    "InsightsConfiguration": {
        "InsightsEnabled": "",
        "NotificationsEnabled": ""
    },
    "Tags": [
        {
            "Key": "",
            "Value": ""
        }
    ]
}
headers = {"content-type": "application/json"}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
library(httr)

url <- "{{baseUrl}}/CreateGroup"

payload <- "{\n  \"GroupName\": \"\",\n  \"FilterExpression\": \"\",\n  \"InsightsConfiguration\": {\n    \"InsightsEnabled\": \"\",\n    \"NotificationsEnabled\": \"\"\n  },\n  \"Tags\": [\n    {\n      \"Key\": \"\",\n      \"Value\": \"\"\n    }\n  ]\n}"

encode <- "json"

response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/CreateGroup")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n  \"GroupName\": \"\",\n  \"FilterExpression\": \"\",\n  \"InsightsConfiguration\": {\n    \"InsightsEnabled\": \"\",\n    \"NotificationsEnabled\": \"\"\n  },\n  \"Tags\": [\n    {\n      \"Key\": \"\",\n      \"Value\": \"\"\n    }\n  ]\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/CreateGroup') do |req|
  req.body = "{\n  \"GroupName\": \"\",\n  \"FilterExpression\": \"\",\n  \"InsightsConfiguration\": {\n    \"InsightsEnabled\": \"\",\n    \"NotificationsEnabled\": \"\"\n  },\n  \"Tags\": [\n    {\n      \"Key\": \"\",\n      \"Value\": \"\"\n    }\n  ]\n}"
end

puts response.status
puts response.body
use serde_json::json;
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/CreateGroup";

    let payload = json!({
        "GroupName": "",
        "FilterExpression": "",
        "InsightsConfiguration": json!({
            "InsightsEnabled": "",
            "NotificationsEnabled": ""
        }),
        "Tags": (
            json!({
                "Key": "",
                "Value": ""
            })
        )
    });

    let mut headers = reqwest::header::HeaderMap::new();
    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}}/CreateGroup \
  --header 'content-type: application/json' \
  --data '{
  "GroupName": "",
  "FilterExpression": "",
  "InsightsConfiguration": {
    "InsightsEnabled": "",
    "NotificationsEnabled": ""
  },
  "Tags": [
    {
      "Key": "",
      "Value": ""
    }
  ]
}'
echo '{
  "GroupName": "",
  "FilterExpression": "",
  "InsightsConfiguration": {
    "InsightsEnabled": "",
    "NotificationsEnabled": ""
  },
  "Tags": [
    {
      "Key": "",
      "Value": ""
    }
  ]
}' |  \
  http POST {{baseUrl}}/CreateGroup \
  content-type:application/json
wget --quiet \
  --method POST \
  --header 'content-type: application/json' \
  --body-data '{\n  "GroupName": "",\n  "FilterExpression": "",\n  "InsightsConfiguration": {\n    "InsightsEnabled": "",\n    "NotificationsEnabled": ""\n  },\n  "Tags": [\n    {\n      "Key": "",\n      "Value": ""\n    }\n  ]\n}' \
  --output-document \
  - {{baseUrl}}/CreateGroup
import Foundation

let headers = ["content-type": "application/json"]
let parameters = [
  "GroupName": "",
  "FilterExpression": "",
  "InsightsConfiguration": [
    "InsightsEnabled": "",
    "NotificationsEnabled": ""
  ],
  "Tags": [
    [
      "Key": "",
      "Value": ""
    ]
  ]
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/CreateGroup")! 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 CreateSamplingRule
{{baseUrl}}/CreateSamplingRule
BODY json

{
  "SamplingRule": {
    "RuleName": "",
    "RuleARN": "",
    "ResourceARN": "",
    "Priority": "",
    "FixedRate": "",
    "ReservoirSize": "",
    "ServiceName": "",
    "ServiceType": "",
    "Host": "",
    "HTTPMethod": "",
    "URLPath": "",
    "Version": "",
    "Attributes": ""
  },
  "Tags": [
    {
      "Key": "",
      "Value": ""
    }
  ]
}
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/CreateSamplingRule");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n  \"SamplingRule\": {\n    \"RuleName\": \"\",\n    \"RuleARN\": \"\",\n    \"ResourceARN\": \"\",\n    \"Priority\": \"\",\n    \"FixedRate\": \"\",\n    \"ReservoirSize\": \"\",\n    \"ServiceName\": \"\",\n    \"ServiceType\": \"\",\n    \"Host\": \"\",\n    \"HTTPMethod\": \"\",\n    \"URLPath\": \"\",\n    \"Version\": \"\",\n    \"Attributes\": \"\"\n  },\n  \"Tags\": [\n    {\n      \"Key\": \"\",\n      \"Value\": \"\"\n    }\n  ]\n}");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/post "{{baseUrl}}/CreateSamplingRule" {:content-type :json
                                                               :form-params {:SamplingRule {:RuleName ""
                                                                                            :RuleARN ""
                                                                                            :ResourceARN ""
                                                                                            :Priority ""
                                                                                            :FixedRate ""
                                                                                            :ReservoirSize ""
                                                                                            :ServiceName ""
                                                                                            :ServiceType ""
                                                                                            :Host ""
                                                                                            :HTTPMethod ""
                                                                                            :URLPath ""
                                                                                            :Version ""
                                                                                            :Attributes ""}
                                                                             :Tags [{:Key ""
                                                                                     :Value ""}]}})
require "http/client"

url = "{{baseUrl}}/CreateSamplingRule"
headers = HTTP::Headers{
  "content-type" => "application/json"
}
reqBody = "{\n  \"SamplingRule\": {\n    \"RuleName\": \"\",\n    \"RuleARN\": \"\",\n    \"ResourceARN\": \"\",\n    \"Priority\": \"\",\n    \"FixedRate\": \"\",\n    \"ReservoirSize\": \"\",\n    \"ServiceName\": \"\",\n    \"ServiceType\": \"\",\n    \"Host\": \"\",\n    \"HTTPMethod\": \"\",\n    \"URLPath\": \"\",\n    \"Version\": \"\",\n    \"Attributes\": \"\"\n  },\n  \"Tags\": [\n    {\n      \"Key\": \"\",\n      \"Value\": \"\"\n    }\n  ]\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}}/CreateSamplingRule"),
    Content = new StringContent("{\n  \"SamplingRule\": {\n    \"RuleName\": \"\",\n    \"RuleARN\": \"\",\n    \"ResourceARN\": \"\",\n    \"Priority\": \"\",\n    \"FixedRate\": \"\",\n    \"ReservoirSize\": \"\",\n    \"ServiceName\": \"\",\n    \"ServiceType\": \"\",\n    \"Host\": \"\",\n    \"HTTPMethod\": \"\",\n    \"URLPath\": \"\",\n    \"Version\": \"\",\n    \"Attributes\": \"\"\n  },\n  \"Tags\": [\n    {\n      \"Key\": \"\",\n      \"Value\": \"\"\n    }\n  ]\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}}/CreateSamplingRule");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n  \"SamplingRule\": {\n    \"RuleName\": \"\",\n    \"RuleARN\": \"\",\n    \"ResourceARN\": \"\",\n    \"Priority\": \"\",\n    \"FixedRate\": \"\",\n    \"ReservoirSize\": \"\",\n    \"ServiceName\": \"\",\n    \"ServiceType\": \"\",\n    \"Host\": \"\",\n    \"HTTPMethod\": \"\",\n    \"URLPath\": \"\",\n    \"Version\": \"\",\n    \"Attributes\": \"\"\n  },\n  \"Tags\": [\n    {\n      \"Key\": \"\",\n      \"Value\": \"\"\n    }\n  ]\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/CreateSamplingRule"

	payload := strings.NewReader("{\n  \"SamplingRule\": {\n    \"RuleName\": \"\",\n    \"RuleARN\": \"\",\n    \"ResourceARN\": \"\",\n    \"Priority\": \"\",\n    \"FixedRate\": \"\",\n    \"ReservoirSize\": \"\",\n    \"ServiceName\": \"\",\n    \"ServiceType\": \"\",\n    \"Host\": \"\",\n    \"HTTPMethod\": \"\",\n    \"URLPath\": \"\",\n    \"Version\": \"\",\n    \"Attributes\": \"\"\n  },\n  \"Tags\": [\n    {\n      \"Key\": \"\",\n      \"Value\": \"\"\n    }\n  ]\n}")

	req, _ := http.NewRequest("POST", url, payload)

	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/CreateSamplingRule HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 362

{
  "SamplingRule": {
    "RuleName": "",
    "RuleARN": "",
    "ResourceARN": "",
    "Priority": "",
    "FixedRate": "",
    "ReservoirSize": "",
    "ServiceName": "",
    "ServiceType": "",
    "Host": "",
    "HTTPMethod": "",
    "URLPath": "",
    "Version": "",
    "Attributes": ""
  },
  "Tags": [
    {
      "Key": "",
      "Value": ""
    }
  ]
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/CreateSamplingRule")
  .setHeader("content-type", "application/json")
  .setBody("{\n  \"SamplingRule\": {\n    \"RuleName\": \"\",\n    \"RuleARN\": \"\",\n    \"ResourceARN\": \"\",\n    \"Priority\": \"\",\n    \"FixedRate\": \"\",\n    \"ReservoirSize\": \"\",\n    \"ServiceName\": \"\",\n    \"ServiceType\": \"\",\n    \"Host\": \"\",\n    \"HTTPMethod\": \"\",\n    \"URLPath\": \"\",\n    \"Version\": \"\",\n    \"Attributes\": \"\"\n  },\n  \"Tags\": [\n    {\n      \"Key\": \"\",\n      \"Value\": \"\"\n    }\n  ]\n}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/CreateSamplingRule"))
    .header("content-type", "application/json")
    .method("POST", HttpRequest.BodyPublishers.ofString("{\n  \"SamplingRule\": {\n    \"RuleName\": \"\",\n    \"RuleARN\": \"\",\n    \"ResourceARN\": \"\",\n    \"Priority\": \"\",\n    \"FixedRate\": \"\",\n    \"ReservoirSize\": \"\",\n    \"ServiceName\": \"\",\n    \"ServiceType\": \"\",\n    \"Host\": \"\",\n    \"HTTPMethod\": \"\",\n    \"URLPath\": \"\",\n    \"Version\": \"\",\n    \"Attributes\": \"\"\n  },\n  \"Tags\": [\n    {\n      \"Key\": \"\",\n      \"Value\": \"\"\n    }\n  ]\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  \"SamplingRule\": {\n    \"RuleName\": \"\",\n    \"RuleARN\": \"\",\n    \"ResourceARN\": \"\",\n    \"Priority\": \"\",\n    \"FixedRate\": \"\",\n    \"ReservoirSize\": \"\",\n    \"ServiceName\": \"\",\n    \"ServiceType\": \"\",\n    \"Host\": \"\",\n    \"HTTPMethod\": \"\",\n    \"URLPath\": \"\",\n    \"Version\": \"\",\n    \"Attributes\": \"\"\n  },\n  \"Tags\": [\n    {\n      \"Key\": \"\",\n      \"Value\": \"\"\n    }\n  ]\n}");
Request request = new Request.Builder()
  .url("{{baseUrl}}/CreateSamplingRule")
  .post(body)
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/CreateSamplingRule")
  .header("content-type", "application/json")
  .body("{\n  \"SamplingRule\": {\n    \"RuleName\": \"\",\n    \"RuleARN\": \"\",\n    \"ResourceARN\": \"\",\n    \"Priority\": \"\",\n    \"FixedRate\": \"\",\n    \"ReservoirSize\": \"\",\n    \"ServiceName\": \"\",\n    \"ServiceType\": \"\",\n    \"Host\": \"\",\n    \"HTTPMethod\": \"\",\n    \"URLPath\": \"\",\n    \"Version\": \"\",\n    \"Attributes\": \"\"\n  },\n  \"Tags\": [\n    {\n      \"Key\": \"\",\n      \"Value\": \"\"\n    }\n  ]\n}")
  .asString();
const data = JSON.stringify({
  SamplingRule: {
    RuleName: '',
    RuleARN: '',
    ResourceARN: '',
    Priority: '',
    FixedRate: '',
    ReservoirSize: '',
    ServiceName: '',
    ServiceType: '',
    Host: '',
    HTTPMethod: '',
    URLPath: '',
    Version: '',
    Attributes: ''
  },
  Tags: [
    {
      Key: '',
      Value: ''
    }
  ]
});

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener('readystatechange', function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open('POST', '{{baseUrl}}/CreateSamplingRule');
xhr.setRequestHeader('content-type', 'application/json');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'POST',
  url: '{{baseUrl}}/CreateSamplingRule',
  headers: {'content-type': 'application/json'},
  data: {
    SamplingRule: {
      RuleName: '',
      RuleARN: '',
      ResourceARN: '',
      Priority: '',
      FixedRate: '',
      ReservoirSize: '',
      ServiceName: '',
      ServiceType: '',
      Host: '',
      HTTPMethod: '',
      URLPath: '',
      Version: '',
      Attributes: ''
    },
    Tags: [{Key: '', Value: ''}]
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/CreateSamplingRule';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"SamplingRule":{"RuleName":"","RuleARN":"","ResourceARN":"","Priority":"","FixedRate":"","ReservoirSize":"","ServiceName":"","ServiceType":"","Host":"","HTTPMethod":"","URLPath":"","Version":"","Attributes":""},"Tags":[{"Key":"","Value":""}]}'
};

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}}/CreateSamplingRule',
  method: 'POST',
  headers: {
    'content-type': 'application/json'
  },
  processData: false,
  data: '{\n  "SamplingRule": {\n    "RuleName": "",\n    "RuleARN": "",\n    "ResourceARN": "",\n    "Priority": "",\n    "FixedRate": "",\n    "ReservoirSize": "",\n    "ServiceName": "",\n    "ServiceType": "",\n    "Host": "",\n    "HTTPMethod": "",\n    "URLPath": "",\n    "Version": "",\n    "Attributes": ""\n  },\n  "Tags": [\n    {\n      "Key": "",\n      "Value": ""\n    }\n  ]\n}'
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n  \"SamplingRule\": {\n    \"RuleName\": \"\",\n    \"RuleARN\": \"\",\n    \"ResourceARN\": \"\",\n    \"Priority\": \"\",\n    \"FixedRate\": \"\",\n    \"ReservoirSize\": \"\",\n    \"ServiceName\": \"\",\n    \"ServiceType\": \"\",\n    \"Host\": \"\",\n    \"HTTPMethod\": \"\",\n    \"URLPath\": \"\",\n    \"Version\": \"\",\n    \"Attributes\": \"\"\n  },\n  \"Tags\": [\n    {\n      \"Key\": \"\",\n      \"Value\": \"\"\n    }\n  ]\n}")
val request = Request.Builder()
  .url("{{baseUrl}}/CreateSamplingRule")
  .post(body)
  .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/CreateSamplingRule',
  headers: {
    '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({
  SamplingRule: {
    RuleName: '',
    RuleARN: '',
    ResourceARN: '',
    Priority: '',
    FixedRate: '',
    ReservoirSize: '',
    ServiceName: '',
    ServiceType: '',
    Host: '',
    HTTPMethod: '',
    URLPath: '',
    Version: '',
    Attributes: ''
  },
  Tags: [{Key: '', Value: ''}]
}));
req.end();
const request = require('request');

const options = {
  method: 'POST',
  url: '{{baseUrl}}/CreateSamplingRule',
  headers: {'content-type': 'application/json'},
  body: {
    SamplingRule: {
      RuleName: '',
      RuleARN: '',
      ResourceARN: '',
      Priority: '',
      FixedRate: '',
      ReservoirSize: '',
      ServiceName: '',
      ServiceType: '',
      Host: '',
      HTTPMethod: '',
      URLPath: '',
      Version: '',
      Attributes: ''
    },
    Tags: [{Key: '', Value: ''}]
  },
  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}}/CreateSamplingRule');

req.headers({
  'content-type': 'application/json'
});

req.type('json');
req.send({
  SamplingRule: {
    RuleName: '',
    RuleARN: '',
    ResourceARN: '',
    Priority: '',
    FixedRate: '',
    ReservoirSize: '',
    ServiceName: '',
    ServiceType: '',
    Host: '',
    HTTPMethod: '',
    URLPath: '',
    Version: '',
    Attributes: ''
  },
  Tags: [
    {
      Key: '',
      Value: ''
    }
  ]
});

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}}/CreateSamplingRule',
  headers: {'content-type': 'application/json'},
  data: {
    SamplingRule: {
      RuleName: '',
      RuleARN: '',
      ResourceARN: '',
      Priority: '',
      FixedRate: '',
      ReservoirSize: '',
      ServiceName: '',
      ServiceType: '',
      Host: '',
      HTTPMethod: '',
      URLPath: '',
      Version: '',
      Attributes: ''
    },
    Tags: [{Key: '', Value: ''}]
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/CreateSamplingRule';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"SamplingRule":{"RuleName":"","RuleARN":"","ResourceARN":"","Priority":"","FixedRate":"","ReservoirSize":"","ServiceName":"","ServiceType":"","Host":"","HTTPMethod":"","URLPath":"","Version":"","Attributes":""},"Tags":[{"Key":"","Value":""}]}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
#import 

NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"SamplingRule": @{ @"RuleName": @"", @"RuleARN": @"", @"ResourceARN": @"", @"Priority": @"", @"FixedRate": @"", @"ReservoirSize": @"", @"ServiceName": @"", @"ServiceType": @"", @"Host": @"", @"HTTPMethod": @"", @"URLPath": @"", @"Version": @"", @"Attributes": @"" },
                              @"Tags": @[ @{ @"Key": @"", @"Value": @"" } ] };

NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/CreateSamplingRule"]
                                                       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}}/CreateSamplingRule" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n  \"SamplingRule\": {\n    \"RuleName\": \"\",\n    \"RuleARN\": \"\",\n    \"ResourceARN\": \"\",\n    \"Priority\": \"\",\n    \"FixedRate\": \"\",\n    \"ReservoirSize\": \"\",\n    \"ServiceName\": \"\",\n    \"ServiceType\": \"\",\n    \"Host\": \"\",\n    \"HTTPMethod\": \"\",\n    \"URLPath\": \"\",\n    \"Version\": \"\",\n    \"Attributes\": \"\"\n  },\n  \"Tags\": [\n    {\n      \"Key\": \"\",\n      \"Value\": \"\"\n    }\n  ]\n}" in

Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/CreateSamplingRule",
  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([
    'SamplingRule' => [
        'RuleName' => '',
        'RuleARN' => '',
        'ResourceARN' => '',
        'Priority' => '',
        'FixedRate' => '',
        'ReservoirSize' => '',
        'ServiceName' => '',
        'ServiceType' => '',
        'Host' => '',
        'HTTPMethod' => '',
        'URLPath' => '',
        'Version' => '',
        'Attributes' => ''
    ],
    'Tags' => [
        [
                'Key' => '',
                'Value' => ''
        ]
    ]
  ]),
  CURLOPT_HTTPHEADER => [
    "content-type: application/json"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('POST', '{{baseUrl}}/CreateSamplingRule', [
  'body' => '{
  "SamplingRule": {
    "RuleName": "",
    "RuleARN": "",
    "ResourceARN": "",
    "Priority": "",
    "FixedRate": "",
    "ReservoirSize": "",
    "ServiceName": "",
    "ServiceType": "",
    "Host": "",
    "HTTPMethod": "",
    "URLPath": "",
    "Version": "",
    "Attributes": ""
  },
  "Tags": [
    {
      "Key": "",
      "Value": ""
    }
  ]
}',
  'headers' => [
    'content-type' => 'application/json',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/CreateSamplingRule');
$request->setMethod(HTTP_METH_POST);

$request->setHeaders([
  'content-type' => 'application/json'
]);

$request->setContentType('application/json');
$request->setBody(json_encode([
  'SamplingRule' => [
    'RuleName' => '',
    'RuleARN' => '',
    'ResourceARN' => '',
    'Priority' => '',
    'FixedRate' => '',
    'ReservoirSize' => '',
    'ServiceName' => '',
    'ServiceType' => '',
    'Host' => '',
    'HTTPMethod' => '',
    'URLPath' => '',
    'Version' => '',
    'Attributes' => ''
  ],
  'Tags' => [
    [
        'Key' => '',
        'Value' => ''
    ]
  ]
]));

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
append(json_encode([
  'SamplingRule' => [
    'RuleName' => '',
    'RuleARN' => '',
    'ResourceARN' => '',
    'Priority' => '',
    'FixedRate' => '',
    'ReservoirSize' => '',
    'ServiceName' => '',
    'ServiceType' => '',
    'Host' => '',
    'HTTPMethod' => '',
    'URLPath' => '',
    'Version' => '',
    'Attributes' => ''
  ],
  'Tags' => [
    [
        'Key' => '',
        'Value' => ''
    ]
  ]
]));
$request->setRequestUrl('{{baseUrl}}/CreateSamplingRule');
$request->setRequestMethod('POST');
$request->setBody($body);

$request->setHeaders([
  'content-type' => 'application/json'
]);

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/CreateSamplingRule' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "SamplingRule": {
    "RuleName": "",
    "RuleARN": "",
    "ResourceARN": "",
    "Priority": "",
    "FixedRate": "",
    "ReservoirSize": "",
    "ServiceName": "",
    "ServiceType": "",
    "Host": "",
    "HTTPMethod": "",
    "URLPath": "",
    "Version": "",
    "Attributes": ""
  },
  "Tags": [
    {
      "Key": "",
      "Value": ""
    }
  ]
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/CreateSamplingRule' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "SamplingRule": {
    "RuleName": "",
    "RuleARN": "",
    "ResourceARN": "",
    "Priority": "",
    "FixedRate": "",
    "ReservoirSize": "",
    "ServiceName": "",
    "ServiceType": "",
    "Host": "",
    "HTTPMethod": "",
    "URLPath": "",
    "Version": "",
    "Attributes": ""
  },
  "Tags": [
    {
      "Key": "",
      "Value": ""
    }
  ]
}'
import http.client

conn = http.client.HTTPSConnection("example.com")

payload = "{\n  \"SamplingRule\": {\n    \"RuleName\": \"\",\n    \"RuleARN\": \"\",\n    \"ResourceARN\": \"\",\n    \"Priority\": \"\",\n    \"FixedRate\": \"\",\n    \"ReservoirSize\": \"\",\n    \"ServiceName\": \"\",\n    \"ServiceType\": \"\",\n    \"Host\": \"\",\n    \"HTTPMethod\": \"\",\n    \"URLPath\": \"\",\n    \"Version\": \"\",\n    \"Attributes\": \"\"\n  },\n  \"Tags\": [\n    {\n      \"Key\": \"\",\n      \"Value\": \"\"\n    }\n  ]\n}"

headers = { 'content-type': "application/json" }

conn.request("POST", "/baseUrl/CreateSamplingRule", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/CreateSamplingRule"

payload = {
    "SamplingRule": {
        "RuleName": "",
        "RuleARN": "",
        "ResourceARN": "",
        "Priority": "",
        "FixedRate": "",
        "ReservoirSize": "",
        "ServiceName": "",
        "ServiceType": "",
        "Host": "",
        "HTTPMethod": "",
        "URLPath": "",
        "Version": "",
        "Attributes": ""
    },
    "Tags": [
        {
            "Key": "",
            "Value": ""
        }
    ]
}
headers = {"content-type": "application/json"}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
library(httr)

url <- "{{baseUrl}}/CreateSamplingRule"

payload <- "{\n  \"SamplingRule\": {\n    \"RuleName\": \"\",\n    \"RuleARN\": \"\",\n    \"ResourceARN\": \"\",\n    \"Priority\": \"\",\n    \"FixedRate\": \"\",\n    \"ReservoirSize\": \"\",\n    \"ServiceName\": \"\",\n    \"ServiceType\": \"\",\n    \"Host\": \"\",\n    \"HTTPMethod\": \"\",\n    \"URLPath\": \"\",\n    \"Version\": \"\",\n    \"Attributes\": \"\"\n  },\n  \"Tags\": [\n    {\n      \"Key\": \"\",\n      \"Value\": \"\"\n    }\n  ]\n}"

encode <- "json"

response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/CreateSamplingRule")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n  \"SamplingRule\": {\n    \"RuleName\": \"\",\n    \"RuleARN\": \"\",\n    \"ResourceARN\": \"\",\n    \"Priority\": \"\",\n    \"FixedRate\": \"\",\n    \"ReservoirSize\": \"\",\n    \"ServiceName\": \"\",\n    \"ServiceType\": \"\",\n    \"Host\": \"\",\n    \"HTTPMethod\": \"\",\n    \"URLPath\": \"\",\n    \"Version\": \"\",\n    \"Attributes\": \"\"\n  },\n  \"Tags\": [\n    {\n      \"Key\": \"\",\n      \"Value\": \"\"\n    }\n  ]\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/CreateSamplingRule') do |req|
  req.body = "{\n  \"SamplingRule\": {\n    \"RuleName\": \"\",\n    \"RuleARN\": \"\",\n    \"ResourceARN\": \"\",\n    \"Priority\": \"\",\n    \"FixedRate\": \"\",\n    \"ReservoirSize\": \"\",\n    \"ServiceName\": \"\",\n    \"ServiceType\": \"\",\n    \"Host\": \"\",\n    \"HTTPMethod\": \"\",\n    \"URLPath\": \"\",\n    \"Version\": \"\",\n    \"Attributes\": \"\"\n  },\n  \"Tags\": [\n    {\n      \"Key\": \"\",\n      \"Value\": \"\"\n    }\n  ]\n}"
end

puts response.status
puts response.body
use serde_json::json;
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/CreateSamplingRule";

    let payload = json!({
        "SamplingRule": json!({
            "RuleName": "",
            "RuleARN": "",
            "ResourceARN": "",
            "Priority": "",
            "FixedRate": "",
            "ReservoirSize": "",
            "ServiceName": "",
            "ServiceType": "",
            "Host": "",
            "HTTPMethod": "",
            "URLPath": "",
            "Version": "",
            "Attributes": ""
        }),
        "Tags": (
            json!({
                "Key": "",
                "Value": ""
            })
        )
    });

    let mut headers = reqwest::header::HeaderMap::new();
    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}}/CreateSamplingRule \
  --header 'content-type: application/json' \
  --data '{
  "SamplingRule": {
    "RuleName": "",
    "RuleARN": "",
    "ResourceARN": "",
    "Priority": "",
    "FixedRate": "",
    "ReservoirSize": "",
    "ServiceName": "",
    "ServiceType": "",
    "Host": "",
    "HTTPMethod": "",
    "URLPath": "",
    "Version": "",
    "Attributes": ""
  },
  "Tags": [
    {
      "Key": "",
      "Value": ""
    }
  ]
}'
echo '{
  "SamplingRule": {
    "RuleName": "",
    "RuleARN": "",
    "ResourceARN": "",
    "Priority": "",
    "FixedRate": "",
    "ReservoirSize": "",
    "ServiceName": "",
    "ServiceType": "",
    "Host": "",
    "HTTPMethod": "",
    "URLPath": "",
    "Version": "",
    "Attributes": ""
  },
  "Tags": [
    {
      "Key": "",
      "Value": ""
    }
  ]
}' |  \
  http POST {{baseUrl}}/CreateSamplingRule \
  content-type:application/json
wget --quiet \
  --method POST \
  --header 'content-type: application/json' \
  --body-data '{\n  "SamplingRule": {\n    "RuleName": "",\n    "RuleARN": "",\n    "ResourceARN": "",\n    "Priority": "",\n    "FixedRate": "",\n    "ReservoirSize": "",\n    "ServiceName": "",\n    "ServiceType": "",\n    "Host": "",\n    "HTTPMethod": "",\n    "URLPath": "",\n    "Version": "",\n    "Attributes": ""\n  },\n  "Tags": [\n    {\n      "Key": "",\n      "Value": ""\n    }\n  ]\n}' \
  --output-document \
  - {{baseUrl}}/CreateSamplingRule
import Foundation

let headers = ["content-type": "application/json"]
let parameters = [
  "SamplingRule": [
    "RuleName": "",
    "RuleARN": "",
    "ResourceARN": "",
    "Priority": "",
    "FixedRate": "",
    "ReservoirSize": "",
    "ServiceName": "",
    "ServiceType": "",
    "Host": "",
    "HTTPMethod": "",
    "URLPath": "",
    "Version": "",
    "Attributes": ""
  ],
  "Tags": [
    [
      "Key": "",
      "Value": ""
    ]
  ]
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/CreateSamplingRule")! 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 DeleteGroup
{{baseUrl}}/DeleteGroup
BODY json

{
  "GroupName": "",
  "GroupARN": ""
}
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/DeleteGroup");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n  \"GroupName\": \"\",\n  \"GroupARN\": \"\"\n}");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/post "{{baseUrl}}/DeleteGroup" {:content-type :json
                                                        :form-params {:GroupName ""
                                                                      :GroupARN ""}})
require "http/client"

url = "{{baseUrl}}/DeleteGroup"
headers = HTTP::Headers{
  "content-type" => "application/json"
}
reqBody = "{\n  \"GroupName\": \"\",\n  \"GroupARN\": \"\"\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}}/DeleteGroup"),
    Content = new StringContent("{\n  \"GroupName\": \"\",\n  \"GroupARN\": \"\"\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}}/DeleteGroup");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n  \"GroupName\": \"\",\n  \"GroupARN\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/DeleteGroup"

	payload := strings.NewReader("{\n  \"GroupName\": \"\",\n  \"GroupARN\": \"\"\n}")

	req, _ := http.NewRequest("POST", url, payload)

	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/DeleteGroup HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 39

{
  "GroupName": "",
  "GroupARN": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/DeleteGroup")
  .setHeader("content-type", "application/json")
  .setBody("{\n  \"GroupName\": \"\",\n  \"GroupARN\": \"\"\n}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/DeleteGroup"))
    .header("content-type", "application/json")
    .method("POST", HttpRequest.BodyPublishers.ofString("{\n  \"GroupName\": \"\",\n  \"GroupARN\": \"\"\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  \"GroupName\": \"\",\n  \"GroupARN\": \"\"\n}");
Request request = new Request.Builder()
  .url("{{baseUrl}}/DeleteGroup")
  .post(body)
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/DeleteGroup")
  .header("content-type", "application/json")
  .body("{\n  \"GroupName\": \"\",\n  \"GroupARN\": \"\"\n}")
  .asString();
const data = JSON.stringify({
  GroupName: '',
  GroupARN: ''
});

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener('readystatechange', function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open('POST', '{{baseUrl}}/DeleteGroup');
xhr.setRequestHeader('content-type', 'application/json');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'POST',
  url: '{{baseUrl}}/DeleteGroup',
  headers: {'content-type': 'application/json'},
  data: {GroupName: '', GroupARN: ''}
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/DeleteGroup';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"GroupName":"","GroupARN":""}'
};

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}}/DeleteGroup',
  method: 'POST',
  headers: {
    'content-type': 'application/json'
  },
  processData: false,
  data: '{\n  "GroupName": "",\n  "GroupARN": ""\n}'
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n  \"GroupName\": \"\",\n  \"GroupARN\": \"\"\n}")
val request = Request.Builder()
  .url("{{baseUrl}}/DeleteGroup")
  .post(body)
  .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/DeleteGroup',
  headers: {
    '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({GroupName: '', GroupARN: ''}));
req.end();
const request = require('request');

const options = {
  method: 'POST',
  url: '{{baseUrl}}/DeleteGroup',
  headers: {'content-type': 'application/json'},
  body: {GroupName: '', GroupARN: ''},
  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}}/DeleteGroup');

req.headers({
  'content-type': 'application/json'
});

req.type('json');
req.send({
  GroupName: '',
  GroupARN: ''
});

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}}/DeleteGroup',
  headers: {'content-type': 'application/json'},
  data: {GroupName: '', GroupARN: ''}
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/DeleteGroup';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"GroupName":"","GroupARN":""}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
#import 

NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"GroupName": @"",
                              @"GroupARN": @"" };

NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/DeleteGroup"]
                                                       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}}/DeleteGroup" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n  \"GroupName\": \"\",\n  \"GroupARN\": \"\"\n}" in

Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/DeleteGroup",
  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([
    'GroupName' => '',
    'GroupARN' => ''
  ]),
  CURLOPT_HTTPHEADER => [
    "content-type: application/json"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('POST', '{{baseUrl}}/DeleteGroup', [
  'body' => '{
  "GroupName": "",
  "GroupARN": ""
}',
  'headers' => [
    'content-type' => 'application/json',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/DeleteGroup');
$request->setMethod(HTTP_METH_POST);

$request->setHeaders([
  'content-type' => 'application/json'
]);

$request->setContentType('application/json');
$request->setBody(json_encode([
  'GroupName' => '',
  'GroupARN' => ''
]));

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
append(json_encode([
  'GroupName' => '',
  'GroupARN' => ''
]));
$request->setRequestUrl('{{baseUrl}}/DeleteGroup');
$request->setRequestMethod('POST');
$request->setBody($body);

$request->setHeaders([
  'content-type' => 'application/json'
]);

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/DeleteGroup' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "GroupName": "",
  "GroupARN": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/DeleteGroup' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "GroupName": "",
  "GroupARN": ""
}'
import http.client

conn = http.client.HTTPSConnection("example.com")

payload = "{\n  \"GroupName\": \"\",\n  \"GroupARN\": \"\"\n}"

headers = { 'content-type': "application/json" }

conn.request("POST", "/baseUrl/DeleteGroup", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/DeleteGroup"

payload = {
    "GroupName": "",
    "GroupARN": ""
}
headers = {"content-type": "application/json"}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
library(httr)

url <- "{{baseUrl}}/DeleteGroup"

payload <- "{\n  \"GroupName\": \"\",\n  \"GroupARN\": \"\"\n}"

encode <- "json"

response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/DeleteGroup")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n  \"GroupName\": \"\",\n  \"GroupARN\": \"\"\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/DeleteGroup') do |req|
  req.body = "{\n  \"GroupName\": \"\",\n  \"GroupARN\": \"\"\n}"
end

puts response.status
puts response.body
use serde_json::json;
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/DeleteGroup";

    let payload = json!({
        "GroupName": "",
        "GroupARN": ""
    });

    let mut headers = reqwest::header::HeaderMap::new();
    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}}/DeleteGroup \
  --header 'content-type: application/json' \
  --data '{
  "GroupName": "",
  "GroupARN": ""
}'
echo '{
  "GroupName": "",
  "GroupARN": ""
}' |  \
  http POST {{baseUrl}}/DeleteGroup \
  content-type:application/json
wget --quiet \
  --method POST \
  --header 'content-type: application/json' \
  --body-data '{\n  "GroupName": "",\n  "GroupARN": ""\n}' \
  --output-document \
  - {{baseUrl}}/DeleteGroup
import Foundation

let headers = ["content-type": "application/json"]
let parameters = [
  "GroupName": "",
  "GroupARN": ""
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/DeleteGroup")! 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 DeleteResourcePolicy
{{baseUrl}}/DeleteResourcePolicy
BODY json

{
  "PolicyName": "",
  "PolicyRevisionId": ""
}
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/DeleteResourcePolicy");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n  \"PolicyName\": \"\",\n  \"PolicyRevisionId\": \"\"\n}");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/post "{{baseUrl}}/DeleteResourcePolicy" {:content-type :json
                                                                 :form-params {:PolicyName ""
                                                                               :PolicyRevisionId ""}})
require "http/client"

url = "{{baseUrl}}/DeleteResourcePolicy"
headers = HTTP::Headers{
  "content-type" => "application/json"
}
reqBody = "{\n  \"PolicyName\": \"\",\n  \"PolicyRevisionId\": \"\"\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}}/DeleteResourcePolicy"),
    Content = new StringContent("{\n  \"PolicyName\": \"\",\n  \"PolicyRevisionId\": \"\"\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}}/DeleteResourcePolicy");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n  \"PolicyName\": \"\",\n  \"PolicyRevisionId\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/DeleteResourcePolicy"

	payload := strings.NewReader("{\n  \"PolicyName\": \"\",\n  \"PolicyRevisionId\": \"\"\n}")

	req, _ := http.NewRequest("POST", url, payload)

	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/DeleteResourcePolicy HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 48

{
  "PolicyName": "",
  "PolicyRevisionId": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/DeleteResourcePolicy")
  .setHeader("content-type", "application/json")
  .setBody("{\n  \"PolicyName\": \"\",\n  \"PolicyRevisionId\": \"\"\n}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/DeleteResourcePolicy"))
    .header("content-type", "application/json")
    .method("POST", HttpRequest.BodyPublishers.ofString("{\n  \"PolicyName\": \"\",\n  \"PolicyRevisionId\": \"\"\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  \"PolicyName\": \"\",\n  \"PolicyRevisionId\": \"\"\n}");
Request request = new Request.Builder()
  .url("{{baseUrl}}/DeleteResourcePolicy")
  .post(body)
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/DeleteResourcePolicy")
  .header("content-type", "application/json")
  .body("{\n  \"PolicyName\": \"\",\n  \"PolicyRevisionId\": \"\"\n}")
  .asString();
const data = JSON.stringify({
  PolicyName: '',
  PolicyRevisionId: ''
});

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener('readystatechange', function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open('POST', '{{baseUrl}}/DeleteResourcePolicy');
xhr.setRequestHeader('content-type', 'application/json');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'POST',
  url: '{{baseUrl}}/DeleteResourcePolicy',
  headers: {'content-type': 'application/json'},
  data: {PolicyName: '', PolicyRevisionId: ''}
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/DeleteResourcePolicy';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"PolicyName":"","PolicyRevisionId":""}'
};

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}}/DeleteResourcePolicy',
  method: 'POST',
  headers: {
    'content-type': 'application/json'
  },
  processData: false,
  data: '{\n  "PolicyName": "",\n  "PolicyRevisionId": ""\n}'
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n  \"PolicyName\": \"\",\n  \"PolicyRevisionId\": \"\"\n}")
val request = Request.Builder()
  .url("{{baseUrl}}/DeleteResourcePolicy")
  .post(body)
  .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/DeleteResourcePolicy',
  headers: {
    '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({PolicyName: '', PolicyRevisionId: ''}));
req.end();
const request = require('request');

const options = {
  method: 'POST',
  url: '{{baseUrl}}/DeleteResourcePolicy',
  headers: {'content-type': 'application/json'},
  body: {PolicyName: '', PolicyRevisionId: ''},
  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}}/DeleteResourcePolicy');

req.headers({
  'content-type': 'application/json'
});

req.type('json');
req.send({
  PolicyName: '',
  PolicyRevisionId: ''
});

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}}/DeleteResourcePolicy',
  headers: {'content-type': 'application/json'},
  data: {PolicyName: '', PolicyRevisionId: ''}
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/DeleteResourcePolicy';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"PolicyName":"","PolicyRevisionId":""}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
#import 

NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"PolicyName": @"",
                              @"PolicyRevisionId": @"" };

NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/DeleteResourcePolicy"]
                                                       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}}/DeleteResourcePolicy" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n  \"PolicyName\": \"\",\n  \"PolicyRevisionId\": \"\"\n}" in

Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/DeleteResourcePolicy",
  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([
    'PolicyName' => '',
    'PolicyRevisionId' => ''
  ]),
  CURLOPT_HTTPHEADER => [
    "content-type: application/json"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('POST', '{{baseUrl}}/DeleteResourcePolicy', [
  'body' => '{
  "PolicyName": "",
  "PolicyRevisionId": ""
}',
  'headers' => [
    'content-type' => 'application/json',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/DeleteResourcePolicy');
$request->setMethod(HTTP_METH_POST);

$request->setHeaders([
  'content-type' => 'application/json'
]);

$request->setContentType('application/json');
$request->setBody(json_encode([
  'PolicyName' => '',
  'PolicyRevisionId' => ''
]));

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
append(json_encode([
  'PolicyName' => '',
  'PolicyRevisionId' => ''
]));
$request->setRequestUrl('{{baseUrl}}/DeleteResourcePolicy');
$request->setRequestMethod('POST');
$request->setBody($body);

$request->setHeaders([
  'content-type' => 'application/json'
]);

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/DeleteResourcePolicy' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "PolicyName": "",
  "PolicyRevisionId": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/DeleteResourcePolicy' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "PolicyName": "",
  "PolicyRevisionId": ""
}'
import http.client

conn = http.client.HTTPSConnection("example.com")

payload = "{\n  \"PolicyName\": \"\",\n  \"PolicyRevisionId\": \"\"\n}"

headers = { 'content-type': "application/json" }

conn.request("POST", "/baseUrl/DeleteResourcePolicy", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/DeleteResourcePolicy"

payload = {
    "PolicyName": "",
    "PolicyRevisionId": ""
}
headers = {"content-type": "application/json"}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
library(httr)

url <- "{{baseUrl}}/DeleteResourcePolicy"

payload <- "{\n  \"PolicyName\": \"\",\n  \"PolicyRevisionId\": \"\"\n}"

encode <- "json"

response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/DeleteResourcePolicy")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n  \"PolicyName\": \"\",\n  \"PolicyRevisionId\": \"\"\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/DeleteResourcePolicy') do |req|
  req.body = "{\n  \"PolicyName\": \"\",\n  \"PolicyRevisionId\": \"\"\n}"
end

puts response.status
puts response.body
use serde_json::json;
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/DeleteResourcePolicy";

    let payload = json!({
        "PolicyName": "",
        "PolicyRevisionId": ""
    });

    let mut headers = reqwest::header::HeaderMap::new();
    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}}/DeleteResourcePolicy \
  --header 'content-type: application/json' \
  --data '{
  "PolicyName": "",
  "PolicyRevisionId": ""
}'
echo '{
  "PolicyName": "",
  "PolicyRevisionId": ""
}' |  \
  http POST {{baseUrl}}/DeleteResourcePolicy \
  content-type:application/json
wget --quiet \
  --method POST \
  --header 'content-type: application/json' \
  --body-data '{\n  "PolicyName": "",\n  "PolicyRevisionId": ""\n}' \
  --output-document \
  - {{baseUrl}}/DeleteResourcePolicy
import Foundation

let headers = ["content-type": "application/json"]
let parameters = [
  "PolicyName": "",
  "PolicyRevisionId": ""
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/DeleteResourcePolicy")! 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 DeleteSamplingRule
{{baseUrl}}/DeleteSamplingRule
BODY json

{
  "RuleName": "",
  "RuleARN": ""
}
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/DeleteSamplingRule");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n  \"RuleName\": \"\",\n  \"RuleARN\": \"\"\n}");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/post "{{baseUrl}}/DeleteSamplingRule" {:content-type :json
                                                               :form-params {:RuleName ""
                                                                             :RuleARN ""}})
require "http/client"

url = "{{baseUrl}}/DeleteSamplingRule"
headers = HTTP::Headers{
  "content-type" => "application/json"
}
reqBody = "{\n  \"RuleName\": \"\",\n  \"RuleARN\": \"\"\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}}/DeleteSamplingRule"),
    Content = new StringContent("{\n  \"RuleName\": \"\",\n  \"RuleARN\": \"\"\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}}/DeleteSamplingRule");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n  \"RuleName\": \"\",\n  \"RuleARN\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/DeleteSamplingRule"

	payload := strings.NewReader("{\n  \"RuleName\": \"\",\n  \"RuleARN\": \"\"\n}")

	req, _ := http.NewRequest("POST", url, payload)

	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/DeleteSamplingRule HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 37

{
  "RuleName": "",
  "RuleARN": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/DeleteSamplingRule")
  .setHeader("content-type", "application/json")
  .setBody("{\n  \"RuleName\": \"\",\n  \"RuleARN\": \"\"\n}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/DeleteSamplingRule"))
    .header("content-type", "application/json")
    .method("POST", HttpRequest.BodyPublishers.ofString("{\n  \"RuleName\": \"\",\n  \"RuleARN\": \"\"\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  \"RuleName\": \"\",\n  \"RuleARN\": \"\"\n}");
Request request = new Request.Builder()
  .url("{{baseUrl}}/DeleteSamplingRule")
  .post(body)
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/DeleteSamplingRule")
  .header("content-type", "application/json")
  .body("{\n  \"RuleName\": \"\",\n  \"RuleARN\": \"\"\n}")
  .asString();
const data = JSON.stringify({
  RuleName: '',
  RuleARN: ''
});

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener('readystatechange', function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open('POST', '{{baseUrl}}/DeleteSamplingRule');
xhr.setRequestHeader('content-type', 'application/json');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'POST',
  url: '{{baseUrl}}/DeleteSamplingRule',
  headers: {'content-type': 'application/json'},
  data: {RuleName: '', RuleARN: ''}
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/DeleteSamplingRule';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"RuleName":"","RuleARN":""}'
};

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}}/DeleteSamplingRule',
  method: 'POST',
  headers: {
    'content-type': 'application/json'
  },
  processData: false,
  data: '{\n  "RuleName": "",\n  "RuleARN": ""\n}'
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n  \"RuleName\": \"\",\n  \"RuleARN\": \"\"\n}")
val request = Request.Builder()
  .url("{{baseUrl}}/DeleteSamplingRule")
  .post(body)
  .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/DeleteSamplingRule',
  headers: {
    '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({RuleName: '', RuleARN: ''}));
req.end();
const request = require('request');

const options = {
  method: 'POST',
  url: '{{baseUrl}}/DeleteSamplingRule',
  headers: {'content-type': 'application/json'},
  body: {RuleName: '', RuleARN: ''},
  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}}/DeleteSamplingRule');

req.headers({
  'content-type': 'application/json'
});

req.type('json');
req.send({
  RuleName: '',
  RuleARN: ''
});

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}}/DeleteSamplingRule',
  headers: {'content-type': 'application/json'},
  data: {RuleName: '', RuleARN: ''}
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/DeleteSamplingRule';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"RuleName":"","RuleARN":""}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
#import 

NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"RuleName": @"",
                              @"RuleARN": @"" };

NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/DeleteSamplingRule"]
                                                       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}}/DeleteSamplingRule" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n  \"RuleName\": \"\",\n  \"RuleARN\": \"\"\n}" in

Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/DeleteSamplingRule",
  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([
    'RuleName' => '',
    'RuleARN' => ''
  ]),
  CURLOPT_HTTPHEADER => [
    "content-type: application/json"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('POST', '{{baseUrl}}/DeleteSamplingRule', [
  'body' => '{
  "RuleName": "",
  "RuleARN": ""
}',
  'headers' => [
    'content-type' => 'application/json',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/DeleteSamplingRule');
$request->setMethod(HTTP_METH_POST);

$request->setHeaders([
  'content-type' => 'application/json'
]);

$request->setContentType('application/json');
$request->setBody(json_encode([
  'RuleName' => '',
  'RuleARN' => ''
]));

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
append(json_encode([
  'RuleName' => '',
  'RuleARN' => ''
]));
$request->setRequestUrl('{{baseUrl}}/DeleteSamplingRule');
$request->setRequestMethod('POST');
$request->setBody($body);

$request->setHeaders([
  'content-type' => 'application/json'
]);

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/DeleteSamplingRule' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "RuleName": "",
  "RuleARN": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/DeleteSamplingRule' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "RuleName": "",
  "RuleARN": ""
}'
import http.client

conn = http.client.HTTPSConnection("example.com")

payload = "{\n  \"RuleName\": \"\",\n  \"RuleARN\": \"\"\n}"

headers = { 'content-type': "application/json" }

conn.request("POST", "/baseUrl/DeleteSamplingRule", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/DeleteSamplingRule"

payload = {
    "RuleName": "",
    "RuleARN": ""
}
headers = {"content-type": "application/json"}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
library(httr)

url <- "{{baseUrl}}/DeleteSamplingRule"

payload <- "{\n  \"RuleName\": \"\",\n  \"RuleARN\": \"\"\n}"

encode <- "json"

response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/DeleteSamplingRule")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n  \"RuleName\": \"\",\n  \"RuleARN\": \"\"\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/DeleteSamplingRule') do |req|
  req.body = "{\n  \"RuleName\": \"\",\n  \"RuleARN\": \"\"\n}"
end

puts response.status
puts response.body
use serde_json::json;
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/DeleteSamplingRule";

    let payload = json!({
        "RuleName": "",
        "RuleARN": ""
    });

    let mut headers = reqwest::header::HeaderMap::new();
    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}}/DeleteSamplingRule \
  --header 'content-type: application/json' \
  --data '{
  "RuleName": "",
  "RuleARN": ""
}'
echo '{
  "RuleName": "",
  "RuleARN": ""
}' |  \
  http POST {{baseUrl}}/DeleteSamplingRule \
  content-type:application/json
wget --quiet \
  --method POST \
  --header 'content-type: application/json' \
  --body-data '{\n  "RuleName": "",\n  "RuleARN": ""\n}' \
  --output-document \
  - {{baseUrl}}/DeleteSamplingRule
import Foundation

let headers = ["content-type": "application/json"]
let parameters = [
  "RuleName": "",
  "RuleARN": ""
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/DeleteSamplingRule")! 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 GetEncryptionConfig
{{baseUrl}}/EncryptionConfig
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/EncryptionConfig");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/post "{{baseUrl}}/EncryptionConfig")
require "http/client"

url = "{{baseUrl}}/EncryptionConfig"

response = HTTP::Client.post url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
    Method = HttpMethod.Post,
    RequestUri = new Uri("{{baseUrl}}/EncryptionConfig"),
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/EncryptionConfig");
var request = new RestRequest("", Method.Post);
var response = client.Execute(request);
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/EncryptionConfig"

	req, _ := http.NewRequest("POST", url, nil)

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
POST /baseUrl/EncryptionConfig HTTP/1.1
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/EncryptionConfig")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/EncryptionConfig"))
    .method("POST", HttpRequest.BodyPublishers.noBody())
    .build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("{{baseUrl}}/EncryptionConfig")
  .post(null)
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/EncryptionConfig")
  .asString();
const data = null;

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener('readystatechange', function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open('POST', '{{baseUrl}}/EncryptionConfig');

xhr.send(data);
import axios from 'axios';

const options = {method: 'POST', url: '{{baseUrl}}/EncryptionConfig'};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/EncryptionConfig';
const options = {method: 'POST'};

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}}/EncryptionConfig',
  method: 'POST',
  headers: {}
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val request = Request.Builder()
  .url("{{baseUrl}}/EncryptionConfig")
  .post(null)
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'POST',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/EncryptionConfig',
  headers: {}
};

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.end();
const request = require('request');

const options = {method: 'POST', url: '{{baseUrl}}/EncryptionConfig'};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('POST', '{{baseUrl}}/EncryptionConfig');

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}}/EncryptionConfig'};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/EncryptionConfig';
const options = {method: 'POST'};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
#import 

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/EncryptionConfig"]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];

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}}/EncryptionConfig" in

Client.call `POST uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/EncryptionConfig",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('POST', '{{baseUrl}}/EncryptionConfig');

echo $response->getBody();
setUrl('{{baseUrl}}/EncryptionConfig');
$request->setMethod(HTTP_METH_POST);

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/EncryptionConfig');
$request->setRequestMethod('POST');
$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/EncryptionConfig' -Method POST 
$response = Invoke-RestMethod -Uri '{{baseUrl}}/EncryptionConfig' -Method POST 
import http.client

conn = http.client.HTTPSConnection("example.com")

conn.request("POST", "/baseUrl/EncryptionConfig")

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/EncryptionConfig"

response = requests.post(url)

print(response.json())
library(httr)

url <- "{{baseUrl}}/EncryptionConfig"

response <- VERB("POST", url, content_type("application/octet-stream"))

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/EncryptionConfig")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)

response = http.request(request)
puts response.read_body
require 'faraday'

conn = Faraday.new(
  url: 'https://example.com',
)

response = conn.post('/baseUrl/EncryptionConfig') do |req|
end

puts response.status
puts response.body
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/EncryptionConfig";

    let client = reqwest::Client::new();
    let response = client.post(url)
        .send()
        .await;

    let results = response.unwrap()
        .json::()
        .await
        .unwrap();

    dbg!(results);
}
curl --request POST \
  --url {{baseUrl}}/EncryptionConfig
http POST {{baseUrl}}/EncryptionConfig
wget --quiet \
  --method POST \
  --output-document \
  - {{baseUrl}}/EncryptionConfig
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/EncryptionConfig")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"

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 GetGroup
{{baseUrl}}/GetGroup
BODY json

{
  "GroupName": "",
  "GroupARN": ""
}
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/GetGroup");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n  \"GroupName\": \"\",\n  \"GroupARN\": \"\"\n}");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/post "{{baseUrl}}/GetGroup" {:content-type :json
                                                     :form-params {:GroupName ""
                                                                   :GroupARN ""}})
require "http/client"

url = "{{baseUrl}}/GetGroup"
headers = HTTP::Headers{
  "content-type" => "application/json"
}
reqBody = "{\n  \"GroupName\": \"\",\n  \"GroupARN\": \"\"\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}}/GetGroup"),
    Content = new StringContent("{\n  \"GroupName\": \"\",\n  \"GroupARN\": \"\"\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}}/GetGroup");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n  \"GroupName\": \"\",\n  \"GroupARN\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/GetGroup"

	payload := strings.NewReader("{\n  \"GroupName\": \"\",\n  \"GroupARN\": \"\"\n}")

	req, _ := http.NewRequest("POST", url, payload)

	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/GetGroup HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 39

{
  "GroupName": "",
  "GroupARN": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/GetGroup")
  .setHeader("content-type", "application/json")
  .setBody("{\n  \"GroupName\": \"\",\n  \"GroupARN\": \"\"\n}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/GetGroup"))
    .header("content-type", "application/json")
    .method("POST", HttpRequest.BodyPublishers.ofString("{\n  \"GroupName\": \"\",\n  \"GroupARN\": \"\"\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  \"GroupName\": \"\",\n  \"GroupARN\": \"\"\n}");
Request request = new Request.Builder()
  .url("{{baseUrl}}/GetGroup")
  .post(body)
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/GetGroup")
  .header("content-type", "application/json")
  .body("{\n  \"GroupName\": \"\",\n  \"GroupARN\": \"\"\n}")
  .asString();
const data = JSON.stringify({
  GroupName: '',
  GroupARN: ''
});

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener('readystatechange', function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open('POST', '{{baseUrl}}/GetGroup');
xhr.setRequestHeader('content-type', 'application/json');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'POST',
  url: '{{baseUrl}}/GetGroup',
  headers: {'content-type': 'application/json'},
  data: {GroupName: '', GroupARN: ''}
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/GetGroup';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"GroupName":"","GroupARN":""}'
};

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}}/GetGroup',
  method: 'POST',
  headers: {
    'content-type': 'application/json'
  },
  processData: false,
  data: '{\n  "GroupName": "",\n  "GroupARN": ""\n}'
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n  \"GroupName\": \"\",\n  \"GroupARN\": \"\"\n}")
val request = Request.Builder()
  .url("{{baseUrl}}/GetGroup")
  .post(body)
  .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/GetGroup',
  headers: {
    '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({GroupName: '', GroupARN: ''}));
req.end();
const request = require('request');

const options = {
  method: 'POST',
  url: '{{baseUrl}}/GetGroup',
  headers: {'content-type': 'application/json'},
  body: {GroupName: '', GroupARN: ''},
  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}}/GetGroup');

req.headers({
  'content-type': 'application/json'
});

req.type('json');
req.send({
  GroupName: '',
  GroupARN: ''
});

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}}/GetGroup',
  headers: {'content-type': 'application/json'},
  data: {GroupName: '', GroupARN: ''}
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/GetGroup';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"GroupName":"","GroupARN":""}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
#import 

NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"GroupName": @"",
                              @"GroupARN": @"" };

NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/GetGroup"]
                                                       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}}/GetGroup" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n  \"GroupName\": \"\",\n  \"GroupARN\": \"\"\n}" in

Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/GetGroup",
  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([
    'GroupName' => '',
    'GroupARN' => ''
  ]),
  CURLOPT_HTTPHEADER => [
    "content-type: application/json"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('POST', '{{baseUrl}}/GetGroup', [
  'body' => '{
  "GroupName": "",
  "GroupARN": ""
}',
  'headers' => [
    'content-type' => 'application/json',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/GetGroup');
$request->setMethod(HTTP_METH_POST);

$request->setHeaders([
  'content-type' => 'application/json'
]);

$request->setContentType('application/json');
$request->setBody(json_encode([
  'GroupName' => '',
  'GroupARN' => ''
]));

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
append(json_encode([
  'GroupName' => '',
  'GroupARN' => ''
]));
$request->setRequestUrl('{{baseUrl}}/GetGroup');
$request->setRequestMethod('POST');
$request->setBody($body);

$request->setHeaders([
  'content-type' => 'application/json'
]);

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/GetGroup' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "GroupName": "",
  "GroupARN": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/GetGroup' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "GroupName": "",
  "GroupARN": ""
}'
import http.client

conn = http.client.HTTPSConnection("example.com")

payload = "{\n  \"GroupName\": \"\",\n  \"GroupARN\": \"\"\n}"

headers = { 'content-type': "application/json" }

conn.request("POST", "/baseUrl/GetGroup", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/GetGroup"

payload = {
    "GroupName": "",
    "GroupARN": ""
}
headers = {"content-type": "application/json"}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
library(httr)

url <- "{{baseUrl}}/GetGroup"

payload <- "{\n  \"GroupName\": \"\",\n  \"GroupARN\": \"\"\n}"

encode <- "json"

response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/GetGroup")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n  \"GroupName\": \"\",\n  \"GroupARN\": \"\"\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/GetGroup') do |req|
  req.body = "{\n  \"GroupName\": \"\",\n  \"GroupARN\": \"\"\n}"
end

puts response.status
puts response.body
use serde_json::json;
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/GetGroup";

    let payload = json!({
        "GroupName": "",
        "GroupARN": ""
    });

    let mut headers = reqwest::header::HeaderMap::new();
    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}}/GetGroup \
  --header 'content-type: application/json' \
  --data '{
  "GroupName": "",
  "GroupARN": ""
}'
echo '{
  "GroupName": "",
  "GroupARN": ""
}' |  \
  http POST {{baseUrl}}/GetGroup \
  content-type:application/json
wget --quiet \
  --method POST \
  --header 'content-type: application/json' \
  --body-data '{\n  "GroupName": "",\n  "GroupARN": ""\n}' \
  --output-document \
  - {{baseUrl}}/GetGroup
import Foundation

let headers = ["content-type": "application/json"]
let parameters = [
  "GroupName": "",
  "GroupARN": ""
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/GetGroup")! 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 GetGroups
{{baseUrl}}/Groups
BODY json

{
  "NextToken": ""
}
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/Groups");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n  \"NextToken\": \"\"\n}");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/post "{{baseUrl}}/Groups" {:content-type :json
                                                   :form-params {:NextToken ""}})
require "http/client"

url = "{{baseUrl}}/Groups"
headers = HTTP::Headers{
  "content-type" => "application/json"
}
reqBody = "{\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}}/Groups"),
    Content = new StringContent("{\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}}/Groups");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n  \"NextToken\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/Groups"

	payload := strings.NewReader("{\n  \"NextToken\": \"\"\n}")

	req, _ := http.NewRequest("POST", url, payload)

	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/Groups HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 21

{
  "NextToken": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/Groups")
  .setHeader("content-type", "application/json")
  .setBody("{\n  \"NextToken\": \"\"\n}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/Groups"))
    .header("content-type", "application/json")
    .method("POST", HttpRequest.BodyPublishers.ofString("{\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  \"NextToken\": \"\"\n}");
Request request = new Request.Builder()
  .url("{{baseUrl}}/Groups")
  .post(body)
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/Groups")
  .header("content-type", "application/json")
  .body("{\n  \"NextToken\": \"\"\n}")
  .asString();
const data = JSON.stringify({
  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}}/Groups');
xhr.setRequestHeader('content-type', 'application/json');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'POST',
  url: '{{baseUrl}}/Groups',
  headers: {'content-type': 'application/json'},
  data: {NextToken: ''}
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/Groups';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"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}}/Groups',
  method: 'POST',
  headers: {
    'content-type': 'application/json'
  },
  processData: false,
  data: '{\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  \"NextToken\": \"\"\n}")
val request = Request.Builder()
  .url("{{baseUrl}}/Groups")
  .post(body)
  .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/Groups',
  headers: {
    '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({NextToken: ''}));
req.end();
const request = require('request');

const options = {
  method: 'POST',
  url: '{{baseUrl}}/Groups',
  headers: {'content-type': 'application/json'},
  body: {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}}/Groups');

req.headers({
  'content-type': 'application/json'
});

req.type('json');
req.send({
  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}}/Groups',
  headers: {'content-type': 'application/json'},
  data: {NextToken: ''}
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/Groups';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"NextToken":""}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
#import 

NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"NextToken": @"" };

NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/Groups"]
                                                       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}}/Groups" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n  \"NextToken\": \"\"\n}" in

Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/Groups",
  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([
    'NextToken' => ''
  ]),
  CURLOPT_HTTPHEADER => [
    "content-type: application/json"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('POST', '{{baseUrl}}/Groups', [
  'body' => '{
  "NextToken": ""
}',
  'headers' => [
    'content-type' => 'application/json',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/Groups');
$request->setMethod(HTTP_METH_POST);

$request->setHeaders([
  'content-type' => 'application/json'
]);

$request->setContentType('application/json');
$request->setBody(json_encode([
  'NextToken' => ''
]));

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
append(json_encode([
  'NextToken' => ''
]));
$request->setRequestUrl('{{baseUrl}}/Groups');
$request->setRequestMethod('POST');
$request->setBody($body);

$request->setHeaders([
  'content-type' => 'application/json'
]);

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/Groups' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "NextToken": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/Groups' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "NextToken": ""
}'
import http.client

conn = http.client.HTTPSConnection("example.com")

payload = "{\n  \"NextToken\": \"\"\n}"

headers = { 'content-type': "application/json" }

conn.request("POST", "/baseUrl/Groups", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/Groups"

payload = { "NextToken": "" }
headers = {"content-type": "application/json"}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
library(httr)

url <- "{{baseUrl}}/Groups"

payload <- "{\n  \"NextToken\": \"\"\n}"

encode <- "json"

response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/Groups")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\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/Groups') do |req|
  req.body = "{\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}}/Groups";

    let payload = json!({"NextToken": ""});

    let mut headers = reqwest::header::HeaderMap::new();
    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}}/Groups \
  --header 'content-type: application/json' \
  --data '{
  "NextToken": ""
}'
echo '{
  "NextToken": ""
}' |  \
  http POST {{baseUrl}}/Groups \
  content-type:application/json
wget --quiet \
  --method POST \
  --header 'content-type: application/json' \
  --body-data '{\n  "NextToken": ""\n}' \
  --output-document \
  - {{baseUrl}}/Groups
import Foundation

let headers = ["content-type": "application/json"]
let parameters = ["NextToken": ""] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/Groups")! 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 GetInsight
{{baseUrl}}/Insight
BODY json

{
  "InsightId": ""
}
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/Insight");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n  \"InsightId\": \"\"\n}");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/post "{{baseUrl}}/Insight" {:content-type :json
                                                    :form-params {:InsightId ""}})
require "http/client"

url = "{{baseUrl}}/Insight"
headers = HTTP::Headers{
  "content-type" => "application/json"
}
reqBody = "{\n  \"InsightId\": \"\"\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}}/Insight"),
    Content = new StringContent("{\n  \"InsightId\": \"\"\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}}/Insight");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n  \"InsightId\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/Insight"

	payload := strings.NewReader("{\n  \"InsightId\": \"\"\n}")

	req, _ := http.NewRequest("POST", url, payload)

	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/Insight HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 21

{
  "InsightId": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/Insight")
  .setHeader("content-type", "application/json")
  .setBody("{\n  \"InsightId\": \"\"\n}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/Insight"))
    .header("content-type", "application/json")
    .method("POST", HttpRequest.BodyPublishers.ofString("{\n  \"InsightId\": \"\"\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  \"InsightId\": \"\"\n}");
Request request = new Request.Builder()
  .url("{{baseUrl}}/Insight")
  .post(body)
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/Insight")
  .header("content-type", "application/json")
  .body("{\n  \"InsightId\": \"\"\n}")
  .asString();
const data = JSON.stringify({
  InsightId: ''
});

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener('readystatechange', function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open('POST', '{{baseUrl}}/Insight');
xhr.setRequestHeader('content-type', 'application/json');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'POST',
  url: '{{baseUrl}}/Insight',
  headers: {'content-type': 'application/json'},
  data: {InsightId: ''}
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/Insight';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"InsightId":""}'
};

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}}/Insight',
  method: 'POST',
  headers: {
    'content-type': 'application/json'
  },
  processData: false,
  data: '{\n  "InsightId": ""\n}'
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n  \"InsightId\": \"\"\n}")
val request = Request.Builder()
  .url("{{baseUrl}}/Insight")
  .post(body)
  .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/Insight',
  headers: {
    '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({InsightId: ''}));
req.end();
const request = require('request');

const options = {
  method: 'POST',
  url: '{{baseUrl}}/Insight',
  headers: {'content-type': 'application/json'},
  body: {InsightId: ''},
  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}}/Insight');

req.headers({
  'content-type': 'application/json'
});

req.type('json');
req.send({
  InsightId: ''
});

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}}/Insight',
  headers: {'content-type': 'application/json'},
  data: {InsightId: ''}
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/Insight';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"InsightId":""}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
#import 

NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"InsightId": @"" };

NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/Insight"]
                                                       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}}/Insight" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n  \"InsightId\": \"\"\n}" in

Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/Insight",
  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([
    'InsightId' => ''
  ]),
  CURLOPT_HTTPHEADER => [
    "content-type: application/json"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('POST', '{{baseUrl}}/Insight', [
  'body' => '{
  "InsightId": ""
}',
  'headers' => [
    'content-type' => 'application/json',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/Insight');
$request->setMethod(HTTP_METH_POST);

$request->setHeaders([
  'content-type' => 'application/json'
]);

$request->setContentType('application/json');
$request->setBody(json_encode([
  'InsightId' => ''
]));

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
append(json_encode([
  'InsightId' => ''
]));
$request->setRequestUrl('{{baseUrl}}/Insight');
$request->setRequestMethod('POST');
$request->setBody($body);

$request->setHeaders([
  'content-type' => 'application/json'
]);

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/Insight' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "InsightId": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/Insight' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "InsightId": ""
}'
import http.client

conn = http.client.HTTPSConnection("example.com")

payload = "{\n  \"InsightId\": \"\"\n}"

headers = { 'content-type': "application/json" }

conn.request("POST", "/baseUrl/Insight", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/Insight"

payload = { "InsightId": "" }
headers = {"content-type": "application/json"}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
library(httr)

url <- "{{baseUrl}}/Insight"

payload <- "{\n  \"InsightId\": \"\"\n}"

encode <- "json"

response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/Insight")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n  \"InsightId\": \"\"\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/Insight') do |req|
  req.body = "{\n  \"InsightId\": \"\"\n}"
end

puts response.status
puts response.body
use serde_json::json;
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/Insight";

    let payload = json!({"InsightId": ""});

    let mut headers = reqwest::header::HeaderMap::new();
    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}}/Insight \
  --header 'content-type: application/json' \
  --data '{
  "InsightId": ""
}'
echo '{
  "InsightId": ""
}' |  \
  http POST {{baseUrl}}/Insight \
  content-type:application/json
wget --quiet \
  --method POST \
  --header 'content-type: application/json' \
  --body-data '{\n  "InsightId": ""\n}' \
  --output-document \
  - {{baseUrl}}/Insight
import Foundation

let headers = ["content-type": "application/json"]
let parameters = ["InsightId": ""] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/Insight")! 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 GetInsightEvents
{{baseUrl}}/InsightEvents
BODY json

{
  "InsightId": "",
  "MaxResults": 0,
  "NextToken": ""
}
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/InsightEvents");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n  \"InsightId\": \"\",\n  \"MaxResults\": 0,\n  \"NextToken\": \"\"\n}");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/post "{{baseUrl}}/InsightEvents" {:content-type :json
                                                          :form-params {:InsightId ""
                                                                        :MaxResults 0
                                                                        :NextToken ""}})
require "http/client"

url = "{{baseUrl}}/InsightEvents"
headers = HTTP::Headers{
  "content-type" => "application/json"
}
reqBody = "{\n  \"InsightId\": \"\",\n  \"MaxResults\": 0,\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}}/InsightEvents"),
    Content = new StringContent("{\n  \"InsightId\": \"\",\n  \"MaxResults\": 0,\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}}/InsightEvents");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n  \"InsightId\": \"\",\n  \"MaxResults\": 0,\n  \"NextToken\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/InsightEvents"

	payload := strings.NewReader("{\n  \"InsightId\": \"\",\n  \"MaxResults\": 0,\n  \"NextToken\": \"\"\n}")

	req, _ := http.NewRequest("POST", url, payload)

	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/InsightEvents HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 59

{
  "InsightId": "",
  "MaxResults": 0,
  "NextToken": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/InsightEvents")
  .setHeader("content-type", "application/json")
  .setBody("{\n  \"InsightId\": \"\",\n  \"MaxResults\": 0,\n  \"NextToken\": \"\"\n}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/InsightEvents"))
    .header("content-type", "application/json")
    .method("POST", HttpRequest.BodyPublishers.ofString("{\n  \"InsightId\": \"\",\n  \"MaxResults\": 0,\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  \"InsightId\": \"\",\n  \"MaxResults\": 0,\n  \"NextToken\": \"\"\n}");
Request request = new Request.Builder()
  .url("{{baseUrl}}/InsightEvents")
  .post(body)
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/InsightEvents")
  .header("content-type", "application/json")
  .body("{\n  \"InsightId\": \"\",\n  \"MaxResults\": 0,\n  \"NextToken\": \"\"\n}")
  .asString();
const data = JSON.stringify({
  InsightId: '',
  MaxResults: 0,
  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}}/InsightEvents');
xhr.setRequestHeader('content-type', 'application/json');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'POST',
  url: '{{baseUrl}}/InsightEvents',
  headers: {'content-type': 'application/json'},
  data: {InsightId: '', MaxResults: 0, NextToken: ''}
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/InsightEvents';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"InsightId":"","MaxResults":0,"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}}/InsightEvents',
  method: 'POST',
  headers: {
    'content-type': 'application/json'
  },
  processData: false,
  data: '{\n  "InsightId": "",\n  "MaxResults": 0,\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  \"InsightId\": \"\",\n  \"MaxResults\": 0,\n  \"NextToken\": \"\"\n}")
val request = Request.Builder()
  .url("{{baseUrl}}/InsightEvents")
  .post(body)
  .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/InsightEvents',
  headers: {
    '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({InsightId: '', MaxResults: 0, NextToken: ''}));
req.end();
const request = require('request');

const options = {
  method: 'POST',
  url: '{{baseUrl}}/InsightEvents',
  headers: {'content-type': 'application/json'},
  body: {InsightId: '', MaxResults: 0, 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}}/InsightEvents');

req.headers({
  'content-type': 'application/json'
});

req.type('json');
req.send({
  InsightId: '',
  MaxResults: 0,
  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}}/InsightEvents',
  headers: {'content-type': 'application/json'},
  data: {InsightId: '', MaxResults: 0, NextToken: ''}
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/InsightEvents';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"InsightId":"","MaxResults":0,"NextToken":""}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
#import 

NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"InsightId": @"",
                              @"MaxResults": @0,
                              @"NextToken": @"" };

NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/InsightEvents"]
                                                       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}}/InsightEvents" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n  \"InsightId\": \"\",\n  \"MaxResults\": 0,\n  \"NextToken\": \"\"\n}" in

Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/InsightEvents",
  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([
    'InsightId' => '',
    'MaxResults' => 0,
    'NextToken' => ''
  ]),
  CURLOPT_HTTPHEADER => [
    "content-type: application/json"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('POST', '{{baseUrl}}/InsightEvents', [
  'body' => '{
  "InsightId": "",
  "MaxResults": 0,
  "NextToken": ""
}',
  'headers' => [
    'content-type' => 'application/json',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/InsightEvents');
$request->setMethod(HTTP_METH_POST);

$request->setHeaders([
  'content-type' => 'application/json'
]);

$request->setContentType('application/json');
$request->setBody(json_encode([
  'InsightId' => '',
  'MaxResults' => 0,
  'NextToken' => ''
]));

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
append(json_encode([
  'InsightId' => '',
  'MaxResults' => 0,
  'NextToken' => ''
]));
$request->setRequestUrl('{{baseUrl}}/InsightEvents');
$request->setRequestMethod('POST');
$request->setBody($body);

$request->setHeaders([
  'content-type' => 'application/json'
]);

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/InsightEvents' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "InsightId": "",
  "MaxResults": 0,
  "NextToken": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/InsightEvents' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "InsightId": "",
  "MaxResults": 0,
  "NextToken": ""
}'
import http.client

conn = http.client.HTTPSConnection("example.com")

payload = "{\n  \"InsightId\": \"\",\n  \"MaxResults\": 0,\n  \"NextToken\": \"\"\n}"

headers = { 'content-type': "application/json" }

conn.request("POST", "/baseUrl/InsightEvents", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/InsightEvents"

payload = {
    "InsightId": "",
    "MaxResults": 0,
    "NextToken": ""
}
headers = {"content-type": "application/json"}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
library(httr)

url <- "{{baseUrl}}/InsightEvents"

payload <- "{\n  \"InsightId\": \"\",\n  \"MaxResults\": 0,\n  \"NextToken\": \"\"\n}"

encode <- "json"

response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/InsightEvents")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n  \"InsightId\": \"\",\n  \"MaxResults\": 0,\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/InsightEvents') do |req|
  req.body = "{\n  \"InsightId\": \"\",\n  \"MaxResults\": 0,\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}}/InsightEvents";

    let payload = json!({
        "InsightId": "",
        "MaxResults": 0,
        "NextToken": ""
    });

    let mut headers = reqwest::header::HeaderMap::new();
    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}}/InsightEvents \
  --header 'content-type: application/json' \
  --data '{
  "InsightId": "",
  "MaxResults": 0,
  "NextToken": ""
}'
echo '{
  "InsightId": "",
  "MaxResults": 0,
  "NextToken": ""
}' |  \
  http POST {{baseUrl}}/InsightEvents \
  content-type:application/json
wget --quiet \
  --method POST \
  --header 'content-type: application/json' \
  --body-data '{\n  "InsightId": "",\n  "MaxResults": 0,\n  "NextToken": ""\n}' \
  --output-document \
  - {{baseUrl}}/InsightEvents
import Foundation

let headers = ["content-type": "application/json"]
let parameters = [
  "InsightId": "",
  "MaxResults": 0,
  "NextToken": ""
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/InsightEvents")! 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 GetInsightImpactGraph
{{baseUrl}}/InsightImpactGraph
BODY json

{
  "InsightId": "",
  "StartTime": "",
  "EndTime": "",
  "NextToken": ""
}
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/InsightImpactGraph");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n  \"InsightId\": \"\",\n  \"StartTime\": \"\",\n  \"EndTime\": \"\",\n  \"NextToken\": \"\"\n}");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/post "{{baseUrl}}/InsightImpactGraph" {:content-type :json
                                                               :form-params {:InsightId ""
                                                                             :StartTime ""
                                                                             :EndTime ""
                                                                             :NextToken ""}})
require "http/client"

url = "{{baseUrl}}/InsightImpactGraph"
headers = HTTP::Headers{
  "content-type" => "application/json"
}
reqBody = "{\n  \"InsightId\": \"\",\n  \"StartTime\": \"\",\n  \"EndTime\": \"\",\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}}/InsightImpactGraph"),
    Content = new StringContent("{\n  \"InsightId\": \"\",\n  \"StartTime\": \"\",\n  \"EndTime\": \"\",\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}}/InsightImpactGraph");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n  \"InsightId\": \"\",\n  \"StartTime\": \"\",\n  \"EndTime\": \"\",\n  \"NextToken\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/InsightImpactGraph"

	payload := strings.NewReader("{\n  \"InsightId\": \"\",\n  \"StartTime\": \"\",\n  \"EndTime\": \"\",\n  \"NextToken\": \"\"\n}")

	req, _ := http.NewRequest("POST", url, payload)

	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/InsightImpactGraph HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 76

{
  "InsightId": "",
  "StartTime": "",
  "EndTime": "",
  "NextToken": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/InsightImpactGraph")
  .setHeader("content-type", "application/json")
  .setBody("{\n  \"InsightId\": \"\",\n  \"StartTime\": \"\",\n  \"EndTime\": \"\",\n  \"NextToken\": \"\"\n}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/InsightImpactGraph"))
    .header("content-type", "application/json")
    .method("POST", HttpRequest.BodyPublishers.ofString("{\n  \"InsightId\": \"\",\n  \"StartTime\": \"\",\n  \"EndTime\": \"\",\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  \"InsightId\": \"\",\n  \"StartTime\": \"\",\n  \"EndTime\": \"\",\n  \"NextToken\": \"\"\n}");
Request request = new Request.Builder()
  .url("{{baseUrl}}/InsightImpactGraph")
  .post(body)
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/InsightImpactGraph")
  .header("content-type", "application/json")
  .body("{\n  \"InsightId\": \"\",\n  \"StartTime\": \"\",\n  \"EndTime\": \"\",\n  \"NextToken\": \"\"\n}")
  .asString();
const data = JSON.stringify({
  InsightId: '',
  StartTime: '',
  EndTime: '',
  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}}/InsightImpactGraph');
xhr.setRequestHeader('content-type', 'application/json');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'POST',
  url: '{{baseUrl}}/InsightImpactGraph',
  headers: {'content-type': 'application/json'},
  data: {InsightId: '', StartTime: '', EndTime: '', NextToken: ''}
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/InsightImpactGraph';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"InsightId":"","StartTime":"","EndTime":"","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}}/InsightImpactGraph',
  method: 'POST',
  headers: {
    'content-type': 'application/json'
  },
  processData: false,
  data: '{\n  "InsightId": "",\n  "StartTime": "",\n  "EndTime": "",\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  \"InsightId\": \"\",\n  \"StartTime\": \"\",\n  \"EndTime\": \"\",\n  \"NextToken\": \"\"\n}")
val request = Request.Builder()
  .url("{{baseUrl}}/InsightImpactGraph")
  .post(body)
  .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/InsightImpactGraph',
  headers: {
    '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({InsightId: '', StartTime: '', EndTime: '', NextToken: ''}));
req.end();
const request = require('request');

const options = {
  method: 'POST',
  url: '{{baseUrl}}/InsightImpactGraph',
  headers: {'content-type': 'application/json'},
  body: {InsightId: '', StartTime: '', EndTime: '', 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}}/InsightImpactGraph');

req.headers({
  'content-type': 'application/json'
});

req.type('json');
req.send({
  InsightId: '',
  StartTime: '',
  EndTime: '',
  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}}/InsightImpactGraph',
  headers: {'content-type': 'application/json'},
  data: {InsightId: '', StartTime: '', EndTime: '', NextToken: ''}
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/InsightImpactGraph';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"InsightId":"","StartTime":"","EndTime":"","NextToken":""}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
#import 

NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"InsightId": @"",
                              @"StartTime": @"",
                              @"EndTime": @"",
                              @"NextToken": @"" };

NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/InsightImpactGraph"]
                                                       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}}/InsightImpactGraph" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n  \"InsightId\": \"\",\n  \"StartTime\": \"\",\n  \"EndTime\": \"\",\n  \"NextToken\": \"\"\n}" in

Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/InsightImpactGraph",
  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([
    'InsightId' => '',
    'StartTime' => '',
    'EndTime' => '',
    'NextToken' => ''
  ]),
  CURLOPT_HTTPHEADER => [
    "content-type: application/json"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('POST', '{{baseUrl}}/InsightImpactGraph', [
  'body' => '{
  "InsightId": "",
  "StartTime": "",
  "EndTime": "",
  "NextToken": ""
}',
  'headers' => [
    'content-type' => 'application/json',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/InsightImpactGraph');
$request->setMethod(HTTP_METH_POST);

$request->setHeaders([
  'content-type' => 'application/json'
]);

$request->setContentType('application/json');
$request->setBody(json_encode([
  'InsightId' => '',
  'StartTime' => '',
  'EndTime' => '',
  'NextToken' => ''
]));

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
append(json_encode([
  'InsightId' => '',
  'StartTime' => '',
  'EndTime' => '',
  'NextToken' => ''
]));
$request->setRequestUrl('{{baseUrl}}/InsightImpactGraph');
$request->setRequestMethod('POST');
$request->setBody($body);

$request->setHeaders([
  'content-type' => 'application/json'
]);

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/InsightImpactGraph' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "InsightId": "",
  "StartTime": "",
  "EndTime": "",
  "NextToken": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/InsightImpactGraph' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "InsightId": "",
  "StartTime": "",
  "EndTime": "",
  "NextToken": ""
}'
import http.client

conn = http.client.HTTPSConnection("example.com")

payload = "{\n  \"InsightId\": \"\",\n  \"StartTime\": \"\",\n  \"EndTime\": \"\",\n  \"NextToken\": \"\"\n}"

headers = { 'content-type': "application/json" }

conn.request("POST", "/baseUrl/InsightImpactGraph", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/InsightImpactGraph"

payload = {
    "InsightId": "",
    "StartTime": "",
    "EndTime": "",
    "NextToken": ""
}
headers = {"content-type": "application/json"}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
library(httr)

url <- "{{baseUrl}}/InsightImpactGraph"

payload <- "{\n  \"InsightId\": \"\",\n  \"StartTime\": \"\",\n  \"EndTime\": \"\",\n  \"NextToken\": \"\"\n}"

encode <- "json"

response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/InsightImpactGraph")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n  \"InsightId\": \"\",\n  \"StartTime\": \"\",\n  \"EndTime\": \"\",\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/InsightImpactGraph') do |req|
  req.body = "{\n  \"InsightId\": \"\",\n  \"StartTime\": \"\",\n  \"EndTime\": \"\",\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}}/InsightImpactGraph";

    let payload = json!({
        "InsightId": "",
        "StartTime": "",
        "EndTime": "",
        "NextToken": ""
    });

    let mut headers = reqwest::header::HeaderMap::new();
    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}}/InsightImpactGraph \
  --header 'content-type: application/json' \
  --data '{
  "InsightId": "",
  "StartTime": "",
  "EndTime": "",
  "NextToken": ""
}'
echo '{
  "InsightId": "",
  "StartTime": "",
  "EndTime": "",
  "NextToken": ""
}' |  \
  http POST {{baseUrl}}/InsightImpactGraph \
  content-type:application/json
wget --quiet \
  --method POST \
  --header 'content-type: application/json' \
  --body-data '{\n  "InsightId": "",\n  "StartTime": "",\n  "EndTime": "",\n  "NextToken": ""\n}' \
  --output-document \
  - {{baseUrl}}/InsightImpactGraph
import Foundation

let headers = ["content-type": "application/json"]
let parameters = [
  "InsightId": "",
  "StartTime": "",
  "EndTime": "",
  "NextToken": ""
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/InsightImpactGraph")! 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 GetInsightSummaries
{{baseUrl}}/InsightSummaries
BODY json

{
  "States": [],
  "GroupARN": "",
  "GroupName": "",
  "StartTime": "",
  "EndTime": "",
  "MaxResults": 0,
  "NextToken": ""
}
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/InsightSummaries");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n  \"States\": [],\n  \"GroupARN\": \"\",\n  \"GroupName\": \"\",\n  \"StartTime\": \"\",\n  \"EndTime\": \"\",\n  \"MaxResults\": 0,\n  \"NextToken\": \"\"\n}");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/post "{{baseUrl}}/InsightSummaries" {:content-type :json
                                                             :form-params {:States []
                                                                           :GroupARN ""
                                                                           :GroupName ""
                                                                           :StartTime ""
                                                                           :EndTime ""
                                                                           :MaxResults 0
                                                                           :NextToken ""}})
require "http/client"

url = "{{baseUrl}}/InsightSummaries"
headers = HTTP::Headers{
  "content-type" => "application/json"
}
reqBody = "{\n  \"States\": [],\n  \"GroupARN\": \"\",\n  \"GroupName\": \"\",\n  \"StartTime\": \"\",\n  \"EndTime\": \"\",\n  \"MaxResults\": 0,\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}}/InsightSummaries"),
    Content = new StringContent("{\n  \"States\": [],\n  \"GroupARN\": \"\",\n  \"GroupName\": \"\",\n  \"StartTime\": \"\",\n  \"EndTime\": \"\",\n  \"MaxResults\": 0,\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}}/InsightSummaries");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n  \"States\": [],\n  \"GroupARN\": \"\",\n  \"GroupName\": \"\",\n  \"StartTime\": \"\",\n  \"EndTime\": \"\",\n  \"MaxResults\": 0,\n  \"NextToken\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/InsightSummaries"

	payload := strings.NewReader("{\n  \"States\": [],\n  \"GroupARN\": \"\",\n  \"GroupName\": \"\",\n  \"StartTime\": \"\",\n  \"EndTime\": \"\",\n  \"MaxResults\": 0,\n  \"NextToken\": \"\"\n}")

	req, _ := http.NewRequest("POST", url, payload)

	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/InsightSummaries HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 129

{
  "States": [],
  "GroupARN": "",
  "GroupName": "",
  "StartTime": "",
  "EndTime": "",
  "MaxResults": 0,
  "NextToken": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/InsightSummaries")
  .setHeader("content-type", "application/json")
  .setBody("{\n  \"States\": [],\n  \"GroupARN\": \"\",\n  \"GroupName\": \"\",\n  \"StartTime\": \"\",\n  \"EndTime\": \"\",\n  \"MaxResults\": 0,\n  \"NextToken\": \"\"\n}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/InsightSummaries"))
    .header("content-type", "application/json")
    .method("POST", HttpRequest.BodyPublishers.ofString("{\n  \"States\": [],\n  \"GroupARN\": \"\",\n  \"GroupName\": \"\",\n  \"StartTime\": \"\",\n  \"EndTime\": \"\",\n  \"MaxResults\": 0,\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  \"States\": [],\n  \"GroupARN\": \"\",\n  \"GroupName\": \"\",\n  \"StartTime\": \"\",\n  \"EndTime\": \"\",\n  \"MaxResults\": 0,\n  \"NextToken\": \"\"\n}");
Request request = new Request.Builder()
  .url("{{baseUrl}}/InsightSummaries")
  .post(body)
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/InsightSummaries")
  .header("content-type", "application/json")
  .body("{\n  \"States\": [],\n  \"GroupARN\": \"\",\n  \"GroupName\": \"\",\n  \"StartTime\": \"\",\n  \"EndTime\": \"\",\n  \"MaxResults\": 0,\n  \"NextToken\": \"\"\n}")
  .asString();
const data = JSON.stringify({
  States: [],
  GroupARN: '',
  GroupName: '',
  StartTime: '',
  EndTime: '',
  MaxResults: 0,
  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}}/InsightSummaries');
xhr.setRequestHeader('content-type', 'application/json');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'POST',
  url: '{{baseUrl}}/InsightSummaries',
  headers: {'content-type': 'application/json'},
  data: {
    States: [],
    GroupARN: '',
    GroupName: '',
    StartTime: '',
    EndTime: '',
    MaxResults: 0,
    NextToken: ''
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/InsightSummaries';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"States":[],"GroupARN":"","GroupName":"","StartTime":"","EndTime":"","MaxResults":0,"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}}/InsightSummaries',
  method: 'POST',
  headers: {
    'content-type': 'application/json'
  },
  processData: false,
  data: '{\n  "States": [],\n  "GroupARN": "",\n  "GroupName": "",\n  "StartTime": "",\n  "EndTime": "",\n  "MaxResults": 0,\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  \"States\": [],\n  \"GroupARN\": \"\",\n  \"GroupName\": \"\",\n  \"StartTime\": \"\",\n  \"EndTime\": \"\",\n  \"MaxResults\": 0,\n  \"NextToken\": \"\"\n}")
val request = Request.Builder()
  .url("{{baseUrl}}/InsightSummaries")
  .post(body)
  .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/InsightSummaries',
  headers: {
    '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({
  States: [],
  GroupARN: '',
  GroupName: '',
  StartTime: '',
  EndTime: '',
  MaxResults: 0,
  NextToken: ''
}));
req.end();
const request = require('request');

const options = {
  method: 'POST',
  url: '{{baseUrl}}/InsightSummaries',
  headers: {'content-type': 'application/json'},
  body: {
    States: [],
    GroupARN: '',
    GroupName: '',
    StartTime: '',
    EndTime: '',
    MaxResults: 0,
    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}}/InsightSummaries');

req.headers({
  'content-type': 'application/json'
});

req.type('json');
req.send({
  States: [],
  GroupARN: '',
  GroupName: '',
  StartTime: '',
  EndTime: '',
  MaxResults: 0,
  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}}/InsightSummaries',
  headers: {'content-type': 'application/json'},
  data: {
    States: [],
    GroupARN: '',
    GroupName: '',
    StartTime: '',
    EndTime: '',
    MaxResults: 0,
    NextToken: ''
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/InsightSummaries';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"States":[],"GroupARN":"","GroupName":"","StartTime":"","EndTime":"","MaxResults":0,"NextToken":""}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
#import 

NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"States": @[  ],
                              @"GroupARN": @"",
                              @"GroupName": @"",
                              @"StartTime": @"",
                              @"EndTime": @"",
                              @"MaxResults": @0,
                              @"NextToken": @"" };

NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/InsightSummaries"]
                                                       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}}/InsightSummaries" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n  \"States\": [],\n  \"GroupARN\": \"\",\n  \"GroupName\": \"\",\n  \"StartTime\": \"\",\n  \"EndTime\": \"\",\n  \"MaxResults\": 0,\n  \"NextToken\": \"\"\n}" in

Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/InsightSummaries",
  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([
    'States' => [
        
    ],
    'GroupARN' => '',
    'GroupName' => '',
    'StartTime' => '',
    'EndTime' => '',
    'MaxResults' => 0,
    'NextToken' => ''
  ]),
  CURLOPT_HTTPHEADER => [
    "content-type: application/json"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('POST', '{{baseUrl}}/InsightSummaries', [
  'body' => '{
  "States": [],
  "GroupARN": "",
  "GroupName": "",
  "StartTime": "",
  "EndTime": "",
  "MaxResults": 0,
  "NextToken": ""
}',
  'headers' => [
    'content-type' => 'application/json',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/InsightSummaries');
$request->setMethod(HTTP_METH_POST);

$request->setHeaders([
  'content-type' => 'application/json'
]);

$request->setContentType('application/json');
$request->setBody(json_encode([
  'States' => [
    
  ],
  'GroupARN' => '',
  'GroupName' => '',
  'StartTime' => '',
  'EndTime' => '',
  'MaxResults' => 0,
  'NextToken' => ''
]));

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
append(json_encode([
  'States' => [
    
  ],
  'GroupARN' => '',
  'GroupName' => '',
  'StartTime' => '',
  'EndTime' => '',
  'MaxResults' => 0,
  'NextToken' => ''
]));
$request->setRequestUrl('{{baseUrl}}/InsightSummaries');
$request->setRequestMethod('POST');
$request->setBody($body);

$request->setHeaders([
  'content-type' => 'application/json'
]);

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/InsightSummaries' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "States": [],
  "GroupARN": "",
  "GroupName": "",
  "StartTime": "",
  "EndTime": "",
  "MaxResults": 0,
  "NextToken": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/InsightSummaries' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "States": [],
  "GroupARN": "",
  "GroupName": "",
  "StartTime": "",
  "EndTime": "",
  "MaxResults": 0,
  "NextToken": ""
}'
import http.client

conn = http.client.HTTPSConnection("example.com")

payload = "{\n  \"States\": [],\n  \"GroupARN\": \"\",\n  \"GroupName\": \"\",\n  \"StartTime\": \"\",\n  \"EndTime\": \"\",\n  \"MaxResults\": 0,\n  \"NextToken\": \"\"\n}"

headers = { 'content-type': "application/json" }

conn.request("POST", "/baseUrl/InsightSummaries", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/InsightSummaries"

payload = {
    "States": [],
    "GroupARN": "",
    "GroupName": "",
    "StartTime": "",
    "EndTime": "",
    "MaxResults": 0,
    "NextToken": ""
}
headers = {"content-type": "application/json"}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
library(httr)

url <- "{{baseUrl}}/InsightSummaries"

payload <- "{\n  \"States\": [],\n  \"GroupARN\": \"\",\n  \"GroupName\": \"\",\n  \"StartTime\": \"\",\n  \"EndTime\": \"\",\n  \"MaxResults\": 0,\n  \"NextToken\": \"\"\n}"

encode <- "json"

response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/InsightSummaries")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n  \"States\": [],\n  \"GroupARN\": \"\",\n  \"GroupName\": \"\",\n  \"StartTime\": \"\",\n  \"EndTime\": \"\",\n  \"MaxResults\": 0,\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/InsightSummaries') do |req|
  req.body = "{\n  \"States\": [],\n  \"GroupARN\": \"\",\n  \"GroupName\": \"\",\n  \"StartTime\": \"\",\n  \"EndTime\": \"\",\n  \"MaxResults\": 0,\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}}/InsightSummaries";

    let payload = json!({
        "States": (),
        "GroupARN": "",
        "GroupName": "",
        "StartTime": "",
        "EndTime": "",
        "MaxResults": 0,
        "NextToken": ""
    });

    let mut headers = reqwest::header::HeaderMap::new();
    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}}/InsightSummaries \
  --header 'content-type: application/json' \
  --data '{
  "States": [],
  "GroupARN": "",
  "GroupName": "",
  "StartTime": "",
  "EndTime": "",
  "MaxResults": 0,
  "NextToken": ""
}'
echo '{
  "States": [],
  "GroupARN": "",
  "GroupName": "",
  "StartTime": "",
  "EndTime": "",
  "MaxResults": 0,
  "NextToken": ""
}' |  \
  http POST {{baseUrl}}/InsightSummaries \
  content-type:application/json
wget --quiet \
  --method POST \
  --header 'content-type: application/json' \
  --body-data '{\n  "States": [],\n  "GroupARN": "",\n  "GroupName": "",\n  "StartTime": "",\n  "EndTime": "",\n  "MaxResults": 0,\n  "NextToken": ""\n}' \
  --output-document \
  - {{baseUrl}}/InsightSummaries
import Foundation

let headers = ["content-type": "application/json"]
let parameters = [
  "States": [],
  "GroupARN": "",
  "GroupName": "",
  "StartTime": "",
  "EndTime": "",
  "MaxResults": 0,
  "NextToken": ""
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/InsightSummaries")! 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 GetSamplingRules
{{baseUrl}}/GetSamplingRules
BODY json

{
  "NextToken": ""
}
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/GetSamplingRules");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n  \"NextToken\": \"\"\n}");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/post "{{baseUrl}}/GetSamplingRules" {:content-type :json
                                                             :form-params {:NextToken ""}})
require "http/client"

url = "{{baseUrl}}/GetSamplingRules"
headers = HTTP::Headers{
  "content-type" => "application/json"
}
reqBody = "{\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}}/GetSamplingRules"),
    Content = new StringContent("{\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}}/GetSamplingRules");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n  \"NextToken\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/GetSamplingRules"

	payload := strings.NewReader("{\n  \"NextToken\": \"\"\n}")

	req, _ := http.NewRequest("POST", url, payload)

	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/GetSamplingRules HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 21

{
  "NextToken": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/GetSamplingRules")
  .setHeader("content-type", "application/json")
  .setBody("{\n  \"NextToken\": \"\"\n}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/GetSamplingRules"))
    .header("content-type", "application/json")
    .method("POST", HttpRequest.BodyPublishers.ofString("{\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  \"NextToken\": \"\"\n}");
Request request = new Request.Builder()
  .url("{{baseUrl}}/GetSamplingRules")
  .post(body)
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/GetSamplingRules")
  .header("content-type", "application/json")
  .body("{\n  \"NextToken\": \"\"\n}")
  .asString();
const data = JSON.stringify({
  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}}/GetSamplingRules');
xhr.setRequestHeader('content-type', 'application/json');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'POST',
  url: '{{baseUrl}}/GetSamplingRules',
  headers: {'content-type': 'application/json'},
  data: {NextToken: ''}
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/GetSamplingRules';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"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}}/GetSamplingRules',
  method: 'POST',
  headers: {
    'content-type': 'application/json'
  },
  processData: false,
  data: '{\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  \"NextToken\": \"\"\n}")
val request = Request.Builder()
  .url("{{baseUrl}}/GetSamplingRules")
  .post(body)
  .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/GetSamplingRules',
  headers: {
    '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({NextToken: ''}));
req.end();
const request = require('request');

const options = {
  method: 'POST',
  url: '{{baseUrl}}/GetSamplingRules',
  headers: {'content-type': 'application/json'},
  body: {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}}/GetSamplingRules');

req.headers({
  'content-type': 'application/json'
});

req.type('json');
req.send({
  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}}/GetSamplingRules',
  headers: {'content-type': 'application/json'},
  data: {NextToken: ''}
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/GetSamplingRules';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"NextToken":""}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
#import 

NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"NextToken": @"" };

NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/GetSamplingRules"]
                                                       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}}/GetSamplingRules" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n  \"NextToken\": \"\"\n}" in

Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/GetSamplingRules",
  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([
    'NextToken' => ''
  ]),
  CURLOPT_HTTPHEADER => [
    "content-type: application/json"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('POST', '{{baseUrl}}/GetSamplingRules', [
  'body' => '{
  "NextToken": ""
}',
  'headers' => [
    'content-type' => 'application/json',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/GetSamplingRules');
$request->setMethod(HTTP_METH_POST);

$request->setHeaders([
  'content-type' => 'application/json'
]);

$request->setContentType('application/json');
$request->setBody(json_encode([
  'NextToken' => ''
]));

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
append(json_encode([
  'NextToken' => ''
]));
$request->setRequestUrl('{{baseUrl}}/GetSamplingRules');
$request->setRequestMethod('POST');
$request->setBody($body);

$request->setHeaders([
  'content-type' => 'application/json'
]);

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/GetSamplingRules' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "NextToken": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/GetSamplingRules' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "NextToken": ""
}'
import http.client

conn = http.client.HTTPSConnection("example.com")

payload = "{\n  \"NextToken\": \"\"\n}"

headers = { 'content-type': "application/json" }

conn.request("POST", "/baseUrl/GetSamplingRules", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/GetSamplingRules"

payload = { "NextToken": "" }
headers = {"content-type": "application/json"}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
library(httr)

url <- "{{baseUrl}}/GetSamplingRules"

payload <- "{\n  \"NextToken\": \"\"\n}"

encode <- "json"

response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/GetSamplingRules")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\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/GetSamplingRules') do |req|
  req.body = "{\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}}/GetSamplingRules";

    let payload = json!({"NextToken": ""});

    let mut headers = reqwest::header::HeaderMap::new();
    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}}/GetSamplingRules \
  --header 'content-type: application/json' \
  --data '{
  "NextToken": ""
}'
echo '{
  "NextToken": ""
}' |  \
  http POST {{baseUrl}}/GetSamplingRules \
  content-type:application/json
wget --quiet \
  --method POST \
  --header 'content-type: application/json' \
  --body-data '{\n  "NextToken": ""\n}' \
  --output-document \
  - {{baseUrl}}/GetSamplingRules
import Foundation

let headers = ["content-type": "application/json"]
let parameters = ["NextToken": ""] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/GetSamplingRules")! 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 GetSamplingStatisticSummaries
{{baseUrl}}/SamplingStatisticSummaries
BODY json

{
  "NextToken": ""
}
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/SamplingStatisticSummaries");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n  \"NextToken\": \"\"\n}");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/post "{{baseUrl}}/SamplingStatisticSummaries" {:content-type :json
                                                                       :form-params {:NextToken ""}})
require "http/client"

url = "{{baseUrl}}/SamplingStatisticSummaries"
headers = HTTP::Headers{
  "content-type" => "application/json"
}
reqBody = "{\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}}/SamplingStatisticSummaries"),
    Content = new StringContent("{\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}}/SamplingStatisticSummaries");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n  \"NextToken\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/SamplingStatisticSummaries"

	payload := strings.NewReader("{\n  \"NextToken\": \"\"\n}")

	req, _ := http.NewRequest("POST", url, payload)

	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/SamplingStatisticSummaries HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 21

{
  "NextToken": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/SamplingStatisticSummaries")
  .setHeader("content-type", "application/json")
  .setBody("{\n  \"NextToken\": \"\"\n}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/SamplingStatisticSummaries"))
    .header("content-type", "application/json")
    .method("POST", HttpRequest.BodyPublishers.ofString("{\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  \"NextToken\": \"\"\n}");
Request request = new Request.Builder()
  .url("{{baseUrl}}/SamplingStatisticSummaries")
  .post(body)
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/SamplingStatisticSummaries")
  .header("content-type", "application/json")
  .body("{\n  \"NextToken\": \"\"\n}")
  .asString();
const data = JSON.stringify({
  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}}/SamplingStatisticSummaries');
xhr.setRequestHeader('content-type', 'application/json');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'POST',
  url: '{{baseUrl}}/SamplingStatisticSummaries',
  headers: {'content-type': 'application/json'},
  data: {NextToken: ''}
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/SamplingStatisticSummaries';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"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}}/SamplingStatisticSummaries',
  method: 'POST',
  headers: {
    'content-type': 'application/json'
  },
  processData: false,
  data: '{\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  \"NextToken\": \"\"\n}")
val request = Request.Builder()
  .url("{{baseUrl}}/SamplingStatisticSummaries")
  .post(body)
  .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/SamplingStatisticSummaries',
  headers: {
    '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({NextToken: ''}));
req.end();
const request = require('request');

const options = {
  method: 'POST',
  url: '{{baseUrl}}/SamplingStatisticSummaries',
  headers: {'content-type': 'application/json'},
  body: {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}}/SamplingStatisticSummaries');

req.headers({
  'content-type': 'application/json'
});

req.type('json');
req.send({
  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}}/SamplingStatisticSummaries',
  headers: {'content-type': 'application/json'},
  data: {NextToken: ''}
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/SamplingStatisticSummaries';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"NextToken":""}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
#import 

NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"NextToken": @"" };

NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/SamplingStatisticSummaries"]
                                                       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}}/SamplingStatisticSummaries" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n  \"NextToken\": \"\"\n}" in

Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/SamplingStatisticSummaries",
  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([
    'NextToken' => ''
  ]),
  CURLOPT_HTTPHEADER => [
    "content-type: application/json"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('POST', '{{baseUrl}}/SamplingStatisticSummaries', [
  'body' => '{
  "NextToken": ""
}',
  'headers' => [
    'content-type' => 'application/json',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/SamplingStatisticSummaries');
$request->setMethod(HTTP_METH_POST);

$request->setHeaders([
  'content-type' => 'application/json'
]);

$request->setContentType('application/json');
$request->setBody(json_encode([
  'NextToken' => ''
]));

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
append(json_encode([
  'NextToken' => ''
]));
$request->setRequestUrl('{{baseUrl}}/SamplingStatisticSummaries');
$request->setRequestMethod('POST');
$request->setBody($body);

$request->setHeaders([
  'content-type' => 'application/json'
]);

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/SamplingStatisticSummaries' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "NextToken": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/SamplingStatisticSummaries' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "NextToken": ""
}'
import http.client

conn = http.client.HTTPSConnection("example.com")

payload = "{\n  \"NextToken\": \"\"\n}"

headers = { 'content-type': "application/json" }

conn.request("POST", "/baseUrl/SamplingStatisticSummaries", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/SamplingStatisticSummaries"

payload = { "NextToken": "" }
headers = {"content-type": "application/json"}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
library(httr)

url <- "{{baseUrl}}/SamplingStatisticSummaries"

payload <- "{\n  \"NextToken\": \"\"\n}"

encode <- "json"

response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/SamplingStatisticSummaries")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\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/SamplingStatisticSummaries') do |req|
  req.body = "{\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}}/SamplingStatisticSummaries";

    let payload = json!({"NextToken": ""});

    let mut headers = reqwest::header::HeaderMap::new();
    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}}/SamplingStatisticSummaries \
  --header 'content-type: application/json' \
  --data '{
  "NextToken": ""
}'
echo '{
  "NextToken": ""
}' |  \
  http POST {{baseUrl}}/SamplingStatisticSummaries \
  content-type:application/json
wget --quiet \
  --method POST \
  --header 'content-type: application/json' \
  --body-data '{\n  "NextToken": ""\n}' \
  --output-document \
  - {{baseUrl}}/SamplingStatisticSummaries
import Foundation

let headers = ["content-type": "application/json"]
let parameters = ["NextToken": ""] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/SamplingStatisticSummaries")! 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 GetSamplingTargets
{{baseUrl}}/SamplingTargets
BODY json

{
  "SamplingStatisticsDocuments": [
    {
      "RuleName": "",
      "ClientID": "",
      "Timestamp": "",
      "RequestCount": "",
      "SampledCount": "",
      "BorrowCount": ""
    }
  ]
}
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/SamplingTargets");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n  \"SamplingStatisticsDocuments\": [\n    {\n      \"RuleName\": \"\",\n      \"ClientID\": \"\",\n      \"Timestamp\": \"\",\n      \"RequestCount\": \"\",\n      \"SampledCount\": \"\",\n      \"BorrowCount\": \"\"\n    }\n  ]\n}");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/post "{{baseUrl}}/SamplingTargets" {:content-type :json
                                                            :form-params {:SamplingStatisticsDocuments [{:RuleName ""
                                                                                                         :ClientID ""
                                                                                                         :Timestamp ""
                                                                                                         :RequestCount ""
                                                                                                         :SampledCount ""
                                                                                                         :BorrowCount ""}]}})
require "http/client"

url = "{{baseUrl}}/SamplingTargets"
headers = HTTP::Headers{
  "content-type" => "application/json"
}
reqBody = "{\n  \"SamplingStatisticsDocuments\": [\n    {\n      \"RuleName\": \"\",\n      \"ClientID\": \"\",\n      \"Timestamp\": \"\",\n      \"RequestCount\": \"\",\n      \"SampledCount\": \"\",\n      \"BorrowCount\": \"\"\n    }\n  ]\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}}/SamplingTargets"),
    Content = new StringContent("{\n  \"SamplingStatisticsDocuments\": [\n    {\n      \"RuleName\": \"\",\n      \"ClientID\": \"\",\n      \"Timestamp\": \"\",\n      \"RequestCount\": \"\",\n      \"SampledCount\": \"\",\n      \"BorrowCount\": \"\"\n    }\n  ]\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}}/SamplingTargets");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n  \"SamplingStatisticsDocuments\": [\n    {\n      \"RuleName\": \"\",\n      \"ClientID\": \"\",\n      \"Timestamp\": \"\",\n      \"RequestCount\": \"\",\n      \"SampledCount\": \"\",\n      \"BorrowCount\": \"\"\n    }\n  ]\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/SamplingTargets"

	payload := strings.NewReader("{\n  \"SamplingStatisticsDocuments\": [\n    {\n      \"RuleName\": \"\",\n      \"ClientID\": \"\",\n      \"Timestamp\": \"\",\n      \"RequestCount\": \"\",\n      \"SampledCount\": \"\",\n      \"BorrowCount\": \"\"\n    }\n  ]\n}")

	req, _ := http.NewRequest("POST", url, payload)

	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/SamplingTargets HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 197

{
  "SamplingStatisticsDocuments": [
    {
      "RuleName": "",
      "ClientID": "",
      "Timestamp": "",
      "RequestCount": "",
      "SampledCount": "",
      "BorrowCount": ""
    }
  ]
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/SamplingTargets")
  .setHeader("content-type", "application/json")
  .setBody("{\n  \"SamplingStatisticsDocuments\": [\n    {\n      \"RuleName\": \"\",\n      \"ClientID\": \"\",\n      \"Timestamp\": \"\",\n      \"RequestCount\": \"\",\n      \"SampledCount\": \"\",\n      \"BorrowCount\": \"\"\n    }\n  ]\n}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/SamplingTargets"))
    .header("content-type", "application/json")
    .method("POST", HttpRequest.BodyPublishers.ofString("{\n  \"SamplingStatisticsDocuments\": [\n    {\n      \"RuleName\": \"\",\n      \"ClientID\": \"\",\n      \"Timestamp\": \"\",\n      \"RequestCount\": \"\",\n      \"SampledCount\": \"\",\n      \"BorrowCount\": \"\"\n    }\n  ]\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  \"SamplingStatisticsDocuments\": [\n    {\n      \"RuleName\": \"\",\n      \"ClientID\": \"\",\n      \"Timestamp\": \"\",\n      \"RequestCount\": \"\",\n      \"SampledCount\": \"\",\n      \"BorrowCount\": \"\"\n    }\n  ]\n}");
Request request = new Request.Builder()
  .url("{{baseUrl}}/SamplingTargets")
  .post(body)
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/SamplingTargets")
  .header("content-type", "application/json")
  .body("{\n  \"SamplingStatisticsDocuments\": [\n    {\n      \"RuleName\": \"\",\n      \"ClientID\": \"\",\n      \"Timestamp\": \"\",\n      \"RequestCount\": \"\",\n      \"SampledCount\": \"\",\n      \"BorrowCount\": \"\"\n    }\n  ]\n}")
  .asString();
const data = JSON.stringify({
  SamplingStatisticsDocuments: [
    {
      RuleName: '',
      ClientID: '',
      Timestamp: '',
      RequestCount: '',
      SampledCount: '',
      BorrowCount: ''
    }
  ]
});

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener('readystatechange', function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open('POST', '{{baseUrl}}/SamplingTargets');
xhr.setRequestHeader('content-type', 'application/json');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'POST',
  url: '{{baseUrl}}/SamplingTargets',
  headers: {'content-type': 'application/json'},
  data: {
    SamplingStatisticsDocuments: [
      {
        RuleName: '',
        ClientID: '',
        Timestamp: '',
        RequestCount: '',
        SampledCount: '',
        BorrowCount: ''
      }
    ]
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/SamplingTargets';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"SamplingStatisticsDocuments":[{"RuleName":"","ClientID":"","Timestamp":"","RequestCount":"","SampledCount":"","BorrowCount":""}]}'
};

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}}/SamplingTargets',
  method: 'POST',
  headers: {
    'content-type': 'application/json'
  },
  processData: false,
  data: '{\n  "SamplingStatisticsDocuments": [\n    {\n      "RuleName": "",\n      "ClientID": "",\n      "Timestamp": "",\n      "RequestCount": "",\n      "SampledCount": "",\n      "BorrowCount": ""\n    }\n  ]\n}'
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n  \"SamplingStatisticsDocuments\": [\n    {\n      \"RuleName\": \"\",\n      \"ClientID\": \"\",\n      \"Timestamp\": \"\",\n      \"RequestCount\": \"\",\n      \"SampledCount\": \"\",\n      \"BorrowCount\": \"\"\n    }\n  ]\n}")
val request = Request.Builder()
  .url("{{baseUrl}}/SamplingTargets")
  .post(body)
  .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/SamplingTargets',
  headers: {
    '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({
  SamplingStatisticsDocuments: [
    {
      RuleName: '',
      ClientID: '',
      Timestamp: '',
      RequestCount: '',
      SampledCount: '',
      BorrowCount: ''
    }
  ]
}));
req.end();
const request = require('request');

const options = {
  method: 'POST',
  url: '{{baseUrl}}/SamplingTargets',
  headers: {'content-type': 'application/json'},
  body: {
    SamplingStatisticsDocuments: [
      {
        RuleName: '',
        ClientID: '',
        Timestamp: '',
        RequestCount: '',
        SampledCount: '',
        BorrowCount: ''
      }
    ]
  },
  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}}/SamplingTargets');

req.headers({
  'content-type': 'application/json'
});

req.type('json');
req.send({
  SamplingStatisticsDocuments: [
    {
      RuleName: '',
      ClientID: '',
      Timestamp: '',
      RequestCount: '',
      SampledCount: '',
      BorrowCount: ''
    }
  ]
});

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}}/SamplingTargets',
  headers: {'content-type': 'application/json'},
  data: {
    SamplingStatisticsDocuments: [
      {
        RuleName: '',
        ClientID: '',
        Timestamp: '',
        RequestCount: '',
        SampledCount: '',
        BorrowCount: ''
      }
    ]
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/SamplingTargets';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"SamplingStatisticsDocuments":[{"RuleName":"","ClientID":"","Timestamp":"","RequestCount":"","SampledCount":"","BorrowCount":""}]}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
#import 

NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"SamplingStatisticsDocuments": @[ @{ @"RuleName": @"", @"ClientID": @"", @"Timestamp": @"", @"RequestCount": @"", @"SampledCount": @"", @"BorrowCount": @"" } ] };

NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/SamplingTargets"]
                                                       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}}/SamplingTargets" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n  \"SamplingStatisticsDocuments\": [\n    {\n      \"RuleName\": \"\",\n      \"ClientID\": \"\",\n      \"Timestamp\": \"\",\n      \"RequestCount\": \"\",\n      \"SampledCount\": \"\",\n      \"BorrowCount\": \"\"\n    }\n  ]\n}" in

Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/SamplingTargets",
  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([
    'SamplingStatisticsDocuments' => [
        [
                'RuleName' => '',
                'ClientID' => '',
                'Timestamp' => '',
                'RequestCount' => '',
                'SampledCount' => '',
                'BorrowCount' => ''
        ]
    ]
  ]),
  CURLOPT_HTTPHEADER => [
    "content-type: application/json"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('POST', '{{baseUrl}}/SamplingTargets', [
  'body' => '{
  "SamplingStatisticsDocuments": [
    {
      "RuleName": "",
      "ClientID": "",
      "Timestamp": "",
      "RequestCount": "",
      "SampledCount": "",
      "BorrowCount": ""
    }
  ]
}',
  'headers' => [
    'content-type' => 'application/json',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/SamplingTargets');
$request->setMethod(HTTP_METH_POST);

$request->setHeaders([
  'content-type' => 'application/json'
]);

$request->setContentType('application/json');
$request->setBody(json_encode([
  'SamplingStatisticsDocuments' => [
    [
        'RuleName' => '',
        'ClientID' => '',
        'Timestamp' => '',
        'RequestCount' => '',
        'SampledCount' => '',
        'BorrowCount' => ''
    ]
  ]
]));

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
append(json_encode([
  'SamplingStatisticsDocuments' => [
    [
        'RuleName' => '',
        'ClientID' => '',
        'Timestamp' => '',
        'RequestCount' => '',
        'SampledCount' => '',
        'BorrowCount' => ''
    ]
  ]
]));
$request->setRequestUrl('{{baseUrl}}/SamplingTargets');
$request->setRequestMethod('POST');
$request->setBody($body);

$request->setHeaders([
  'content-type' => 'application/json'
]);

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/SamplingTargets' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "SamplingStatisticsDocuments": [
    {
      "RuleName": "",
      "ClientID": "",
      "Timestamp": "",
      "RequestCount": "",
      "SampledCount": "",
      "BorrowCount": ""
    }
  ]
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/SamplingTargets' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "SamplingStatisticsDocuments": [
    {
      "RuleName": "",
      "ClientID": "",
      "Timestamp": "",
      "RequestCount": "",
      "SampledCount": "",
      "BorrowCount": ""
    }
  ]
}'
import http.client

conn = http.client.HTTPSConnection("example.com")

payload = "{\n  \"SamplingStatisticsDocuments\": [\n    {\n      \"RuleName\": \"\",\n      \"ClientID\": \"\",\n      \"Timestamp\": \"\",\n      \"RequestCount\": \"\",\n      \"SampledCount\": \"\",\n      \"BorrowCount\": \"\"\n    }\n  ]\n}"

headers = { 'content-type': "application/json" }

conn.request("POST", "/baseUrl/SamplingTargets", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/SamplingTargets"

payload = { "SamplingStatisticsDocuments": [
        {
            "RuleName": "",
            "ClientID": "",
            "Timestamp": "",
            "RequestCount": "",
            "SampledCount": "",
            "BorrowCount": ""
        }
    ] }
headers = {"content-type": "application/json"}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
library(httr)

url <- "{{baseUrl}}/SamplingTargets"

payload <- "{\n  \"SamplingStatisticsDocuments\": [\n    {\n      \"RuleName\": \"\",\n      \"ClientID\": \"\",\n      \"Timestamp\": \"\",\n      \"RequestCount\": \"\",\n      \"SampledCount\": \"\",\n      \"BorrowCount\": \"\"\n    }\n  ]\n}"

encode <- "json"

response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/SamplingTargets")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n  \"SamplingStatisticsDocuments\": [\n    {\n      \"RuleName\": \"\",\n      \"ClientID\": \"\",\n      \"Timestamp\": \"\",\n      \"RequestCount\": \"\",\n      \"SampledCount\": \"\",\n      \"BorrowCount\": \"\"\n    }\n  ]\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/SamplingTargets') do |req|
  req.body = "{\n  \"SamplingStatisticsDocuments\": [\n    {\n      \"RuleName\": \"\",\n      \"ClientID\": \"\",\n      \"Timestamp\": \"\",\n      \"RequestCount\": \"\",\n      \"SampledCount\": \"\",\n      \"BorrowCount\": \"\"\n    }\n  ]\n}"
end

puts response.status
puts response.body
use serde_json::json;
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/SamplingTargets";

    let payload = json!({"SamplingStatisticsDocuments": (
            json!({
                "RuleName": "",
                "ClientID": "",
                "Timestamp": "",
                "RequestCount": "",
                "SampledCount": "",
                "BorrowCount": ""
            })
        )});

    let mut headers = reqwest::header::HeaderMap::new();
    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}}/SamplingTargets \
  --header 'content-type: application/json' \
  --data '{
  "SamplingStatisticsDocuments": [
    {
      "RuleName": "",
      "ClientID": "",
      "Timestamp": "",
      "RequestCount": "",
      "SampledCount": "",
      "BorrowCount": ""
    }
  ]
}'
echo '{
  "SamplingStatisticsDocuments": [
    {
      "RuleName": "",
      "ClientID": "",
      "Timestamp": "",
      "RequestCount": "",
      "SampledCount": "",
      "BorrowCount": ""
    }
  ]
}' |  \
  http POST {{baseUrl}}/SamplingTargets \
  content-type:application/json
wget --quiet \
  --method POST \
  --header 'content-type: application/json' \
  --body-data '{\n  "SamplingStatisticsDocuments": [\n    {\n      "RuleName": "",\n      "ClientID": "",\n      "Timestamp": "",\n      "RequestCount": "",\n      "SampledCount": "",\n      "BorrowCount": ""\n    }\n  ]\n}' \
  --output-document \
  - {{baseUrl}}/SamplingTargets
import Foundation

let headers = ["content-type": "application/json"]
let parameters = ["SamplingStatisticsDocuments": [
    [
      "RuleName": "",
      "ClientID": "",
      "Timestamp": "",
      "RequestCount": "",
      "SampledCount": "",
      "BorrowCount": ""
    ]
  ]] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/SamplingTargets")! 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 GetServiceGraph
{{baseUrl}}/ServiceGraph
BODY json

{
  "StartTime": "",
  "EndTime": "",
  "GroupName": "",
  "GroupARN": "",
  "NextToken": ""
}
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/ServiceGraph");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n  \"StartTime\": \"\",\n  \"EndTime\": \"\",\n  \"GroupName\": \"\",\n  \"GroupARN\": \"\",\n  \"NextToken\": \"\"\n}");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/post "{{baseUrl}}/ServiceGraph" {:content-type :json
                                                         :form-params {:StartTime ""
                                                                       :EndTime ""
                                                                       :GroupName ""
                                                                       :GroupARN ""
                                                                       :NextToken ""}})
require "http/client"

url = "{{baseUrl}}/ServiceGraph"
headers = HTTP::Headers{
  "content-type" => "application/json"
}
reqBody = "{\n  \"StartTime\": \"\",\n  \"EndTime\": \"\",\n  \"GroupName\": \"\",\n  \"GroupARN\": \"\",\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}}/ServiceGraph"),
    Content = new StringContent("{\n  \"StartTime\": \"\",\n  \"EndTime\": \"\",\n  \"GroupName\": \"\",\n  \"GroupARN\": \"\",\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}}/ServiceGraph");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n  \"StartTime\": \"\",\n  \"EndTime\": \"\",\n  \"GroupName\": \"\",\n  \"GroupARN\": \"\",\n  \"NextToken\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/ServiceGraph"

	payload := strings.NewReader("{\n  \"StartTime\": \"\",\n  \"EndTime\": \"\",\n  \"GroupName\": \"\",\n  \"GroupARN\": \"\",\n  \"NextToken\": \"\"\n}")

	req, _ := http.NewRequest("POST", url, payload)

	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/ServiceGraph HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 94

{
  "StartTime": "",
  "EndTime": "",
  "GroupName": "",
  "GroupARN": "",
  "NextToken": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/ServiceGraph")
  .setHeader("content-type", "application/json")
  .setBody("{\n  \"StartTime\": \"\",\n  \"EndTime\": \"\",\n  \"GroupName\": \"\",\n  \"GroupARN\": \"\",\n  \"NextToken\": \"\"\n}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/ServiceGraph"))
    .header("content-type", "application/json")
    .method("POST", HttpRequest.BodyPublishers.ofString("{\n  \"StartTime\": \"\",\n  \"EndTime\": \"\",\n  \"GroupName\": \"\",\n  \"GroupARN\": \"\",\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  \"StartTime\": \"\",\n  \"EndTime\": \"\",\n  \"GroupName\": \"\",\n  \"GroupARN\": \"\",\n  \"NextToken\": \"\"\n}");
Request request = new Request.Builder()
  .url("{{baseUrl}}/ServiceGraph")
  .post(body)
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/ServiceGraph")
  .header("content-type", "application/json")
  .body("{\n  \"StartTime\": \"\",\n  \"EndTime\": \"\",\n  \"GroupName\": \"\",\n  \"GroupARN\": \"\",\n  \"NextToken\": \"\"\n}")
  .asString();
const data = JSON.stringify({
  StartTime: '',
  EndTime: '',
  GroupName: '',
  GroupARN: '',
  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}}/ServiceGraph');
xhr.setRequestHeader('content-type', 'application/json');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'POST',
  url: '{{baseUrl}}/ServiceGraph',
  headers: {'content-type': 'application/json'},
  data: {StartTime: '', EndTime: '', GroupName: '', GroupARN: '', NextToken: ''}
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/ServiceGraph';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"StartTime":"","EndTime":"","GroupName":"","GroupARN":"","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}}/ServiceGraph',
  method: 'POST',
  headers: {
    'content-type': 'application/json'
  },
  processData: false,
  data: '{\n  "StartTime": "",\n  "EndTime": "",\n  "GroupName": "",\n  "GroupARN": "",\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  \"StartTime\": \"\",\n  \"EndTime\": \"\",\n  \"GroupName\": \"\",\n  \"GroupARN\": \"\",\n  \"NextToken\": \"\"\n}")
val request = Request.Builder()
  .url("{{baseUrl}}/ServiceGraph")
  .post(body)
  .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/ServiceGraph',
  headers: {
    '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({StartTime: '', EndTime: '', GroupName: '', GroupARN: '', NextToken: ''}));
req.end();
const request = require('request');

const options = {
  method: 'POST',
  url: '{{baseUrl}}/ServiceGraph',
  headers: {'content-type': 'application/json'},
  body: {StartTime: '', EndTime: '', GroupName: '', GroupARN: '', 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}}/ServiceGraph');

req.headers({
  'content-type': 'application/json'
});

req.type('json');
req.send({
  StartTime: '',
  EndTime: '',
  GroupName: '',
  GroupARN: '',
  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}}/ServiceGraph',
  headers: {'content-type': 'application/json'},
  data: {StartTime: '', EndTime: '', GroupName: '', GroupARN: '', NextToken: ''}
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/ServiceGraph';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"StartTime":"","EndTime":"","GroupName":"","GroupARN":"","NextToken":""}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
#import 

NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"StartTime": @"",
                              @"EndTime": @"",
                              @"GroupName": @"",
                              @"GroupARN": @"",
                              @"NextToken": @"" };

NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/ServiceGraph"]
                                                       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}}/ServiceGraph" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n  \"StartTime\": \"\",\n  \"EndTime\": \"\",\n  \"GroupName\": \"\",\n  \"GroupARN\": \"\",\n  \"NextToken\": \"\"\n}" in

Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/ServiceGraph",
  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([
    'StartTime' => '',
    'EndTime' => '',
    'GroupName' => '',
    'GroupARN' => '',
    'NextToken' => ''
  ]),
  CURLOPT_HTTPHEADER => [
    "content-type: application/json"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('POST', '{{baseUrl}}/ServiceGraph', [
  'body' => '{
  "StartTime": "",
  "EndTime": "",
  "GroupName": "",
  "GroupARN": "",
  "NextToken": ""
}',
  'headers' => [
    'content-type' => 'application/json',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/ServiceGraph');
$request->setMethod(HTTP_METH_POST);

$request->setHeaders([
  'content-type' => 'application/json'
]);

$request->setContentType('application/json');
$request->setBody(json_encode([
  'StartTime' => '',
  'EndTime' => '',
  'GroupName' => '',
  'GroupARN' => '',
  'NextToken' => ''
]));

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
append(json_encode([
  'StartTime' => '',
  'EndTime' => '',
  'GroupName' => '',
  'GroupARN' => '',
  'NextToken' => ''
]));
$request->setRequestUrl('{{baseUrl}}/ServiceGraph');
$request->setRequestMethod('POST');
$request->setBody($body);

$request->setHeaders([
  'content-type' => 'application/json'
]);

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/ServiceGraph' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "StartTime": "",
  "EndTime": "",
  "GroupName": "",
  "GroupARN": "",
  "NextToken": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/ServiceGraph' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "StartTime": "",
  "EndTime": "",
  "GroupName": "",
  "GroupARN": "",
  "NextToken": ""
}'
import http.client

conn = http.client.HTTPSConnection("example.com")

payload = "{\n  \"StartTime\": \"\",\n  \"EndTime\": \"\",\n  \"GroupName\": \"\",\n  \"GroupARN\": \"\",\n  \"NextToken\": \"\"\n}"

headers = { 'content-type': "application/json" }

conn.request("POST", "/baseUrl/ServiceGraph", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/ServiceGraph"

payload = {
    "StartTime": "",
    "EndTime": "",
    "GroupName": "",
    "GroupARN": "",
    "NextToken": ""
}
headers = {"content-type": "application/json"}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
library(httr)

url <- "{{baseUrl}}/ServiceGraph"

payload <- "{\n  \"StartTime\": \"\",\n  \"EndTime\": \"\",\n  \"GroupName\": \"\",\n  \"GroupARN\": \"\",\n  \"NextToken\": \"\"\n}"

encode <- "json"

response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/ServiceGraph")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n  \"StartTime\": \"\",\n  \"EndTime\": \"\",\n  \"GroupName\": \"\",\n  \"GroupARN\": \"\",\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/ServiceGraph') do |req|
  req.body = "{\n  \"StartTime\": \"\",\n  \"EndTime\": \"\",\n  \"GroupName\": \"\",\n  \"GroupARN\": \"\",\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}}/ServiceGraph";

    let payload = json!({
        "StartTime": "",
        "EndTime": "",
        "GroupName": "",
        "GroupARN": "",
        "NextToken": ""
    });

    let mut headers = reqwest::header::HeaderMap::new();
    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}}/ServiceGraph \
  --header 'content-type: application/json' \
  --data '{
  "StartTime": "",
  "EndTime": "",
  "GroupName": "",
  "GroupARN": "",
  "NextToken": ""
}'
echo '{
  "StartTime": "",
  "EndTime": "",
  "GroupName": "",
  "GroupARN": "",
  "NextToken": ""
}' |  \
  http POST {{baseUrl}}/ServiceGraph \
  content-type:application/json
wget --quiet \
  --method POST \
  --header 'content-type: application/json' \
  --body-data '{\n  "StartTime": "",\n  "EndTime": "",\n  "GroupName": "",\n  "GroupARN": "",\n  "NextToken": ""\n}' \
  --output-document \
  - {{baseUrl}}/ServiceGraph
import Foundation

let headers = ["content-type": "application/json"]
let parameters = [
  "StartTime": "",
  "EndTime": "",
  "GroupName": "",
  "GroupARN": "",
  "NextToken": ""
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/ServiceGraph")! 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 GetTimeSeriesServiceStatistics
{{baseUrl}}/TimeSeriesServiceStatistics
BODY json

{
  "StartTime": "",
  "EndTime": "",
  "GroupName": "",
  "GroupARN": "",
  "EntitySelectorExpression": "",
  "Period": 0,
  "ForecastStatistics": false,
  "NextToken": ""
}
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/TimeSeriesServiceStatistics");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n  \"StartTime\": \"\",\n  \"EndTime\": \"\",\n  \"GroupName\": \"\",\n  \"GroupARN\": \"\",\n  \"EntitySelectorExpression\": \"\",\n  \"Period\": 0,\n  \"ForecastStatistics\": false,\n  \"NextToken\": \"\"\n}");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/post "{{baseUrl}}/TimeSeriesServiceStatistics" {:content-type :json
                                                                        :form-params {:StartTime ""
                                                                                      :EndTime ""
                                                                                      :GroupName ""
                                                                                      :GroupARN ""
                                                                                      :EntitySelectorExpression ""
                                                                                      :Period 0
                                                                                      :ForecastStatistics false
                                                                                      :NextToken ""}})
require "http/client"

url = "{{baseUrl}}/TimeSeriesServiceStatistics"
headers = HTTP::Headers{
  "content-type" => "application/json"
}
reqBody = "{\n  \"StartTime\": \"\",\n  \"EndTime\": \"\",\n  \"GroupName\": \"\",\n  \"GroupARN\": \"\",\n  \"EntitySelectorExpression\": \"\",\n  \"Period\": 0,\n  \"ForecastStatistics\": false,\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}}/TimeSeriesServiceStatistics"),
    Content = new StringContent("{\n  \"StartTime\": \"\",\n  \"EndTime\": \"\",\n  \"GroupName\": \"\",\n  \"GroupARN\": \"\",\n  \"EntitySelectorExpression\": \"\",\n  \"Period\": 0,\n  \"ForecastStatistics\": false,\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}}/TimeSeriesServiceStatistics");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n  \"StartTime\": \"\",\n  \"EndTime\": \"\",\n  \"GroupName\": \"\",\n  \"GroupARN\": \"\",\n  \"EntitySelectorExpression\": \"\",\n  \"Period\": 0,\n  \"ForecastStatistics\": false,\n  \"NextToken\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/TimeSeriesServiceStatistics"

	payload := strings.NewReader("{\n  \"StartTime\": \"\",\n  \"EndTime\": \"\",\n  \"GroupName\": \"\",\n  \"GroupARN\": \"\",\n  \"EntitySelectorExpression\": \"\",\n  \"Period\": 0,\n  \"ForecastStatistics\": false,\n  \"NextToken\": \"\"\n}")

	req, _ := http.NewRequest("POST", url, payload)

	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/TimeSeriesServiceStatistics HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 174

{
  "StartTime": "",
  "EndTime": "",
  "GroupName": "",
  "GroupARN": "",
  "EntitySelectorExpression": "",
  "Period": 0,
  "ForecastStatistics": false,
  "NextToken": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/TimeSeriesServiceStatistics")
  .setHeader("content-type", "application/json")
  .setBody("{\n  \"StartTime\": \"\",\n  \"EndTime\": \"\",\n  \"GroupName\": \"\",\n  \"GroupARN\": \"\",\n  \"EntitySelectorExpression\": \"\",\n  \"Period\": 0,\n  \"ForecastStatistics\": false,\n  \"NextToken\": \"\"\n}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/TimeSeriesServiceStatistics"))
    .header("content-type", "application/json")
    .method("POST", HttpRequest.BodyPublishers.ofString("{\n  \"StartTime\": \"\",\n  \"EndTime\": \"\",\n  \"GroupName\": \"\",\n  \"GroupARN\": \"\",\n  \"EntitySelectorExpression\": \"\",\n  \"Period\": 0,\n  \"ForecastStatistics\": false,\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  \"StartTime\": \"\",\n  \"EndTime\": \"\",\n  \"GroupName\": \"\",\n  \"GroupARN\": \"\",\n  \"EntitySelectorExpression\": \"\",\n  \"Period\": 0,\n  \"ForecastStatistics\": false,\n  \"NextToken\": \"\"\n}");
Request request = new Request.Builder()
  .url("{{baseUrl}}/TimeSeriesServiceStatistics")
  .post(body)
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/TimeSeriesServiceStatistics")
  .header("content-type", "application/json")
  .body("{\n  \"StartTime\": \"\",\n  \"EndTime\": \"\",\n  \"GroupName\": \"\",\n  \"GroupARN\": \"\",\n  \"EntitySelectorExpression\": \"\",\n  \"Period\": 0,\n  \"ForecastStatistics\": false,\n  \"NextToken\": \"\"\n}")
  .asString();
const data = JSON.stringify({
  StartTime: '',
  EndTime: '',
  GroupName: '',
  GroupARN: '',
  EntitySelectorExpression: '',
  Period: 0,
  ForecastStatistics: false,
  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}}/TimeSeriesServiceStatistics');
xhr.setRequestHeader('content-type', 'application/json');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'POST',
  url: '{{baseUrl}}/TimeSeriesServiceStatistics',
  headers: {'content-type': 'application/json'},
  data: {
    StartTime: '',
    EndTime: '',
    GroupName: '',
    GroupARN: '',
    EntitySelectorExpression: '',
    Period: 0,
    ForecastStatistics: false,
    NextToken: ''
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/TimeSeriesServiceStatistics';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"StartTime":"","EndTime":"","GroupName":"","GroupARN":"","EntitySelectorExpression":"","Period":0,"ForecastStatistics":false,"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}}/TimeSeriesServiceStatistics',
  method: 'POST',
  headers: {
    'content-type': 'application/json'
  },
  processData: false,
  data: '{\n  "StartTime": "",\n  "EndTime": "",\n  "GroupName": "",\n  "GroupARN": "",\n  "EntitySelectorExpression": "",\n  "Period": 0,\n  "ForecastStatistics": false,\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  \"StartTime\": \"\",\n  \"EndTime\": \"\",\n  \"GroupName\": \"\",\n  \"GroupARN\": \"\",\n  \"EntitySelectorExpression\": \"\",\n  \"Period\": 0,\n  \"ForecastStatistics\": false,\n  \"NextToken\": \"\"\n}")
val request = Request.Builder()
  .url("{{baseUrl}}/TimeSeriesServiceStatistics")
  .post(body)
  .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/TimeSeriesServiceStatistics',
  headers: {
    '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({
  StartTime: '',
  EndTime: '',
  GroupName: '',
  GroupARN: '',
  EntitySelectorExpression: '',
  Period: 0,
  ForecastStatistics: false,
  NextToken: ''
}));
req.end();
const request = require('request');

const options = {
  method: 'POST',
  url: '{{baseUrl}}/TimeSeriesServiceStatistics',
  headers: {'content-type': 'application/json'},
  body: {
    StartTime: '',
    EndTime: '',
    GroupName: '',
    GroupARN: '',
    EntitySelectorExpression: '',
    Period: 0,
    ForecastStatistics: false,
    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}}/TimeSeriesServiceStatistics');

req.headers({
  'content-type': 'application/json'
});

req.type('json');
req.send({
  StartTime: '',
  EndTime: '',
  GroupName: '',
  GroupARN: '',
  EntitySelectorExpression: '',
  Period: 0,
  ForecastStatistics: false,
  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}}/TimeSeriesServiceStatistics',
  headers: {'content-type': 'application/json'},
  data: {
    StartTime: '',
    EndTime: '',
    GroupName: '',
    GroupARN: '',
    EntitySelectorExpression: '',
    Period: 0,
    ForecastStatistics: false,
    NextToken: ''
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/TimeSeriesServiceStatistics';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"StartTime":"","EndTime":"","GroupName":"","GroupARN":"","EntitySelectorExpression":"","Period":0,"ForecastStatistics":false,"NextToken":""}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
#import 

NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"StartTime": @"",
                              @"EndTime": @"",
                              @"GroupName": @"",
                              @"GroupARN": @"",
                              @"EntitySelectorExpression": @"",
                              @"Period": @0,
                              @"ForecastStatistics": @NO,
                              @"NextToken": @"" };

NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/TimeSeriesServiceStatistics"]
                                                       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}}/TimeSeriesServiceStatistics" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n  \"StartTime\": \"\",\n  \"EndTime\": \"\",\n  \"GroupName\": \"\",\n  \"GroupARN\": \"\",\n  \"EntitySelectorExpression\": \"\",\n  \"Period\": 0,\n  \"ForecastStatistics\": false,\n  \"NextToken\": \"\"\n}" in

Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/TimeSeriesServiceStatistics",
  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([
    'StartTime' => '',
    'EndTime' => '',
    'GroupName' => '',
    'GroupARN' => '',
    'EntitySelectorExpression' => '',
    'Period' => 0,
    'ForecastStatistics' => null,
    'NextToken' => ''
  ]),
  CURLOPT_HTTPHEADER => [
    "content-type: application/json"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('POST', '{{baseUrl}}/TimeSeriesServiceStatistics', [
  'body' => '{
  "StartTime": "",
  "EndTime": "",
  "GroupName": "",
  "GroupARN": "",
  "EntitySelectorExpression": "",
  "Period": 0,
  "ForecastStatistics": false,
  "NextToken": ""
}',
  'headers' => [
    'content-type' => 'application/json',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/TimeSeriesServiceStatistics');
$request->setMethod(HTTP_METH_POST);

$request->setHeaders([
  'content-type' => 'application/json'
]);

$request->setContentType('application/json');
$request->setBody(json_encode([
  'StartTime' => '',
  'EndTime' => '',
  'GroupName' => '',
  'GroupARN' => '',
  'EntitySelectorExpression' => '',
  'Period' => 0,
  'ForecastStatistics' => null,
  'NextToken' => ''
]));

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
append(json_encode([
  'StartTime' => '',
  'EndTime' => '',
  'GroupName' => '',
  'GroupARN' => '',
  'EntitySelectorExpression' => '',
  'Period' => 0,
  'ForecastStatistics' => null,
  'NextToken' => ''
]));
$request->setRequestUrl('{{baseUrl}}/TimeSeriesServiceStatistics');
$request->setRequestMethod('POST');
$request->setBody($body);

$request->setHeaders([
  'content-type' => 'application/json'
]);

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/TimeSeriesServiceStatistics' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "StartTime": "",
  "EndTime": "",
  "GroupName": "",
  "GroupARN": "",
  "EntitySelectorExpression": "",
  "Period": 0,
  "ForecastStatistics": false,
  "NextToken": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/TimeSeriesServiceStatistics' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "StartTime": "",
  "EndTime": "",
  "GroupName": "",
  "GroupARN": "",
  "EntitySelectorExpression": "",
  "Period": 0,
  "ForecastStatistics": false,
  "NextToken": ""
}'
import http.client

conn = http.client.HTTPSConnection("example.com")

payload = "{\n  \"StartTime\": \"\",\n  \"EndTime\": \"\",\n  \"GroupName\": \"\",\n  \"GroupARN\": \"\",\n  \"EntitySelectorExpression\": \"\",\n  \"Period\": 0,\n  \"ForecastStatistics\": false,\n  \"NextToken\": \"\"\n}"

headers = { 'content-type': "application/json" }

conn.request("POST", "/baseUrl/TimeSeriesServiceStatistics", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/TimeSeriesServiceStatistics"

payload = {
    "StartTime": "",
    "EndTime": "",
    "GroupName": "",
    "GroupARN": "",
    "EntitySelectorExpression": "",
    "Period": 0,
    "ForecastStatistics": False,
    "NextToken": ""
}
headers = {"content-type": "application/json"}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
library(httr)

url <- "{{baseUrl}}/TimeSeriesServiceStatistics"

payload <- "{\n  \"StartTime\": \"\",\n  \"EndTime\": \"\",\n  \"GroupName\": \"\",\n  \"GroupARN\": \"\",\n  \"EntitySelectorExpression\": \"\",\n  \"Period\": 0,\n  \"ForecastStatistics\": false,\n  \"NextToken\": \"\"\n}"

encode <- "json"

response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/TimeSeriesServiceStatistics")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n  \"StartTime\": \"\",\n  \"EndTime\": \"\",\n  \"GroupName\": \"\",\n  \"GroupARN\": \"\",\n  \"EntitySelectorExpression\": \"\",\n  \"Period\": 0,\n  \"ForecastStatistics\": false,\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/TimeSeriesServiceStatistics') do |req|
  req.body = "{\n  \"StartTime\": \"\",\n  \"EndTime\": \"\",\n  \"GroupName\": \"\",\n  \"GroupARN\": \"\",\n  \"EntitySelectorExpression\": \"\",\n  \"Period\": 0,\n  \"ForecastStatistics\": false,\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}}/TimeSeriesServiceStatistics";

    let payload = json!({
        "StartTime": "",
        "EndTime": "",
        "GroupName": "",
        "GroupARN": "",
        "EntitySelectorExpression": "",
        "Period": 0,
        "ForecastStatistics": false,
        "NextToken": ""
    });

    let mut headers = reqwest::header::HeaderMap::new();
    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}}/TimeSeriesServiceStatistics \
  --header 'content-type: application/json' \
  --data '{
  "StartTime": "",
  "EndTime": "",
  "GroupName": "",
  "GroupARN": "",
  "EntitySelectorExpression": "",
  "Period": 0,
  "ForecastStatistics": false,
  "NextToken": ""
}'
echo '{
  "StartTime": "",
  "EndTime": "",
  "GroupName": "",
  "GroupARN": "",
  "EntitySelectorExpression": "",
  "Period": 0,
  "ForecastStatistics": false,
  "NextToken": ""
}' |  \
  http POST {{baseUrl}}/TimeSeriesServiceStatistics \
  content-type:application/json
wget --quiet \
  --method POST \
  --header 'content-type: application/json' \
  --body-data '{\n  "StartTime": "",\n  "EndTime": "",\n  "GroupName": "",\n  "GroupARN": "",\n  "EntitySelectorExpression": "",\n  "Period": 0,\n  "ForecastStatistics": false,\n  "NextToken": ""\n}' \
  --output-document \
  - {{baseUrl}}/TimeSeriesServiceStatistics
import Foundation

let headers = ["content-type": "application/json"]
let parameters = [
  "StartTime": "",
  "EndTime": "",
  "GroupName": "",
  "GroupARN": "",
  "EntitySelectorExpression": "",
  "Period": 0,
  "ForecastStatistics": false,
  "NextToken": ""
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/TimeSeriesServiceStatistics")! 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 GetTraceGraph
{{baseUrl}}/TraceGraph
BODY json

{
  "TraceIds": [],
  "NextToken": ""
}
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/TraceGraph");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n  \"TraceIds\": [],\n  \"NextToken\": \"\"\n}");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/post "{{baseUrl}}/TraceGraph" {:content-type :json
                                                       :form-params {:TraceIds []
                                                                     :NextToken ""}})
require "http/client"

url = "{{baseUrl}}/TraceGraph"
headers = HTTP::Headers{
  "content-type" => "application/json"
}
reqBody = "{\n  \"TraceIds\": [],\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}}/TraceGraph"),
    Content = new StringContent("{\n  \"TraceIds\": [],\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}}/TraceGraph");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n  \"TraceIds\": [],\n  \"NextToken\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/TraceGraph"

	payload := strings.NewReader("{\n  \"TraceIds\": [],\n  \"NextToken\": \"\"\n}")

	req, _ := http.NewRequest("POST", url, payload)

	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/TraceGraph HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 39

{
  "TraceIds": [],
  "NextToken": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/TraceGraph")
  .setHeader("content-type", "application/json")
  .setBody("{\n  \"TraceIds\": [],\n  \"NextToken\": \"\"\n}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/TraceGraph"))
    .header("content-type", "application/json")
    .method("POST", HttpRequest.BodyPublishers.ofString("{\n  \"TraceIds\": [],\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  \"TraceIds\": [],\n  \"NextToken\": \"\"\n}");
Request request = new Request.Builder()
  .url("{{baseUrl}}/TraceGraph")
  .post(body)
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/TraceGraph")
  .header("content-type", "application/json")
  .body("{\n  \"TraceIds\": [],\n  \"NextToken\": \"\"\n}")
  .asString();
const data = JSON.stringify({
  TraceIds: [],
  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}}/TraceGraph');
xhr.setRequestHeader('content-type', 'application/json');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'POST',
  url: '{{baseUrl}}/TraceGraph',
  headers: {'content-type': 'application/json'},
  data: {TraceIds: [], NextToken: ''}
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/TraceGraph';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"TraceIds":[],"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}}/TraceGraph',
  method: 'POST',
  headers: {
    'content-type': 'application/json'
  },
  processData: false,
  data: '{\n  "TraceIds": [],\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  \"TraceIds\": [],\n  \"NextToken\": \"\"\n}")
val request = Request.Builder()
  .url("{{baseUrl}}/TraceGraph")
  .post(body)
  .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/TraceGraph',
  headers: {
    '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({TraceIds: [], NextToken: ''}));
req.end();
const request = require('request');

const options = {
  method: 'POST',
  url: '{{baseUrl}}/TraceGraph',
  headers: {'content-type': 'application/json'},
  body: {TraceIds: [], 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}}/TraceGraph');

req.headers({
  'content-type': 'application/json'
});

req.type('json');
req.send({
  TraceIds: [],
  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}}/TraceGraph',
  headers: {'content-type': 'application/json'},
  data: {TraceIds: [], NextToken: ''}
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/TraceGraph';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"TraceIds":[],"NextToken":""}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
#import 

NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"TraceIds": @[  ],
                              @"NextToken": @"" };

NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/TraceGraph"]
                                                       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}}/TraceGraph" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n  \"TraceIds\": [],\n  \"NextToken\": \"\"\n}" in

Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/TraceGraph",
  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([
    'TraceIds' => [
        
    ],
    'NextToken' => ''
  ]),
  CURLOPT_HTTPHEADER => [
    "content-type: application/json"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('POST', '{{baseUrl}}/TraceGraph', [
  'body' => '{
  "TraceIds": [],
  "NextToken": ""
}',
  'headers' => [
    'content-type' => 'application/json',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/TraceGraph');
$request->setMethod(HTTP_METH_POST);

$request->setHeaders([
  'content-type' => 'application/json'
]);

$request->setContentType('application/json');
$request->setBody(json_encode([
  'TraceIds' => [
    
  ],
  'NextToken' => ''
]));

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
append(json_encode([
  'TraceIds' => [
    
  ],
  'NextToken' => ''
]));
$request->setRequestUrl('{{baseUrl}}/TraceGraph');
$request->setRequestMethod('POST');
$request->setBody($body);

$request->setHeaders([
  'content-type' => 'application/json'
]);

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/TraceGraph' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "TraceIds": [],
  "NextToken": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/TraceGraph' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "TraceIds": [],
  "NextToken": ""
}'
import http.client

conn = http.client.HTTPSConnection("example.com")

payload = "{\n  \"TraceIds\": [],\n  \"NextToken\": \"\"\n}"

headers = { 'content-type': "application/json" }

conn.request("POST", "/baseUrl/TraceGraph", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/TraceGraph"

payload = {
    "TraceIds": [],
    "NextToken": ""
}
headers = {"content-type": "application/json"}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
library(httr)

url <- "{{baseUrl}}/TraceGraph"

payload <- "{\n  \"TraceIds\": [],\n  \"NextToken\": \"\"\n}"

encode <- "json"

response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/TraceGraph")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n  \"TraceIds\": [],\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/TraceGraph') do |req|
  req.body = "{\n  \"TraceIds\": [],\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}}/TraceGraph";

    let payload = json!({
        "TraceIds": (),
        "NextToken": ""
    });

    let mut headers = reqwest::header::HeaderMap::new();
    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}}/TraceGraph \
  --header 'content-type: application/json' \
  --data '{
  "TraceIds": [],
  "NextToken": ""
}'
echo '{
  "TraceIds": [],
  "NextToken": ""
}' |  \
  http POST {{baseUrl}}/TraceGraph \
  content-type:application/json
wget --quiet \
  --method POST \
  --header 'content-type: application/json' \
  --body-data '{\n  "TraceIds": [],\n  "NextToken": ""\n}' \
  --output-document \
  - {{baseUrl}}/TraceGraph
import Foundation

let headers = ["content-type": "application/json"]
let parameters = [
  "TraceIds": [],
  "NextToken": ""
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/TraceGraph")! 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 GetTraceSummaries
{{baseUrl}}/TraceSummaries
BODY json

{
  "StartTime": "",
  "EndTime": "",
  "TimeRangeType": "",
  "Sampling": false,
  "SamplingStrategy": {
    "Name": "",
    "Value": ""
  },
  "FilterExpression": "",
  "NextToken": ""
}
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/TraceSummaries");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n  \"StartTime\": \"\",\n  \"EndTime\": \"\",\n  \"TimeRangeType\": \"\",\n  \"Sampling\": false,\n  \"SamplingStrategy\": {\n    \"Name\": \"\",\n    \"Value\": \"\"\n  },\n  \"FilterExpression\": \"\",\n  \"NextToken\": \"\"\n}");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/post "{{baseUrl}}/TraceSummaries" {:content-type :json
                                                           :form-params {:StartTime ""
                                                                         :EndTime ""
                                                                         :TimeRangeType ""
                                                                         :Sampling false
                                                                         :SamplingStrategy {:Name ""
                                                                                            :Value ""}
                                                                         :FilterExpression ""
                                                                         :NextToken ""}})
require "http/client"

url = "{{baseUrl}}/TraceSummaries"
headers = HTTP::Headers{
  "content-type" => "application/json"
}
reqBody = "{\n  \"StartTime\": \"\",\n  \"EndTime\": \"\",\n  \"TimeRangeType\": \"\",\n  \"Sampling\": false,\n  \"SamplingStrategy\": {\n    \"Name\": \"\",\n    \"Value\": \"\"\n  },\n  \"FilterExpression\": \"\",\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}}/TraceSummaries"),
    Content = new StringContent("{\n  \"StartTime\": \"\",\n  \"EndTime\": \"\",\n  \"TimeRangeType\": \"\",\n  \"Sampling\": false,\n  \"SamplingStrategy\": {\n    \"Name\": \"\",\n    \"Value\": \"\"\n  },\n  \"FilterExpression\": \"\",\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}}/TraceSummaries");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n  \"StartTime\": \"\",\n  \"EndTime\": \"\",\n  \"TimeRangeType\": \"\",\n  \"Sampling\": false,\n  \"SamplingStrategy\": {\n    \"Name\": \"\",\n    \"Value\": \"\"\n  },\n  \"FilterExpression\": \"\",\n  \"NextToken\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/TraceSummaries"

	payload := strings.NewReader("{\n  \"StartTime\": \"\",\n  \"EndTime\": \"\",\n  \"TimeRangeType\": \"\",\n  \"Sampling\": false,\n  \"SamplingStrategy\": {\n    \"Name\": \"\",\n    \"Value\": \"\"\n  },\n  \"FilterExpression\": \"\",\n  \"NextToken\": \"\"\n}")

	req, _ := http.NewRequest("POST", url, payload)

	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/TraceSummaries HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 188

{
  "StartTime": "",
  "EndTime": "",
  "TimeRangeType": "",
  "Sampling": false,
  "SamplingStrategy": {
    "Name": "",
    "Value": ""
  },
  "FilterExpression": "",
  "NextToken": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/TraceSummaries")
  .setHeader("content-type", "application/json")
  .setBody("{\n  \"StartTime\": \"\",\n  \"EndTime\": \"\",\n  \"TimeRangeType\": \"\",\n  \"Sampling\": false,\n  \"SamplingStrategy\": {\n    \"Name\": \"\",\n    \"Value\": \"\"\n  },\n  \"FilterExpression\": \"\",\n  \"NextToken\": \"\"\n}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/TraceSummaries"))
    .header("content-type", "application/json")
    .method("POST", HttpRequest.BodyPublishers.ofString("{\n  \"StartTime\": \"\",\n  \"EndTime\": \"\",\n  \"TimeRangeType\": \"\",\n  \"Sampling\": false,\n  \"SamplingStrategy\": {\n    \"Name\": \"\",\n    \"Value\": \"\"\n  },\n  \"FilterExpression\": \"\",\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  \"StartTime\": \"\",\n  \"EndTime\": \"\",\n  \"TimeRangeType\": \"\",\n  \"Sampling\": false,\n  \"SamplingStrategy\": {\n    \"Name\": \"\",\n    \"Value\": \"\"\n  },\n  \"FilterExpression\": \"\",\n  \"NextToken\": \"\"\n}");
Request request = new Request.Builder()
  .url("{{baseUrl}}/TraceSummaries")
  .post(body)
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/TraceSummaries")
  .header("content-type", "application/json")
  .body("{\n  \"StartTime\": \"\",\n  \"EndTime\": \"\",\n  \"TimeRangeType\": \"\",\n  \"Sampling\": false,\n  \"SamplingStrategy\": {\n    \"Name\": \"\",\n    \"Value\": \"\"\n  },\n  \"FilterExpression\": \"\",\n  \"NextToken\": \"\"\n}")
  .asString();
const data = JSON.stringify({
  StartTime: '',
  EndTime: '',
  TimeRangeType: '',
  Sampling: false,
  SamplingStrategy: {
    Name: '',
    Value: ''
  },
  FilterExpression: '',
  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}}/TraceSummaries');
xhr.setRequestHeader('content-type', 'application/json');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'POST',
  url: '{{baseUrl}}/TraceSummaries',
  headers: {'content-type': 'application/json'},
  data: {
    StartTime: '',
    EndTime: '',
    TimeRangeType: '',
    Sampling: false,
    SamplingStrategy: {Name: '', Value: ''},
    FilterExpression: '',
    NextToken: ''
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/TraceSummaries';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"StartTime":"","EndTime":"","TimeRangeType":"","Sampling":false,"SamplingStrategy":{"Name":"","Value":""},"FilterExpression":"","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}}/TraceSummaries',
  method: 'POST',
  headers: {
    'content-type': 'application/json'
  },
  processData: false,
  data: '{\n  "StartTime": "",\n  "EndTime": "",\n  "TimeRangeType": "",\n  "Sampling": false,\n  "SamplingStrategy": {\n    "Name": "",\n    "Value": ""\n  },\n  "FilterExpression": "",\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  \"StartTime\": \"\",\n  \"EndTime\": \"\",\n  \"TimeRangeType\": \"\",\n  \"Sampling\": false,\n  \"SamplingStrategy\": {\n    \"Name\": \"\",\n    \"Value\": \"\"\n  },\n  \"FilterExpression\": \"\",\n  \"NextToken\": \"\"\n}")
val request = Request.Builder()
  .url("{{baseUrl}}/TraceSummaries")
  .post(body)
  .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/TraceSummaries',
  headers: {
    '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({
  StartTime: '',
  EndTime: '',
  TimeRangeType: '',
  Sampling: false,
  SamplingStrategy: {Name: '', Value: ''},
  FilterExpression: '',
  NextToken: ''
}));
req.end();
const request = require('request');

const options = {
  method: 'POST',
  url: '{{baseUrl}}/TraceSummaries',
  headers: {'content-type': 'application/json'},
  body: {
    StartTime: '',
    EndTime: '',
    TimeRangeType: '',
    Sampling: false,
    SamplingStrategy: {Name: '', Value: ''},
    FilterExpression: '',
    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}}/TraceSummaries');

req.headers({
  'content-type': 'application/json'
});

req.type('json');
req.send({
  StartTime: '',
  EndTime: '',
  TimeRangeType: '',
  Sampling: false,
  SamplingStrategy: {
    Name: '',
    Value: ''
  },
  FilterExpression: '',
  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}}/TraceSummaries',
  headers: {'content-type': 'application/json'},
  data: {
    StartTime: '',
    EndTime: '',
    TimeRangeType: '',
    Sampling: false,
    SamplingStrategy: {Name: '', Value: ''},
    FilterExpression: '',
    NextToken: ''
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/TraceSummaries';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"StartTime":"","EndTime":"","TimeRangeType":"","Sampling":false,"SamplingStrategy":{"Name":"","Value":""},"FilterExpression":"","NextToken":""}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
#import 

NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"StartTime": @"",
                              @"EndTime": @"",
                              @"TimeRangeType": @"",
                              @"Sampling": @NO,
                              @"SamplingStrategy": @{ @"Name": @"", @"Value": @"" },
                              @"FilterExpression": @"",
                              @"NextToken": @"" };

NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/TraceSummaries"]
                                                       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}}/TraceSummaries" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n  \"StartTime\": \"\",\n  \"EndTime\": \"\",\n  \"TimeRangeType\": \"\",\n  \"Sampling\": false,\n  \"SamplingStrategy\": {\n    \"Name\": \"\",\n    \"Value\": \"\"\n  },\n  \"FilterExpression\": \"\",\n  \"NextToken\": \"\"\n}" in

Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/TraceSummaries",
  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([
    'StartTime' => '',
    'EndTime' => '',
    'TimeRangeType' => '',
    'Sampling' => null,
    'SamplingStrategy' => [
        'Name' => '',
        'Value' => ''
    ],
    'FilterExpression' => '',
    'NextToken' => ''
  ]),
  CURLOPT_HTTPHEADER => [
    "content-type: application/json"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('POST', '{{baseUrl}}/TraceSummaries', [
  'body' => '{
  "StartTime": "",
  "EndTime": "",
  "TimeRangeType": "",
  "Sampling": false,
  "SamplingStrategy": {
    "Name": "",
    "Value": ""
  },
  "FilterExpression": "",
  "NextToken": ""
}',
  'headers' => [
    'content-type' => 'application/json',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/TraceSummaries');
$request->setMethod(HTTP_METH_POST);

$request->setHeaders([
  'content-type' => 'application/json'
]);

$request->setContentType('application/json');
$request->setBody(json_encode([
  'StartTime' => '',
  'EndTime' => '',
  'TimeRangeType' => '',
  'Sampling' => null,
  'SamplingStrategy' => [
    'Name' => '',
    'Value' => ''
  ],
  'FilterExpression' => '',
  'NextToken' => ''
]));

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
append(json_encode([
  'StartTime' => '',
  'EndTime' => '',
  'TimeRangeType' => '',
  'Sampling' => null,
  'SamplingStrategy' => [
    'Name' => '',
    'Value' => ''
  ],
  'FilterExpression' => '',
  'NextToken' => ''
]));
$request->setRequestUrl('{{baseUrl}}/TraceSummaries');
$request->setRequestMethod('POST');
$request->setBody($body);

$request->setHeaders([
  'content-type' => 'application/json'
]);

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/TraceSummaries' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "StartTime": "",
  "EndTime": "",
  "TimeRangeType": "",
  "Sampling": false,
  "SamplingStrategy": {
    "Name": "",
    "Value": ""
  },
  "FilterExpression": "",
  "NextToken": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/TraceSummaries' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "StartTime": "",
  "EndTime": "",
  "TimeRangeType": "",
  "Sampling": false,
  "SamplingStrategy": {
    "Name": "",
    "Value": ""
  },
  "FilterExpression": "",
  "NextToken": ""
}'
import http.client

conn = http.client.HTTPSConnection("example.com")

payload = "{\n  \"StartTime\": \"\",\n  \"EndTime\": \"\",\n  \"TimeRangeType\": \"\",\n  \"Sampling\": false,\n  \"SamplingStrategy\": {\n    \"Name\": \"\",\n    \"Value\": \"\"\n  },\n  \"FilterExpression\": \"\",\n  \"NextToken\": \"\"\n}"

headers = { 'content-type': "application/json" }

conn.request("POST", "/baseUrl/TraceSummaries", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/TraceSummaries"

payload = {
    "StartTime": "",
    "EndTime": "",
    "TimeRangeType": "",
    "Sampling": False,
    "SamplingStrategy": {
        "Name": "",
        "Value": ""
    },
    "FilterExpression": "",
    "NextToken": ""
}
headers = {"content-type": "application/json"}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
library(httr)

url <- "{{baseUrl}}/TraceSummaries"

payload <- "{\n  \"StartTime\": \"\",\n  \"EndTime\": \"\",\n  \"TimeRangeType\": \"\",\n  \"Sampling\": false,\n  \"SamplingStrategy\": {\n    \"Name\": \"\",\n    \"Value\": \"\"\n  },\n  \"FilterExpression\": \"\",\n  \"NextToken\": \"\"\n}"

encode <- "json"

response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/TraceSummaries")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n  \"StartTime\": \"\",\n  \"EndTime\": \"\",\n  \"TimeRangeType\": \"\",\n  \"Sampling\": false,\n  \"SamplingStrategy\": {\n    \"Name\": \"\",\n    \"Value\": \"\"\n  },\n  \"FilterExpression\": \"\",\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/TraceSummaries') do |req|
  req.body = "{\n  \"StartTime\": \"\",\n  \"EndTime\": \"\",\n  \"TimeRangeType\": \"\",\n  \"Sampling\": false,\n  \"SamplingStrategy\": {\n    \"Name\": \"\",\n    \"Value\": \"\"\n  },\n  \"FilterExpression\": \"\",\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}}/TraceSummaries";

    let payload = json!({
        "StartTime": "",
        "EndTime": "",
        "TimeRangeType": "",
        "Sampling": false,
        "SamplingStrategy": json!({
            "Name": "",
            "Value": ""
        }),
        "FilterExpression": "",
        "NextToken": ""
    });

    let mut headers = reqwest::header::HeaderMap::new();
    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}}/TraceSummaries \
  --header 'content-type: application/json' \
  --data '{
  "StartTime": "",
  "EndTime": "",
  "TimeRangeType": "",
  "Sampling": false,
  "SamplingStrategy": {
    "Name": "",
    "Value": ""
  },
  "FilterExpression": "",
  "NextToken": ""
}'
echo '{
  "StartTime": "",
  "EndTime": "",
  "TimeRangeType": "",
  "Sampling": false,
  "SamplingStrategy": {
    "Name": "",
    "Value": ""
  },
  "FilterExpression": "",
  "NextToken": ""
}' |  \
  http POST {{baseUrl}}/TraceSummaries \
  content-type:application/json
wget --quiet \
  --method POST \
  --header 'content-type: application/json' \
  --body-data '{\n  "StartTime": "",\n  "EndTime": "",\n  "TimeRangeType": "",\n  "Sampling": false,\n  "SamplingStrategy": {\n    "Name": "",\n    "Value": ""\n  },\n  "FilterExpression": "",\n  "NextToken": ""\n}' \
  --output-document \
  - {{baseUrl}}/TraceSummaries
import Foundation

let headers = ["content-type": "application/json"]
let parameters = [
  "StartTime": "",
  "EndTime": "",
  "TimeRangeType": "",
  "Sampling": false,
  "SamplingStrategy": [
    "Name": "",
    "Value": ""
  ],
  "FilterExpression": "",
  "NextToken": ""
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/TraceSummaries")! 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 ListResourcePolicies
{{baseUrl}}/ListResourcePolicies
BODY json

{
  "NextToken": ""
}
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/ListResourcePolicies");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n  \"NextToken\": \"\"\n}");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/post "{{baseUrl}}/ListResourcePolicies" {:content-type :json
                                                                 :form-params {:NextToken ""}})
require "http/client"

url = "{{baseUrl}}/ListResourcePolicies"
headers = HTTP::Headers{
  "content-type" => "application/json"
}
reqBody = "{\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}}/ListResourcePolicies"),
    Content = new StringContent("{\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}}/ListResourcePolicies");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n  \"NextToken\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/ListResourcePolicies"

	payload := strings.NewReader("{\n  \"NextToken\": \"\"\n}")

	req, _ := http.NewRequest("POST", url, payload)

	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/ListResourcePolicies HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 21

{
  "NextToken": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/ListResourcePolicies")
  .setHeader("content-type", "application/json")
  .setBody("{\n  \"NextToken\": \"\"\n}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/ListResourcePolicies"))
    .header("content-type", "application/json")
    .method("POST", HttpRequest.BodyPublishers.ofString("{\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  \"NextToken\": \"\"\n}");
Request request = new Request.Builder()
  .url("{{baseUrl}}/ListResourcePolicies")
  .post(body)
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/ListResourcePolicies")
  .header("content-type", "application/json")
  .body("{\n  \"NextToken\": \"\"\n}")
  .asString();
const data = JSON.stringify({
  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}}/ListResourcePolicies');
xhr.setRequestHeader('content-type', 'application/json');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'POST',
  url: '{{baseUrl}}/ListResourcePolicies',
  headers: {'content-type': 'application/json'},
  data: {NextToken: ''}
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/ListResourcePolicies';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"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}}/ListResourcePolicies',
  method: 'POST',
  headers: {
    'content-type': 'application/json'
  },
  processData: false,
  data: '{\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  \"NextToken\": \"\"\n}")
val request = Request.Builder()
  .url("{{baseUrl}}/ListResourcePolicies")
  .post(body)
  .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/ListResourcePolicies',
  headers: {
    '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({NextToken: ''}));
req.end();
const request = require('request');

const options = {
  method: 'POST',
  url: '{{baseUrl}}/ListResourcePolicies',
  headers: {'content-type': 'application/json'},
  body: {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}}/ListResourcePolicies');

req.headers({
  'content-type': 'application/json'
});

req.type('json');
req.send({
  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}}/ListResourcePolicies',
  headers: {'content-type': 'application/json'},
  data: {NextToken: ''}
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/ListResourcePolicies';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"NextToken":""}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
#import 

NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"NextToken": @"" };

NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/ListResourcePolicies"]
                                                       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}}/ListResourcePolicies" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n  \"NextToken\": \"\"\n}" in

Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/ListResourcePolicies",
  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([
    'NextToken' => ''
  ]),
  CURLOPT_HTTPHEADER => [
    "content-type: application/json"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('POST', '{{baseUrl}}/ListResourcePolicies', [
  'body' => '{
  "NextToken": ""
}',
  'headers' => [
    'content-type' => 'application/json',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/ListResourcePolicies');
$request->setMethod(HTTP_METH_POST);

$request->setHeaders([
  'content-type' => 'application/json'
]);

$request->setContentType('application/json');
$request->setBody(json_encode([
  'NextToken' => ''
]));

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
append(json_encode([
  'NextToken' => ''
]));
$request->setRequestUrl('{{baseUrl}}/ListResourcePolicies');
$request->setRequestMethod('POST');
$request->setBody($body);

$request->setHeaders([
  'content-type' => 'application/json'
]);

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/ListResourcePolicies' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "NextToken": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/ListResourcePolicies' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "NextToken": ""
}'
import http.client

conn = http.client.HTTPSConnection("example.com")

payload = "{\n  \"NextToken\": \"\"\n}"

headers = { 'content-type': "application/json" }

conn.request("POST", "/baseUrl/ListResourcePolicies", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/ListResourcePolicies"

payload = { "NextToken": "" }
headers = {"content-type": "application/json"}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
library(httr)

url <- "{{baseUrl}}/ListResourcePolicies"

payload <- "{\n  \"NextToken\": \"\"\n}"

encode <- "json"

response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/ListResourcePolicies")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\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/ListResourcePolicies') do |req|
  req.body = "{\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}}/ListResourcePolicies";

    let payload = json!({"NextToken": ""});

    let mut headers = reqwest::header::HeaderMap::new();
    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}}/ListResourcePolicies \
  --header 'content-type: application/json' \
  --data '{
  "NextToken": ""
}'
echo '{
  "NextToken": ""
}' |  \
  http POST {{baseUrl}}/ListResourcePolicies \
  content-type:application/json
wget --quiet \
  --method POST \
  --header 'content-type: application/json' \
  --body-data '{\n  "NextToken": ""\n}' \
  --output-document \
  - {{baseUrl}}/ListResourcePolicies
import Foundation

let headers = ["content-type": "application/json"]
let parameters = ["NextToken": ""] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/ListResourcePolicies")! 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 ListTagsForResource
{{baseUrl}}/ListTagsForResource
BODY json

{
  "ResourceARN": "",
  "NextToken": ""
}
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/ListTagsForResource");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n  \"ResourceARN\": \"\",\n  \"NextToken\": \"\"\n}");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/post "{{baseUrl}}/ListTagsForResource" {:content-type :json
                                                                :form-params {:ResourceARN ""
                                                                              :NextToken ""}})
require "http/client"

url = "{{baseUrl}}/ListTagsForResource"
headers = HTTP::Headers{
  "content-type" => "application/json"
}
reqBody = "{\n  \"ResourceARN\": \"\",\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}}/ListTagsForResource"),
    Content = new StringContent("{\n  \"ResourceARN\": \"\",\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}}/ListTagsForResource");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n  \"ResourceARN\": \"\",\n  \"NextToken\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/ListTagsForResource"

	payload := strings.NewReader("{\n  \"ResourceARN\": \"\",\n  \"NextToken\": \"\"\n}")

	req, _ := http.NewRequest("POST", url, payload)

	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/ListTagsForResource HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 42

{
  "ResourceARN": "",
  "NextToken": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/ListTagsForResource")
  .setHeader("content-type", "application/json")
  .setBody("{\n  \"ResourceARN\": \"\",\n  \"NextToken\": \"\"\n}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/ListTagsForResource"))
    .header("content-type", "application/json")
    .method("POST", HttpRequest.BodyPublishers.ofString("{\n  \"ResourceARN\": \"\",\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  \"ResourceARN\": \"\",\n  \"NextToken\": \"\"\n}");
Request request = new Request.Builder()
  .url("{{baseUrl}}/ListTagsForResource")
  .post(body)
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/ListTagsForResource")
  .header("content-type", "application/json")
  .body("{\n  \"ResourceARN\": \"\",\n  \"NextToken\": \"\"\n}")
  .asString();
const data = JSON.stringify({
  ResourceARN: '',
  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}}/ListTagsForResource');
xhr.setRequestHeader('content-type', 'application/json');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'POST',
  url: '{{baseUrl}}/ListTagsForResource',
  headers: {'content-type': 'application/json'},
  data: {ResourceARN: '', NextToken: ''}
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/ListTagsForResource';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"ResourceARN":"","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}}/ListTagsForResource',
  method: 'POST',
  headers: {
    'content-type': 'application/json'
  },
  processData: false,
  data: '{\n  "ResourceARN": "",\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  \"ResourceARN\": \"\",\n  \"NextToken\": \"\"\n}")
val request = Request.Builder()
  .url("{{baseUrl}}/ListTagsForResource")
  .post(body)
  .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/ListTagsForResource',
  headers: {
    '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({ResourceARN: '', NextToken: ''}));
req.end();
const request = require('request');

const options = {
  method: 'POST',
  url: '{{baseUrl}}/ListTagsForResource',
  headers: {'content-type': 'application/json'},
  body: {ResourceARN: '', 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}}/ListTagsForResource');

req.headers({
  'content-type': 'application/json'
});

req.type('json');
req.send({
  ResourceARN: '',
  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}}/ListTagsForResource',
  headers: {'content-type': 'application/json'},
  data: {ResourceARN: '', NextToken: ''}
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/ListTagsForResource';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"ResourceARN":"","NextToken":""}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
#import 

NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"ResourceARN": @"",
                              @"NextToken": @"" };

NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/ListTagsForResource"]
                                                       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}}/ListTagsForResource" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n  \"ResourceARN\": \"\",\n  \"NextToken\": \"\"\n}" in

Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/ListTagsForResource",
  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([
    'ResourceARN' => '',
    'NextToken' => ''
  ]),
  CURLOPT_HTTPHEADER => [
    "content-type: application/json"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('POST', '{{baseUrl}}/ListTagsForResource', [
  'body' => '{
  "ResourceARN": "",
  "NextToken": ""
}',
  'headers' => [
    'content-type' => 'application/json',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/ListTagsForResource');
$request->setMethod(HTTP_METH_POST);

$request->setHeaders([
  'content-type' => 'application/json'
]);

$request->setContentType('application/json');
$request->setBody(json_encode([
  'ResourceARN' => '',
  'NextToken' => ''
]));

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
append(json_encode([
  'ResourceARN' => '',
  'NextToken' => ''
]));
$request->setRequestUrl('{{baseUrl}}/ListTagsForResource');
$request->setRequestMethod('POST');
$request->setBody($body);

$request->setHeaders([
  'content-type' => 'application/json'
]);

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/ListTagsForResource' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "ResourceARN": "",
  "NextToken": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/ListTagsForResource' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "ResourceARN": "",
  "NextToken": ""
}'
import http.client

conn = http.client.HTTPSConnection("example.com")

payload = "{\n  \"ResourceARN\": \"\",\n  \"NextToken\": \"\"\n}"

headers = { 'content-type': "application/json" }

conn.request("POST", "/baseUrl/ListTagsForResource", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/ListTagsForResource"

payload = {
    "ResourceARN": "",
    "NextToken": ""
}
headers = {"content-type": "application/json"}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
library(httr)

url <- "{{baseUrl}}/ListTagsForResource"

payload <- "{\n  \"ResourceARN\": \"\",\n  \"NextToken\": \"\"\n}"

encode <- "json"

response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/ListTagsForResource")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n  \"ResourceARN\": \"\",\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/ListTagsForResource') do |req|
  req.body = "{\n  \"ResourceARN\": \"\",\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}}/ListTagsForResource";

    let payload = json!({
        "ResourceARN": "",
        "NextToken": ""
    });

    let mut headers = reqwest::header::HeaderMap::new();
    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}}/ListTagsForResource \
  --header 'content-type: application/json' \
  --data '{
  "ResourceARN": "",
  "NextToken": ""
}'
echo '{
  "ResourceARN": "",
  "NextToken": ""
}' |  \
  http POST {{baseUrl}}/ListTagsForResource \
  content-type:application/json
wget --quiet \
  --method POST \
  --header 'content-type: application/json' \
  --body-data '{\n  "ResourceARN": "",\n  "NextToken": ""\n}' \
  --output-document \
  - {{baseUrl}}/ListTagsForResource
import Foundation

let headers = ["content-type": "application/json"]
let parameters = [
  "ResourceARN": "",
  "NextToken": ""
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/ListTagsForResource")! 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 PutEncryptionConfig
{{baseUrl}}/PutEncryptionConfig
BODY json

{
  "KeyId": "",
  "Type": ""
}
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/PutEncryptionConfig");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n  \"KeyId\": \"\",\n  \"Type\": \"\"\n}");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/post "{{baseUrl}}/PutEncryptionConfig" {:content-type :json
                                                                :form-params {:KeyId ""
                                                                              :Type ""}})
require "http/client"

url = "{{baseUrl}}/PutEncryptionConfig"
headers = HTTP::Headers{
  "content-type" => "application/json"
}
reqBody = "{\n  \"KeyId\": \"\",\n  \"Type\": \"\"\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}}/PutEncryptionConfig"),
    Content = new StringContent("{\n  \"KeyId\": \"\",\n  \"Type\": \"\"\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}}/PutEncryptionConfig");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n  \"KeyId\": \"\",\n  \"Type\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/PutEncryptionConfig"

	payload := strings.NewReader("{\n  \"KeyId\": \"\",\n  \"Type\": \"\"\n}")

	req, _ := http.NewRequest("POST", url, payload)

	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/PutEncryptionConfig HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 31

{
  "KeyId": "",
  "Type": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/PutEncryptionConfig")
  .setHeader("content-type", "application/json")
  .setBody("{\n  \"KeyId\": \"\",\n  \"Type\": \"\"\n}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/PutEncryptionConfig"))
    .header("content-type", "application/json")
    .method("POST", HttpRequest.BodyPublishers.ofString("{\n  \"KeyId\": \"\",\n  \"Type\": \"\"\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  \"KeyId\": \"\",\n  \"Type\": \"\"\n}");
Request request = new Request.Builder()
  .url("{{baseUrl}}/PutEncryptionConfig")
  .post(body)
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/PutEncryptionConfig")
  .header("content-type", "application/json")
  .body("{\n  \"KeyId\": \"\",\n  \"Type\": \"\"\n}")
  .asString();
const data = JSON.stringify({
  KeyId: '',
  Type: ''
});

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener('readystatechange', function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open('POST', '{{baseUrl}}/PutEncryptionConfig');
xhr.setRequestHeader('content-type', 'application/json');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'POST',
  url: '{{baseUrl}}/PutEncryptionConfig',
  headers: {'content-type': 'application/json'},
  data: {KeyId: '', Type: ''}
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/PutEncryptionConfig';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"KeyId":"","Type":""}'
};

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}}/PutEncryptionConfig',
  method: 'POST',
  headers: {
    'content-type': 'application/json'
  },
  processData: false,
  data: '{\n  "KeyId": "",\n  "Type": ""\n}'
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n  \"KeyId\": \"\",\n  \"Type\": \"\"\n}")
val request = Request.Builder()
  .url("{{baseUrl}}/PutEncryptionConfig")
  .post(body)
  .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/PutEncryptionConfig',
  headers: {
    '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({KeyId: '', Type: ''}));
req.end();
const request = require('request');

const options = {
  method: 'POST',
  url: '{{baseUrl}}/PutEncryptionConfig',
  headers: {'content-type': 'application/json'},
  body: {KeyId: '', Type: ''},
  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}}/PutEncryptionConfig');

req.headers({
  'content-type': 'application/json'
});

req.type('json');
req.send({
  KeyId: '',
  Type: ''
});

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}}/PutEncryptionConfig',
  headers: {'content-type': 'application/json'},
  data: {KeyId: '', Type: ''}
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/PutEncryptionConfig';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"KeyId":"","Type":""}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
#import 

NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"KeyId": @"",
                              @"Type": @"" };

NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/PutEncryptionConfig"]
                                                       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}}/PutEncryptionConfig" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n  \"KeyId\": \"\",\n  \"Type\": \"\"\n}" in

Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/PutEncryptionConfig",
  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([
    'KeyId' => '',
    'Type' => ''
  ]),
  CURLOPT_HTTPHEADER => [
    "content-type: application/json"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('POST', '{{baseUrl}}/PutEncryptionConfig', [
  'body' => '{
  "KeyId": "",
  "Type": ""
}',
  'headers' => [
    'content-type' => 'application/json',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/PutEncryptionConfig');
$request->setMethod(HTTP_METH_POST);

$request->setHeaders([
  'content-type' => 'application/json'
]);

$request->setContentType('application/json');
$request->setBody(json_encode([
  'KeyId' => '',
  'Type' => ''
]));

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
append(json_encode([
  'KeyId' => '',
  'Type' => ''
]));
$request->setRequestUrl('{{baseUrl}}/PutEncryptionConfig');
$request->setRequestMethod('POST');
$request->setBody($body);

$request->setHeaders([
  'content-type' => 'application/json'
]);

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/PutEncryptionConfig' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "KeyId": "",
  "Type": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/PutEncryptionConfig' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "KeyId": "",
  "Type": ""
}'
import http.client

conn = http.client.HTTPSConnection("example.com")

payload = "{\n  \"KeyId\": \"\",\n  \"Type\": \"\"\n}"

headers = { 'content-type': "application/json" }

conn.request("POST", "/baseUrl/PutEncryptionConfig", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/PutEncryptionConfig"

payload = {
    "KeyId": "",
    "Type": ""
}
headers = {"content-type": "application/json"}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
library(httr)

url <- "{{baseUrl}}/PutEncryptionConfig"

payload <- "{\n  \"KeyId\": \"\",\n  \"Type\": \"\"\n}"

encode <- "json"

response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/PutEncryptionConfig")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n  \"KeyId\": \"\",\n  \"Type\": \"\"\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/PutEncryptionConfig') do |req|
  req.body = "{\n  \"KeyId\": \"\",\n  \"Type\": \"\"\n}"
end

puts response.status
puts response.body
use serde_json::json;
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/PutEncryptionConfig";

    let payload = json!({
        "KeyId": "",
        "Type": ""
    });

    let mut headers = reqwest::header::HeaderMap::new();
    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}}/PutEncryptionConfig \
  --header 'content-type: application/json' \
  --data '{
  "KeyId": "",
  "Type": ""
}'
echo '{
  "KeyId": "",
  "Type": ""
}' |  \
  http POST {{baseUrl}}/PutEncryptionConfig \
  content-type:application/json
wget --quiet \
  --method POST \
  --header 'content-type: application/json' \
  --body-data '{\n  "KeyId": "",\n  "Type": ""\n}' \
  --output-document \
  - {{baseUrl}}/PutEncryptionConfig
import Foundation

let headers = ["content-type": "application/json"]
let parameters = [
  "KeyId": "",
  "Type": ""
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/PutEncryptionConfig")! 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 PutResourcePolicy
{{baseUrl}}/PutResourcePolicy
BODY json

{
  "PolicyName": "",
  "PolicyDocument": "",
  "PolicyRevisionId": "",
  "BypassPolicyLockoutCheck": false
}
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/PutResourcePolicy");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n  \"PolicyName\": \"\",\n  \"PolicyDocument\": \"\",\n  \"PolicyRevisionId\": \"\",\n  \"BypassPolicyLockoutCheck\": false\n}");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/post "{{baseUrl}}/PutResourcePolicy" {:content-type :json
                                                              :form-params {:PolicyName ""
                                                                            :PolicyDocument ""
                                                                            :PolicyRevisionId ""
                                                                            :BypassPolicyLockoutCheck false}})
require "http/client"

url = "{{baseUrl}}/PutResourcePolicy"
headers = HTTP::Headers{
  "content-type" => "application/json"
}
reqBody = "{\n  \"PolicyName\": \"\",\n  \"PolicyDocument\": \"\",\n  \"PolicyRevisionId\": \"\",\n  \"BypassPolicyLockoutCheck\": false\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}}/PutResourcePolicy"),
    Content = new StringContent("{\n  \"PolicyName\": \"\",\n  \"PolicyDocument\": \"\",\n  \"PolicyRevisionId\": \"\",\n  \"BypassPolicyLockoutCheck\": false\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}}/PutResourcePolicy");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n  \"PolicyName\": \"\",\n  \"PolicyDocument\": \"\",\n  \"PolicyRevisionId\": \"\",\n  \"BypassPolicyLockoutCheck\": false\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/PutResourcePolicy"

	payload := strings.NewReader("{\n  \"PolicyName\": \"\",\n  \"PolicyDocument\": \"\",\n  \"PolicyRevisionId\": \"\",\n  \"BypassPolicyLockoutCheck\": false\n}")

	req, _ := http.NewRequest("POST", url, payload)

	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/PutResourcePolicy HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 109

{
  "PolicyName": "",
  "PolicyDocument": "",
  "PolicyRevisionId": "",
  "BypassPolicyLockoutCheck": false
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/PutResourcePolicy")
  .setHeader("content-type", "application/json")
  .setBody("{\n  \"PolicyName\": \"\",\n  \"PolicyDocument\": \"\",\n  \"PolicyRevisionId\": \"\",\n  \"BypassPolicyLockoutCheck\": false\n}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/PutResourcePolicy"))
    .header("content-type", "application/json")
    .method("POST", HttpRequest.BodyPublishers.ofString("{\n  \"PolicyName\": \"\",\n  \"PolicyDocument\": \"\",\n  \"PolicyRevisionId\": \"\",\n  \"BypassPolicyLockoutCheck\": false\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  \"PolicyName\": \"\",\n  \"PolicyDocument\": \"\",\n  \"PolicyRevisionId\": \"\",\n  \"BypassPolicyLockoutCheck\": false\n}");
Request request = new Request.Builder()
  .url("{{baseUrl}}/PutResourcePolicy")
  .post(body)
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/PutResourcePolicy")
  .header("content-type", "application/json")
  .body("{\n  \"PolicyName\": \"\",\n  \"PolicyDocument\": \"\",\n  \"PolicyRevisionId\": \"\",\n  \"BypassPolicyLockoutCheck\": false\n}")
  .asString();
const data = JSON.stringify({
  PolicyName: '',
  PolicyDocument: '',
  PolicyRevisionId: '',
  BypassPolicyLockoutCheck: false
});

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener('readystatechange', function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open('POST', '{{baseUrl}}/PutResourcePolicy');
xhr.setRequestHeader('content-type', 'application/json');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'POST',
  url: '{{baseUrl}}/PutResourcePolicy',
  headers: {'content-type': 'application/json'},
  data: {
    PolicyName: '',
    PolicyDocument: '',
    PolicyRevisionId: '',
    BypassPolicyLockoutCheck: false
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/PutResourcePolicy';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"PolicyName":"","PolicyDocument":"","PolicyRevisionId":"","BypassPolicyLockoutCheck":false}'
};

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}}/PutResourcePolicy',
  method: 'POST',
  headers: {
    'content-type': 'application/json'
  },
  processData: false,
  data: '{\n  "PolicyName": "",\n  "PolicyDocument": "",\n  "PolicyRevisionId": "",\n  "BypassPolicyLockoutCheck": false\n}'
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n  \"PolicyName\": \"\",\n  \"PolicyDocument\": \"\",\n  \"PolicyRevisionId\": \"\",\n  \"BypassPolicyLockoutCheck\": false\n}")
val request = Request.Builder()
  .url("{{baseUrl}}/PutResourcePolicy")
  .post(body)
  .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/PutResourcePolicy',
  headers: {
    '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({
  PolicyName: '',
  PolicyDocument: '',
  PolicyRevisionId: '',
  BypassPolicyLockoutCheck: false
}));
req.end();
const request = require('request');

const options = {
  method: 'POST',
  url: '{{baseUrl}}/PutResourcePolicy',
  headers: {'content-type': 'application/json'},
  body: {
    PolicyName: '',
    PolicyDocument: '',
    PolicyRevisionId: '',
    BypassPolicyLockoutCheck: false
  },
  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}}/PutResourcePolicy');

req.headers({
  'content-type': 'application/json'
});

req.type('json');
req.send({
  PolicyName: '',
  PolicyDocument: '',
  PolicyRevisionId: '',
  BypassPolicyLockoutCheck: false
});

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}}/PutResourcePolicy',
  headers: {'content-type': 'application/json'},
  data: {
    PolicyName: '',
    PolicyDocument: '',
    PolicyRevisionId: '',
    BypassPolicyLockoutCheck: false
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/PutResourcePolicy';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"PolicyName":"","PolicyDocument":"","PolicyRevisionId":"","BypassPolicyLockoutCheck":false}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
#import 

NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"PolicyName": @"",
                              @"PolicyDocument": @"",
                              @"PolicyRevisionId": @"",
                              @"BypassPolicyLockoutCheck": @NO };

NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/PutResourcePolicy"]
                                                       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}}/PutResourcePolicy" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n  \"PolicyName\": \"\",\n  \"PolicyDocument\": \"\",\n  \"PolicyRevisionId\": \"\",\n  \"BypassPolicyLockoutCheck\": false\n}" in

Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/PutResourcePolicy",
  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([
    'PolicyName' => '',
    'PolicyDocument' => '',
    'PolicyRevisionId' => '',
    'BypassPolicyLockoutCheck' => null
  ]),
  CURLOPT_HTTPHEADER => [
    "content-type: application/json"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('POST', '{{baseUrl}}/PutResourcePolicy', [
  'body' => '{
  "PolicyName": "",
  "PolicyDocument": "",
  "PolicyRevisionId": "",
  "BypassPolicyLockoutCheck": false
}',
  'headers' => [
    'content-type' => 'application/json',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/PutResourcePolicy');
$request->setMethod(HTTP_METH_POST);

$request->setHeaders([
  'content-type' => 'application/json'
]);

$request->setContentType('application/json');
$request->setBody(json_encode([
  'PolicyName' => '',
  'PolicyDocument' => '',
  'PolicyRevisionId' => '',
  'BypassPolicyLockoutCheck' => null
]));

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
append(json_encode([
  'PolicyName' => '',
  'PolicyDocument' => '',
  'PolicyRevisionId' => '',
  'BypassPolicyLockoutCheck' => null
]));
$request->setRequestUrl('{{baseUrl}}/PutResourcePolicy');
$request->setRequestMethod('POST');
$request->setBody($body);

$request->setHeaders([
  'content-type' => 'application/json'
]);

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/PutResourcePolicy' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "PolicyName": "",
  "PolicyDocument": "",
  "PolicyRevisionId": "",
  "BypassPolicyLockoutCheck": false
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/PutResourcePolicy' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "PolicyName": "",
  "PolicyDocument": "",
  "PolicyRevisionId": "",
  "BypassPolicyLockoutCheck": false
}'
import http.client

conn = http.client.HTTPSConnection("example.com")

payload = "{\n  \"PolicyName\": \"\",\n  \"PolicyDocument\": \"\",\n  \"PolicyRevisionId\": \"\",\n  \"BypassPolicyLockoutCheck\": false\n}"

headers = { 'content-type': "application/json" }

conn.request("POST", "/baseUrl/PutResourcePolicy", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/PutResourcePolicy"

payload = {
    "PolicyName": "",
    "PolicyDocument": "",
    "PolicyRevisionId": "",
    "BypassPolicyLockoutCheck": False
}
headers = {"content-type": "application/json"}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
library(httr)

url <- "{{baseUrl}}/PutResourcePolicy"

payload <- "{\n  \"PolicyName\": \"\",\n  \"PolicyDocument\": \"\",\n  \"PolicyRevisionId\": \"\",\n  \"BypassPolicyLockoutCheck\": false\n}"

encode <- "json"

response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/PutResourcePolicy")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n  \"PolicyName\": \"\",\n  \"PolicyDocument\": \"\",\n  \"PolicyRevisionId\": \"\",\n  \"BypassPolicyLockoutCheck\": false\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/PutResourcePolicy') do |req|
  req.body = "{\n  \"PolicyName\": \"\",\n  \"PolicyDocument\": \"\",\n  \"PolicyRevisionId\": \"\",\n  \"BypassPolicyLockoutCheck\": false\n}"
end

puts response.status
puts response.body
use serde_json::json;
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/PutResourcePolicy";

    let payload = json!({
        "PolicyName": "",
        "PolicyDocument": "",
        "PolicyRevisionId": "",
        "BypassPolicyLockoutCheck": false
    });

    let mut headers = reqwest::header::HeaderMap::new();
    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}}/PutResourcePolicy \
  --header 'content-type: application/json' \
  --data '{
  "PolicyName": "",
  "PolicyDocument": "",
  "PolicyRevisionId": "",
  "BypassPolicyLockoutCheck": false
}'
echo '{
  "PolicyName": "",
  "PolicyDocument": "",
  "PolicyRevisionId": "",
  "BypassPolicyLockoutCheck": false
}' |  \
  http POST {{baseUrl}}/PutResourcePolicy \
  content-type:application/json
wget --quiet \
  --method POST \
  --header 'content-type: application/json' \
  --body-data '{\n  "PolicyName": "",\n  "PolicyDocument": "",\n  "PolicyRevisionId": "",\n  "BypassPolicyLockoutCheck": false\n}' \
  --output-document \
  - {{baseUrl}}/PutResourcePolicy
import Foundation

let headers = ["content-type": "application/json"]
let parameters = [
  "PolicyName": "",
  "PolicyDocument": "",
  "PolicyRevisionId": "",
  "BypassPolicyLockoutCheck": false
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/PutResourcePolicy")! 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 PutTelemetryRecords
{{baseUrl}}/TelemetryRecords
BODY json

{
  "TelemetryRecords": [
    {
      "Timestamp": "",
      "SegmentsReceivedCount": "",
      "SegmentsSentCount": "",
      "SegmentsSpilloverCount": "",
      "SegmentsRejectedCount": "",
      "BackendConnectionErrors": ""
    }
  ],
  "EC2InstanceId": "",
  "Hostname": "",
  "ResourceARN": ""
}
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/TelemetryRecords");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n  \"TelemetryRecords\": [\n    {\n      \"Timestamp\": \"\",\n      \"SegmentsReceivedCount\": \"\",\n      \"SegmentsSentCount\": \"\",\n      \"SegmentsSpilloverCount\": \"\",\n      \"SegmentsRejectedCount\": \"\",\n      \"BackendConnectionErrors\": \"\"\n    }\n  ],\n  \"EC2InstanceId\": \"\",\n  \"Hostname\": \"\",\n  \"ResourceARN\": \"\"\n}");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/post "{{baseUrl}}/TelemetryRecords" {:content-type :json
                                                             :form-params {:TelemetryRecords [{:Timestamp ""
                                                                                               :SegmentsReceivedCount ""
                                                                                               :SegmentsSentCount ""
                                                                                               :SegmentsSpilloverCount ""
                                                                                               :SegmentsRejectedCount ""
                                                                                               :BackendConnectionErrors ""}]
                                                                           :EC2InstanceId ""
                                                                           :Hostname ""
                                                                           :ResourceARN ""}})
require "http/client"

url = "{{baseUrl}}/TelemetryRecords"
headers = HTTP::Headers{
  "content-type" => "application/json"
}
reqBody = "{\n  \"TelemetryRecords\": [\n    {\n      \"Timestamp\": \"\",\n      \"SegmentsReceivedCount\": \"\",\n      \"SegmentsSentCount\": \"\",\n      \"SegmentsSpilloverCount\": \"\",\n      \"SegmentsRejectedCount\": \"\",\n      \"BackendConnectionErrors\": \"\"\n    }\n  ],\n  \"EC2InstanceId\": \"\",\n  \"Hostname\": \"\",\n  \"ResourceARN\": \"\"\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}}/TelemetryRecords"),
    Content = new StringContent("{\n  \"TelemetryRecords\": [\n    {\n      \"Timestamp\": \"\",\n      \"SegmentsReceivedCount\": \"\",\n      \"SegmentsSentCount\": \"\",\n      \"SegmentsSpilloverCount\": \"\",\n      \"SegmentsRejectedCount\": \"\",\n      \"BackendConnectionErrors\": \"\"\n    }\n  ],\n  \"EC2InstanceId\": \"\",\n  \"Hostname\": \"\",\n  \"ResourceARN\": \"\"\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}}/TelemetryRecords");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n  \"TelemetryRecords\": [\n    {\n      \"Timestamp\": \"\",\n      \"SegmentsReceivedCount\": \"\",\n      \"SegmentsSentCount\": \"\",\n      \"SegmentsSpilloverCount\": \"\",\n      \"SegmentsRejectedCount\": \"\",\n      \"BackendConnectionErrors\": \"\"\n    }\n  ],\n  \"EC2InstanceId\": \"\",\n  \"Hostname\": \"\",\n  \"ResourceARN\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/TelemetryRecords"

	payload := strings.NewReader("{\n  \"TelemetryRecords\": [\n    {\n      \"Timestamp\": \"\",\n      \"SegmentsReceivedCount\": \"\",\n      \"SegmentsSentCount\": \"\",\n      \"SegmentsSpilloverCount\": \"\",\n      \"SegmentsRejectedCount\": \"\",\n      \"BackendConnectionErrors\": \"\"\n    }\n  ],\n  \"EC2InstanceId\": \"\",\n  \"Hostname\": \"\",\n  \"ResourceARN\": \"\"\n}")

	req, _ := http.NewRequest("POST", url, payload)

	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/TelemetryRecords HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 301

{
  "TelemetryRecords": [
    {
      "Timestamp": "",
      "SegmentsReceivedCount": "",
      "SegmentsSentCount": "",
      "SegmentsSpilloverCount": "",
      "SegmentsRejectedCount": "",
      "BackendConnectionErrors": ""
    }
  ],
  "EC2InstanceId": "",
  "Hostname": "",
  "ResourceARN": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/TelemetryRecords")
  .setHeader("content-type", "application/json")
  .setBody("{\n  \"TelemetryRecords\": [\n    {\n      \"Timestamp\": \"\",\n      \"SegmentsReceivedCount\": \"\",\n      \"SegmentsSentCount\": \"\",\n      \"SegmentsSpilloverCount\": \"\",\n      \"SegmentsRejectedCount\": \"\",\n      \"BackendConnectionErrors\": \"\"\n    }\n  ],\n  \"EC2InstanceId\": \"\",\n  \"Hostname\": \"\",\n  \"ResourceARN\": \"\"\n}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/TelemetryRecords"))
    .header("content-type", "application/json")
    .method("POST", HttpRequest.BodyPublishers.ofString("{\n  \"TelemetryRecords\": [\n    {\n      \"Timestamp\": \"\",\n      \"SegmentsReceivedCount\": \"\",\n      \"SegmentsSentCount\": \"\",\n      \"SegmentsSpilloverCount\": \"\",\n      \"SegmentsRejectedCount\": \"\",\n      \"BackendConnectionErrors\": \"\"\n    }\n  ],\n  \"EC2InstanceId\": \"\",\n  \"Hostname\": \"\",\n  \"ResourceARN\": \"\"\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  \"TelemetryRecords\": [\n    {\n      \"Timestamp\": \"\",\n      \"SegmentsReceivedCount\": \"\",\n      \"SegmentsSentCount\": \"\",\n      \"SegmentsSpilloverCount\": \"\",\n      \"SegmentsRejectedCount\": \"\",\n      \"BackendConnectionErrors\": \"\"\n    }\n  ],\n  \"EC2InstanceId\": \"\",\n  \"Hostname\": \"\",\n  \"ResourceARN\": \"\"\n}");
Request request = new Request.Builder()
  .url("{{baseUrl}}/TelemetryRecords")
  .post(body)
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/TelemetryRecords")
  .header("content-type", "application/json")
  .body("{\n  \"TelemetryRecords\": [\n    {\n      \"Timestamp\": \"\",\n      \"SegmentsReceivedCount\": \"\",\n      \"SegmentsSentCount\": \"\",\n      \"SegmentsSpilloverCount\": \"\",\n      \"SegmentsRejectedCount\": \"\",\n      \"BackendConnectionErrors\": \"\"\n    }\n  ],\n  \"EC2InstanceId\": \"\",\n  \"Hostname\": \"\",\n  \"ResourceARN\": \"\"\n}")
  .asString();
const data = JSON.stringify({
  TelemetryRecords: [
    {
      Timestamp: '',
      SegmentsReceivedCount: '',
      SegmentsSentCount: '',
      SegmentsSpilloverCount: '',
      SegmentsRejectedCount: '',
      BackendConnectionErrors: ''
    }
  ],
  EC2InstanceId: '',
  Hostname: '',
  ResourceARN: ''
});

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener('readystatechange', function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open('POST', '{{baseUrl}}/TelemetryRecords');
xhr.setRequestHeader('content-type', 'application/json');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'POST',
  url: '{{baseUrl}}/TelemetryRecords',
  headers: {'content-type': 'application/json'},
  data: {
    TelemetryRecords: [
      {
        Timestamp: '',
        SegmentsReceivedCount: '',
        SegmentsSentCount: '',
        SegmentsSpilloverCount: '',
        SegmentsRejectedCount: '',
        BackendConnectionErrors: ''
      }
    ],
    EC2InstanceId: '',
    Hostname: '',
    ResourceARN: ''
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/TelemetryRecords';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"TelemetryRecords":[{"Timestamp":"","SegmentsReceivedCount":"","SegmentsSentCount":"","SegmentsSpilloverCount":"","SegmentsRejectedCount":"","BackendConnectionErrors":""}],"EC2InstanceId":"","Hostname":"","ResourceARN":""}'
};

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}}/TelemetryRecords',
  method: 'POST',
  headers: {
    'content-type': 'application/json'
  },
  processData: false,
  data: '{\n  "TelemetryRecords": [\n    {\n      "Timestamp": "",\n      "SegmentsReceivedCount": "",\n      "SegmentsSentCount": "",\n      "SegmentsSpilloverCount": "",\n      "SegmentsRejectedCount": "",\n      "BackendConnectionErrors": ""\n    }\n  ],\n  "EC2InstanceId": "",\n  "Hostname": "",\n  "ResourceARN": ""\n}'
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n  \"TelemetryRecords\": [\n    {\n      \"Timestamp\": \"\",\n      \"SegmentsReceivedCount\": \"\",\n      \"SegmentsSentCount\": \"\",\n      \"SegmentsSpilloverCount\": \"\",\n      \"SegmentsRejectedCount\": \"\",\n      \"BackendConnectionErrors\": \"\"\n    }\n  ],\n  \"EC2InstanceId\": \"\",\n  \"Hostname\": \"\",\n  \"ResourceARN\": \"\"\n}")
val request = Request.Builder()
  .url("{{baseUrl}}/TelemetryRecords")
  .post(body)
  .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/TelemetryRecords',
  headers: {
    '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({
  TelemetryRecords: [
    {
      Timestamp: '',
      SegmentsReceivedCount: '',
      SegmentsSentCount: '',
      SegmentsSpilloverCount: '',
      SegmentsRejectedCount: '',
      BackendConnectionErrors: ''
    }
  ],
  EC2InstanceId: '',
  Hostname: '',
  ResourceARN: ''
}));
req.end();
const request = require('request');

const options = {
  method: 'POST',
  url: '{{baseUrl}}/TelemetryRecords',
  headers: {'content-type': 'application/json'},
  body: {
    TelemetryRecords: [
      {
        Timestamp: '',
        SegmentsReceivedCount: '',
        SegmentsSentCount: '',
        SegmentsSpilloverCount: '',
        SegmentsRejectedCount: '',
        BackendConnectionErrors: ''
      }
    ],
    EC2InstanceId: '',
    Hostname: '',
    ResourceARN: ''
  },
  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}}/TelemetryRecords');

req.headers({
  'content-type': 'application/json'
});

req.type('json');
req.send({
  TelemetryRecords: [
    {
      Timestamp: '',
      SegmentsReceivedCount: '',
      SegmentsSentCount: '',
      SegmentsSpilloverCount: '',
      SegmentsRejectedCount: '',
      BackendConnectionErrors: ''
    }
  ],
  EC2InstanceId: '',
  Hostname: '',
  ResourceARN: ''
});

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}}/TelemetryRecords',
  headers: {'content-type': 'application/json'},
  data: {
    TelemetryRecords: [
      {
        Timestamp: '',
        SegmentsReceivedCount: '',
        SegmentsSentCount: '',
        SegmentsSpilloverCount: '',
        SegmentsRejectedCount: '',
        BackendConnectionErrors: ''
      }
    ],
    EC2InstanceId: '',
    Hostname: '',
    ResourceARN: ''
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/TelemetryRecords';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"TelemetryRecords":[{"Timestamp":"","SegmentsReceivedCount":"","SegmentsSentCount":"","SegmentsSpilloverCount":"","SegmentsRejectedCount":"","BackendConnectionErrors":""}],"EC2InstanceId":"","Hostname":"","ResourceARN":""}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
#import 

NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"TelemetryRecords": @[ @{ @"Timestamp": @"", @"SegmentsReceivedCount": @"", @"SegmentsSentCount": @"", @"SegmentsSpilloverCount": @"", @"SegmentsRejectedCount": @"", @"BackendConnectionErrors": @"" } ],
                              @"EC2InstanceId": @"",
                              @"Hostname": @"",
                              @"ResourceARN": @"" };

NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/TelemetryRecords"]
                                                       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}}/TelemetryRecords" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n  \"TelemetryRecords\": [\n    {\n      \"Timestamp\": \"\",\n      \"SegmentsReceivedCount\": \"\",\n      \"SegmentsSentCount\": \"\",\n      \"SegmentsSpilloverCount\": \"\",\n      \"SegmentsRejectedCount\": \"\",\n      \"BackendConnectionErrors\": \"\"\n    }\n  ],\n  \"EC2InstanceId\": \"\",\n  \"Hostname\": \"\",\n  \"ResourceARN\": \"\"\n}" in

Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/TelemetryRecords",
  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([
    'TelemetryRecords' => [
        [
                'Timestamp' => '',
                'SegmentsReceivedCount' => '',
                'SegmentsSentCount' => '',
                'SegmentsSpilloverCount' => '',
                'SegmentsRejectedCount' => '',
                'BackendConnectionErrors' => ''
        ]
    ],
    'EC2InstanceId' => '',
    'Hostname' => '',
    'ResourceARN' => ''
  ]),
  CURLOPT_HTTPHEADER => [
    "content-type: application/json"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('POST', '{{baseUrl}}/TelemetryRecords', [
  'body' => '{
  "TelemetryRecords": [
    {
      "Timestamp": "",
      "SegmentsReceivedCount": "",
      "SegmentsSentCount": "",
      "SegmentsSpilloverCount": "",
      "SegmentsRejectedCount": "",
      "BackendConnectionErrors": ""
    }
  ],
  "EC2InstanceId": "",
  "Hostname": "",
  "ResourceARN": ""
}',
  'headers' => [
    'content-type' => 'application/json',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/TelemetryRecords');
$request->setMethod(HTTP_METH_POST);

$request->setHeaders([
  'content-type' => 'application/json'
]);

$request->setContentType('application/json');
$request->setBody(json_encode([
  'TelemetryRecords' => [
    [
        'Timestamp' => '',
        'SegmentsReceivedCount' => '',
        'SegmentsSentCount' => '',
        'SegmentsSpilloverCount' => '',
        'SegmentsRejectedCount' => '',
        'BackendConnectionErrors' => ''
    ]
  ],
  'EC2InstanceId' => '',
  'Hostname' => '',
  'ResourceARN' => ''
]));

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
append(json_encode([
  'TelemetryRecords' => [
    [
        'Timestamp' => '',
        'SegmentsReceivedCount' => '',
        'SegmentsSentCount' => '',
        'SegmentsSpilloverCount' => '',
        'SegmentsRejectedCount' => '',
        'BackendConnectionErrors' => ''
    ]
  ],
  'EC2InstanceId' => '',
  'Hostname' => '',
  'ResourceARN' => ''
]));
$request->setRequestUrl('{{baseUrl}}/TelemetryRecords');
$request->setRequestMethod('POST');
$request->setBody($body);

$request->setHeaders([
  'content-type' => 'application/json'
]);

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/TelemetryRecords' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "TelemetryRecords": [
    {
      "Timestamp": "",
      "SegmentsReceivedCount": "",
      "SegmentsSentCount": "",
      "SegmentsSpilloverCount": "",
      "SegmentsRejectedCount": "",
      "BackendConnectionErrors": ""
    }
  ],
  "EC2InstanceId": "",
  "Hostname": "",
  "ResourceARN": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/TelemetryRecords' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "TelemetryRecords": [
    {
      "Timestamp": "",
      "SegmentsReceivedCount": "",
      "SegmentsSentCount": "",
      "SegmentsSpilloverCount": "",
      "SegmentsRejectedCount": "",
      "BackendConnectionErrors": ""
    }
  ],
  "EC2InstanceId": "",
  "Hostname": "",
  "ResourceARN": ""
}'
import http.client

conn = http.client.HTTPSConnection("example.com")

payload = "{\n  \"TelemetryRecords\": [\n    {\n      \"Timestamp\": \"\",\n      \"SegmentsReceivedCount\": \"\",\n      \"SegmentsSentCount\": \"\",\n      \"SegmentsSpilloverCount\": \"\",\n      \"SegmentsRejectedCount\": \"\",\n      \"BackendConnectionErrors\": \"\"\n    }\n  ],\n  \"EC2InstanceId\": \"\",\n  \"Hostname\": \"\",\n  \"ResourceARN\": \"\"\n}"

headers = { 'content-type': "application/json" }

conn.request("POST", "/baseUrl/TelemetryRecords", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/TelemetryRecords"

payload = {
    "TelemetryRecords": [
        {
            "Timestamp": "",
            "SegmentsReceivedCount": "",
            "SegmentsSentCount": "",
            "SegmentsSpilloverCount": "",
            "SegmentsRejectedCount": "",
            "BackendConnectionErrors": ""
        }
    ],
    "EC2InstanceId": "",
    "Hostname": "",
    "ResourceARN": ""
}
headers = {"content-type": "application/json"}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
library(httr)

url <- "{{baseUrl}}/TelemetryRecords"

payload <- "{\n  \"TelemetryRecords\": [\n    {\n      \"Timestamp\": \"\",\n      \"SegmentsReceivedCount\": \"\",\n      \"SegmentsSentCount\": \"\",\n      \"SegmentsSpilloverCount\": \"\",\n      \"SegmentsRejectedCount\": \"\",\n      \"BackendConnectionErrors\": \"\"\n    }\n  ],\n  \"EC2InstanceId\": \"\",\n  \"Hostname\": \"\",\n  \"ResourceARN\": \"\"\n}"

encode <- "json"

response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/TelemetryRecords")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n  \"TelemetryRecords\": [\n    {\n      \"Timestamp\": \"\",\n      \"SegmentsReceivedCount\": \"\",\n      \"SegmentsSentCount\": \"\",\n      \"SegmentsSpilloverCount\": \"\",\n      \"SegmentsRejectedCount\": \"\",\n      \"BackendConnectionErrors\": \"\"\n    }\n  ],\n  \"EC2InstanceId\": \"\",\n  \"Hostname\": \"\",\n  \"ResourceARN\": \"\"\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/TelemetryRecords') do |req|
  req.body = "{\n  \"TelemetryRecords\": [\n    {\n      \"Timestamp\": \"\",\n      \"SegmentsReceivedCount\": \"\",\n      \"SegmentsSentCount\": \"\",\n      \"SegmentsSpilloverCount\": \"\",\n      \"SegmentsRejectedCount\": \"\",\n      \"BackendConnectionErrors\": \"\"\n    }\n  ],\n  \"EC2InstanceId\": \"\",\n  \"Hostname\": \"\",\n  \"ResourceARN\": \"\"\n}"
end

puts response.status
puts response.body
use serde_json::json;
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/TelemetryRecords";

    let payload = json!({
        "TelemetryRecords": (
            json!({
                "Timestamp": "",
                "SegmentsReceivedCount": "",
                "SegmentsSentCount": "",
                "SegmentsSpilloverCount": "",
                "SegmentsRejectedCount": "",
                "BackendConnectionErrors": ""
            })
        ),
        "EC2InstanceId": "",
        "Hostname": "",
        "ResourceARN": ""
    });

    let mut headers = reqwest::header::HeaderMap::new();
    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}}/TelemetryRecords \
  --header 'content-type: application/json' \
  --data '{
  "TelemetryRecords": [
    {
      "Timestamp": "",
      "SegmentsReceivedCount": "",
      "SegmentsSentCount": "",
      "SegmentsSpilloverCount": "",
      "SegmentsRejectedCount": "",
      "BackendConnectionErrors": ""
    }
  ],
  "EC2InstanceId": "",
  "Hostname": "",
  "ResourceARN": ""
}'
echo '{
  "TelemetryRecords": [
    {
      "Timestamp": "",
      "SegmentsReceivedCount": "",
      "SegmentsSentCount": "",
      "SegmentsSpilloverCount": "",
      "SegmentsRejectedCount": "",
      "BackendConnectionErrors": ""
    }
  ],
  "EC2InstanceId": "",
  "Hostname": "",
  "ResourceARN": ""
}' |  \
  http POST {{baseUrl}}/TelemetryRecords \
  content-type:application/json
wget --quiet \
  --method POST \
  --header 'content-type: application/json' \
  --body-data '{\n  "TelemetryRecords": [\n    {\n      "Timestamp": "",\n      "SegmentsReceivedCount": "",\n      "SegmentsSentCount": "",\n      "SegmentsSpilloverCount": "",\n      "SegmentsRejectedCount": "",\n      "BackendConnectionErrors": ""\n    }\n  ],\n  "EC2InstanceId": "",\n  "Hostname": "",\n  "ResourceARN": ""\n}' \
  --output-document \
  - {{baseUrl}}/TelemetryRecords
import Foundation

let headers = ["content-type": "application/json"]
let parameters = [
  "TelemetryRecords": [
    [
      "Timestamp": "",
      "SegmentsReceivedCount": "",
      "SegmentsSentCount": "",
      "SegmentsSpilloverCount": "",
      "SegmentsRejectedCount": "",
      "BackendConnectionErrors": ""
    ]
  ],
  "EC2InstanceId": "",
  "Hostname": "",
  "ResourceARN": ""
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/TelemetryRecords")! 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 PutTraceSegments
{{baseUrl}}/TraceSegments
BODY json

{
  "TraceSegmentDocuments": []
}
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/TraceSegments");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n  \"TraceSegmentDocuments\": []\n}");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/post "{{baseUrl}}/TraceSegments" {:content-type :json
                                                          :form-params {:TraceSegmentDocuments []}})
require "http/client"

url = "{{baseUrl}}/TraceSegments"
headers = HTTP::Headers{
  "content-type" => "application/json"
}
reqBody = "{\n  \"TraceSegmentDocuments\": []\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}}/TraceSegments"),
    Content = new StringContent("{\n  \"TraceSegmentDocuments\": []\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}}/TraceSegments");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n  \"TraceSegmentDocuments\": []\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/TraceSegments"

	payload := strings.NewReader("{\n  \"TraceSegmentDocuments\": []\n}")

	req, _ := http.NewRequest("POST", url, payload)

	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/TraceSegments HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 33

{
  "TraceSegmentDocuments": []
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/TraceSegments")
  .setHeader("content-type", "application/json")
  .setBody("{\n  \"TraceSegmentDocuments\": []\n}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/TraceSegments"))
    .header("content-type", "application/json")
    .method("POST", HttpRequest.BodyPublishers.ofString("{\n  \"TraceSegmentDocuments\": []\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  \"TraceSegmentDocuments\": []\n}");
Request request = new Request.Builder()
  .url("{{baseUrl}}/TraceSegments")
  .post(body)
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/TraceSegments")
  .header("content-type", "application/json")
  .body("{\n  \"TraceSegmentDocuments\": []\n}")
  .asString();
const data = JSON.stringify({
  TraceSegmentDocuments: []
});

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener('readystatechange', function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open('POST', '{{baseUrl}}/TraceSegments');
xhr.setRequestHeader('content-type', 'application/json');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'POST',
  url: '{{baseUrl}}/TraceSegments',
  headers: {'content-type': 'application/json'},
  data: {TraceSegmentDocuments: []}
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/TraceSegments';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"TraceSegmentDocuments":[]}'
};

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}}/TraceSegments',
  method: 'POST',
  headers: {
    'content-type': 'application/json'
  },
  processData: false,
  data: '{\n  "TraceSegmentDocuments": []\n}'
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n  \"TraceSegmentDocuments\": []\n}")
val request = Request.Builder()
  .url("{{baseUrl}}/TraceSegments")
  .post(body)
  .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/TraceSegments',
  headers: {
    '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({TraceSegmentDocuments: []}));
req.end();
const request = require('request');

const options = {
  method: 'POST',
  url: '{{baseUrl}}/TraceSegments',
  headers: {'content-type': 'application/json'},
  body: {TraceSegmentDocuments: []},
  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}}/TraceSegments');

req.headers({
  'content-type': 'application/json'
});

req.type('json');
req.send({
  TraceSegmentDocuments: []
});

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}}/TraceSegments',
  headers: {'content-type': 'application/json'},
  data: {TraceSegmentDocuments: []}
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/TraceSegments';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"TraceSegmentDocuments":[]}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
#import 

NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"TraceSegmentDocuments": @[  ] };

NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/TraceSegments"]
                                                       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}}/TraceSegments" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n  \"TraceSegmentDocuments\": []\n}" in

Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/TraceSegments",
  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([
    'TraceSegmentDocuments' => [
        
    ]
  ]),
  CURLOPT_HTTPHEADER => [
    "content-type: application/json"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('POST', '{{baseUrl}}/TraceSegments', [
  'body' => '{
  "TraceSegmentDocuments": []
}',
  'headers' => [
    'content-type' => 'application/json',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/TraceSegments');
$request->setMethod(HTTP_METH_POST);

$request->setHeaders([
  'content-type' => 'application/json'
]);

$request->setContentType('application/json');
$request->setBody(json_encode([
  'TraceSegmentDocuments' => [
    
  ]
]));

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
append(json_encode([
  'TraceSegmentDocuments' => [
    
  ]
]));
$request->setRequestUrl('{{baseUrl}}/TraceSegments');
$request->setRequestMethod('POST');
$request->setBody($body);

$request->setHeaders([
  'content-type' => 'application/json'
]);

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/TraceSegments' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "TraceSegmentDocuments": []
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/TraceSegments' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "TraceSegmentDocuments": []
}'
import http.client

conn = http.client.HTTPSConnection("example.com")

payload = "{\n  \"TraceSegmentDocuments\": []\n}"

headers = { 'content-type': "application/json" }

conn.request("POST", "/baseUrl/TraceSegments", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/TraceSegments"

payload = { "TraceSegmentDocuments": [] }
headers = {"content-type": "application/json"}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
library(httr)

url <- "{{baseUrl}}/TraceSegments"

payload <- "{\n  \"TraceSegmentDocuments\": []\n}"

encode <- "json"

response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/TraceSegments")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n  \"TraceSegmentDocuments\": []\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/TraceSegments') do |req|
  req.body = "{\n  \"TraceSegmentDocuments\": []\n}"
end

puts response.status
puts response.body
use serde_json::json;
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/TraceSegments";

    let payload = json!({"TraceSegmentDocuments": ()});

    let mut headers = reqwest::header::HeaderMap::new();
    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}}/TraceSegments \
  --header 'content-type: application/json' \
  --data '{
  "TraceSegmentDocuments": []
}'
echo '{
  "TraceSegmentDocuments": []
}' |  \
  http POST {{baseUrl}}/TraceSegments \
  content-type:application/json
wget --quiet \
  --method POST \
  --header 'content-type: application/json' \
  --body-data '{\n  "TraceSegmentDocuments": []\n}' \
  --output-document \
  - {{baseUrl}}/TraceSegments
import Foundation

let headers = ["content-type": "application/json"]
let parameters = ["TraceSegmentDocuments": []] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/TraceSegments")! 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 TagResource
{{baseUrl}}/TagResource
BODY json

{
  "ResourceARN": "",
  "Tags": [
    {
      "Key": "",
      "Value": ""
    }
  ]
}
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/TagResource");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n  \"ResourceARN\": \"\",\n  \"Tags\": [\n    {\n      \"Key\": \"\",\n      \"Value\": \"\"\n    }\n  ]\n}");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/post "{{baseUrl}}/TagResource" {:content-type :json
                                                        :form-params {:ResourceARN ""
                                                                      :Tags [{:Key ""
                                                                              :Value ""}]}})
require "http/client"

url = "{{baseUrl}}/TagResource"
headers = HTTP::Headers{
  "content-type" => "application/json"
}
reqBody = "{\n  \"ResourceARN\": \"\",\n  \"Tags\": [\n    {\n      \"Key\": \"\",\n      \"Value\": \"\"\n    }\n  ]\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}}/TagResource"),
    Content = new StringContent("{\n  \"ResourceARN\": \"\",\n  \"Tags\": [\n    {\n      \"Key\": \"\",\n      \"Value\": \"\"\n    }\n  ]\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}}/TagResource");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n  \"ResourceARN\": \"\",\n  \"Tags\": [\n    {\n      \"Key\": \"\",\n      \"Value\": \"\"\n    }\n  ]\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/TagResource"

	payload := strings.NewReader("{\n  \"ResourceARN\": \"\",\n  \"Tags\": [\n    {\n      \"Key\": \"\",\n      \"Value\": \"\"\n    }\n  ]\n}")

	req, _ := http.NewRequest("POST", url, payload)

	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/TagResource HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 87

{
  "ResourceARN": "",
  "Tags": [
    {
      "Key": "",
      "Value": ""
    }
  ]
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/TagResource")
  .setHeader("content-type", "application/json")
  .setBody("{\n  \"ResourceARN\": \"\",\n  \"Tags\": [\n    {\n      \"Key\": \"\",\n      \"Value\": \"\"\n    }\n  ]\n}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/TagResource"))
    .header("content-type", "application/json")
    .method("POST", HttpRequest.BodyPublishers.ofString("{\n  \"ResourceARN\": \"\",\n  \"Tags\": [\n    {\n      \"Key\": \"\",\n      \"Value\": \"\"\n    }\n  ]\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  \"ResourceARN\": \"\",\n  \"Tags\": [\n    {\n      \"Key\": \"\",\n      \"Value\": \"\"\n    }\n  ]\n}");
Request request = new Request.Builder()
  .url("{{baseUrl}}/TagResource")
  .post(body)
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/TagResource")
  .header("content-type", "application/json")
  .body("{\n  \"ResourceARN\": \"\",\n  \"Tags\": [\n    {\n      \"Key\": \"\",\n      \"Value\": \"\"\n    }\n  ]\n}")
  .asString();
const data = JSON.stringify({
  ResourceARN: '',
  Tags: [
    {
      Key: '',
      Value: ''
    }
  ]
});

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener('readystatechange', function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open('POST', '{{baseUrl}}/TagResource');
xhr.setRequestHeader('content-type', 'application/json');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'POST',
  url: '{{baseUrl}}/TagResource',
  headers: {'content-type': 'application/json'},
  data: {ResourceARN: '', Tags: [{Key: '', Value: ''}]}
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/TagResource';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"ResourceARN":"","Tags":[{"Key":"","Value":""}]}'
};

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}}/TagResource',
  method: 'POST',
  headers: {
    'content-type': 'application/json'
  },
  processData: false,
  data: '{\n  "ResourceARN": "",\n  "Tags": [\n    {\n      "Key": "",\n      "Value": ""\n    }\n  ]\n}'
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n  \"ResourceARN\": \"\",\n  \"Tags\": [\n    {\n      \"Key\": \"\",\n      \"Value\": \"\"\n    }\n  ]\n}")
val request = Request.Builder()
  .url("{{baseUrl}}/TagResource")
  .post(body)
  .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/TagResource',
  headers: {
    '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({ResourceARN: '', Tags: [{Key: '', Value: ''}]}));
req.end();
const request = require('request');

const options = {
  method: 'POST',
  url: '{{baseUrl}}/TagResource',
  headers: {'content-type': 'application/json'},
  body: {ResourceARN: '', Tags: [{Key: '', Value: ''}]},
  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}}/TagResource');

req.headers({
  'content-type': 'application/json'
});

req.type('json');
req.send({
  ResourceARN: '',
  Tags: [
    {
      Key: '',
      Value: ''
    }
  ]
});

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}}/TagResource',
  headers: {'content-type': 'application/json'},
  data: {ResourceARN: '', Tags: [{Key: '', Value: ''}]}
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/TagResource';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"ResourceARN":"","Tags":[{"Key":"","Value":""}]}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
#import 

NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"ResourceARN": @"",
                              @"Tags": @[ @{ @"Key": @"", @"Value": @"" } ] };

NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/TagResource"]
                                                       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}}/TagResource" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n  \"ResourceARN\": \"\",\n  \"Tags\": [\n    {\n      \"Key\": \"\",\n      \"Value\": \"\"\n    }\n  ]\n}" in

Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/TagResource",
  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([
    'ResourceARN' => '',
    'Tags' => [
        [
                'Key' => '',
                'Value' => ''
        ]
    ]
  ]),
  CURLOPT_HTTPHEADER => [
    "content-type: application/json"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('POST', '{{baseUrl}}/TagResource', [
  'body' => '{
  "ResourceARN": "",
  "Tags": [
    {
      "Key": "",
      "Value": ""
    }
  ]
}',
  'headers' => [
    'content-type' => 'application/json',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/TagResource');
$request->setMethod(HTTP_METH_POST);

$request->setHeaders([
  'content-type' => 'application/json'
]);

$request->setContentType('application/json');
$request->setBody(json_encode([
  'ResourceARN' => '',
  'Tags' => [
    [
        'Key' => '',
        'Value' => ''
    ]
  ]
]));

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
append(json_encode([
  'ResourceARN' => '',
  'Tags' => [
    [
        'Key' => '',
        'Value' => ''
    ]
  ]
]));
$request->setRequestUrl('{{baseUrl}}/TagResource');
$request->setRequestMethod('POST');
$request->setBody($body);

$request->setHeaders([
  'content-type' => 'application/json'
]);

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/TagResource' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "ResourceARN": "",
  "Tags": [
    {
      "Key": "",
      "Value": ""
    }
  ]
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/TagResource' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "ResourceARN": "",
  "Tags": [
    {
      "Key": "",
      "Value": ""
    }
  ]
}'
import http.client

conn = http.client.HTTPSConnection("example.com")

payload = "{\n  \"ResourceARN\": \"\",\n  \"Tags\": [\n    {\n      \"Key\": \"\",\n      \"Value\": \"\"\n    }\n  ]\n}"

headers = { 'content-type': "application/json" }

conn.request("POST", "/baseUrl/TagResource", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/TagResource"

payload = {
    "ResourceARN": "",
    "Tags": [
        {
            "Key": "",
            "Value": ""
        }
    ]
}
headers = {"content-type": "application/json"}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
library(httr)

url <- "{{baseUrl}}/TagResource"

payload <- "{\n  \"ResourceARN\": \"\",\n  \"Tags\": [\n    {\n      \"Key\": \"\",\n      \"Value\": \"\"\n    }\n  ]\n}"

encode <- "json"

response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/TagResource")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n  \"ResourceARN\": \"\",\n  \"Tags\": [\n    {\n      \"Key\": \"\",\n      \"Value\": \"\"\n    }\n  ]\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/TagResource') do |req|
  req.body = "{\n  \"ResourceARN\": \"\",\n  \"Tags\": [\n    {\n      \"Key\": \"\",\n      \"Value\": \"\"\n    }\n  ]\n}"
end

puts response.status
puts response.body
use serde_json::json;
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/TagResource";

    let payload = json!({
        "ResourceARN": "",
        "Tags": (
            json!({
                "Key": "",
                "Value": ""
            })
        )
    });

    let mut headers = reqwest::header::HeaderMap::new();
    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}}/TagResource \
  --header 'content-type: application/json' \
  --data '{
  "ResourceARN": "",
  "Tags": [
    {
      "Key": "",
      "Value": ""
    }
  ]
}'
echo '{
  "ResourceARN": "",
  "Tags": [
    {
      "Key": "",
      "Value": ""
    }
  ]
}' |  \
  http POST {{baseUrl}}/TagResource \
  content-type:application/json
wget --quiet \
  --method POST \
  --header 'content-type: application/json' \
  --body-data '{\n  "ResourceARN": "",\n  "Tags": [\n    {\n      "Key": "",\n      "Value": ""\n    }\n  ]\n}' \
  --output-document \
  - {{baseUrl}}/TagResource
import Foundation

let headers = ["content-type": "application/json"]
let parameters = [
  "ResourceARN": "",
  "Tags": [
    [
      "Key": "",
      "Value": ""
    ]
  ]
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/TagResource")! 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 UntagResource
{{baseUrl}}/UntagResource
BODY json

{
  "ResourceARN": "",
  "TagKeys": []
}
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/UntagResource");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n  \"ResourceARN\": \"\",\n  \"TagKeys\": []\n}");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/post "{{baseUrl}}/UntagResource" {:content-type :json
                                                          :form-params {:ResourceARN ""
                                                                        :TagKeys []}})
require "http/client"

url = "{{baseUrl}}/UntagResource"
headers = HTTP::Headers{
  "content-type" => "application/json"
}
reqBody = "{\n  \"ResourceARN\": \"\",\n  \"TagKeys\": []\n}"

response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
    Method = HttpMethod.Post,
    RequestUri = new Uri("{{baseUrl}}/UntagResource"),
    Content = new StringContent("{\n  \"ResourceARN\": \"\",\n  \"TagKeys\": []\n}")
    {
        Headers =
        {
            ContentType = new MediaTypeHeaderValue("application/json")
        }
    }
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/UntagResource");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n  \"ResourceARN\": \"\",\n  \"TagKeys\": []\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/UntagResource"

	payload := strings.NewReader("{\n  \"ResourceARN\": \"\",\n  \"TagKeys\": []\n}")

	req, _ := http.NewRequest("POST", url, payload)

	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/UntagResource HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 40

{
  "ResourceARN": "",
  "TagKeys": []
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/UntagResource")
  .setHeader("content-type", "application/json")
  .setBody("{\n  \"ResourceARN\": \"\",\n  \"TagKeys\": []\n}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/UntagResource"))
    .header("content-type", "application/json")
    .method("POST", HttpRequest.BodyPublishers.ofString("{\n  \"ResourceARN\": \"\",\n  \"TagKeys\": []\n}"))
    .build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();

MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n  \"ResourceARN\": \"\",\n  \"TagKeys\": []\n}");
Request request = new Request.Builder()
  .url("{{baseUrl}}/UntagResource")
  .post(body)
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/UntagResource")
  .header("content-type", "application/json")
  .body("{\n  \"ResourceARN\": \"\",\n  \"TagKeys\": []\n}")
  .asString();
const data = JSON.stringify({
  ResourceARN: '',
  TagKeys: []
});

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener('readystatechange', function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open('POST', '{{baseUrl}}/UntagResource');
xhr.setRequestHeader('content-type', 'application/json');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'POST',
  url: '{{baseUrl}}/UntagResource',
  headers: {'content-type': 'application/json'},
  data: {ResourceARN: '', TagKeys: []}
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/UntagResource';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"ResourceARN":"","TagKeys":[]}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
const settings = {
  async: true,
  crossDomain: true,
  url: '{{baseUrl}}/UntagResource',
  method: 'POST',
  headers: {
    'content-type': 'application/json'
  },
  processData: false,
  data: '{\n  "ResourceARN": "",\n  "TagKeys": []\n}'
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n  \"ResourceARN\": \"\",\n  \"TagKeys\": []\n}")
val request = Request.Builder()
  .url("{{baseUrl}}/UntagResource")
  .post(body)
  .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/UntagResource',
  headers: {
    '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({ResourceARN: '', TagKeys: []}));
req.end();
const request = require('request');

const options = {
  method: 'POST',
  url: '{{baseUrl}}/UntagResource',
  headers: {'content-type': 'application/json'},
  body: {ResourceARN: '', TagKeys: []},
  json: true
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('POST', '{{baseUrl}}/UntagResource');

req.headers({
  'content-type': 'application/json'
});

req.type('json');
req.send({
  ResourceARN: '',
  TagKeys: []
});

req.end(function (res) {
  if (res.error) throw new Error(res.error);

  console.log(res.body);
});
const axios = require('axios').default;

const options = {
  method: 'POST',
  url: '{{baseUrl}}/UntagResource',
  headers: {'content-type': 'application/json'},
  data: {ResourceARN: '', TagKeys: []}
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/UntagResource';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"ResourceARN":"","TagKeys":[]}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
#import 

NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"ResourceARN": @"",
                              @"TagKeys": @[  ] };

NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/UntagResource"]
                                                       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}}/UntagResource" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n  \"ResourceARN\": \"\",\n  \"TagKeys\": []\n}" in

Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/UntagResource",
  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([
    'ResourceARN' => '',
    'TagKeys' => [
        
    ]
  ]),
  CURLOPT_HTTPHEADER => [
    "content-type: application/json"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('POST', '{{baseUrl}}/UntagResource', [
  'body' => '{
  "ResourceARN": "",
  "TagKeys": []
}',
  'headers' => [
    'content-type' => 'application/json',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/UntagResource');
$request->setMethod(HTTP_METH_POST);

$request->setHeaders([
  'content-type' => 'application/json'
]);

$request->setContentType('application/json');
$request->setBody(json_encode([
  'ResourceARN' => '',
  'TagKeys' => [
    
  ]
]));

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
append(json_encode([
  'ResourceARN' => '',
  'TagKeys' => [
    
  ]
]));
$request->setRequestUrl('{{baseUrl}}/UntagResource');
$request->setRequestMethod('POST');
$request->setBody($body);

$request->setHeaders([
  'content-type' => 'application/json'
]);

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/UntagResource' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "ResourceARN": "",
  "TagKeys": []
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/UntagResource' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "ResourceARN": "",
  "TagKeys": []
}'
import http.client

conn = http.client.HTTPSConnection("example.com")

payload = "{\n  \"ResourceARN\": \"\",\n  \"TagKeys\": []\n}"

headers = { 'content-type': "application/json" }

conn.request("POST", "/baseUrl/UntagResource", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/UntagResource"

payload = {
    "ResourceARN": "",
    "TagKeys": []
}
headers = {"content-type": "application/json"}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
library(httr)

url <- "{{baseUrl}}/UntagResource"

payload <- "{\n  \"ResourceARN\": \"\",\n  \"TagKeys\": []\n}"

encode <- "json"

response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/UntagResource")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n  \"ResourceARN\": \"\",\n  \"TagKeys\": []\n}"

response = http.request(request)
puts response.read_body
require 'faraday'

conn = Faraday.new(
  url: 'https://example.com',
  headers: {'Content-Type' => 'application/json'}
)

response = conn.post('/baseUrl/UntagResource') do |req|
  req.body = "{\n  \"ResourceARN\": \"\",\n  \"TagKeys\": []\n}"
end

puts response.status
puts response.body
use serde_json::json;
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/UntagResource";

    let payload = json!({
        "ResourceARN": "",
        "TagKeys": ()
    });

    let mut headers = reqwest::header::HeaderMap::new();
    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}}/UntagResource \
  --header 'content-type: application/json' \
  --data '{
  "ResourceARN": "",
  "TagKeys": []
}'
echo '{
  "ResourceARN": "",
  "TagKeys": []
}' |  \
  http POST {{baseUrl}}/UntagResource \
  content-type:application/json
wget --quiet \
  --method POST \
  --header 'content-type: application/json' \
  --body-data '{\n  "ResourceARN": "",\n  "TagKeys": []\n}' \
  --output-document \
  - {{baseUrl}}/UntagResource
import Foundation

let headers = ["content-type": "application/json"]
let parameters = [
  "ResourceARN": "",
  "TagKeys": []
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/UntagResource")! 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 UpdateGroup
{{baseUrl}}/UpdateGroup
BODY json

{
  "GroupName": "",
  "GroupARN": "",
  "FilterExpression": "",
  "InsightsConfiguration": {
    "InsightsEnabled": "",
    "NotificationsEnabled": ""
  }
}
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/UpdateGroup");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n  \"GroupName\": \"\",\n  \"GroupARN\": \"\",\n  \"FilterExpression\": \"\",\n  \"InsightsConfiguration\": {\n    \"InsightsEnabled\": \"\",\n    \"NotificationsEnabled\": \"\"\n  }\n}");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/post "{{baseUrl}}/UpdateGroup" {:content-type :json
                                                        :form-params {:GroupName ""
                                                                      :GroupARN ""
                                                                      :FilterExpression ""
                                                                      :InsightsConfiguration {:InsightsEnabled ""
                                                                                              :NotificationsEnabled ""}}})
require "http/client"

url = "{{baseUrl}}/UpdateGroup"
headers = HTTP::Headers{
  "content-type" => "application/json"
}
reqBody = "{\n  \"GroupName\": \"\",\n  \"GroupARN\": \"\",\n  \"FilterExpression\": \"\",\n  \"InsightsConfiguration\": {\n    \"InsightsEnabled\": \"\",\n    \"NotificationsEnabled\": \"\"\n  }\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}}/UpdateGroup"),
    Content = new StringContent("{\n  \"GroupName\": \"\",\n  \"GroupARN\": \"\",\n  \"FilterExpression\": \"\",\n  \"InsightsConfiguration\": {\n    \"InsightsEnabled\": \"\",\n    \"NotificationsEnabled\": \"\"\n  }\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}}/UpdateGroup");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n  \"GroupName\": \"\",\n  \"GroupARN\": \"\",\n  \"FilterExpression\": \"\",\n  \"InsightsConfiguration\": {\n    \"InsightsEnabled\": \"\",\n    \"NotificationsEnabled\": \"\"\n  }\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/UpdateGroup"

	payload := strings.NewReader("{\n  \"GroupName\": \"\",\n  \"GroupARN\": \"\",\n  \"FilterExpression\": \"\",\n  \"InsightsConfiguration\": {\n    \"InsightsEnabled\": \"\",\n    \"NotificationsEnabled\": \"\"\n  }\n}")

	req, _ := http.NewRequest("POST", url, payload)

	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/UpdateGroup HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 157

{
  "GroupName": "",
  "GroupARN": "",
  "FilterExpression": "",
  "InsightsConfiguration": {
    "InsightsEnabled": "",
    "NotificationsEnabled": ""
  }
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/UpdateGroup")
  .setHeader("content-type", "application/json")
  .setBody("{\n  \"GroupName\": \"\",\n  \"GroupARN\": \"\",\n  \"FilterExpression\": \"\",\n  \"InsightsConfiguration\": {\n    \"InsightsEnabled\": \"\",\n    \"NotificationsEnabled\": \"\"\n  }\n}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/UpdateGroup"))
    .header("content-type", "application/json")
    .method("POST", HttpRequest.BodyPublishers.ofString("{\n  \"GroupName\": \"\",\n  \"GroupARN\": \"\",\n  \"FilterExpression\": \"\",\n  \"InsightsConfiguration\": {\n    \"InsightsEnabled\": \"\",\n    \"NotificationsEnabled\": \"\"\n  }\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  \"GroupName\": \"\",\n  \"GroupARN\": \"\",\n  \"FilterExpression\": \"\",\n  \"InsightsConfiguration\": {\n    \"InsightsEnabled\": \"\",\n    \"NotificationsEnabled\": \"\"\n  }\n}");
Request request = new Request.Builder()
  .url("{{baseUrl}}/UpdateGroup")
  .post(body)
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/UpdateGroup")
  .header("content-type", "application/json")
  .body("{\n  \"GroupName\": \"\",\n  \"GroupARN\": \"\",\n  \"FilterExpression\": \"\",\n  \"InsightsConfiguration\": {\n    \"InsightsEnabled\": \"\",\n    \"NotificationsEnabled\": \"\"\n  }\n}")
  .asString();
const data = JSON.stringify({
  GroupName: '',
  GroupARN: '',
  FilterExpression: '',
  InsightsConfiguration: {
    InsightsEnabled: '',
    NotificationsEnabled: ''
  }
});

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener('readystatechange', function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open('POST', '{{baseUrl}}/UpdateGroup');
xhr.setRequestHeader('content-type', 'application/json');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'POST',
  url: '{{baseUrl}}/UpdateGroup',
  headers: {'content-type': 'application/json'},
  data: {
    GroupName: '',
    GroupARN: '',
    FilterExpression: '',
    InsightsConfiguration: {InsightsEnabled: '', NotificationsEnabled: ''}
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/UpdateGroup';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"GroupName":"","GroupARN":"","FilterExpression":"","InsightsConfiguration":{"InsightsEnabled":"","NotificationsEnabled":""}}'
};

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}}/UpdateGroup',
  method: 'POST',
  headers: {
    'content-type': 'application/json'
  },
  processData: false,
  data: '{\n  "GroupName": "",\n  "GroupARN": "",\n  "FilterExpression": "",\n  "InsightsConfiguration": {\n    "InsightsEnabled": "",\n    "NotificationsEnabled": ""\n  }\n}'
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n  \"GroupName\": \"\",\n  \"GroupARN\": \"\",\n  \"FilterExpression\": \"\",\n  \"InsightsConfiguration\": {\n    \"InsightsEnabled\": \"\",\n    \"NotificationsEnabled\": \"\"\n  }\n}")
val request = Request.Builder()
  .url("{{baseUrl}}/UpdateGroup")
  .post(body)
  .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/UpdateGroup',
  headers: {
    '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({
  GroupName: '',
  GroupARN: '',
  FilterExpression: '',
  InsightsConfiguration: {InsightsEnabled: '', NotificationsEnabled: ''}
}));
req.end();
const request = require('request');

const options = {
  method: 'POST',
  url: '{{baseUrl}}/UpdateGroup',
  headers: {'content-type': 'application/json'},
  body: {
    GroupName: '',
    GroupARN: '',
    FilterExpression: '',
    InsightsConfiguration: {InsightsEnabled: '', NotificationsEnabled: ''}
  },
  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}}/UpdateGroup');

req.headers({
  'content-type': 'application/json'
});

req.type('json');
req.send({
  GroupName: '',
  GroupARN: '',
  FilterExpression: '',
  InsightsConfiguration: {
    InsightsEnabled: '',
    NotificationsEnabled: ''
  }
});

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}}/UpdateGroup',
  headers: {'content-type': 'application/json'},
  data: {
    GroupName: '',
    GroupARN: '',
    FilterExpression: '',
    InsightsConfiguration: {InsightsEnabled: '', NotificationsEnabled: ''}
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/UpdateGroup';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"GroupName":"","GroupARN":"","FilterExpression":"","InsightsConfiguration":{"InsightsEnabled":"","NotificationsEnabled":""}}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
#import 

NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"GroupName": @"",
                              @"GroupARN": @"",
                              @"FilterExpression": @"",
                              @"InsightsConfiguration": @{ @"InsightsEnabled": @"", @"NotificationsEnabled": @"" } };

NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/UpdateGroup"]
                                                       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}}/UpdateGroup" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n  \"GroupName\": \"\",\n  \"GroupARN\": \"\",\n  \"FilterExpression\": \"\",\n  \"InsightsConfiguration\": {\n    \"InsightsEnabled\": \"\",\n    \"NotificationsEnabled\": \"\"\n  }\n}" in

Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/UpdateGroup",
  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([
    'GroupName' => '',
    'GroupARN' => '',
    'FilterExpression' => '',
    'InsightsConfiguration' => [
        'InsightsEnabled' => '',
        'NotificationsEnabled' => ''
    ]
  ]),
  CURLOPT_HTTPHEADER => [
    "content-type: application/json"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('POST', '{{baseUrl}}/UpdateGroup', [
  'body' => '{
  "GroupName": "",
  "GroupARN": "",
  "FilterExpression": "",
  "InsightsConfiguration": {
    "InsightsEnabled": "",
    "NotificationsEnabled": ""
  }
}',
  'headers' => [
    'content-type' => 'application/json',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/UpdateGroup');
$request->setMethod(HTTP_METH_POST);

$request->setHeaders([
  'content-type' => 'application/json'
]);

$request->setContentType('application/json');
$request->setBody(json_encode([
  'GroupName' => '',
  'GroupARN' => '',
  'FilterExpression' => '',
  'InsightsConfiguration' => [
    'InsightsEnabled' => '',
    'NotificationsEnabled' => ''
  ]
]));

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
append(json_encode([
  'GroupName' => '',
  'GroupARN' => '',
  'FilterExpression' => '',
  'InsightsConfiguration' => [
    'InsightsEnabled' => '',
    'NotificationsEnabled' => ''
  ]
]));
$request->setRequestUrl('{{baseUrl}}/UpdateGroup');
$request->setRequestMethod('POST');
$request->setBody($body);

$request->setHeaders([
  'content-type' => 'application/json'
]);

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/UpdateGroup' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "GroupName": "",
  "GroupARN": "",
  "FilterExpression": "",
  "InsightsConfiguration": {
    "InsightsEnabled": "",
    "NotificationsEnabled": ""
  }
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/UpdateGroup' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "GroupName": "",
  "GroupARN": "",
  "FilterExpression": "",
  "InsightsConfiguration": {
    "InsightsEnabled": "",
    "NotificationsEnabled": ""
  }
}'
import http.client

conn = http.client.HTTPSConnection("example.com")

payload = "{\n  \"GroupName\": \"\",\n  \"GroupARN\": \"\",\n  \"FilterExpression\": \"\",\n  \"InsightsConfiguration\": {\n    \"InsightsEnabled\": \"\",\n    \"NotificationsEnabled\": \"\"\n  }\n}"

headers = { 'content-type': "application/json" }

conn.request("POST", "/baseUrl/UpdateGroup", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/UpdateGroup"

payload = {
    "GroupName": "",
    "GroupARN": "",
    "FilterExpression": "",
    "InsightsConfiguration": {
        "InsightsEnabled": "",
        "NotificationsEnabled": ""
    }
}
headers = {"content-type": "application/json"}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
library(httr)

url <- "{{baseUrl}}/UpdateGroup"

payload <- "{\n  \"GroupName\": \"\",\n  \"GroupARN\": \"\",\n  \"FilterExpression\": \"\",\n  \"InsightsConfiguration\": {\n    \"InsightsEnabled\": \"\",\n    \"NotificationsEnabled\": \"\"\n  }\n}"

encode <- "json"

response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/UpdateGroup")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n  \"GroupName\": \"\",\n  \"GroupARN\": \"\",\n  \"FilterExpression\": \"\",\n  \"InsightsConfiguration\": {\n    \"InsightsEnabled\": \"\",\n    \"NotificationsEnabled\": \"\"\n  }\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/UpdateGroup') do |req|
  req.body = "{\n  \"GroupName\": \"\",\n  \"GroupARN\": \"\",\n  \"FilterExpression\": \"\",\n  \"InsightsConfiguration\": {\n    \"InsightsEnabled\": \"\",\n    \"NotificationsEnabled\": \"\"\n  }\n}"
end

puts response.status
puts response.body
use serde_json::json;
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/UpdateGroup";

    let payload = json!({
        "GroupName": "",
        "GroupARN": "",
        "FilterExpression": "",
        "InsightsConfiguration": json!({
            "InsightsEnabled": "",
            "NotificationsEnabled": ""
        })
    });

    let mut headers = reqwest::header::HeaderMap::new();
    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}}/UpdateGroup \
  --header 'content-type: application/json' \
  --data '{
  "GroupName": "",
  "GroupARN": "",
  "FilterExpression": "",
  "InsightsConfiguration": {
    "InsightsEnabled": "",
    "NotificationsEnabled": ""
  }
}'
echo '{
  "GroupName": "",
  "GroupARN": "",
  "FilterExpression": "",
  "InsightsConfiguration": {
    "InsightsEnabled": "",
    "NotificationsEnabled": ""
  }
}' |  \
  http POST {{baseUrl}}/UpdateGroup \
  content-type:application/json
wget --quiet \
  --method POST \
  --header 'content-type: application/json' \
  --body-data '{\n  "GroupName": "",\n  "GroupARN": "",\n  "FilterExpression": "",\n  "InsightsConfiguration": {\n    "InsightsEnabled": "",\n    "NotificationsEnabled": ""\n  }\n}' \
  --output-document \
  - {{baseUrl}}/UpdateGroup
import Foundation

let headers = ["content-type": "application/json"]
let parameters = [
  "GroupName": "",
  "GroupARN": "",
  "FilterExpression": "",
  "InsightsConfiguration": [
    "InsightsEnabled": "",
    "NotificationsEnabled": ""
  ]
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/UpdateGroup")! 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 UpdateSamplingRule
{{baseUrl}}/UpdateSamplingRule
BODY json

{
  "SamplingRuleUpdate": {
    "RuleName": "",
    "RuleARN": "",
    "ResourceARN": "",
    "Priority": "",
    "FixedRate": "",
    "ReservoirSize": "",
    "Host": "",
    "ServiceName": "",
    "ServiceType": "",
    "HTTPMethod": "",
    "URLPath": "",
    "Attributes": ""
  }
}
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/UpdateSamplingRule");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n  \"SamplingRuleUpdate\": {\n    \"RuleName\": \"\",\n    \"RuleARN\": \"\",\n    \"ResourceARN\": \"\",\n    \"Priority\": \"\",\n    \"FixedRate\": \"\",\n    \"ReservoirSize\": \"\",\n    \"Host\": \"\",\n    \"ServiceName\": \"\",\n    \"ServiceType\": \"\",\n    \"HTTPMethod\": \"\",\n    \"URLPath\": \"\",\n    \"Attributes\": \"\"\n  }\n}");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/post "{{baseUrl}}/UpdateSamplingRule" {:content-type :json
                                                               :form-params {:SamplingRuleUpdate {:RuleName ""
                                                                                                  :RuleARN ""
                                                                                                  :ResourceARN ""
                                                                                                  :Priority ""
                                                                                                  :FixedRate ""
                                                                                                  :ReservoirSize ""
                                                                                                  :Host ""
                                                                                                  :ServiceName ""
                                                                                                  :ServiceType ""
                                                                                                  :HTTPMethod ""
                                                                                                  :URLPath ""
                                                                                                  :Attributes ""}}})
require "http/client"

url = "{{baseUrl}}/UpdateSamplingRule"
headers = HTTP::Headers{
  "content-type" => "application/json"
}
reqBody = "{\n  \"SamplingRuleUpdate\": {\n    \"RuleName\": \"\",\n    \"RuleARN\": \"\",\n    \"ResourceARN\": \"\",\n    \"Priority\": \"\",\n    \"FixedRate\": \"\",\n    \"ReservoirSize\": \"\",\n    \"Host\": \"\",\n    \"ServiceName\": \"\",\n    \"ServiceType\": \"\",\n    \"HTTPMethod\": \"\",\n    \"URLPath\": \"\",\n    \"Attributes\": \"\"\n  }\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}}/UpdateSamplingRule"),
    Content = new StringContent("{\n  \"SamplingRuleUpdate\": {\n    \"RuleName\": \"\",\n    \"RuleARN\": \"\",\n    \"ResourceARN\": \"\",\n    \"Priority\": \"\",\n    \"FixedRate\": \"\",\n    \"ReservoirSize\": \"\",\n    \"Host\": \"\",\n    \"ServiceName\": \"\",\n    \"ServiceType\": \"\",\n    \"HTTPMethod\": \"\",\n    \"URLPath\": \"\",\n    \"Attributes\": \"\"\n  }\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}}/UpdateSamplingRule");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n  \"SamplingRuleUpdate\": {\n    \"RuleName\": \"\",\n    \"RuleARN\": \"\",\n    \"ResourceARN\": \"\",\n    \"Priority\": \"\",\n    \"FixedRate\": \"\",\n    \"ReservoirSize\": \"\",\n    \"Host\": \"\",\n    \"ServiceName\": \"\",\n    \"ServiceType\": \"\",\n    \"HTTPMethod\": \"\",\n    \"URLPath\": \"\",\n    \"Attributes\": \"\"\n  }\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/UpdateSamplingRule"

	payload := strings.NewReader("{\n  \"SamplingRuleUpdate\": {\n    \"RuleName\": \"\",\n    \"RuleARN\": \"\",\n    \"ResourceARN\": \"\",\n    \"Priority\": \"\",\n    \"FixedRate\": \"\",\n    \"ReservoirSize\": \"\",\n    \"Host\": \"\",\n    \"ServiceName\": \"\",\n    \"ServiceType\": \"\",\n    \"HTTPMethod\": \"\",\n    \"URLPath\": \"\",\n    \"Attributes\": \"\"\n  }\n}")

	req, _ := http.NewRequest("POST", url, payload)

	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/UpdateSamplingRule HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 285

{
  "SamplingRuleUpdate": {
    "RuleName": "",
    "RuleARN": "",
    "ResourceARN": "",
    "Priority": "",
    "FixedRate": "",
    "ReservoirSize": "",
    "Host": "",
    "ServiceName": "",
    "ServiceType": "",
    "HTTPMethod": "",
    "URLPath": "",
    "Attributes": ""
  }
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/UpdateSamplingRule")
  .setHeader("content-type", "application/json")
  .setBody("{\n  \"SamplingRuleUpdate\": {\n    \"RuleName\": \"\",\n    \"RuleARN\": \"\",\n    \"ResourceARN\": \"\",\n    \"Priority\": \"\",\n    \"FixedRate\": \"\",\n    \"ReservoirSize\": \"\",\n    \"Host\": \"\",\n    \"ServiceName\": \"\",\n    \"ServiceType\": \"\",\n    \"HTTPMethod\": \"\",\n    \"URLPath\": \"\",\n    \"Attributes\": \"\"\n  }\n}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/UpdateSamplingRule"))
    .header("content-type", "application/json")
    .method("POST", HttpRequest.BodyPublishers.ofString("{\n  \"SamplingRuleUpdate\": {\n    \"RuleName\": \"\",\n    \"RuleARN\": \"\",\n    \"ResourceARN\": \"\",\n    \"Priority\": \"\",\n    \"FixedRate\": \"\",\n    \"ReservoirSize\": \"\",\n    \"Host\": \"\",\n    \"ServiceName\": \"\",\n    \"ServiceType\": \"\",\n    \"HTTPMethod\": \"\",\n    \"URLPath\": \"\",\n    \"Attributes\": \"\"\n  }\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  \"SamplingRuleUpdate\": {\n    \"RuleName\": \"\",\n    \"RuleARN\": \"\",\n    \"ResourceARN\": \"\",\n    \"Priority\": \"\",\n    \"FixedRate\": \"\",\n    \"ReservoirSize\": \"\",\n    \"Host\": \"\",\n    \"ServiceName\": \"\",\n    \"ServiceType\": \"\",\n    \"HTTPMethod\": \"\",\n    \"URLPath\": \"\",\n    \"Attributes\": \"\"\n  }\n}");
Request request = new Request.Builder()
  .url("{{baseUrl}}/UpdateSamplingRule")
  .post(body)
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/UpdateSamplingRule")
  .header("content-type", "application/json")
  .body("{\n  \"SamplingRuleUpdate\": {\n    \"RuleName\": \"\",\n    \"RuleARN\": \"\",\n    \"ResourceARN\": \"\",\n    \"Priority\": \"\",\n    \"FixedRate\": \"\",\n    \"ReservoirSize\": \"\",\n    \"Host\": \"\",\n    \"ServiceName\": \"\",\n    \"ServiceType\": \"\",\n    \"HTTPMethod\": \"\",\n    \"URLPath\": \"\",\n    \"Attributes\": \"\"\n  }\n}")
  .asString();
const data = JSON.stringify({
  SamplingRuleUpdate: {
    RuleName: '',
    RuleARN: '',
    ResourceARN: '',
    Priority: '',
    FixedRate: '',
    ReservoirSize: '',
    Host: '',
    ServiceName: '',
    ServiceType: '',
    HTTPMethod: '',
    URLPath: '',
    Attributes: ''
  }
});

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener('readystatechange', function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open('POST', '{{baseUrl}}/UpdateSamplingRule');
xhr.setRequestHeader('content-type', 'application/json');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'POST',
  url: '{{baseUrl}}/UpdateSamplingRule',
  headers: {'content-type': 'application/json'},
  data: {
    SamplingRuleUpdate: {
      RuleName: '',
      RuleARN: '',
      ResourceARN: '',
      Priority: '',
      FixedRate: '',
      ReservoirSize: '',
      Host: '',
      ServiceName: '',
      ServiceType: '',
      HTTPMethod: '',
      URLPath: '',
      Attributes: ''
    }
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/UpdateSamplingRule';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"SamplingRuleUpdate":{"RuleName":"","RuleARN":"","ResourceARN":"","Priority":"","FixedRate":"","ReservoirSize":"","Host":"","ServiceName":"","ServiceType":"","HTTPMethod":"","URLPath":"","Attributes":""}}'
};

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}}/UpdateSamplingRule',
  method: 'POST',
  headers: {
    'content-type': 'application/json'
  },
  processData: false,
  data: '{\n  "SamplingRuleUpdate": {\n    "RuleName": "",\n    "RuleARN": "",\n    "ResourceARN": "",\n    "Priority": "",\n    "FixedRate": "",\n    "ReservoirSize": "",\n    "Host": "",\n    "ServiceName": "",\n    "ServiceType": "",\n    "HTTPMethod": "",\n    "URLPath": "",\n    "Attributes": ""\n  }\n}'
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n  \"SamplingRuleUpdate\": {\n    \"RuleName\": \"\",\n    \"RuleARN\": \"\",\n    \"ResourceARN\": \"\",\n    \"Priority\": \"\",\n    \"FixedRate\": \"\",\n    \"ReservoirSize\": \"\",\n    \"Host\": \"\",\n    \"ServiceName\": \"\",\n    \"ServiceType\": \"\",\n    \"HTTPMethod\": \"\",\n    \"URLPath\": \"\",\n    \"Attributes\": \"\"\n  }\n}")
val request = Request.Builder()
  .url("{{baseUrl}}/UpdateSamplingRule")
  .post(body)
  .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/UpdateSamplingRule',
  headers: {
    '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({
  SamplingRuleUpdate: {
    RuleName: '',
    RuleARN: '',
    ResourceARN: '',
    Priority: '',
    FixedRate: '',
    ReservoirSize: '',
    Host: '',
    ServiceName: '',
    ServiceType: '',
    HTTPMethod: '',
    URLPath: '',
    Attributes: ''
  }
}));
req.end();
const request = require('request');

const options = {
  method: 'POST',
  url: '{{baseUrl}}/UpdateSamplingRule',
  headers: {'content-type': 'application/json'},
  body: {
    SamplingRuleUpdate: {
      RuleName: '',
      RuleARN: '',
      ResourceARN: '',
      Priority: '',
      FixedRate: '',
      ReservoirSize: '',
      Host: '',
      ServiceName: '',
      ServiceType: '',
      HTTPMethod: '',
      URLPath: '',
      Attributes: ''
    }
  },
  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}}/UpdateSamplingRule');

req.headers({
  'content-type': 'application/json'
});

req.type('json');
req.send({
  SamplingRuleUpdate: {
    RuleName: '',
    RuleARN: '',
    ResourceARN: '',
    Priority: '',
    FixedRate: '',
    ReservoirSize: '',
    Host: '',
    ServiceName: '',
    ServiceType: '',
    HTTPMethod: '',
    URLPath: '',
    Attributes: ''
  }
});

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}}/UpdateSamplingRule',
  headers: {'content-type': 'application/json'},
  data: {
    SamplingRuleUpdate: {
      RuleName: '',
      RuleARN: '',
      ResourceARN: '',
      Priority: '',
      FixedRate: '',
      ReservoirSize: '',
      Host: '',
      ServiceName: '',
      ServiceType: '',
      HTTPMethod: '',
      URLPath: '',
      Attributes: ''
    }
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/UpdateSamplingRule';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"SamplingRuleUpdate":{"RuleName":"","RuleARN":"","ResourceARN":"","Priority":"","FixedRate":"","ReservoirSize":"","Host":"","ServiceName":"","ServiceType":"","HTTPMethod":"","URLPath":"","Attributes":""}}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
#import 

NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"SamplingRuleUpdate": @{ @"RuleName": @"", @"RuleARN": @"", @"ResourceARN": @"", @"Priority": @"", @"FixedRate": @"", @"ReservoirSize": @"", @"Host": @"", @"ServiceName": @"", @"ServiceType": @"", @"HTTPMethod": @"", @"URLPath": @"", @"Attributes": @"" } };

NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/UpdateSamplingRule"]
                                                       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}}/UpdateSamplingRule" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n  \"SamplingRuleUpdate\": {\n    \"RuleName\": \"\",\n    \"RuleARN\": \"\",\n    \"ResourceARN\": \"\",\n    \"Priority\": \"\",\n    \"FixedRate\": \"\",\n    \"ReservoirSize\": \"\",\n    \"Host\": \"\",\n    \"ServiceName\": \"\",\n    \"ServiceType\": \"\",\n    \"HTTPMethod\": \"\",\n    \"URLPath\": \"\",\n    \"Attributes\": \"\"\n  }\n}" in

Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/UpdateSamplingRule",
  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([
    'SamplingRuleUpdate' => [
        'RuleName' => '',
        'RuleARN' => '',
        'ResourceARN' => '',
        'Priority' => '',
        'FixedRate' => '',
        'ReservoirSize' => '',
        'Host' => '',
        'ServiceName' => '',
        'ServiceType' => '',
        'HTTPMethod' => '',
        'URLPath' => '',
        'Attributes' => ''
    ]
  ]),
  CURLOPT_HTTPHEADER => [
    "content-type: application/json"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('POST', '{{baseUrl}}/UpdateSamplingRule', [
  'body' => '{
  "SamplingRuleUpdate": {
    "RuleName": "",
    "RuleARN": "",
    "ResourceARN": "",
    "Priority": "",
    "FixedRate": "",
    "ReservoirSize": "",
    "Host": "",
    "ServiceName": "",
    "ServiceType": "",
    "HTTPMethod": "",
    "URLPath": "",
    "Attributes": ""
  }
}',
  'headers' => [
    'content-type' => 'application/json',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/UpdateSamplingRule');
$request->setMethod(HTTP_METH_POST);

$request->setHeaders([
  'content-type' => 'application/json'
]);

$request->setContentType('application/json');
$request->setBody(json_encode([
  'SamplingRuleUpdate' => [
    'RuleName' => '',
    'RuleARN' => '',
    'ResourceARN' => '',
    'Priority' => '',
    'FixedRate' => '',
    'ReservoirSize' => '',
    'Host' => '',
    'ServiceName' => '',
    'ServiceType' => '',
    'HTTPMethod' => '',
    'URLPath' => '',
    'Attributes' => ''
  ]
]));

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
append(json_encode([
  'SamplingRuleUpdate' => [
    'RuleName' => '',
    'RuleARN' => '',
    'ResourceARN' => '',
    'Priority' => '',
    'FixedRate' => '',
    'ReservoirSize' => '',
    'Host' => '',
    'ServiceName' => '',
    'ServiceType' => '',
    'HTTPMethod' => '',
    'URLPath' => '',
    'Attributes' => ''
  ]
]));
$request->setRequestUrl('{{baseUrl}}/UpdateSamplingRule');
$request->setRequestMethod('POST');
$request->setBody($body);

$request->setHeaders([
  'content-type' => 'application/json'
]);

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/UpdateSamplingRule' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "SamplingRuleUpdate": {
    "RuleName": "",
    "RuleARN": "",
    "ResourceARN": "",
    "Priority": "",
    "FixedRate": "",
    "ReservoirSize": "",
    "Host": "",
    "ServiceName": "",
    "ServiceType": "",
    "HTTPMethod": "",
    "URLPath": "",
    "Attributes": ""
  }
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/UpdateSamplingRule' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "SamplingRuleUpdate": {
    "RuleName": "",
    "RuleARN": "",
    "ResourceARN": "",
    "Priority": "",
    "FixedRate": "",
    "ReservoirSize": "",
    "Host": "",
    "ServiceName": "",
    "ServiceType": "",
    "HTTPMethod": "",
    "URLPath": "",
    "Attributes": ""
  }
}'
import http.client

conn = http.client.HTTPSConnection("example.com")

payload = "{\n  \"SamplingRuleUpdate\": {\n    \"RuleName\": \"\",\n    \"RuleARN\": \"\",\n    \"ResourceARN\": \"\",\n    \"Priority\": \"\",\n    \"FixedRate\": \"\",\n    \"ReservoirSize\": \"\",\n    \"Host\": \"\",\n    \"ServiceName\": \"\",\n    \"ServiceType\": \"\",\n    \"HTTPMethod\": \"\",\n    \"URLPath\": \"\",\n    \"Attributes\": \"\"\n  }\n}"

headers = { 'content-type': "application/json" }

conn.request("POST", "/baseUrl/UpdateSamplingRule", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/UpdateSamplingRule"

payload = { "SamplingRuleUpdate": {
        "RuleName": "",
        "RuleARN": "",
        "ResourceARN": "",
        "Priority": "",
        "FixedRate": "",
        "ReservoirSize": "",
        "Host": "",
        "ServiceName": "",
        "ServiceType": "",
        "HTTPMethod": "",
        "URLPath": "",
        "Attributes": ""
    } }
headers = {"content-type": "application/json"}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
library(httr)

url <- "{{baseUrl}}/UpdateSamplingRule"

payload <- "{\n  \"SamplingRuleUpdate\": {\n    \"RuleName\": \"\",\n    \"RuleARN\": \"\",\n    \"ResourceARN\": \"\",\n    \"Priority\": \"\",\n    \"FixedRate\": \"\",\n    \"ReservoirSize\": \"\",\n    \"Host\": \"\",\n    \"ServiceName\": \"\",\n    \"ServiceType\": \"\",\n    \"HTTPMethod\": \"\",\n    \"URLPath\": \"\",\n    \"Attributes\": \"\"\n  }\n}"

encode <- "json"

response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/UpdateSamplingRule")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n  \"SamplingRuleUpdate\": {\n    \"RuleName\": \"\",\n    \"RuleARN\": \"\",\n    \"ResourceARN\": \"\",\n    \"Priority\": \"\",\n    \"FixedRate\": \"\",\n    \"ReservoirSize\": \"\",\n    \"Host\": \"\",\n    \"ServiceName\": \"\",\n    \"ServiceType\": \"\",\n    \"HTTPMethod\": \"\",\n    \"URLPath\": \"\",\n    \"Attributes\": \"\"\n  }\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/UpdateSamplingRule') do |req|
  req.body = "{\n  \"SamplingRuleUpdate\": {\n    \"RuleName\": \"\",\n    \"RuleARN\": \"\",\n    \"ResourceARN\": \"\",\n    \"Priority\": \"\",\n    \"FixedRate\": \"\",\n    \"ReservoirSize\": \"\",\n    \"Host\": \"\",\n    \"ServiceName\": \"\",\n    \"ServiceType\": \"\",\n    \"HTTPMethod\": \"\",\n    \"URLPath\": \"\",\n    \"Attributes\": \"\"\n  }\n}"
end

puts response.status
puts response.body
use serde_json::json;
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/UpdateSamplingRule";

    let payload = json!({"SamplingRuleUpdate": json!({
            "RuleName": "",
            "RuleARN": "",
            "ResourceARN": "",
            "Priority": "",
            "FixedRate": "",
            "ReservoirSize": "",
            "Host": "",
            "ServiceName": "",
            "ServiceType": "",
            "HTTPMethod": "",
            "URLPath": "",
            "Attributes": ""
        })});

    let mut headers = reqwest::header::HeaderMap::new();
    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}}/UpdateSamplingRule \
  --header 'content-type: application/json' \
  --data '{
  "SamplingRuleUpdate": {
    "RuleName": "",
    "RuleARN": "",
    "ResourceARN": "",
    "Priority": "",
    "FixedRate": "",
    "ReservoirSize": "",
    "Host": "",
    "ServiceName": "",
    "ServiceType": "",
    "HTTPMethod": "",
    "URLPath": "",
    "Attributes": ""
  }
}'
echo '{
  "SamplingRuleUpdate": {
    "RuleName": "",
    "RuleARN": "",
    "ResourceARN": "",
    "Priority": "",
    "FixedRate": "",
    "ReservoirSize": "",
    "Host": "",
    "ServiceName": "",
    "ServiceType": "",
    "HTTPMethod": "",
    "URLPath": "",
    "Attributes": ""
  }
}' |  \
  http POST {{baseUrl}}/UpdateSamplingRule \
  content-type:application/json
wget --quiet \
  --method POST \
  --header 'content-type: application/json' \
  --body-data '{\n  "SamplingRuleUpdate": {\n    "RuleName": "",\n    "RuleARN": "",\n    "ResourceARN": "",\n    "Priority": "",\n    "FixedRate": "",\n    "ReservoirSize": "",\n    "Host": "",\n    "ServiceName": "",\n    "ServiceType": "",\n    "HTTPMethod": "",\n    "URLPath": "",\n    "Attributes": ""\n  }\n}' \
  --output-document \
  - {{baseUrl}}/UpdateSamplingRule
import Foundation

let headers = ["content-type": "application/json"]
let parameters = ["SamplingRuleUpdate": [
    "RuleName": "",
    "RuleARN": "",
    "ResourceARN": "",
    "Priority": "",
    "FixedRate": "",
    "ReservoirSize": "",
    "Host": "",
    "ServiceName": "",
    "ServiceType": "",
    "HTTPMethod": "",
    "URLPath": "",
    "Attributes": ""
  ]] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/UpdateSamplingRule")! 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()