Amazon Connect Participant Service
Amazon Connect Participant Servicev2018-09-07
Amazon Connect is an easy-to-use omnichannel cloud contact center service that enables companies of any size to deliver superior customer service at a lower cost. Amazon Connect communications capabilities make it easy for companies to deliver personalized interactions across communication channels, including chat. Use the Amazon Connect Participant Service to manage participants (for example, agents, customers, and managers listening in), and to send messages and events within a chat contact. The APIs in the service enable the following: sending chat messages, attachment sharing, managing a…
- Endpoints
- 8 (8 POST)
- Base URL
http://participant.connect.{region}.amazonaws.com- Authentication
- API key
- Spec format
- OpenAPI 3.0.0
- API version
- 2018-09-07
- Provider
- amazonaws.com
- License
- Apache 2.0 License
- Categories
- Cloud & Infrastructure
- Last updated
Use this API in Bruno:
- Download the Bruno collection above and unzip it.
- In Bruno, choose Open Collection and select the unzipped folder.
- Set the
baseUrlvariable (for examplehttp://participant.connect.{region}.amazonaws.com) and your API key credentials, then send requests.
POST
CompleteAttachmentUpload
{{baseUrl}}/participant/complete-attachment-upload#X-Amz-Bearer
HEADERS
X-Amz-Bearer
BODY json
{
"AttachmentIds": [],
"ClientToken": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/participant/complete-attachment-upload#X-Amz-Bearer");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-amz-bearer: ");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"AttachmentIds\": [],\n \"ClientToken\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/participant/complete-attachment-upload#X-Amz-Bearer" {:headers {:x-amz-bearer ""}
:content-type :json
:form-params {:AttachmentIds []
:ClientToken ""}})
require "http/client"
url = "{{baseUrl}}/participant/complete-attachment-upload#X-Amz-Bearer"
headers = HTTP::Headers{
"x-amz-bearer" => ""
"content-type" => "application/json"
}
reqBody = "{\n \"AttachmentIds\": [],\n \"ClientToken\": \"\"\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}}/participant/complete-attachment-upload#X-Amz-Bearer"),
Headers =
{
{ "x-amz-bearer", "" },
},
Content = new StringContent("{\n \"AttachmentIds\": [],\n \"ClientToken\": \"\"\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}}/participant/complete-attachment-upload#X-Amz-Bearer");
var request = new RestRequest("", Method.Post);
request.AddHeader("x-amz-bearer", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"AttachmentIds\": [],\n \"ClientToken\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/participant/complete-attachment-upload#X-Amz-Bearer"
payload := strings.NewReader("{\n \"AttachmentIds\": [],\n \"ClientToken\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-amz-bearer", "")
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/participant/complete-attachment-upload HTTP/1.1
X-Amz-Bearer:
Content-Type: application/json
Host: example.com
Content-Length: 46
{
"AttachmentIds": [],
"ClientToken": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/participant/complete-attachment-upload#X-Amz-Bearer")
.setHeader("x-amz-bearer", "")
.setHeader("content-type", "application/json")
.setBody("{\n \"AttachmentIds\": [],\n \"ClientToken\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/participant/complete-attachment-upload#X-Amz-Bearer"))
.header("x-amz-bearer", "")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"AttachmentIds\": [],\n \"ClientToken\": \"\"\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 \"AttachmentIds\": [],\n \"ClientToken\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/participant/complete-attachment-upload#X-Amz-Bearer")
.post(body)
.addHeader("x-amz-bearer", "")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/participant/complete-attachment-upload#X-Amz-Bearer")
.header("x-amz-bearer", "")
.header("content-type", "application/json")
.body("{\n \"AttachmentIds\": [],\n \"ClientToken\": \"\"\n}")
.asString();
const data = JSON.stringify({
AttachmentIds: [],
ClientToken: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/participant/complete-attachment-upload#X-Amz-Bearer');
xhr.setRequestHeader('x-amz-bearer', '');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/participant/complete-attachment-upload#X-Amz-Bearer',
headers: {'x-amz-bearer': '', 'content-type': 'application/json'},
data: {AttachmentIds: [], ClientToken: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/participant/complete-attachment-upload#X-Amz-Bearer';
const options = {
method: 'POST',
headers: {'x-amz-bearer': '', 'content-type': 'application/json'},
body: '{"AttachmentIds":[],"ClientToken":""}'
};
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}}/participant/complete-attachment-upload#X-Amz-Bearer',
method: 'POST',
headers: {
'x-amz-bearer': '',
'content-type': 'application/json'
},
processData: false,
data: '{\n "AttachmentIds": [],\n "ClientToken": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"AttachmentIds\": [],\n \"ClientToken\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/participant/complete-attachment-upload#X-Amz-Bearer")
.post(body)
.addHeader("x-amz-bearer", "")
.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/participant/complete-attachment-upload',
headers: {
'x-amz-bearer': '',
'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({AttachmentIds: [], ClientToken: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/participant/complete-attachment-upload#X-Amz-Bearer',
headers: {'x-amz-bearer': '', 'content-type': 'application/json'},
body: {AttachmentIds: [], ClientToken: ''},
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}}/participant/complete-attachment-upload#X-Amz-Bearer');
req.headers({
'x-amz-bearer': '',
'content-type': 'application/json'
});
req.type('json');
req.send({
AttachmentIds: [],
ClientToken: ''
});
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}}/participant/complete-attachment-upload#X-Amz-Bearer',
headers: {'x-amz-bearer': '', 'content-type': 'application/json'},
data: {AttachmentIds: [], ClientToken: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/participant/complete-attachment-upload#X-Amz-Bearer';
const options = {
method: 'POST',
headers: {'x-amz-bearer': '', 'content-type': 'application/json'},
body: '{"AttachmentIds":[],"ClientToken":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"x-amz-bearer": @"",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"AttachmentIds": @[ ],
@"ClientToken": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/participant/complete-attachment-upload#X-Amz-Bearer"]
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}}/participant/complete-attachment-upload#X-Amz-Bearer" in
let headers = Header.add_list (Header.init ()) [
("x-amz-bearer", "");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"AttachmentIds\": [],\n \"ClientToken\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/participant/complete-attachment-upload#X-Amz-Bearer",
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([
'AttachmentIds' => [
],
'ClientToken' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json",
"x-amz-bearer: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/participant/complete-attachment-upload#X-Amz-Bearer', [
'body' => '{
"AttachmentIds": [],
"ClientToken": ""
}',
'headers' => [
'content-type' => 'application/json',
'x-amz-bearer' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/participant/complete-attachment-upload#X-Amz-Bearer');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'x-amz-bearer' => '',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'AttachmentIds' => [
],
'ClientToken' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'AttachmentIds' => [
],
'ClientToken' => ''
]));
$request->setRequestUrl('{{baseUrl}}/participant/complete-attachment-upload#X-Amz-Bearer');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'x-amz-bearer' => '',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("x-amz-bearer", "")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/participant/complete-attachment-upload#X-Amz-Bearer' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"AttachmentIds": [],
"ClientToken": ""
}'
$headers=@{}
$headers.Add("x-amz-bearer", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/participant/complete-attachment-upload#X-Amz-Bearer' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"AttachmentIds": [],
"ClientToken": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"AttachmentIds\": [],\n \"ClientToken\": \"\"\n}"
headers = {
'x-amz-bearer': "",
'content-type': "application/json"
}
conn.request("POST", "/baseUrl/participant/complete-attachment-upload", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/participant/complete-attachment-upload#X-Amz-Bearer"
payload = {
"AttachmentIds": [],
"ClientToken": ""
}
headers = {
"x-amz-bearer": "",
"content-type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/participant/complete-attachment-upload#X-Amz-Bearer"
payload <- "{\n \"AttachmentIds\": [],\n \"ClientToken\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, add_headers('x-amz-bearer' = ''), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/participant/complete-attachment-upload#X-Amz-Bearer")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-amz-bearer"] = ''
request["content-type"] = 'application/json'
request.body = "{\n \"AttachmentIds\": [],\n \"ClientToken\": \"\"\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/participant/complete-attachment-upload') do |req|
req.headers['x-amz-bearer'] = ''
req.body = "{\n \"AttachmentIds\": [],\n \"ClientToken\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/participant/complete-attachment-upload#X-Amz-Bearer";
let payload = json!({
"AttachmentIds": (),
"ClientToken": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("x-amz-bearer", "".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url '{{baseUrl}}/participant/complete-attachment-upload#X-Amz-Bearer' \
--header 'content-type: application/json' \
--header 'x-amz-bearer: ' \
--data '{
"AttachmentIds": [],
"ClientToken": ""
}'
echo '{
"AttachmentIds": [],
"ClientToken": ""
}' | \
http POST '{{baseUrl}}/participant/complete-attachment-upload#X-Amz-Bearer' \
content-type:application/json \
x-amz-bearer:''
wget --quiet \
--method POST \
--header 'x-amz-bearer: ' \
--header 'content-type: application/json' \
--body-data '{\n "AttachmentIds": [],\n "ClientToken": ""\n}' \
--output-document \
- '{{baseUrl}}/participant/complete-attachment-upload#X-Amz-Bearer'
import Foundation
let headers = [
"x-amz-bearer": "",
"content-type": "application/json"
]
let parameters = [
"AttachmentIds": [],
"ClientToken": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/participant/complete-attachment-upload#X-Amz-Bearer")! 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
CreateParticipantConnection
{{baseUrl}}/participant/connection#X-Amz-Bearer
HEADERS
X-Amz-Bearer
BODY json
{
"Type": [],
"ConnectParticipant": false
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/participant/connection#X-Amz-Bearer");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-amz-bearer: ");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"Type\": [],\n \"ConnectParticipant\": false\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/participant/connection#X-Amz-Bearer" {:headers {:x-amz-bearer ""}
:content-type :json
:form-params {:Type []
:ConnectParticipant false}})
require "http/client"
url = "{{baseUrl}}/participant/connection#X-Amz-Bearer"
headers = HTTP::Headers{
"x-amz-bearer" => ""
"content-type" => "application/json"
}
reqBody = "{\n \"Type\": [],\n \"ConnectParticipant\": 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}}/participant/connection#X-Amz-Bearer"),
Headers =
{
{ "x-amz-bearer", "" },
},
Content = new StringContent("{\n \"Type\": [],\n \"ConnectParticipant\": 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}}/participant/connection#X-Amz-Bearer");
var request = new RestRequest("", Method.Post);
request.AddHeader("x-amz-bearer", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"Type\": [],\n \"ConnectParticipant\": false\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/participant/connection#X-Amz-Bearer"
payload := strings.NewReader("{\n \"Type\": [],\n \"ConnectParticipant\": false\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-amz-bearer", "")
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/participant/connection HTTP/1.1
X-Amz-Bearer:
Content-Type: application/json
Host: example.com
Content-Length: 47
{
"Type": [],
"ConnectParticipant": false
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/participant/connection#X-Amz-Bearer")
.setHeader("x-amz-bearer", "")
.setHeader("content-type", "application/json")
.setBody("{\n \"Type\": [],\n \"ConnectParticipant\": false\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/participant/connection#X-Amz-Bearer"))
.header("x-amz-bearer", "")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"Type\": [],\n \"ConnectParticipant\": 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 \"Type\": [],\n \"ConnectParticipant\": false\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/participant/connection#X-Amz-Bearer")
.post(body)
.addHeader("x-amz-bearer", "")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/participant/connection#X-Amz-Bearer")
.header("x-amz-bearer", "")
.header("content-type", "application/json")
.body("{\n \"Type\": [],\n \"ConnectParticipant\": false\n}")
.asString();
const data = JSON.stringify({
Type: [],
ConnectParticipant: 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}}/participant/connection#X-Amz-Bearer');
xhr.setRequestHeader('x-amz-bearer', '');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/participant/connection#X-Amz-Bearer',
headers: {'x-amz-bearer': '', 'content-type': 'application/json'},
data: {Type: [], ConnectParticipant: false}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/participant/connection#X-Amz-Bearer';
const options = {
method: 'POST',
headers: {'x-amz-bearer': '', 'content-type': 'application/json'},
body: '{"Type":[],"ConnectParticipant":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}}/participant/connection#X-Amz-Bearer',
method: 'POST',
headers: {
'x-amz-bearer': '',
'content-type': 'application/json'
},
processData: false,
data: '{\n "Type": [],\n "ConnectParticipant": 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 \"Type\": [],\n \"ConnectParticipant\": false\n}")
val request = Request.Builder()
.url("{{baseUrl}}/participant/connection#X-Amz-Bearer")
.post(body)
.addHeader("x-amz-bearer", "")
.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/participant/connection',
headers: {
'x-amz-bearer': '',
'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({Type: [], ConnectParticipant: false}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/participant/connection#X-Amz-Bearer',
headers: {'x-amz-bearer': '', 'content-type': 'application/json'},
body: {Type: [], ConnectParticipant: 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}}/participant/connection#X-Amz-Bearer');
req.headers({
'x-amz-bearer': '',
'content-type': 'application/json'
});
req.type('json');
req.send({
Type: [],
ConnectParticipant: 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}}/participant/connection#X-Amz-Bearer',
headers: {'x-amz-bearer': '', 'content-type': 'application/json'},
data: {Type: [], ConnectParticipant: false}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/participant/connection#X-Amz-Bearer';
const options = {
method: 'POST',
headers: {'x-amz-bearer': '', 'content-type': 'application/json'},
body: '{"Type":[],"ConnectParticipant":false}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"x-amz-bearer": @"",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"Type": @[ ],
@"ConnectParticipant": @NO };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/participant/connection#X-Amz-Bearer"]
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}}/participant/connection#X-Amz-Bearer" in
let headers = Header.add_list (Header.init ()) [
("x-amz-bearer", "");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"Type\": [],\n \"ConnectParticipant\": false\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/participant/connection#X-Amz-Bearer",
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([
'Type' => [
],
'ConnectParticipant' => null
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json",
"x-amz-bearer: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/participant/connection#X-Amz-Bearer', [
'body' => '{
"Type": [],
"ConnectParticipant": false
}',
'headers' => [
'content-type' => 'application/json',
'x-amz-bearer' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/participant/connection#X-Amz-Bearer');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'x-amz-bearer' => '',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'Type' => [
],
'ConnectParticipant' => null
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'Type' => [
],
'ConnectParticipant' => null
]));
$request->setRequestUrl('{{baseUrl}}/participant/connection#X-Amz-Bearer');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'x-amz-bearer' => '',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("x-amz-bearer", "")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/participant/connection#X-Amz-Bearer' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"Type": [],
"ConnectParticipant": false
}'
$headers=@{}
$headers.Add("x-amz-bearer", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/participant/connection#X-Amz-Bearer' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"Type": [],
"ConnectParticipant": false
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"Type\": [],\n \"ConnectParticipant\": false\n}"
headers = {
'x-amz-bearer': "",
'content-type': "application/json"
}
conn.request("POST", "/baseUrl/participant/connection", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/participant/connection#X-Amz-Bearer"
payload = {
"Type": [],
"ConnectParticipant": False
}
headers = {
"x-amz-bearer": "",
"content-type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/participant/connection#X-Amz-Bearer"
payload <- "{\n \"Type\": [],\n \"ConnectParticipant\": false\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, add_headers('x-amz-bearer' = ''), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/participant/connection#X-Amz-Bearer")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-amz-bearer"] = ''
request["content-type"] = 'application/json'
request.body = "{\n \"Type\": [],\n \"ConnectParticipant\": 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/participant/connection') do |req|
req.headers['x-amz-bearer'] = ''
req.body = "{\n \"Type\": [],\n \"ConnectParticipant\": false\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/participant/connection#X-Amz-Bearer";
let payload = json!({
"Type": (),
"ConnectParticipant": false
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("x-amz-bearer", "".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url '{{baseUrl}}/participant/connection#X-Amz-Bearer' \
--header 'content-type: application/json' \
--header 'x-amz-bearer: ' \
--data '{
"Type": [],
"ConnectParticipant": false
}'
echo '{
"Type": [],
"ConnectParticipant": false
}' | \
http POST '{{baseUrl}}/participant/connection#X-Amz-Bearer' \
content-type:application/json \
x-amz-bearer:''
wget --quiet \
--method POST \
--header 'x-amz-bearer: ' \
--header 'content-type: application/json' \
--body-data '{\n "Type": [],\n "ConnectParticipant": false\n}' \
--output-document \
- '{{baseUrl}}/participant/connection#X-Amz-Bearer'
import Foundation
let headers = [
"x-amz-bearer": "",
"content-type": "application/json"
]
let parameters = [
"Type": [],
"ConnectParticipant": false
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/participant/connection#X-Amz-Bearer")! 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
DisconnectParticipant
{{baseUrl}}/participant/disconnect#X-Amz-Bearer
HEADERS
X-Amz-Bearer
BODY json
{
"ClientToken": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/participant/disconnect#X-Amz-Bearer");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-amz-bearer: ");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"ClientToken\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/participant/disconnect#X-Amz-Bearer" {:headers {:x-amz-bearer ""}
:content-type :json
:form-params {:ClientToken ""}})
require "http/client"
url = "{{baseUrl}}/participant/disconnect#X-Amz-Bearer"
headers = HTTP::Headers{
"x-amz-bearer" => ""
"content-type" => "application/json"
}
reqBody = "{\n \"ClientToken\": \"\"\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}}/participant/disconnect#X-Amz-Bearer"),
Headers =
{
{ "x-amz-bearer", "" },
},
Content = new StringContent("{\n \"ClientToken\": \"\"\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}}/participant/disconnect#X-Amz-Bearer");
var request = new RestRequest("", Method.Post);
request.AddHeader("x-amz-bearer", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"ClientToken\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/participant/disconnect#X-Amz-Bearer"
payload := strings.NewReader("{\n \"ClientToken\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-amz-bearer", "")
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/participant/disconnect HTTP/1.1
X-Amz-Bearer:
Content-Type: application/json
Host: example.com
Content-Length: 23
{
"ClientToken": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/participant/disconnect#X-Amz-Bearer")
.setHeader("x-amz-bearer", "")
.setHeader("content-type", "application/json")
.setBody("{\n \"ClientToken\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/participant/disconnect#X-Amz-Bearer"))
.header("x-amz-bearer", "")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"ClientToken\": \"\"\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 \"ClientToken\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/participant/disconnect#X-Amz-Bearer")
.post(body)
.addHeader("x-amz-bearer", "")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/participant/disconnect#X-Amz-Bearer")
.header("x-amz-bearer", "")
.header("content-type", "application/json")
.body("{\n \"ClientToken\": \"\"\n}")
.asString();
const data = JSON.stringify({
ClientToken: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/participant/disconnect#X-Amz-Bearer');
xhr.setRequestHeader('x-amz-bearer', '');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/participant/disconnect#X-Amz-Bearer',
headers: {'x-amz-bearer': '', 'content-type': 'application/json'},
data: {ClientToken: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/participant/disconnect#X-Amz-Bearer';
const options = {
method: 'POST',
headers: {'x-amz-bearer': '', 'content-type': 'application/json'},
body: '{"ClientToken":""}'
};
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}}/participant/disconnect#X-Amz-Bearer',
method: 'POST',
headers: {
'x-amz-bearer': '',
'content-type': 'application/json'
},
processData: false,
data: '{\n "ClientToken": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"ClientToken\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/participant/disconnect#X-Amz-Bearer")
.post(body)
.addHeader("x-amz-bearer", "")
.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/participant/disconnect',
headers: {
'x-amz-bearer': '',
'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({ClientToken: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/participant/disconnect#X-Amz-Bearer',
headers: {'x-amz-bearer': '', 'content-type': 'application/json'},
body: {ClientToken: ''},
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}}/participant/disconnect#X-Amz-Bearer');
req.headers({
'x-amz-bearer': '',
'content-type': 'application/json'
});
req.type('json');
req.send({
ClientToken: ''
});
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}}/participant/disconnect#X-Amz-Bearer',
headers: {'x-amz-bearer': '', 'content-type': 'application/json'},
data: {ClientToken: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/participant/disconnect#X-Amz-Bearer';
const options = {
method: 'POST',
headers: {'x-amz-bearer': '', 'content-type': 'application/json'},
body: '{"ClientToken":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"x-amz-bearer": @"",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"ClientToken": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/participant/disconnect#X-Amz-Bearer"]
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}}/participant/disconnect#X-Amz-Bearer" in
let headers = Header.add_list (Header.init ()) [
("x-amz-bearer", "");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"ClientToken\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/participant/disconnect#X-Amz-Bearer",
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([
'ClientToken' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json",
"x-amz-bearer: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/participant/disconnect#X-Amz-Bearer', [
'body' => '{
"ClientToken": ""
}',
'headers' => [
'content-type' => 'application/json',
'x-amz-bearer' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/participant/disconnect#X-Amz-Bearer');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'x-amz-bearer' => '',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'ClientToken' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'ClientToken' => ''
]));
$request->setRequestUrl('{{baseUrl}}/participant/disconnect#X-Amz-Bearer');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'x-amz-bearer' => '',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("x-amz-bearer", "")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/participant/disconnect#X-Amz-Bearer' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"ClientToken": ""
}'
$headers=@{}
$headers.Add("x-amz-bearer", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/participant/disconnect#X-Amz-Bearer' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"ClientToken": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"ClientToken\": \"\"\n}"
headers = {
'x-amz-bearer': "",
'content-type': "application/json"
}
conn.request("POST", "/baseUrl/participant/disconnect", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/participant/disconnect#X-Amz-Bearer"
payload = { "ClientToken": "" }
headers = {
"x-amz-bearer": "",
"content-type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/participant/disconnect#X-Amz-Bearer"
payload <- "{\n \"ClientToken\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, add_headers('x-amz-bearer' = ''), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/participant/disconnect#X-Amz-Bearer")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-amz-bearer"] = ''
request["content-type"] = 'application/json'
request.body = "{\n \"ClientToken\": \"\"\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/participant/disconnect') do |req|
req.headers['x-amz-bearer'] = ''
req.body = "{\n \"ClientToken\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/participant/disconnect#X-Amz-Bearer";
let payload = json!({"ClientToken": ""});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("x-amz-bearer", "".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url '{{baseUrl}}/participant/disconnect#X-Amz-Bearer' \
--header 'content-type: application/json' \
--header 'x-amz-bearer: ' \
--data '{
"ClientToken": ""
}'
echo '{
"ClientToken": ""
}' | \
http POST '{{baseUrl}}/participant/disconnect#X-Amz-Bearer' \
content-type:application/json \
x-amz-bearer:''
wget --quiet \
--method POST \
--header 'x-amz-bearer: ' \
--header 'content-type: application/json' \
--body-data '{\n "ClientToken": ""\n}' \
--output-document \
- '{{baseUrl}}/participant/disconnect#X-Amz-Bearer'
import Foundation
let headers = [
"x-amz-bearer": "",
"content-type": "application/json"
]
let parameters = ["ClientToken": ""] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/participant/disconnect#X-Amz-Bearer")! 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
GetAttachment
{{baseUrl}}/participant/attachment#X-Amz-Bearer
HEADERS
X-Amz-Bearer
BODY json
{
"AttachmentId": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/participant/attachment#X-Amz-Bearer");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-amz-bearer: ");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"AttachmentId\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/participant/attachment#X-Amz-Bearer" {:headers {:x-amz-bearer ""}
:content-type :json
:form-params {:AttachmentId ""}})
require "http/client"
url = "{{baseUrl}}/participant/attachment#X-Amz-Bearer"
headers = HTTP::Headers{
"x-amz-bearer" => ""
"content-type" => "application/json"
}
reqBody = "{\n \"AttachmentId\": \"\"\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}}/participant/attachment#X-Amz-Bearer"),
Headers =
{
{ "x-amz-bearer", "" },
},
Content = new StringContent("{\n \"AttachmentId\": \"\"\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}}/participant/attachment#X-Amz-Bearer");
var request = new RestRequest("", Method.Post);
request.AddHeader("x-amz-bearer", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"AttachmentId\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/participant/attachment#X-Amz-Bearer"
payload := strings.NewReader("{\n \"AttachmentId\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-amz-bearer", "")
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/participant/attachment HTTP/1.1
X-Amz-Bearer:
Content-Type: application/json
Host: example.com
Content-Length: 24
{
"AttachmentId": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/participant/attachment#X-Amz-Bearer")
.setHeader("x-amz-bearer", "")
.setHeader("content-type", "application/json")
.setBody("{\n \"AttachmentId\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/participant/attachment#X-Amz-Bearer"))
.header("x-amz-bearer", "")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"AttachmentId\": \"\"\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 \"AttachmentId\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/participant/attachment#X-Amz-Bearer")
.post(body)
.addHeader("x-amz-bearer", "")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/participant/attachment#X-Amz-Bearer")
.header("x-amz-bearer", "")
.header("content-type", "application/json")
.body("{\n \"AttachmentId\": \"\"\n}")
.asString();
const data = JSON.stringify({
AttachmentId: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/participant/attachment#X-Amz-Bearer');
xhr.setRequestHeader('x-amz-bearer', '');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/participant/attachment#X-Amz-Bearer',
headers: {'x-amz-bearer': '', 'content-type': 'application/json'},
data: {AttachmentId: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/participant/attachment#X-Amz-Bearer';
const options = {
method: 'POST',
headers: {'x-amz-bearer': '', 'content-type': 'application/json'},
body: '{"AttachmentId":""}'
};
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}}/participant/attachment#X-Amz-Bearer',
method: 'POST',
headers: {
'x-amz-bearer': '',
'content-type': 'application/json'
},
processData: false,
data: '{\n "AttachmentId": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"AttachmentId\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/participant/attachment#X-Amz-Bearer")
.post(body)
.addHeader("x-amz-bearer", "")
.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/participant/attachment',
headers: {
'x-amz-bearer': '',
'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({AttachmentId: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/participant/attachment#X-Amz-Bearer',
headers: {'x-amz-bearer': '', 'content-type': 'application/json'},
body: {AttachmentId: ''},
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}}/participant/attachment#X-Amz-Bearer');
req.headers({
'x-amz-bearer': '',
'content-type': 'application/json'
});
req.type('json');
req.send({
AttachmentId: ''
});
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}}/participant/attachment#X-Amz-Bearer',
headers: {'x-amz-bearer': '', 'content-type': 'application/json'},
data: {AttachmentId: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/participant/attachment#X-Amz-Bearer';
const options = {
method: 'POST',
headers: {'x-amz-bearer': '', 'content-type': 'application/json'},
body: '{"AttachmentId":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"x-amz-bearer": @"",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"AttachmentId": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/participant/attachment#X-Amz-Bearer"]
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}}/participant/attachment#X-Amz-Bearer" in
let headers = Header.add_list (Header.init ()) [
("x-amz-bearer", "");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"AttachmentId\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/participant/attachment#X-Amz-Bearer",
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([
'AttachmentId' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json",
"x-amz-bearer: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/participant/attachment#X-Amz-Bearer', [
'body' => '{
"AttachmentId": ""
}',
'headers' => [
'content-type' => 'application/json',
'x-amz-bearer' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/participant/attachment#X-Amz-Bearer');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'x-amz-bearer' => '',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'AttachmentId' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'AttachmentId' => ''
]));
$request->setRequestUrl('{{baseUrl}}/participant/attachment#X-Amz-Bearer');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'x-amz-bearer' => '',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("x-amz-bearer", "")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/participant/attachment#X-Amz-Bearer' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"AttachmentId": ""
}'
$headers=@{}
$headers.Add("x-amz-bearer", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/participant/attachment#X-Amz-Bearer' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"AttachmentId": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"AttachmentId\": \"\"\n}"
headers = {
'x-amz-bearer': "",
'content-type': "application/json"
}
conn.request("POST", "/baseUrl/participant/attachment", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/participant/attachment#X-Amz-Bearer"
payload = { "AttachmentId": "" }
headers = {
"x-amz-bearer": "",
"content-type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/participant/attachment#X-Amz-Bearer"
payload <- "{\n \"AttachmentId\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, add_headers('x-amz-bearer' = ''), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/participant/attachment#X-Amz-Bearer")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-amz-bearer"] = ''
request["content-type"] = 'application/json'
request.body = "{\n \"AttachmentId\": \"\"\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/participant/attachment') do |req|
req.headers['x-amz-bearer'] = ''
req.body = "{\n \"AttachmentId\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/participant/attachment#X-Amz-Bearer";
let payload = json!({"AttachmentId": ""});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("x-amz-bearer", "".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url '{{baseUrl}}/participant/attachment#X-Amz-Bearer' \
--header 'content-type: application/json' \
--header 'x-amz-bearer: ' \
--data '{
"AttachmentId": ""
}'
echo '{
"AttachmentId": ""
}' | \
http POST '{{baseUrl}}/participant/attachment#X-Amz-Bearer' \
content-type:application/json \
x-amz-bearer:''
wget --quiet \
--method POST \
--header 'x-amz-bearer: ' \
--header 'content-type: application/json' \
--body-data '{\n "AttachmentId": ""\n}' \
--output-document \
- '{{baseUrl}}/participant/attachment#X-Amz-Bearer'
import Foundation
let headers = [
"x-amz-bearer": "",
"content-type": "application/json"
]
let parameters = ["AttachmentId": ""] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/participant/attachment#X-Amz-Bearer")! 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
GetTranscript
{{baseUrl}}/participant/transcript#X-Amz-Bearer
HEADERS
X-Amz-Bearer
BODY json
{
"ContactId": "",
"MaxResults": 0,
"NextToken": "",
"ScanDirection": "",
"SortOrder": "",
"StartPosition": {
"Id": "",
"AbsoluteTime": "",
"MostRecent": ""
}
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/participant/transcript#X-Amz-Bearer");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-amz-bearer: ");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"ContactId\": \"\",\n \"MaxResults\": 0,\n \"NextToken\": \"\",\n \"ScanDirection\": \"\",\n \"SortOrder\": \"\",\n \"StartPosition\": {\n \"Id\": \"\",\n \"AbsoluteTime\": \"\",\n \"MostRecent\": \"\"\n }\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/participant/transcript#X-Amz-Bearer" {:headers {:x-amz-bearer ""}
:content-type :json
:form-params {:ContactId ""
:MaxResults 0
:NextToken ""
:ScanDirection ""
:SortOrder ""
:StartPosition {:Id ""
:AbsoluteTime ""
:MostRecent ""}}})
require "http/client"
url = "{{baseUrl}}/participant/transcript#X-Amz-Bearer"
headers = HTTP::Headers{
"x-amz-bearer" => ""
"content-type" => "application/json"
}
reqBody = "{\n \"ContactId\": \"\",\n \"MaxResults\": 0,\n \"NextToken\": \"\",\n \"ScanDirection\": \"\",\n \"SortOrder\": \"\",\n \"StartPosition\": {\n \"Id\": \"\",\n \"AbsoluteTime\": \"\",\n \"MostRecent\": \"\"\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}}/participant/transcript#X-Amz-Bearer"),
Headers =
{
{ "x-amz-bearer", "" },
},
Content = new StringContent("{\n \"ContactId\": \"\",\n \"MaxResults\": 0,\n \"NextToken\": \"\",\n \"ScanDirection\": \"\",\n \"SortOrder\": \"\",\n \"StartPosition\": {\n \"Id\": \"\",\n \"AbsoluteTime\": \"\",\n \"MostRecent\": \"\"\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}}/participant/transcript#X-Amz-Bearer");
var request = new RestRequest("", Method.Post);
request.AddHeader("x-amz-bearer", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"ContactId\": \"\",\n \"MaxResults\": 0,\n \"NextToken\": \"\",\n \"ScanDirection\": \"\",\n \"SortOrder\": \"\",\n \"StartPosition\": {\n \"Id\": \"\",\n \"AbsoluteTime\": \"\",\n \"MostRecent\": \"\"\n }\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/participant/transcript#X-Amz-Bearer"
payload := strings.NewReader("{\n \"ContactId\": \"\",\n \"MaxResults\": 0,\n \"NextToken\": \"\",\n \"ScanDirection\": \"\",\n \"SortOrder\": \"\",\n \"StartPosition\": {\n \"Id\": \"\",\n \"AbsoluteTime\": \"\",\n \"MostRecent\": \"\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-amz-bearer", "")
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/participant/transcript HTTP/1.1
X-Amz-Bearer:
Content-Type: application/json
Host: example.com
Content-Length: 186
{
"ContactId": "",
"MaxResults": 0,
"NextToken": "",
"ScanDirection": "",
"SortOrder": "",
"StartPosition": {
"Id": "",
"AbsoluteTime": "",
"MostRecent": ""
}
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/participant/transcript#X-Amz-Bearer")
.setHeader("x-amz-bearer", "")
.setHeader("content-type", "application/json")
.setBody("{\n \"ContactId\": \"\",\n \"MaxResults\": 0,\n \"NextToken\": \"\",\n \"ScanDirection\": \"\",\n \"SortOrder\": \"\",\n \"StartPosition\": {\n \"Id\": \"\",\n \"AbsoluteTime\": \"\",\n \"MostRecent\": \"\"\n }\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/participant/transcript#X-Amz-Bearer"))
.header("x-amz-bearer", "")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"ContactId\": \"\",\n \"MaxResults\": 0,\n \"NextToken\": \"\",\n \"ScanDirection\": \"\",\n \"SortOrder\": \"\",\n \"StartPosition\": {\n \"Id\": \"\",\n \"AbsoluteTime\": \"\",\n \"MostRecent\": \"\"\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 \"ContactId\": \"\",\n \"MaxResults\": 0,\n \"NextToken\": \"\",\n \"ScanDirection\": \"\",\n \"SortOrder\": \"\",\n \"StartPosition\": {\n \"Id\": \"\",\n \"AbsoluteTime\": \"\",\n \"MostRecent\": \"\"\n }\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/participant/transcript#X-Amz-Bearer")
.post(body)
.addHeader("x-amz-bearer", "")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/participant/transcript#X-Amz-Bearer")
.header("x-amz-bearer", "")
.header("content-type", "application/json")
.body("{\n \"ContactId\": \"\",\n \"MaxResults\": 0,\n \"NextToken\": \"\",\n \"ScanDirection\": \"\",\n \"SortOrder\": \"\",\n \"StartPosition\": {\n \"Id\": \"\",\n \"AbsoluteTime\": \"\",\n \"MostRecent\": \"\"\n }\n}")
.asString();
const data = JSON.stringify({
ContactId: '',
MaxResults: 0,
NextToken: '',
ScanDirection: '',
SortOrder: '',
StartPosition: {
Id: '',
AbsoluteTime: '',
MostRecent: ''
}
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/participant/transcript#X-Amz-Bearer');
xhr.setRequestHeader('x-amz-bearer', '');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/participant/transcript#X-Amz-Bearer',
headers: {'x-amz-bearer': '', 'content-type': 'application/json'},
data: {
ContactId: '',
MaxResults: 0,
NextToken: '',
ScanDirection: '',
SortOrder: '',
StartPosition: {Id: '', AbsoluteTime: '', MostRecent: ''}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/participant/transcript#X-Amz-Bearer';
const options = {
method: 'POST',
headers: {'x-amz-bearer': '', 'content-type': 'application/json'},
body: '{"ContactId":"","MaxResults":0,"NextToken":"","ScanDirection":"","SortOrder":"","StartPosition":{"Id":"","AbsoluteTime":"","MostRecent":""}}'
};
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}}/participant/transcript#X-Amz-Bearer',
method: 'POST',
headers: {
'x-amz-bearer': '',
'content-type': 'application/json'
},
processData: false,
data: '{\n "ContactId": "",\n "MaxResults": 0,\n "NextToken": "",\n "ScanDirection": "",\n "SortOrder": "",\n "StartPosition": {\n "Id": "",\n "AbsoluteTime": "",\n "MostRecent": ""\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 \"ContactId\": \"\",\n \"MaxResults\": 0,\n \"NextToken\": \"\",\n \"ScanDirection\": \"\",\n \"SortOrder\": \"\",\n \"StartPosition\": {\n \"Id\": \"\",\n \"AbsoluteTime\": \"\",\n \"MostRecent\": \"\"\n }\n}")
val request = Request.Builder()
.url("{{baseUrl}}/participant/transcript#X-Amz-Bearer")
.post(body)
.addHeader("x-amz-bearer", "")
.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/participant/transcript',
headers: {
'x-amz-bearer': '',
'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({
ContactId: '',
MaxResults: 0,
NextToken: '',
ScanDirection: '',
SortOrder: '',
StartPosition: {Id: '', AbsoluteTime: '', MostRecent: ''}
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/participant/transcript#X-Amz-Bearer',
headers: {'x-amz-bearer': '', 'content-type': 'application/json'},
body: {
ContactId: '',
MaxResults: 0,
NextToken: '',
ScanDirection: '',
SortOrder: '',
StartPosition: {Id: '', AbsoluteTime: '', MostRecent: ''}
},
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}}/participant/transcript#X-Amz-Bearer');
req.headers({
'x-amz-bearer': '',
'content-type': 'application/json'
});
req.type('json');
req.send({
ContactId: '',
MaxResults: 0,
NextToken: '',
ScanDirection: '',
SortOrder: '',
StartPosition: {
Id: '',
AbsoluteTime: '',
MostRecent: ''
}
});
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}}/participant/transcript#X-Amz-Bearer',
headers: {'x-amz-bearer': '', 'content-type': 'application/json'},
data: {
ContactId: '',
MaxResults: 0,
NextToken: '',
ScanDirection: '',
SortOrder: '',
StartPosition: {Id: '', AbsoluteTime: '', MostRecent: ''}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/participant/transcript#X-Amz-Bearer';
const options = {
method: 'POST',
headers: {'x-amz-bearer': '', 'content-type': 'application/json'},
body: '{"ContactId":"","MaxResults":0,"NextToken":"","ScanDirection":"","SortOrder":"","StartPosition":{"Id":"","AbsoluteTime":"","MostRecent":""}}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"x-amz-bearer": @"",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"ContactId": @"",
@"MaxResults": @0,
@"NextToken": @"",
@"ScanDirection": @"",
@"SortOrder": @"",
@"StartPosition": @{ @"Id": @"", @"AbsoluteTime": @"", @"MostRecent": @"" } };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/participant/transcript#X-Amz-Bearer"]
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}}/participant/transcript#X-Amz-Bearer" in
let headers = Header.add_list (Header.init ()) [
("x-amz-bearer", "");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"ContactId\": \"\",\n \"MaxResults\": 0,\n \"NextToken\": \"\",\n \"ScanDirection\": \"\",\n \"SortOrder\": \"\",\n \"StartPosition\": {\n \"Id\": \"\",\n \"AbsoluteTime\": \"\",\n \"MostRecent\": \"\"\n }\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/participant/transcript#X-Amz-Bearer",
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([
'ContactId' => '',
'MaxResults' => 0,
'NextToken' => '',
'ScanDirection' => '',
'SortOrder' => '',
'StartPosition' => [
'Id' => '',
'AbsoluteTime' => '',
'MostRecent' => ''
]
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json",
"x-amz-bearer: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/participant/transcript#X-Amz-Bearer', [
'body' => '{
"ContactId": "",
"MaxResults": 0,
"NextToken": "",
"ScanDirection": "",
"SortOrder": "",
"StartPosition": {
"Id": "",
"AbsoluteTime": "",
"MostRecent": ""
}
}',
'headers' => [
'content-type' => 'application/json',
'x-amz-bearer' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/participant/transcript#X-Amz-Bearer');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'x-amz-bearer' => '',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'ContactId' => '',
'MaxResults' => 0,
'NextToken' => '',
'ScanDirection' => '',
'SortOrder' => '',
'StartPosition' => [
'Id' => '',
'AbsoluteTime' => '',
'MostRecent' => ''
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'ContactId' => '',
'MaxResults' => 0,
'NextToken' => '',
'ScanDirection' => '',
'SortOrder' => '',
'StartPosition' => [
'Id' => '',
'AbsoluteTime' => '',
'MostRecent' => ''
]
]));
$request->setRequestUrl('{{baseUrl}}/participant/transcript#X-Amz-Bearer');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'x-amz-bearer' => '',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("x-amz-bearer", "")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/participant/transcript#X-Amz-Bearer' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"ContactId": "",
"MaxResults": 0,
"NextToken": "",
"ScanDirection": "",
"SortOrder": "",
"StartPosition": {
"Id": "",
"AbsoluteTime": "",
"MostRecent": ""
}
}'
$headers=@{}
$headers.Add("x-amz-bearer", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/participant/transcript#X-Amz-Bearer' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"ContactId": "",
"MaxResults": 0,
"NextToken": "",
"ScanDirection": "",
"SortOrder": "",
"StartPosition": {
"Id": "",
"AbsoluteTime": "",
"MostRecent": ""
}
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"ContactId\": \"\",\n \"MaxResults\": 0,\n \"NextToken\": \"\",\n \"ScanDirection\": \"\",\n \"SortOrder\": \"\",\n \"StartPosition\": {\n \"Id\": \"\",\n \"AbsoluteTime\": \"\",\n \"MostRecent\": \"\"\n }\n}"
headers = {
'x-amz-bearer': "",
'content-type': "application/json"
}
conn.request("POST", "/baseUrl/participant/transcript", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/participant/transcript#X-Amz-Bearer"
payload = {
"ContactId": "",
"MaxResults": 0,
"NextToken": "",
"ScanDirection": "",
"SortOrder": "",
"StartPosition": {
"Id": "",
"AbsoluteTime": "",
"MostRecent": ""
}
}
headers = {
"x-amz-bearer": "",
"content-type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/participant/transcript#X-Amz-Bearer"
payload <- "{\n \"ContactId\": \"\",\n \"MaxResults\": 0,\n \"NextToken\": \"\",\n \"ScanDirection\": \"\",\n \"SortOrder\": \"\",\n \"StartPosition\": {\n \"Id\": \"\",\n \"AbsoluteTime\": \"\",\n \"MostRecent\": \"\"\n }\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, add_headers('x-amz-bearer' = ''), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/participant/transcript#X-Amz-Bearer")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-amz-bearer"] = ''
request["content-type"] = 'application/json'
request.body = "{\n \"ContactId\": \"\",\n \"MaxResults\": 0,\n \"NextToken\": \"\",\n \"ScanDirection\": \"\",\n \"SortOrder\": \"\",\n \"StartPosition\": {\n \"Id\": \"\",\n \"AbsoluteTime\": \"\",\n \"MostRecent\": \"\"\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/participant/transcript') do |req|
req.headers['x-amz-bearer'] = ''
req.body = "{\n \"ContactId\": \"\",\n \"MaxResults\": 0,\n \"NextToken\": \"\",\n \"ScanDirection\": \"\",\n \"SortOrder\": \"\",\n \"StartPosition\": {\n \"Id\": \"\",\n \"AbsoluteTime\": \"\",\n \"MostRecent\": \"\"\n }\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/participant/transcript#X-Amz-Bearer";
let payload = json!({
"ContactId": "",
"MaxResults": 0,
"NextToken": "",
"ScanDirection": "",
"SortOrder": "",
"StartPosition": json!({
"Id": "",
"AbsoluteTime": "",
"MostRecent": ""
})
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("x-amz-bearer", "".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url '{{baseUrl}}/participant/transcript#X-Amz-Bearer' \
--header 'content-type: application/json' \
--header 'x-amz-bearer: ' \
--data '{
"ContactId": "",
"MaxResults": 0,
"NextToken": "",
"ScanDirection": "",
"SortOrder": "",
"StartPosition": {
"Id": "",
"AbsoluteTime": "",
"MostRecent": ""
}
}'
echo '{
"ContactId": "",
"MaxResults": 0,
"NextToken": "",
"ScanDirection": "",
"SortOrder": "",
"StartPosition": {
"Id": "",
"AbsoluteTime": "",
"MostRecent": ""
}
}' | \
http POST '{{baseUrl}}/participant/transcript#X-Amz-Bearer' \
content-type:application/json \
x-amz-bearer:''
wget --quiet \
--method POST \
--header 'x-amz-bearer: ' \
--header 'content-type: application/json' \
--body-data '{\n "ContactId": "",\n "MaxResults": 0,\n "NextToken": "",\n "ScanDirection": "",\n "SortOrder": "",\n "StartPosition": {\n "Id": "",\n "AbsoluteTime": "",\n "MostRecent": ""\n }\n}' \
--output-document \
- '{{baseUrl}}/participant/transcript#X-Amz-Bearer'
import Foundation
let headers = [
"x-amz-bearer": "",
"content-type": "application/json"
]
let parameters = [
"ContactId": "",
"MaxResults": 0,
"NextToken": "",
"ScanDirection": "",
"SortOrder": "",
"StartPosition": [
"Id": "",
"AbsoluteTime": "",
"MostRecent": ""
]
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/participant/transcript#X-Amz-Bearer")! 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
SendEvent
{{baseUrl}}/participant/event#X-Amz-Bearer
HEADERS
X-Amz-Bearer
BODY json
{
"ContentType": "",
"Content": "",
"ClientToken": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/participant/event#X-Amz-Bearer");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-amz-bearer: ");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"ContentType\": \"\",\n \"Content\": \"\",\n \"ClientToken\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/participant/event#X-Amz-Bearer" {:headers {:x-amz-bearer ""}
:content-type :json
:form-params {:ContentType ""
:Content ""
:ClientToken ""}})
require "http/client"
url = "{{baseUrl}}/participant/event#X-Amz-Bearer"
headers = HTTP::Headers{
"x-amz-bearer" => ""
"content-type" => "application/json"
}
reqBody = "{\n \"ContentType\": \"\",\n \"Content\": \"\",\n \"ClientToken\": \"\"\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}}/participant/event#X-Amz-Bearer"),
Headers =
{
{ "x-amz-bearer", "" },
},
Content = new StringContent("{\n \"ContentType\": \"\",\n \"Content\": \"\",\n \"ClientToken\": \"\"\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}}/participant/event#X-Amz-Bearer");
var request = new RestRequest("", Method.Post);
request.AddHeader("x-amz-bearer", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"ContentType\": \"\",\n \"Content\": \"\",\n \"ClientToken\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/participant/event#X-Amz-Bearer"
payload := strings.NewReader("{\n \"ContentType\": \"\",\n \"Content\": \"\",\n \"ClientToken\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-amz-bearer", "")
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/participant/event HTTP/1.1
X-Amz-Bearer:
Content-Type: application/json
Host: example.com
Content-Length: 61
{
"ContentType": "",
"Content": "",
"ClientToken": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/participant/event#X-Amz-Bearer")
.setHeader("x-amz-bearer", "")
.setHeader("content-type", "application/json")
.setBody("{\n \"ContentType\": \"\",\n \"Content\": \"\",\n \"ClientToken\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/participant/event#X-Amz-Bearer"))
.header("x-amz-bearer", "")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"ContentType\": \"\",\n \"Content\": \"\",\n \"ClientToken\": \"\"\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 \"ContentType\": \"\",\n \"Content\": \"\",\n \"ClientToken\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/participant/event#X-Amz-Bearer")
.post(body)
.addHeader("x-amz-bearer", "")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/participant/event#X-Amz-Bearer")
.header("x-amz-bearer", "")
.header("content-type", "application/json")
.body("{\n \"ContentType\": \"\",\n \"Content\": \"\",\n \"ClientToken\": \"\"\n}")
.asString();
const data = JSON.stringify({
ContentType: '',
Content: '',
ClientToken: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/participant/event#X-Amz-Bearer');
xhr.setRequestHeader('x-amz-bearer', '');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/participant/event#X-Amz-Bearer',
headers: {'x-amz-bearer': '', 'content-type': 'application/json'},
data: {ContentType: '', Content: '', ClientToken: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/participant/event#X-Amz-Bearer';
const options = {
method: 'POST',
headers: {'x-amz-bearer': '', 'content-type': 'application/json'},
body: '{"ContentType":"","Content":"","ClientToken":""}'
};
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}}/participant/event#X-Amz-Bearer',
method: 'POST',
headers: {
'x-amz-bearer': '',
'content-type': 'application/json'
},
processData: false,
data: '{\n "ContentType": "",\n "Content": "",\n "ClientToken": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"ContentType\": \"\",\n \"Content\": \"\",\n \"ClientToken\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/participant/event#X-Amz-Bearer")
.post(body)
.addHeader("x-amz-bearer", "")
.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/participant/event',
headers: {
'x-amz-bearer': '',
'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({ContentType: '', Content: '', ClientToken: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/participant/event#X-Amz-Bearer',
headers: {'x-amz-bearer': '', 'content-type': 'application/json'},
body: {ContentType: '', Content: '', ClientToken: ''},
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}}/participant/event#X-Amz-Bearer');
req.headers({
'x-amz-bearer': '',
'content-type': 'application/json'
});
req.type('json');
req.send({
ContentType: '',
Content: '',
ClientToken: ''
});
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}}/participant/event#X-Amz-Bearer',
headers: {'x-amz-bearer': '', 'content-type': 'application/json'},
data: {ContentType: '', Content: '', ClientToken: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/participant/event#X-Amz-Bearer';
const options = {
method: 'POST',
headers: {'x-amz-bearer': '', 'content-type': 'application/json'},
body: '{"ContentType":"","Content":"","ClientToken":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"x-amz-bearer": @"",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"ContentType": @"",
@"Content": @"",
@"ClientToken": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/participant/event#X-Amz-Bearer"]
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}}/participant/event#X-Amz-Bearer" in
let headers = Header.add_list (Header.init ()) [
("x-amz-bearer", "");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"ContentType\": \"\",\n \"Content\": \"\",\n \"ClientToken\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/participant/event#X-Amz-Bearer",
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([
'ContentType' => '',
'Content' => '',
'ClientToken' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json",
"x-amz-bearer: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/participant/event#X-Amz-Bearer', [
'body' => '{
"ContentType": "",
"Content": "",
"ClientToken": ""
}',
'headers' => [
'content-type' => 'application/json',
'x-amz-bearer' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/participant/event#X-Amz-Bearer');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'x-amz-bearer' => '',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'ContentType' => '',
'Content' => '',
'ClientToken' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'ContentType' => '',
'Content' => '',
'ClientToken' => ''
]));
$request->setRequestUrl('{{baseUrl}}/participant/event#X-Amz-Bearer');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'x-amz-bearer' => '',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("x-amz-bearer", "")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/participant/event#X-Amz-Bearer' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"ContentType": "",
"Content": "",
"ClientToken": ""
}'
$headers=@{}
$headers.Add("x-amz-bearer", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/participant/event#X-Amz-Bearer' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"ContentType": "",
"Content": "",
"ClientToken": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"ContentType\": \"\",\n \"Content\": \"\",\n \"ClientToken\": \"\"\n}"
headers = {
'x-amz-bearer': "",
'content-type': "application/json"
}
conn.request("POST", "/baseUrl/participant/event", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/participant/event#X-Amz-Bearer"
payload = {
"ContentType": "",
"Content": "",
"ClientToken": ""
}
headers = {
"x-amz-bearer": "",
"content-type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/participant/event#X-Amz-Bearer"
payload <- "{\n \"ContentType\": \"\",\n \"Content\": \"\",\n \"ClientToken\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, add_headers('x-amz-bearer' = ''), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/participant/event#X-Amz-Bearer")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-amz-bearer"] = ''
request["content-type"] = 'application/json'
request.body = "{\n \"ContentType\": \"\",\n \"Content\": \"\",\n \"ClientToken\": \"\"\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/participant/event') do |req|
req.headers['x-amz-bearer'] = ''
req.body = "{\n \"ContentType\": \"\",\n \"Content\": \"\",\n \"ClientToken\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/participant/event#X-Amz-Bearer";
let payload = json!({
"ContentType": "",
"Content": "",
"ClientToken": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("x-amz-bearer", "".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url '{{baseUrl}}/participant/event#X-Amz-Bearer' \
--header 'content-type: application/json' \
--header 'x-amz-bearer: ' \
--data '{
"ContentType": "",
"Content": "",
"ClientToken": ""
}'
echo '{
"ContentType": "",
"Content": "",
"ClientToken": ""
}' | \
http POST '{{baseUrl}}/participant/event#X-Amz-Bearer' \
content-type:application/json \
x-amz-bearer:''
wget --quiet \
--method POST \
--header 'x-amz-bearer: ' \
--header 'content-type: application/json' \
--body-data '{\n "ContentType": "",\n "Content": "",\n "ClientToken": ""\n}' \
--output-document \
- '{{baseUrl}}/participant/event#X-Amz-Bearer'
import Foundation
let headers = [
"x-amz-bearer": "",
"content-type": "application/json"
]
let parameters = [
"ContentType": "",
"Content": "",
"ClientToken": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/participant/event#X-Amz-Bearer")! 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
SendMessage
{{baseUrl}}/participant/message#X-Amz-Bearer
HEADERS
X-Amz-Bearer
BODY json
{
"ContentType": "",
"Content": "",
"ClientToken": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/participant/message#X-Amz-Bearer");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-amz-bearer: ");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"ContentType\": \"\",\n \"Content\": \"\",\n \"ClientToken\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/participant/message#X-Amz-Bearer" {:headers {:x-amz-bearer ""}
:content-type :json
:form-params {:ContentType ""
:Content ""
:ClientToken ""}})
require "http/client"
url = "{{baseUrl}}/participant/message#X-Amz-Bearer"
headers = HTTP::Headers{
"x-amz-bearer" => ""
"content-type" => "application/json"
}
reqBody = "{\n \"ContentType\": \"\",\n \"Content\": \"\",\n \"ClientToken\": \"\"\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}}/participant/message#X-Amz-Bearer"),
Headers =
{
{ "x-amz-bearer", "" },
},
Content = new StringContent("{\n \"ContentType\": \"\",\n \"Content\": \"\",\n \"ClientToken\": \"\"\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}}/participant/message#X-Amz-Bearer");
var request = new RestRequest("", Method.Post);
request.AddHeader("x-amz-bearer", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"ContentType\": \"\",\n \"Content\": \"\",\n \"ClientToken\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/participant/message#X-Amz-Bearer"
payload := strings.NewReader("{\n \"ContentType\": \"\",\n \"Content\": \"\",\n \"ClientToken\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-amz-bearer", "")
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/participant/message HTTP/1.1
X-Amz-Bearer:
Content-Type: application/json
Host: example.com
Content-Length: 61
{
"ContentType": "",
"Content": "",
"ClientToken": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/participant/message#X-Amz-Bearer")
.setHeader("x-amz-bearer", "")
.setHeader("content-type", "application/json")
.setBody("{\n \"ContentType\": \"\",\n \"Content\": \"\",\n \"ClientToken\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/participant/message#X-Amz-Bearer"))
.header("x-amz-bearer", "")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"ContentType\": \"\",\n \"Content\": \"\",\n \"ClientToken\": \"\"\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 \"ContentType\": \"\",\n \"Content\": \"\",\n \"ClientToken\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/participant/message#X-Amz-Bearer")
.post(body)
.addHeader("x-amz-bearer", "")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/participant/message#X-Amz-Bearer")
.header("x-amz-bearer", "")
.header("content-type", "application/json")
.body("{\n \"ContentType\": \"\",\n \"Content\": \"\",\n \"ClientToken\": \"\"\n}")
.asString();
const data = JSON.stringify({
ContentType: '',
Content: '',
ClientToken: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/participant/message#X-Amz-Bearer');
xhr.setRequestHeader('x-amz-bearer', '');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/participant/message#X-Amz-Bearer',
headers: {'x-amz-bearer': '', 'content-type': 'application/json'},
data: {ContentType: '', Content: '', ClientToken: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/participant/message#X-Amz-Bearer';
const options = {
method: 'POST',
headers: {'x-amz-bearer': '', 'content-type': 'application/json'},
body: '{"ContentType":"","Content":"","ClientToken":""}'
};
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}}/participant/message#X-Amz-Bearer',
method: 'POST',
headers: {
'x-amz-bearer': '',
'content-type': 'application/json'
},
processData: false,
data: '{\n "ContentType": "",\n "Content": "",\n "ClientToken": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"ContentType\": \"\",\n \"Content\": \"\",\n \"ClientToken\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/participant/message#X-Amz-Bearer")
.post(body)
.addHeader("x-amz-bearer", "")
.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/participant/message',
headers: {
'x-amz-bearer': '',
'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({ContentType: '', Content: '', ClientToken: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/participant/message#X-Amz-Bearer',
headers: {'x-amz-bearer': '', 'content-type': 'application/json'},
body: {ContentType: '', Content: '', ClientToken: ''},
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}}/participant/message#X-Amz-Bearer');
req.headers({
'x-amz-bearer': '',
'content-type': 'application/json'
});
req.type('json');
req.send({
ContentType: '',
Content: '',
ClientToken: ''
});
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}}/participant/message#X-Amz-Bearer',
headers: {'x-amz-bearer': '', 'content-type': 'application/json'},
data: {ContentType: '', Content: '', ClientToken: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/participant/message#X-Amz-Bearer';
const options = {
method: 'POST',
headers: {'x-amz-bearer': '', 'content-type': 'application/json'},
body: '{"ContentType":"","Content":"","ClientToken":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"x-amz-bearer": @"",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"ContentType": @"",
@"Content": @"",
@"ClientToken": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/participant/message#X-Amz-Bearer"]
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}}/participant/message#X-Amz-Bearer" in
let headers = Header.add_list (Header.init ()) [
("x-amz-bearer", "");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"ContentType\": \"\",\n \"Content\": \"\",\n \"ClientToken\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/participant/message#X-Amz-Bearer",
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([
'ContentType' => '',
'Content' => '',
'ClientToken' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json",
"x-amz-bearer: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/participant/message#X-Amz-Bearer', [
'body' => '{
"ContentType": "",
"Content": "",
"ClientToken": ""
}',
'headers' => [
'content-type' => 'application/json',
'x-amz-bearer' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/participant/message#X-Amz-Bearer');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'x-amz-bearer' => '',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'ContentType' => '',
'Content' => '',
'ClientToken' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'ContentType' => '',
'Content' => '',
'ClientToken' => ''
]));
$request->setRequestUrl('{{baseUrl}}/participant/message#X-Amz-Bearer');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'x-amz-bearer' => '',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("x-amz-bearer", "")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/participant/message#X-Amz-Bearer' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"ContentType": "",
"Content": "",
"ClientToken": ""
}'
$headers=@{}
$headers.Add("x-amz-bearer", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/participant/message#X-Amz-Bearer' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"ContentType": "",
"Content": "",
"ClientToken": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"ContentType\": \"\",\n \"Content\": \"\",\n \"ClientToken\": \"\"\n}"
headers = {
'x-amz-bearer': "",
'content-type': "application/json"
}
conn.request("POST", "/baseUrl/participant/message", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/participant/message#X-Amz-Bearer"
payload = {
"ContentType": "",
"Content": "",
"ClientToken": ""
}
headers = {
"x-amz-bearer": "",
"content-type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/participant/message#X-Amz-Bearer"
payload <- "{\n \"ContentType\": \"\",\n \"Content\": \"\",\n \"ClientToken\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, add_headers('x-amz-bearer' = ''), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/participant/message#X-Amz-Bearer")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-amz-bearer"] = ''
request["content-type"] = 'application/json'
request.body = "{\n \"ContentType\": \"\",\n \"Content\": \"\",\n \"ClientToken\": \"\"\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/participant/message') do |req|
req.headers['x-amz-bearer'] = ''
req.body = "{\n \"ContentType\": \"\",\n \"Content\": \"\",\n \"ClientToken\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/participant/message#X-Amz-Bearer";
let payload = json!({
"ContentType": "",
"Content": "",
"ClientToken": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("x-amz-bearer", "".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url '{{baseUrl}}/participant/message#X-Amz-Bearer' \
--header 'content-type: application/json' \
--header 'x-amz-bearer: ' \
--data '{
"ContentType": "",
"Content": "",
"ClientToken": ""
}'
echo '{
"ContentType": "",
"Content": "",
"ClientToken": ""
}' | \
http POST '{{baseUrl}}/participant/message#X-Amz-Bearer' \
content-type:application/json \
x-amz-bearer:''
wget --quiet \
--method POST \
--header 'x-amz-bearer: ' \
--header 'content-type: application/json' \
--body-data '{\n "ContentType": "",\n "Content": "",\n "ClientToken": ""\n}' \
--output-document \
- '{{baseUrl}}/participant/message#X-Amz-Bearer'
import Foundation
let headers = [
"x-amz-bearer": "",
"content-type": "application/json"
]
let parameters = [
"ContentType": "",
"Content": "",
"ClientToken": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/participant/message#X-Amz-Bearer")! 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
StartAttachmentUpload
{{baseUrl}}/participant/start-attachment-upload#X-Amz-Bearer
HEADERS
X-Amz-Bearer
BODY json
{
"ContentType": "",
"AttachmentSizeInBytes": 0,
"AttachmentName": "",
"ClientToken": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/participant/start-attachment-upload#X-Amz-Bearer");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-amz-bearer: ");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"ContentType\": \"\",\n \"AttachmentSizeInBytes\": 0,\n \"AttachmentName\": \"\",\n \"ClientToken\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/participant/start-attachment-upload#X-Amz-Bearer" {:headers {:x-amz-bearer ""}
:content-type :json
:form-params {:ContentType ""
:AttachmentSizeInBytes 0
:AttachmentName ""
:ClientToken ""}})
require "http/client"
url = "{{baseUrl}}/participant/start-attachment-upload#X-Amz-Bearer"
headers = HTTP::Headers{
"x-amz-bearer" => ""
"content-type" => "application/json"
}
reqBody = "{\n \"ContentType\": \"\",\n \"AttachmentSizeInBytes\": 0,\n \"AttachmentName\": \"\",\n \"ClientToken\": \"\"\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}}/participant/start-attachment-upload#X-Amz-Bearer"),
Headers =
{
{ "x-amz-bearer", "" },
},
Content = new StringContent("{\n \"ContentType\": \"\",\n \"AttachmentSizeInBytes\": 0,\n \"AttachmentName\": \"\",\n \"ClientToken\": \"\"\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}}/participant/start-attachment-upload#X-Amz-Bearer");
var request = new RestRequest("", Method.Post);
request.AddHeader("x-amz-bearer", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"ContentType\": \"\",\n \"AttachmentSizeInBytes\": 0,\n \"AttachmentName\": \"\",\n \"ClientToken\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/participant/start-attachment-upload#X-Amz-Bearer"
payload := strings.NewReader("{\n \"ContentType\": \"\",\n \"AttachmentSizeInBytes\": 0,\n \"AttachmentName\": \"\",\n \"ClientToken\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-amz-bearer", "")
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/participant/start-attachment-upload HTTP/1.1
X-Amz-Bearer:
Content-Type: application/json
Host: example.com
Content-Length: 98
{
"ContentType": "",
"AttachmentSizeInBytes": 0,
"AttachmentName": "",
"ClientToken": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/participant/start-attachment-upload#X-Amz-Bearer")
.setHeader("x-amz-bearer", "")
.setHeader("content-type", "application/json")
.setBody("{\n \"ContentType\": \"\",\n \"AttachmentSizeInBytes\": 0,\n \"AttachmentName\": \"\",\n \"ClientToken\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/participant/start-attachment-upload#X-Amz-Bearer"))
.header("x-amz-bearer", "")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"ContentType\": \"\",\n \"AttachmentSizeInBytes\": 0,\n \"AttachmentName\": \"\",\n \"ClientToken\": \"\"\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 \"ContentType\": \"\",\n \"AttachmentSizeInBytes\": 0,\n \"AttachmentName\": \"\",\n \"ClientToken\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/participant/start-attachment-upload#X-Amz-Bearer")
.post(body)
.addHeader("x-amz-bearer", "")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/participant/start-attachment-upload#X-Amz-Bearer")
.header("x-amz-bearer", "")
.header("content-type", "application/json")
.body("{\n \"ContentType\": \"\",\n \"AttachmentSizeInBytes\": 0,\n \"AttachmentName\": \"\",\n \"ClientToken\": \"\"\n}")
.asString();
const data = JSON.stringify({
ContentType: '',
AttachmentSizeInBytes: 0,
AttachmentName: '',
ClientToken: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/participant/start-attachment-upload#X-Amz-Bearer');
xhr.setRequestHeader('x-amz-bearer', '');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/participant/start-attachment-upload#X-Amz-Bearer',
headers: {'x-amz-bearer': '', 'content-type': 'application/json'},
data: {ContentType: '', AttachmentSizeInBytes: 0, AttachmentName: '', ClientToken: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/participant/start-attachment-upload#X-Amz-Bearer';
const options = {
method: 'POST',
headers: {'x-amz-bearer': '', 'content-type': 'application/json'},
body: '{"ContentType":"","AttachmentSizeInBytes":0,"AttachmentName":"","ClientToken":""}'
};
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}}/participant/start-attachment-upload#X-Amz-Bearer',
method: 'POST',
headers: {
'x-amz-bearer': '',
'content-type': 'application/json'
},
processData: false,
data: '{\n "ContentType": "",\n "AttachmentSizeInBytes": 0,\n "AttachmentName": "",\n "ClientToken": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"ContentType\": \"\",\n \"AttachmentSizeInBytes\": 0,\n \"AttachmentName\": \"\",\n \"ClientToken\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/participant/start-attachment-upload#X-Amz-Bearer")
.post(body)
.addHeader("x-amz-bearer", "")
.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/participant/start-attachment-upload',
headers: {
'x-amz-bearer': '',
'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({ContentType: '', AttachmentSizeInBytes: 0, AttachmentName: '', ClientToken: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/participant/start-attachment-upload#X-Amz-Bearer',
headers: {'x-amz-bearer': '', 'content-type': 'application/json'},
body: {ContentType: '', AttachmentSizeInBytes: 0, AttachmentName: '', ClientToken: ''},
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}}/participant/start-attachment-upload#X-Amz-Bearer');
req.headers({
'x-amz-bearer': '',
'content-type': 'application/json'
});
req.type('json');
req.send({
ContentType: '',
AttachmentSizeInBytes: 0,
AttachmentName: '',
ClientToken: ''
});
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}}/participant/start-attachment-upload#X-Amz-Bearer',
headers: {'x-amz-bearer': '', 'content-type': 'application/json'},
data: {ContentType: '', AttachmentSizeInBytes: 0, AttachmentName: '', ClientToken: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/participant/start-attachment-upload#X-Amz-Bearer';
const options = {
method: 'POST',
headers: {'x-amz-bearer': '', 'content-type': 'application/json'},
body: '{"ContentType":"","AttachmentSizeInBytes":0,"AttachmentName":"","ClientToken":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"x-amz-bearer": @"",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"ContentType": @"",
@"AttachmentSizeInBytes": @0,
@"AttachmentName": @"",
@"ClientToken": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/participant/start-attachment-upload#X-Amz-Bearer"]
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}}/participant/start-attachment-upload#X-Amz-Bearer" in
let headers = Header.add_list (Header.init ()) [
("x-amz-bearer", "");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"ContentType\": \"\",\n \"AttachmentSizeInBytes\": 0,\n \"AttachmentName\": \"\",\n \"ClientToken\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/participant/start-attachment-upload#X-Amz-Bearer",
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([
'ContentType' => '',
'AttachmentSizeInBytes' => 0,
'AttachmentName' => '',
'ClientToken' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json",
"x-amz-bearer: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/participant/start-attachment-upload#X-Amz-Bearer', [
'body' => '{
"ContentType": "",
"AttachmentSizeInBytes": 0,
"AttachmentName": "",
"ClientToken": ""
}',
'headers' => [
'content-type' => 'application/json',
'x-amz-bearer' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/participant/start-attachment-upload#X-Amz-Bearer');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'x-amz-bearer' => '',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'ContentType' => '',
'AttachmentSizeInBytes' => 0,
'AttachmentName' => '',
'ClientToken' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'ContentType' => '',
'AttachmentSizeInBytes' => 0,
'AttachmentName' => '',
'ClientToken' => ''
]));
$request->setRequestUrl('{{baseUrl}}/participant/start-attachment-upload#X-Amz-Bearer');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'x-amz-bearer' => '',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("x-amz-bearer", "")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/participant/start-attachment-upload#X-Amz-Bearer' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"ContentType": "",
"AttachmentSizeInBytes": 0,
"AttachmentName": "",
"ClientToken": ""
}'
$headers=@{}
$headers.Add("x-amz-bearer", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/participant/start-attachment-upload#X-Amz-Bearer' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"ContentType": "",
"AttachmentSizeInBytes": 0,
"AttachmentName": "",
"ClientToken": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"ContentType\": \"\",\n \"AttachmentSizeInBytes\": 0,\n \"AttachmentName\": \"\",\n \"ClientToken\": \"\"\n}"
headers = {
'x-amz-bearer': "",
'content-type': "application/json"
}
conn.request("POST", "/baseUrl/participant/start-attachment-upload", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/participant/start-attachment-upload#X-Amz-Bearer"
payload = {
"ContentType": "",
"AttachmentSizeInBytes": 0,
"AttachmentName": "",
"ClientToken": ""
}
headers = {
"x-amz-bearer": "",
"content-type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/participant/start-attachment-upload#X-Amz-Bearer"
payload <- "{\n \"ContentType\": \"\",\n \"AttachmentSizeInBytes\": 0,\n \"AttachmentName\": \"\",\n \"ClientToken\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, add_headers('x-amz-bearer' = ''), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/participant/start-attachment-upload#X-Amz-Bearer")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-amz-bearer"] = ''
request["content-type"] = 'application/json'
request.body = "{\n \"ContentType\": \"\",\n \"AttachmentSizeInBytes\": 0,\n \"AttachmentName\": \"\",\n \"ClientToken\": \"\"\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/participant/start-attachment-upload') do |req|
req.headers['x-amz-bearer'] = ''
req.body = "{\n \"ContentType\": \"\",\n \"AttachmentSizeInBytes\": 0,\n \"AttachmentName\": \"\",\n \"ClientToken\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/participant/start-attachment-upload#X-Amz-Bearer";
let payload = json!({
"ContentType": "",
"AttachmentSizeInBytes": 0,
"AttachmentName": "",
"ClientToken": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("x-amz-bearer", "".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url '{{baseUrl}}/participant/start-attachment-upload#X-Amz-Bearer' \
--header 'content-type: application/json' \
--header 'x-amz-bearer: ' \
--data '{
"ContentType": "",
"AttachmentSizeInBytes": 0,
"AttachmentName": "",
"ClientToken": ""
}'
echo '{
"ContentType": "",
"AttachmentSizeInBytes": 0,
"AttachmentName": "",
"ClientToken": ""
}' | \
http POST '{{baseUrl}}/participant/start-attachment-upload#X-Amz-Bearer' \
content-type:application/json \
x-amz-bearer:''
wget --quiet \
--method POST \
--header 'x-amz-bearer: ' \
--header 'content-type: application/json' \
--body-data '{\n "ContentType": "",\n "AttachmentSizeInBytes": 0,\n "AttachmentName": "",\n "ClientToken": ""\n}' \
--output-document \
- '{{baseUrl}}/participant/start-attachment-upload#X-Amz-Bearer'
import Foundation
let headers = [
"x-amz-bearer": "",
"content-type": "application/json"
]
let parameters = [
"ContentType": "",
"AttachmentSizeInBytes": 0,
"AttachmentName": "",
"ClientToken": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/participant/start-attachment-upload#X-Amz-Bearer")! 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()