Application Migration Service
POST
ArchiveApplication
{{baseUrl}}/ArchiveApplication
BODY json
{
"applicationID": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/ArchiveApplication");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"applicationID\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/ArchiveApplication" {:content-type :json
:form-params {:applicationID ""}})
require "http/client"
url = "{{baseUrl}}/ArchiveApplication"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"applicationID\": \"\"\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}}/ArchiveApplication"),
Content = new StringContent("{\n \"applicationID\": \"\"\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}}/ArchiveApplication");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"applicationID\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/ArchiveApplication"
payload := strings.NewReader("{\n \"applicationID\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/ArchiveApplication HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 25
{
"applicationID": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/ArchiveApplication")
.setHeader("content-type", "application/json")
.setBody("{\n \"applicationID\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/ArchiveApplication"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"applicationID\": \"\"\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 \"applicationID\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/ArchiveApplication")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/ArchiveApplication")
.header("content-type", "application/json")
.body("{\n \"applicationID\": \"\"\n}")
.asString();
const data = JSON.stringify({
applicationID: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/ArchiveApplication');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/ArchiveApplication',
headers: {'content-type': 'application/json'},
data: {applicationID: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/ArchiveApplication';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"applicationID":""}'
};
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}}/ArchiveApplication',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "applicationID": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"applicationID\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/ArchiveApplication")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/ArchiveApplication',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({applicationID: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/ArchiveApplication',
headers: {'content-type': 'application/json'},
body: {applicationID: ''},
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}}/ArchiveApplication');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
applicationID: ''
});
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}}/ArchiveApplication',
headers: {'content-type': 'application/json'},
data: {applicationID: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/ArchiveApplication';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"applicationID":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"applicationID": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/ArchiveApplication"]
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}}/ArchiveApplication" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"applicationID\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/ArchiveApplication",
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([
'applicationID' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/ArchiveApplication', [
'body' => '{
"applicationID": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/ArchiveApplication');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'applicationID' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'applicationID' => ''
]));
$request->setRequestUrl('{{baseUrl}}/ArchiveApplication');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/ArchiveApplication' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"applicationID": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/ArchiveApplication' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"applicationID": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"applicationID\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/ArchiveApplication", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/ArchiveApplication"
payload = { "applicationID": "" }
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/ArchiveApplication"
payload <- "{\n \"applicationID\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/ArchiveApplication")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"applicationID\": \"\"\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/ArchiveApplication') do |req|
req.body = "{\n \"applicationID\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/ArchiveApplication";
let payload = json!({"applicationID": ""});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/ArchiveApplication \
--header 'content-type: application/json' \
--data '{
"applicationID": ""
}'
echo '{
"applicationID": ""
}' | \
http POST {{baseUrl}}/ArchiveApplication \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "applicationID": ""\n}' \
--output-document \
- {{baseUrl}}/ArchiveApplication
import Foundation
let headers = ["content-type": "application/json"]
let parameters = ["applicationID": ""] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/ArchiveApplication")! 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
ArchiveWave
{{baseUrl}}/ArchiveWave
BODY json
{
"waveID": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/ArchiveWave");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"waveID\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/ArchiveWave" {:content-type :json
:form-params {:waveID ""}})
require "http/client"
url = "{{baseUrl}}/ArchiveWave"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"waveID\": \"\"\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}}/ArchiveWave"),
Content = new StringContent("{\n \"waveID\": \"\"\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}}/ArchiveWave");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"waveID\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/ArchiveWave"
payload := strings.NewReader("{\n \"waveID\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/ArchiveWave HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 18
{
"waveID": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/ArchiveWave")
.setHeader("content-type", "application/json")
.setBody("{\n \"waveID\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/ArchiveWave"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"waveID\": \"\"\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 \"waveID\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/ArchiveWave")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/ArchiveWave")
.header("content-type", "application/json")
.body("{\n \"waveID\": \"\"\n}")
.asString();
const data = JSON.stringify({
waveID: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/ArchiveWave');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/ArchiveWave',
headers: {'content-type': 'application/json'},
data: {waveID: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/ArchiveWave';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"waveID":""}'
};
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}}/ArchiveWave',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "waveID": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"waveID\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/ArchiveWave")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/ArchiveWave',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({waveID: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/ArchiveWave',
headers: {'content-type': 'application/json'},
body: {waveID: ''},
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}}/ArchiveWave');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
waveID: ''
});
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}}/ArchiveWave',
headers: {'content-type': 'application/json'},
data: {waveID: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/ArchiveWave';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"waveID":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"waveID": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/ArchiveWave"]
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}}/ArchiveWave" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"waveID\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/ArchiveWave",
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([
'waveID' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/ArchiveWave', [
'body' => '{
"waveID": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/ArchiveWave');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'waveID' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'waveID' => ''
]));
$request->setRequestUrl('{{baseUrl}}/ArchiveWave');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/ArchiveWave' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"waveID": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/ArchiveWave' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"waveID": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"waveID\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/ArchiveWave", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/ArchiveWave"
payload = { "waveID": "" }
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/ArchiveWave"
payload <- "{\n \"waveID\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/ArchiveWave")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"waveID\": \"\"\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/ArchiveWave') do |req|
req.body = "{\n \"waveID\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/ArchiveWave";
let payload = json!({"waveID": ""});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/ArchiveWave \
--header 'content-type: application/json' \
--data '{
"waveID": ""
}'
echo '{
"waveID": ""
}' | \
http POST {{baseUrl}}/ArchiveWave \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "waveID": ""\n}' \
--output-document \
- {{baseUrl}}/ArchiveWave
import Foundation
let headers = ["content-type": "application/json"]
let parameters = ["waveID": ""] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/ArchiveWave")! 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
AssociateApplications
{{baseUrl}}/AssociateApplications
BODY json
{
"applicationIDs": [],
"waveID": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/AssociateApplications");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"applicationIDs\": [],\n \"waveID\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/AssociateApplications" {:content-type :json
:form-params {:applicationIDs []
:waveID ""}})
require "http/client"
url = "{{baseUrl}}/AssociateApplications"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"applicationIDs\": [],\n \"waveID\": \"\"\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}}/AssociateApplications"),
Content = new StringContent("{\n \"applicationIDs\": [],\n \"waveID\": \"\"\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}}/AssociateApplications");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"applicationIDs\": [],\n \"waveID\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/AssociateApplications"
payload := strings.NewReader("{\n \"applicationIDs\": [],\n \"waveID\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/AssociateApplications HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 42
{
"applicationIDs": [],
"waveID": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/AssociateApplications")
.setHeader("content-type", "application/json")
.setBody("{\n \"applicationIDs\": [],\n \"waveID\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/AssociateApplications"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"applicationIDs\": [],\n \"waveID\": \"\"\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 \"applicationIDs\": [],\n \"waveID\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/AssociateApplications")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/AssociateApplications")
.header("content-type", "application/json")
.body("{\n \"applicationIDs\": [],\n \"waveID\": \"\"\n}")
.asString();
const data = JSON.stringify({
applicationIDs: [],
waveID: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/AssociateApplications');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/AssociateApplications',
headers: {'content-type': 'application/json'},
data: {applicationIDs: [], waveID: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/AssociateApplications';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"applicationIDs":[],"waveID":""}'
};
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}}/AssociateApplications',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "applicationIDs": [],\n "waveID": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"applicationIDs\": [],\n \"waveID\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/AssociateApplications")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/AssociateApplications',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({applicationIDs: [], waveID: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/AssociateApplications',
headers: {'content-type': 'application/json'},
body: {applicationIDs: [], waveID: ''},
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}}/AssociateApplications');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
applicationIDs: [],
waveID: ''
});
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}}/AssociateApplications',
headers: {'content-type': 'application/json'},
data: {applicationIDs: [], waveID: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/AssociateApplications';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"applicationIDs":[],"waveID":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"applicationIDs": @[ ],
@"waveID": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/AssociateApplications"]
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}}/AssociateApplications" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"applicationIDs\": [],\n \"waveID\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/AssociateApplications",
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([
'applicationIDs' => [
],
'waveID' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/AssociateApplications', [
'body' => '{
"applicationIDs": [],
"waveID": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/AssociateApplications');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'applicationIDs' => [
],
'waveID' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'applicationIDs' => [
],
'waveID' => ''
]));
$request->setRequestUrl('{{baseUrl}}/AssociateApplications');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/AssociateApplications' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"applicationIDs": [],
"waveID": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/AssociateApplications' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"applicationIDs": [],
"waveID": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"applicationIDs\": [],\n \"waveID\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/AssociateApplications", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/AssociateApplications"
payload = {
"applicationIDs": [],
"waveID": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/AssociateApplications"
payload <- "{\n \"applicationIDs\": [],\n \"waveID\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/AssociateApplications")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"applicationIDs\": [],\n \"waveID\": \"\"\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/AssociateApplications') do |req|
req.body = "{\n \"applicationIDs\": [],\n \"waveID\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/AssociateApplications";
let payload = json!({
"applicationIDs": (),
"waveID": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/AssociateApplications \
--header 'content-type: application/json' \
--data '{
"applicationIDs": [],
"waveID": ""
}'
echo '{
"applicationIDs": [],
"waveID": ""
}' | \
http POST {{baseUrl}}/AssociateApplications \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "applicationIDs": [],\n "waveID": ""\n}' \
--output-document \
- {{baseUrl}}/AssociateApplications
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"applicationIDs": [],
"waveID": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/AssociateApplications")! 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
AssociateSourceServers
{{baseUrl}}/AssociateSourceServers
BODY json
{
"applicationID": "",
"sourceServerIDs": []
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/AssociateSourceServers");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"applicationID\": \"\",\n \"sourceServerIDs\": []\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/AssociateSourceServers" {:content-type :json
:form-params {:applicationID ""
:sourceServerIDs []}})
require "http/client"
url = "{{baseUrl}}/AssociateSourceServers"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"applicationID\": \"\",\n \"sourceServerIDs\": []\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}}/AssociateSourceServers"),
Content = new StringContent("{\n \"applicationID\": \"\",\n \"sourceServerIDs\": []\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}}/AssociateSourceServers");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"applicationID\": \"\",\n \"sourceServerIDs\": []\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/AssociateSourceServers"
payload := strings.NewReader("{\n \"applicationID\": \"\",\n \"sourceServerIDs\": []\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/AssociateSourceServers HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 50
{
"applicationID": "",
"sourceServerIDs": []
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/AssociateSourceServers")
.setHeader("content-type", "application/json")
.setBody("{\n \"applicationID\": \"\",\n \"sourceServerIDs\": []\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/AssociateSourceServers"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"applicationID\": \"\",\n \"sourceServerIDs\": []\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 \"applicationID\": \"\",\n \"sourceServerIDs\": []\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/AssociateSourceServers")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/AssociateSourceServers")
.header("content-type", "application/json")
.body("{\n \"applicationID\": \"\",\n \"sourceServerIDs\": []\n}")
.asString();
const data = JSON.stringify({
applicationID: '',
sourceServerIDs: []
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/AssociateSourceServers');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/AssociateSourceServers',
headers: {'content-type': 'application/json'},
data: {applicationID: '', sourceServerIDs: []}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/AssociateSourceServers';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"applicationID":"","sourceServerIDs":[]}'
};
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}}/AssociateSourceServers',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "applicationID": "",\n "sourceServerIDs": []\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"applicationID\": \"\",\n \"sourceServerIDs\": []\n}")
val request = Request.Builder()
.url("{{baseUrl}}/AssociateSourceServers")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/AssociateSourceServers',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({applicationID: '', sourceServerIDs: []}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/AssociateSourceServers',
headers: {'content-type': 'application/json'},
body: {applicationID: '', sourceServerIDs: []},
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}}/AssociateSourceServers');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
applicationID: '',
sourceServerIDs: []
});
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}}/AssociateSourceServers',
headers: {'content-type': 'application/json'},
data: {applicationID: '', sourceServerIDs: []}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/AssociateSourceServers';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"applicationID":"","sourceServerIDs":[]}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"applicationID": @"",
@"sourceServerIDs": @[ ] };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/AssociateSourceServers"]
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}}/AssociateSourceServers" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"applicationID\": \"\",\n \"sourceServerIDs\": []\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/AssociateSourceServers",
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([
'applicationID' => '',
'sourceServerIDs' => [
]
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/AssociateSourceServers', [
'body' => '{
"applicationID": "",
"sourceServerIDs": []
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/AssociateSourceServers');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'applicationID' => '',
'sourceServerIDs' => [
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'applicationID' => '',
'sourceServerIDs' => [
]
]));
$request->setRequestUrl('{{baseUrl}}/AssociateSourceServers');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/AssociateSourceServers' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"applicationID": "",
"sourceServerIDs": []
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/AssociateSourceServers' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"applicationID": "",
"sourceServerIDs": []
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"applicationID\": \"\",\n \"sourceServerIDs\": []\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/AssociateSourceServers", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/AssociateSourceServers"
payload = {
"applicationID": "",
"sourceServerIDs": []
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/AssociateSourceServers"
payload <- "{\n \"applicationID\": \"\",\n \"sourceServerIDs\": []\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/AssociateSourceServers")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"applicationID\": \"\",\n \"sourceServerIDs\": []\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/AssociateSourceServers') do |req|
req.body = "{\n \"applicationID\": \"\",\n \"sourceServerIDs\": []\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/AssociateSourceServers";
let payload = json!({
"applicationID": "",
"sourceServerIDs": ()
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/AssociateSourceServers \
--header 'content-type: application/json' \
--data '{
"applicationID": "",
"sourceServerIDs": []
}'
echo '{
"applicationID": "",
"sourceServerIDs": []
}' | \
http POST {{baseUrl}}/AssociateSourceServers \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "applicationID": "",\n "sourceServerIDs": []\n}' \
--output-document \
- {{baseUrl}}/AssociateSourceServers
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"applicationID": "",
"sourceServerIDs": []
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/AssociateSourceServers")! 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
ChangeServerLifeCycleState
{{baseUrl}}/ChangeServerLifeCycleState
BODY json
{
"lifeCycle": {
"state": ""
},
"sourceServerID": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/ChangeServerLifeCycleState");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"lifeCycle\": {\n \"state\": \"\"\n },\n \"sourceServerID\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/ChangeServerLifeCycleState" {:content-type :json
:form-params {:lifeCycle {:state ""}
:sourceServerID ""}})
require "http/client"
url = "{{baseUrl}}/ChangeServerLifeCycleState"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"lifeCycle\": {\n \"state\": \"\"\n },\n \"sourceServerID\": \"\"\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}}/ChangeServerLifeCycleState"),
Content = new StringContent("{\n \"lifeCycle\": {\n \"state\": \"\"\n },\n \"sourceServerID\": \"\"\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}}/ChangeServerLifeCycleState");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"lifeCycle\": {\n \"state\": \"\"\n },\n \"sourceServerID\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/ChangeServerLifeCycleState"
payload := strings.NewReader("{\n \"lifeCycle\": {\n \"state\": \"\"\n },\n \"sourceServerID\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/ChangeServerLifeCycleState HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 64
{
"lifeCycle": {
"state": ""
},
"sourceServerID": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/ChangeServerLifeCycleState")
.setHeader("content-type", "application/json")
.setBody("{\n \"lifeCycle\": {\n \"state\": \"\"\n },\n \"sourceServerID\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/ChangeServerLifeCycleState"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"lifeCycle\": {\n \"state\": \"\"\n },\n \"sourceServerID\": \"\"\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 \"lifeCycle\": {\n \"state\": \"\"\n },\n \"sourceServerID\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/ChangeServerLifeCycleState")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/ChangeServerLifeCycleState")
.header("content-type", "application/json")
.body("{\n \"lifeCycle\": {\n \"state\": \"\"\n },\n \"sourceServerID\": \"\"\n}")
.asString();
const data = JSON.stringify({
lifeCycle: {
state: ''
},
sourceServerID: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/ChangeServerLifeCycleState');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/ChangeServerLifeCycleState',
headers: {'content-type': 'application/json'},
data: {lifeCycle: {state: ''}, sourceServerID: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/ChangeServerLifeCycleState';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"lifeCycle":{"state":""},"sourceServerID":""}'
};
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}}/ChangeServerLifeCycleState',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "lifeCycle": {\n "state": ""\n },\n "sourceServerID": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"lifeCycle\": {\n \"state\": \"\"\n },\n \"sourceServerID\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/ChangeServerLifeCycleState")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/ChangeServerLifeCycleState',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({lifeCycle: {state: ''}, sourceServerID: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/ChangeServerLifeCycleState',
headers: {'content-type': 'application/json'},
body: {lifeCycle: {state: ''}, sourceServerID: ''},
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}}/ChangeServerLifeCycleState');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
lifeCycle: {
state: ''
},
sourceServerID: ''
});
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}}/ChangeServerLifeCycleState',
headers: {'content-type': 'application/json'},
data: {lifeCycle: {state: ''}, sourceServerID: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/ChangeServerLifeCycleState';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"lifeCycle":{"state":""},"sourceServerID":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"lifeCycle": @{ @"state": @"" },
@"sourceServerID": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/ChangeServerLifeCycleState"]
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}}/ChangeServerLifeCycleState" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"lifeCycle\": {\n \"state\": \"\"\n },\n \"sourceServerID\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/ChangeServerLifeCycleState",
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([
'lifeCycle' => [
'state' => ''
],
'sourceServerID' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/ChangeServerLifeCycleState', [
'body' => '{
"lifeCycle": {
"state": ""
},
"sourceServerID": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/ChangeServerLifeCycleState');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'lifeCycle' => [
'state' => ''
],
'sourceServerID' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'lifeCycle' => [
'state' => ''
],
'sourceServerID' => ''
]));
$request->setRequestUrl('{{baseUrl}}/ChangeServerLifeCycleState');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/ChangeServerLifeCycleState' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"lifeCycle": {
"state": ""
},
"sourceServerID": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/ChangeServerLifeCycleState' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"lifeCycle": {
"state": ""
},
"sourceServerID": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"lifeCycle\": {\n \"state\": \"\"\n },\n \"sourceServerID\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/ChangeServerLifeCycleState", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/ChangeServerLifeCycleState"
payload = {
"lifeCycle": { "state": "" },
"sourceServerID": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/ChangeServerLifeCycleState"
payload <- "{\n \"lifeCycle\": {\n \"state\": \"\"\n },\n \"sourceServerID\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/ChangeServerLifeCycleState")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"lifeCycle\": {\n \"state\": \"\"\n },\n \"sourceServerID\": \"\"\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/ChangeServerLifeCycleState') do |req|
req.body = "{\n \"lifeCycle\": {\n \"state\": \"\"\n },\n \"sourceServerID\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/ChangeServerLifeCycleState";
let payload = json!({
"lifeCycle": json!({"state": ""}),
"sourceServerID": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/ChangeServerLifeCycleState \
--header 'content-type: application/json' \
--data '{
"lifeCycle": {
"state": ""
},
"sourceServerID": ""
}'
echo '{
"lifeCycle": {
"state": ""
},
"sourceServerID": ""
}' | \
http POST {{baseUrl}}/ChangeServerLifeCycleState \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "lifeCycle": {\n "state": ""\n },\n "sourceServerID": ""\n}' \
--output-document \
- {{baseUrl}}/ChangeServerLifeCycleState
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"lifeCycle": ["state": ""],
"sourceServerID": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/ChangeServerLifeCycleState")! 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
CreateApplication
{{baseUrl}}/CreateApplication
BODY json
{
"description": "",
"name": "",
"tags": {}
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/CreateApplication");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"description\": \"\",\n \"name\": \"\",\n \"tags\": {}\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/CreateApplication" {:content-type :json
:form-params {:description ""
:name ""
:tags {}}})
require "http/client"
url = "{{baseUrl}}/CreateApplication"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"description\": \"\",\n \"name\": \"\",\n \"tags\": {}\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/CreateApplication"),
Content = new StringContent("{\n \"description\": \"\",\n \"name\": \"\",\n \"tags\": {}\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/CreateApplication");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"description\": \"\",\n \"name\": \"\",\n \"tags\": {}\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/CreateApplication"
payload := strings.NewReader("{\n \"description\": \"\",\n \"name\": \"\",\n \"tags\": {}\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/CreateApplication HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 51
{
"description": "",
"name": "",
"tags": {}
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/CreateApplication")
.setHeader("content-type", "application/json")
.setBody("{\n \"description\": \"\",\n \"name\": \"\",\n \"tags\": {}\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/CreateApplication"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"description\": \"\",\n \"name\": \"\",\n \"tags\": {}\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"description\": \"\",\n \"name\": \"\",\n \"tags\": {}\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/CreateApplication")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/CreateApplication")
.header("content-type", "application/json")
.body("{\n \"description\": \"\",\n \"name\": \"\",\n \"tags\": {}\n}")
.asString();
const data = JSON.stringify({
description: '',
name: '',
tags: {}
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/CreateApplication');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/CreateApplication',
headers: {'content-type': 'application/json'},
data: {description: '', name: '', tags: {}}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/CreateApplication';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"description":"","name":"","tags":{}}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/CreateApplication',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "description": "",\n "name": "",\n "tags": {}\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"description\": \"\",\n \"name\": \"\",\n \"tags\": {}\n}")
val request = Request.Builder()
.url("{{baseUrl}}/CreateApplication")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/CreateApplication',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({description: '', name: '', tags: {}}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/CreateApplication',
headers: {'content-type': 'application/json'},
body: {description: '', name: '', tags: {}},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/CreateApplication');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
description: '',
name: '',
tags: {}
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/CreateApplication',
headers: {'content-type': 'application/json'},
data: {description: '', name: '', tags: {}}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/CreateApplication';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"description":"","name":"","tags":{}}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"description": @"",
@"name": @"",
@"tags": @{ } };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/CreateApplication"]
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}}/CreateApplication" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"description\": \"\",\n \"name\": \"\",\n \"tags\": {}\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/CreateApplication",
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([
'description' => '',
'name' => '',
'tags' => [
]
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/CreateApplication', [
'body' => '{
"description": "",
"name": "",
"tags": {}
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/CreateApplication');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'description' => '',
'name' => '',
'tags' => [
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'description' => '',
'name' => '',
'tags' => [
]
]));
$request->setRequestUrl('{{baseUrl}}/CreateApplication');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/CreateApplication' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"description": "",
"name": "",
"tags": {}
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/CreateApplication' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"description": "",
"name": "",
"tags": {}
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"description\": \"\",\n \"name\": \"\",\n \"tags\": {}\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/CreateApplication", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/CreateApplication"
payload = {
"description": "",
"name": "",
"tags": {}
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/CreateApplication"
payload <- "{\n \"description\": \"\",\n \"name\": \"\",\n \"tags\": {}\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/CreateApplication")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"description\": \"\",\n \"name\": \"\",\n \"tags\": {}\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/CreateApplication') do |req|
req.body = "{\n \"description\": \"\",\n \"name\": \"\",\n \"tags\": {}\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/CreateApplication";
let payload = json!({
"description": "",
"name": "",
"tags": json!({})
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/CreateApplication \
--header 'content-type: application/json' \
--data '{
"description": "",
"name": "",
"tags": {}
}'
echo '{
"description": "",
"name": "",
"tags": {}
}' | \
http POST {{baseUrl}}/CreateApplication \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "description": "",\n "name": "",\n "tags": {}\n}' \
--output-document \
- {{baseUrl}}/CreateApplication
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"description": "",
"name": "",
"tags": []
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/CreateApplication")! 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
CreateLaunchConfigurationTemplate
{{baseUrl}}/CreateLaunchConfigurationTemplate
BODY json
{
"associatePublicIpAddress": false,
"bootMode": "",
"copyPrivateIp": false,
"copyTags": false,
"enableMapAutoTagging": false,
"largeVolumeConf": {
"iops": "",
"throughput": "",
"volumeType": ""
},
"launchDisposition": "",
"licensing": {
"osByol": ""
},
"mapAutoTaggingMpeID": "",
"postLaunchActions": {
"cloudWatchLogGroupName": "",
"deployment": "",
"s3LogBucket": "",
"s3OutputKeyPrefix": "",
"ssmDocuments": ""
},
"smallVolumeConf": {
"iops": "",
"throughput": "",
"volumeType": ""
},
"smallVolumeMaxSize": 0,
"tags": {},
"targetInstanceTypeRightSizingMethod": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/CreateLaunchConfigurationTemplate");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"associatePublicIpAddress\": false,\n \"bootMode\": \"\",\n \"copyPrivateIp\": false,\n \"copyTags\": false,\n \"enableMapAutoTagging\": false,\n \"largeVolumeConf\": {\n \"iops\": \"\",\n \"throughput\": \"\",\n \"volumeType\": \"\"\n },\n \"launchDisposition\": \"\",\n \"licensing\": {\n \"osByol\": \"\"\n },\n \"mapAutoTaggingMpeID\": \"\",\n \"postLaunchActions\": {\n \"cloudWatchLogGroupName\": \"\",\n \"deployment\": \"\",\n \"s3LogBucket\": \"\",\n \"s3OutputKeyPrefix\": \"\",\n \"ssmDocuments\": \"\"\n },\n \"smallVolumeConf\": {\n \"iops\": \"\",\n \"throughput\": \"\",\n \"volumeType\": \"\"\n },\n \"smallVolumeMaxSize\": 0,\n \"tags\": {},\n \"targetInstanceTypeRightSizingMethod\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/CreateLaunchConfigurationTemplate" {:content-type :json
:form-params {:associatePublicIpAddress false
:bootMode ""
:copyPrivateIp false
:copyTags false
:enableMapAutoTagging false
:largeVolumeConf {:iops ""
:throughput ""
:volumeType ""}
:launchDisposition ""
:licensing {:osByol ""}
:mapAutoTaggingMpeID ""
:postLaunchActions {:cloudWatchLogGroupName ""
:deployment ""
:s3LogBucket ""
:s3OutputKeyPrefix ""
:ssmDocuments ""}
:smallVolumeConf {:iops ""
:throughput ""
:volumeType ""}
:smallVolumeMaxSize 0
:tags {}
:targetInstanceTypeRightSizingMethod ""}})
require "http/client"
url = "{{baseUrl}}/CreateLaunchConfigurationTemplate"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"associatePublicIpAddress\": false,\n \"bootMode\": \"\",\n \"copyPrivateIp\": false,\n \"copyTags\": false,\n \"enableMapAutoTagging\": false,\n \"largeVolumeConf\": {\n \"iops\": \"\",\n \"throughput\": \"\",\n \"volumeType\": \"\"\n },\n \"launchDisposition\": \"\",\n \"licensing\": {\n \"osByol\": \"\"\n },\n \"mapAutoTaggingMpeID\": \"\",\n \"postLaunchActions\": {\n \"cloudWatchLogGroupName\": \"\",\n \"deployment\": \"\",\n \"s3LogBucket\": \"\",\n \"s3OutputKeyPrefix\": \"\",\n \"ssmDocuments\": \"\"\n },\n \"smallVolumeConf\": {\n \"iops\": \"\",\n \"throughput\": \"\",\n \"volumeType\": \"\"\n },\n \"smallVolumeMaxSize\": 0,\n \"tags\": {},\n \"targetInstanceTypeRightSizingMethod\": \"\"\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}}/CreateLaunchConfigurationTemplate"),
Content = new StringContent("{\n \"associatePublicIpAddress\": false,\n \"bootMode\": \"\",\n \"copyPrivateIp\": false,\n \"copyTags\": false,\n \"enableMapAutoTagging\": false,\n \"largeVolumeConf\": {\n \"iops\": \"\",\n \"throughput\": \"\",\n \"volumeType\": \"\"\n },\n \"launchDisposition\": \"\",\n \"licensing\": {\n \"osByol\": \"\"\n },\n \"mapAutoTaggingMpeID\": \"\",\n \"postLaunchActions\": {\n \"cloudWatchLogGroupName\": \"\",\n \"deployment\": \"\",\n \"s3LogBucket\": \"\",\n \"s3OutputKeyPrefix\": \"\",\n \"ssmDocuments\": \"\"\n },\n \"smallVolumeConf\": {\n \"iops\": \"\",\n \"throughput\": \"\",\n \"volumeType\": \"\"\n },\n \"smallVolumeMaxSize\": 0,\n \"tags\": {},\n \"targetInstanceTypeRightSizingMethod\": \"\"\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}}/CreateLaunchConfigurationTemplate");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"associatePublicIpAddress\": false,\n \"bootMode\": \"\",\n \"copyPrivateIp\": false,\n \"copyTags\": false,\n \"enableMapAutoTagging\": false,\n \"largeVolumeConf\": {\n \"iops\": \"\",\n \"throughput\": \"\",\n \"volumeType\": \"\"\n },\n \"launchDisposition\": \"\",\n \"licensing\": {\n \"osByol\": \"\"\n },\n \"mapAutoTaggingMpeID\": \"\",\n \"postLaunchActions\": {\n \"cloudWatchLogGroupName\": \"\",\n \"deployment\": \"\",\n \"s3LogBucket\": \"\",\n \"s3OutputKeyPrefix\": \"\",\n \"ssmDocuments\": \"\"\n },\n \"smallVolumeConf\": {\n \"iops\": \"\",\n \"throughput\": \"\",\n \"volumeType\": \"\"\n },\n \"smallVolumeMaxSize\": 0,\n \"tags\": {},\n \"targetInstanceTypeRightSizingMethod\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/CreateLaunchConfigurationTemplate"
payload := strings.NewReader("{\n \"associatePublicIpAddress\": false,\n \"bootMode\": \"\",\n \"copyPrivateIp\": false,\n \"copyTags\": false,\n \"enableMapAutoTagging\": false,\n \"largeVolumeConf\": {\n \"iops\": \"\",\n \"throughput\": \"\",\n \"volumeType\": \"\"\n },\n \"launchDisposition\": \"\",\n \"licensing\": {\n \"osByol\": \"\"\n },\n \"mapAutoTaggingMpeID\": \"\",\n \"postLaunchActions\": {\n \"cloudWatchLogGroupName\": \"\",\n \"deployment\": \"\",\n \"s3LogBucket\": \"\",\n \"s3OutputKeyPrefix\": \"\",\n \"ssmDocuments\": \"\"\n },\n \"smallVolumeConf\": {\n \"iops\": \"\",\n \"throughput\": \"\",\n \"volumeType\": \"\"\n },\n \"smallVolumeMaxSize\": 0,\n \"tags\": {},\n \"targetInstanceTypeRightSizingMethod\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/CreateLaunchConfigurationTemplate HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 653
{
"associatePublicIpAddress": false,
"bootMode": "",
"copyPrivateIp": false,
"copyTags": false,
"enableMapAutoTagging": false,
"largeVolumeConf": {
"iops": "",
"throughput": "",
"volumeType": ""
},
"launchDisposition": "",
"licensing": {
"osByol": ""
},
"mapAutoTaggingMpeID": "",
"postLaunchActions": {
"cloudWatchLogGroupName": "",
"deployment": "",
"s3LogBucket": "",
"s3OutputKeyPrefix": "",
"ssmDocuments": ""
},
"smallVolumeConf": {
"iops": "",
"throughput": "",
"volumeType": ""
},
"smallVolumeMaxSize": 0,
"tags": {},
"targetInstanceTypeRightSizingMethod": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/CreateLaunchConfigurationTemplate")
.setHeader("content-type", "application/json")
.setBody("{\n \"associatePublicIpAddress\": false,\n \"bootMode\": \"\",\n \"copyPrivateIp\": false,\n \"copyTags\": false,\n \"enableMapAutoTagging\": false,\n \"largeVolumeConf\": {\n \"iops\": \"\",\n \"throughput\": \"\",\n \"volumeType\": \"\"\n },\n \"launchDisposition\": \"\",\n \"licensing\": {\n \"osByol\": \"\"\n },\n \"mapAutoTaggingMpeID\": \"\",\n \"postLaunchActions\": {\n \"cloudWatchLogGroupName\": \"\",\n \"deployment\": \"\",\n \"s3LogBucket\": \"\",\n \"s3OutputKeyPrefix\": \"\",\n \"ssmDocuments\": \"\"\n },\n \"smallVolumeConf\": {\n \"iops\": \"\",\n \"throughput\": \"\",\n \"volumeType\": \"\"\n },\n \"smallVolumeMaxSize\": 0,\n \"tags\": {},\n \"targetInstanceTypeRightSizingMethod\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/CreateLaunchConfigurationTemplate"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"associatePublicIpAddress\": false,\n \"bootMode\": \"\",\n \"copyPrivateIp\": false,\n \"copyTags\": false,\n \"enableMapAutoTagging\": false,\n \"largeVolumeConf\": {\n \"iops\": \"\",\n \"throughput\": \"\",\n \"volumeType\": \"\"\n },\n \"launchDisposition\": \"\",\n \"licensing\": {\n \"osByol\": \"\"\n },\n \"mapAutoTaggingMpeID\": \"\",\n \"postLaunchActions\": {\n \"cloudWatchLogGroupName\": \"\",\n \"deployment\": \"\",\n \"s3LogBucket\": \"\",\n \"s3OutputKeyPrefix\": \"\",\n \"ssmDocuments\": \"\"\n },\n \"smallVolumeConf\": {\n \"iops\": \"\",\n \"throughput\": \"\",\n \"volumeType\": \"\"\n },\n \"smallVolumeMaxSize\": 0,\n \"tags\": {},\n \"targetInstanceTypeRightSizingMethod\": \"\"\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 \"associatePublicIpAddress\": false,\n \"bootMode\": \"\",\n \"copyPrivateIp\": false,\n \"copyTags\": false,\n \"enableMapAutoTagging\": false,\n \"largeVolumeConf\": {\n \"iops\": \"\",\n \"throughput\": \"\",\n \"volumeType\": \"\"\n },\n \"launchDisposition\": \"\",\n \"licensing\": {\n \"osByol\": \"\"\n },\n \"mapAutoTaggingMpeID\": \"\",\n \"postLaunchActions\": {\n \"cloudWatchLogGroupName\": \"\",\n \"deployment\": \"\",\n \"s3LogBucket\": \"\",\n \"s3OutputKeyPrefix\": \"\",\n \"ssmDocuments\": \"\"\n },\n \"smallVolumeConf\": {\n \"iops\": \"\",\n \"throughput\": \"\",\n \"volumeType\": \"\"\n },\n \"smallVolumeMaxSize\": 0,\n \"tags\": {},\n \"targetInstanceTypeRightSizingMethod\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/CreateLaunchConfigurationTemplate")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/CreateLaunchConfigurationTemplate")
.header("content-type", "application/json")
.body("{\n \"associatePublicIpAddress\": false,\n \"bootMode\": \"\",\n \"copyPrivateIp\": false,\n \"copyTags\": false,\n \"enableMapAutoTagging\": false,\n \"largeVolumeConf\": {\n \"iops\": \"\",\n \"throughput\": \"\",\n \"volumeType\": \"\"\n },\n \"launchDisposition\": \"\",\n \"licensing\": {\n \"osByol\": \"\"\n },\n \"mapAutoTaggingMpeID\": \"\",\n \"postLaunchActions\": {\n \"cloudWatchLogGroupName\": \"\",\n \"deployment\": \"\",\n \"s3LogBucket\": \"\",\n \"s3OutputKeyPrefix\": \"\",\n \"ssmDocuments\": \"\"\n },\n \"smallVolumeConf\": {\n \"iops\": \"\",\n \"throughput\": \"\",\n \"volumeType\": \"\"\n },\n \"smallVolumeMaxSize\": 0,\n \"tags\": {},\n \"targetInstanceTypeRightSizingMethod\": \"\"\n}")
.asString();
const data = JSON.stringify({
associatePublicIpAddress: false,
bootMode: '',
copyPrivateIp: false,
copyTags: false,
enableMapAutoTagging: false,
largeVolumeConf: {
iops: '',
throughput: '',
volumeType: ''
},
launchDisposition: '',
licensing: {
osByol: ''
},
mapAutoTaggingMpeID: '',
postLaunchActions: {
cloudWatchLogGroupName: '',
deployment: '',
s3LogBucket: '',
s3OutputKeyPrefix: '',
ssmDocuments: ''
},
smallVolumeConf: {
iops: '',
throughput: '',
volumeType: ''
},
smallVolumeMaxSize: 0,
tags: {},
targetInstanceTypeRightSizingMethod: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/CreateLaunchConfigurationTemplate');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/CreateLaunchConfigurationTemplate',
headers: {'content-type': 'application/json'},
data: {
associatePublicIpAddress: false,
bootMode: '',
copyPrivateIp: false,
copyTags: false,
enableMapAutoTagging: false,
largeVolumeConf: {iops: '', throughput: '', volumeType: ''},
launchDisposition: '',
licensing: {osByol: ''},
mapAutoTaggingMpeID: '',
postLaunchActions: {
cloudWatchLogGroupName: '',
deployment: '',
s3LogBucket: '',
s3OutputKeyPrefix: '',
ssmDocuments: ''
},
smallVolumeConf: {iops: '', throughput: '', volumeType: ''},
smallVolumeMaxSize: 0,
tags: {},
targetInstanceTypeRightSizingMethod: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/CreateLaunchConfigurationTemplate';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"associatePublicIpAddress":false,"bootMode":"","copyPrivateIp":false,"copyTags":false,"enableMapAutoTagging":false,"largeVolumeConf":{"iops":"","throughput":"","volumeType":""},"launchDisposition":"","licensing":{"osByol":""},"mapAutoTaggingMpeID":"","postLaunchActions":{"cloudWatchLogGroupName":"","deployment":"","s3LogBucket":"","s3OutputKeyPrefix":"","ssmDocuments":""},"smallVolumeConf":{"iops":"","throughput":"","volumeType":""},"smallVolumeMaxSize":0,"tags":{},"targetInstanceTypeRightSizingMethod":""}'
};
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}}/CreateLaunchConfigurationTemplate',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "associatePublicIpAddress": false,\n "bootMode": "",\n "copyPrivateIp": false,\n "copyTags": false,\n "enableMapAutoTagging": false,\n "largeVolumeConf": {\n "iops": "",\n "throughput": "",\n "volumeType": ""\n },\n "launchDisposition": "",\n "licensing": {\n "osByol": ""\n },\n "mapAutoTaggingMpeID": "",\n "postLaunchActions": {\n "cloudWatchLogGroupName": "",\n "deployment": "",\n "s3LogBucket": "",\n "s3OutputKeyPrefix": "",\n "ssmDocuments": ""\n },\n "smallVolumeConf": {\n "iops": "",\n "throughput": "",\n "volumeType": ""\n },\n "smallVolumeMaxSize": 0,\n "tags": {},\n "targetInstanceTypeRightSizingMethod": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"associatePublicIpAddress\": false,\n \"bootMode\": \"\",\n \"copyPrivateIp\": false,\n \"copyTags\": false,\n \"enableMapAutoTagging\": false,\n \"largeVolumeConf\": {\n \"iops\": \"\",\n \"throughput\": \"\",\n \"volumeType\": \"\"\n },\n \"launchDisposition\": \"\",\n \"licensing\": {\n \"osByol\": \"\"\n },\n \"mapAutoTaggingMpeID\": \"\",\n \"postLaunchActions\": {\n \"cloudWatchLogGroupName\": \"\",\n \"deployment\": \"\",\n \"s3LogBucket\": \"\",\n \"s3OutputKeyPrefix\": \"\",\n \"ssmDocuments\": \"\"\n },\n \"smallVolumeConf\": {\n \"iops\": \"\",\n \"throughput\": \"\",\n \"volumeType\": \"\"\n },\n \"smallVolumeMaxSize\": 0,\n \"tags\": {},\n \"targetInstanceTypeRightSizingMethod\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/CreateLaunchConfigurationTemplate")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/CreateLaunchConfigurationTemplate',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
associatePublicIpAddress: false,
bootMode: '',
copyPrivateIp: false,
copyTags: false,
enableMapAutoTagging: false,
largeVolumeConf: {iops: '', throughput: '', volumeType: ''},
launchDisposition: '',
licensing: {osByol: ''},
mapAutoTaggingMpeID: '',
postLaunchActions: {
cloudWatchLogGroupName: '',
deployment: '',
s3LogBucket: '',
s3OutputKeyPrefix: '',
ssmDocuments: ''
},
smallVolumeConf: {iops: '', throughput: '', volumeType: ''},
smallVolumeMaxSize: 0,
tags: {},
targetInstanceTypeRightSizingMethod: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/CreateLaunchConfigurationTemplate',
headers: {'content-type': 'application/json'},
body: {
associatePublicIpAddress: false,
bootMode: '',
copyPrivateIp: false,
copyTags: false,
enableMapAutoTagging: false,
largeVolumeConf: {iops: '', throughput: '', volumeType: ''},
launchDisposition: '',
licensing: {osByol: ''},
mapAutoTaggingMpeID: '',
postLaunchActions: {
cloudWatchLogGroupName: '',
deployment: '',
s3LogBucket: '',
s3OutputKeyPrefix: '',
ssmDocuments: ''
},
smallVolumeConf: {iops: '', throughput: '', volumeType: ''},
smallVolumeMaxSize: 0,
tags: {},
targetInstanceTypeRightSizingMethod: ''
},
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}}/CreateLaunchConfigurationTemplate');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
associatePublicIpAddress: false,
bootMode: '',
copyPrivateIp: false,
copyTags: false,
enableMapAutoTagging: false,
largeVolumeConf: {
iops: '',
throughput: '',
volumeType: ''
},
launchDisposition: '',
licensing: {
osByol: ''
},
mapAutoTaggingMpeID: '',
postLaunchActions: {
cloudWatchLogGroupName: '',
deployment: '',
s3LogBucket: '',
s3OutputKeyPrefix: '',
ssmDocuments: ''
},
smallVolumeConf: {
iops: '',
throughput: '',
volumeType: ''
},
smallVolumeMaxSize: 0,
tags: {},
targetInstanceTypeRightSizingMethod: ''
});
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}}/CreateLaunchConfigurationTemplate',
headers: {'content-type': 'application/json'},
data: {
associatePublicIpAddress: false,
bootMode: '',
copyPrivateIp: false,
copyTags: false,
enableMapAutoTagging: false,
largeVolumeConf: {iops: '', throughput: '', volumeType: ''},
launchDisposition: '',
licensing: {osByol: ''},
mapAutoTaggingMpeID: '',
postLaunchActions: {
cloudWatchLogGroupName: '',
deployment: '',
s3LogBucket: '',
s3OutputKeyPrefix: '',
ssmDocuments: ''
},
smallVolumeConf: {iops: '', throughput: '', volumeType: ''},
smallVolumeMaxSize: 0,
tags: {},
targetInstanceTypeRightSizingMethod: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/CreateLaunchConfigurationTemplate';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"associatePublicIpAddress":false,"bootMode":"","copyPrivateIp":false,"copyTags":false,"enableMapAutoTagging":false,"largeVolumeConf":{"iops":"","throughput":"","volumeType":""},"launchDisposition":"","licensing":{"osByol":""},"mapAutoTaggingMpeID":"","postLaunchActions":{"cloudWatchLogGroupName":"","deployment":"","s3LogBucket":"","s3OutputKeyPrefix":"","ssmDocuments":""},"smallVolumeConf":{"iops":"","throughput":"","volumeType":""},"smallVolumeMaxSize":0,"tags":{},"targetInstanceTypeRightSizingMethod":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"associatePublicIpAddress": @NO,
@"bootMode": @"",
@"copyPrivateIp": @NO,
@"copyTags": @NO,
@"enableMapAutoTagging": @NO,
@"largeVolumeConf": @{ @"iops": @"", @"throughput": @"", @"volumeType": @"" },
@"launchDisposition": @"",
@"licensing": @{ @"osByol": @"" },
@"mapAutoTaggingMpeID": @"",
@"postLaunchActions": @{ @"cloudWatchLogGroupName": @"", @"deployment": @"", @"s3LogBucket": @"", @"s3OutputKeyPrefix": @"", @"ssmDocuments": @"" },
@"smallVolumeConf": @{ @"iops": @"", @"throughput": @"", @"volumeType": @"" },
@"smallVolumeMaxSize": @0,
@"tags": @{ },
@"targetInstanceTypeRightSizingMethod": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/CreateLaunchConfigurationTemplate"]
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}}/CreateLaunchConfigurationTemplate" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"associatePublicIpAddress\": false,\n \"bootMode\": \"\",\n \"copyPrivateIp\": false,\n \"copyTags\": false,\n \"enableMapAutoTagging\": false,\n \"largeVolumeConf\": {\n \"iops\": \"\",\n \"throughput\": \"\",\n \"volumeType\": \"\"\n },\n \"launchDisposition\": \"\",\n \"licensing\": {\n \"osByol\": \"\"\n },\n \"mapAutoTaggingMpeID\": \"\",\n \"postLaunchActions\": {\n \"cloudWatchLogGroupName\": \"\",\n \"deployment\": \"\",\n \"s3LogBucket\": \"\",\n \"s3OutputKeyPrefix\": \"\",\n \"ssmDocuments\": \"\"\n },\n \"smallVolumeConf\": {\n \"iops\": \"\",\n \"throughput\": \"\",\n \"volumeType\": \"\"\n },\n \"smallVolumeMaxSize\": 0,\n \"tags\": {},\n \"targetInstanceTypeRightSizingMethod\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/CreateLaunchConfigurationTemplate",
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([
'associatePublicIpAddress' => null,
'bootMode' => '',
'copyPrivateIp' => null,
'copyTags' => null,
'enableMapAutoTagging' => null,
'largeVolumeConf' => [
'iops' => '',
'throughput' => '',
'volumeType' => ''
],
'launchDisposition' => '',
'licensing' => [
'osByol' => ''
],
'mapAutoTaggingMpeID' => '',
'postLaunchActions' => [
'cloudWatchLogGroupName' => '',
'deployment' => '',
's3LogBucket' => '',
's3OutputKeyPrefix' => '',
'ssmDocuments' => ''
],
'smallVolumeConf' => [
'iops' => '',
'throughput' => '',
'volumeType' => ''
],
'smallVolumeMaxSize' => 0,
'tags' => [
],
'targetInstanceTypeRightSizingMethod' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/CreateLaunchConfigurationTemplate', [
'body' => '{
"associatePublicIpAddress": false,
"bootMode": "",
"copyPrivateIp": false,
"copyTags": false,
"enableMapAutoTagging": false,
"largeVolumeConf": {
"iops": "",
"throughput": "",
"volumeType": ""
},
"launchDisposition": "",
"licensing": {
"osByol": ""
},
"mapAutoTaggingMpeID": "",
"postLaunchActions": {
"cloudWatchLogGroupName": "",
"deployment": "",
"s3LogBucket": "",
"s3OutputKeyPrefix": "",
"ssmDocuments": ""
},
"smallVolumeConf": {
"iops": "",
"throughput": "",
"volumeType": ""
},
"smallVolumeMaxSize": 0,
"tags": {},
"targetInstanceTypeRightSizingMethod": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/CreateLaunchConfigurationTemplate');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'associatePublicIpAddress' => null,
'bootMode' => '',
'copyPrivateIp' => null,
'copyTags' => null,
'enableMapAutoTagging' => null,
'largeVolumeConf' => [
'iops' => '',
'throughput' => '',
'volumeType' => ''
],
'launchDisposition' => '',
'licensing' => [
'osByol' => ''
],
'mapAutoTaggingMpeID' => '',
'postLaunchActions' => [
'cloudWatchLogGroupName' => '',
'deployment' => '',
's3LogBucket' => '',
's3OutputKeyPrefix' => '',
'ssmDocuments' => ''
],
'smallVolumeConf' => [
'iops' => '',
'throughput' => '',
'volumeType' => ''
],
'smallVolumeMaxSize' => 0,
'tags' => [
],
'targetInstanceTypeRightSizingMethod' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'associatePublicIpAddress' => null,
'bootMode' => '',
'copyPrivateIp' => null,
'copyTags' => null,
'enableMapAutoTagging' => null,
'largeVolumeConf' => [
'iops' => '',
'throughput' => '',
'volumeType' => ''
],
'launchDisposition' => '',
'licensing' => [
'osByol' => ''
],
'mapAutoTaggingMpeID' => '',
'postLaunchActions' => [
'cloudWatchLogGroupName' => '',
'deployment' => '',
's3LogBucket' => '',
's3OutputKeyPrefix' => '',
'ssmDocuments' => ''
],
'smallVolumeConf' => [
'iops' => '',
'throughput' => '',
'volumeType' => ''
],
'smallVolumeMaxSize' => 0,
'tags' => [
],
'targetInstanceTypeRightSizingMethod' => ''
]));
$request->setRequestUrl('{{baseUrl}}/CreateLaunchConfigurationTemplate');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/CreateLaunchConfigurationTemplate' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"associatePublicIpAddress": false,
"bootMode": "",
"copyPrivateIp": false,
"copyTags": false,
"enableMapAutoTagging": false,
"largeVolumeConf": {
"iops": "",
"throughput": "",
"volumeType": ""
},
"launchDisposition": "",
"licensing": {
"osByol": ""
},
"mapAutoTaggingMpeID": "",
"postLaunchActions": {
"cloudWatchLogGroupName": "",
"deployment": "",
"s3LogBucket": "",
"s3OutputKeyPrefix": "",
"ssmDocuments": ""
},
"smallVolumeConf": {
"iops": "",
"throughput": "",
"volumeType": ""
},
"smallVolumeMaxSize": 0,
"tags": {},
"targetInstanceTypeRightSizingMethod": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/CreateLaunchConfigurationTemplate' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"associatePublicIpAddress": false,
"bootMode": "",
"copyPrivateIp": false,
"copyTags": false,
"enableMapAutoTagging": false,
"largeVolumeConf": {
"iops": "",
"throughput": "",
"volumeType": ""
},
"launchDisposition": "",
"licensing": {
"osByol": ""
},
"mapAutoTaggingMpeID": "",
"postLaunchActions": {
"cloudWatchLogGroupName": "",
"deployment": "",
"s3LogBucket": "",
"s3OutputKeyPrefix": "",
"ssmDocuments": ""
},
"smallVolumeConf": {
"iops": "",
"throughput": "",
"volumeType": ""
},
"smallVolumeMaxSize": 0,
"tags": {},
"targetInstanceTypeRightSizingMethod": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"associatePublicIpAddress\": false,\n \"bootMode\": \"\",\n \"copyPrivateIp\": false,\n \"copyTags\": false,\n \"enableMapAutoTagging\": false,\n \"largeVolumeConf\": {\n \"iops\": \"\",\n \"throughput\": \"\",\n \"volumeType\": \"\"\n },\n \"launchDisposition\": \"\",\n \"licensing\": {\n \"osByol\": \"\"\n },\n \"mapAutoTaggingMpeID\": \"\",\n \"postLaunchActions\": {\n \"cloudWatchLogGroupName\": \"\",\n \"deployment\": \"\",\n \"s3LogBucket\": \"\",\n \"s3OutputKeyPrefix\": \"\",\n \"ssmDocuments\": \"\"\n },\n \"smallVolumeConf\": {\n \"iops\": \"\",\n \"throughput\": \"\",\n \"volumeType\": \"\"\n },\n \"smallVolumeMaxSize\": 0,\n \"tags\": {},\n \"targetInstanceTypeRightSizingMethod\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/CreateLaunchConfigurationTemplate", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/CreateLaunchConfigurationTemplate"
payload = {
"associatePublicIpAddress": False,
"bootMode": "",
"copyPrivateIp": False,
"copyTags": False,
"enableMapAutoTagging": False,
"largeVolumeConf": {
"iops": "",
"throughput": "",
"volumeType": ""
},
"launchDisposition": "",
"licensing": { "osByol": "" },
"mapAutoTaggingMpeID": "",
"postLaunchActions": {
"cloudWatchLogGroupName": "",
"deployment": "",
"s3LogBucket": "",
"s3OutputKeyPrefix": "",
"ssmDocuments": ""
},
"smallVolumeConf": {
"iops": "",
"throughput": "",
"volumeType": ""
},
"smallVolumeMaxSize": 0,
"tags": {},
"targetInstanceTypeRightSizingMethod": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/CreateLaunchConfigurationTemplate"
payload <- "{\n \"associatePublicIpAddress\": false,\n \"bootMode\": \"\",\n \"copyPrivateIp\": false,\n \"copyTags\": false,\n \"enableMapAutoTagging\": false,\n \"largeVolumeConf\": {\n \"iops\": \"\",\n \"throughput\": \"\",\n \"volumeType\": \"\"\n },\n \"launchDisposition\": \"\",\n \"licensing\": {\n \"osByol\": \"\"\n },\n \"mapAutoTaggingMpeID\": \"\",\n \"postLaunchActions\": {\n \"cloudWatchLogGroupName\": \"\",\n \"deployment\": \"\",\n \"s3LogBucket\": \"\",\n \"s3OutputKeyPrefix\": \"\",\n \"ssmDocuments\": \"\"\n },\n \"smallVolumeConf\": {\n \"iops\": \"\",\n \"throughput\": \"\",\n \"volumeType\": \"\"\n },\n \"smallVolumeMaxSize\": 0,\n \"tags\": {},\n \"targetInstanceTypeRightSizingMethod\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/CreateLaunchConfigurationTemplate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"associatePublicIpAddress\": false,\n \"bootMode\": \"\",\n \"copyPrivateIp\": false,\n \"copyTags\": false,\n \"enableMapAutoTagging\": false,\n \"largeVolumeConf\": {\n \"iops\": \"\",\n \"throughput\": \"\",\n \"volumeType\": \"\"\n },\n \"launchDisposition\": \"\",\n \"licensing\": {\n \"osByol\": \"\"\n },\n \"mapAutoTaggingMpeID\": \"\",\n \"postLaunchActions\": {\n \"cloudWatchLogGroupName\": \"\",\n \"deployment\": \"\",\n \"s3LogBucket\": \"\",\n \"s3OutputKeyPrefix\": \"\",\n \"ssmDocuments\": \"\"\n },\n \"smallVolumeConf\": {\n \"iops\": \"\",\n \"throughput\": \"\",\n \"volumeType\": \"\"\n },\n \"smallVolumeMaxSize\": 0,\n \"tags\": {},\n \"targetInstanceTypeRightSizingMethod\": \"\"\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/CreateLaunchConfigurationTemplate') do |req|
req.body = "{\n \"associatePublicIpAddress\": false,\n \"bootMode\": \"\",\n \"copyPrivateIp\": false,\n \"copyTags\": false,\n \"enableMapAutoTagging\": false,\n \"largeVolumeConf\": {\n \"iops\": \"\",\n \"throughput\": \"\",\n \"volumeType\": \"\"\n },\n \"launchDisposition\": \"\",\n \"licensing\": {\n \"osByol\": \"\"\n },\n \"mapAutoTaggingMpeID\": \"\",\n \"postLaunchActions\": {\n \"cloudWatchLogGroupName\": \"\",\n \"deployment\": \"\",\n \"s3LogBucket\": \"\",\n \"s3OutputKeyPrefix\": \"\",\n \"ssmDocuments\": \"\"\n },\n \"smallVolumeConf\": {\n \"iops\": \"\",\n \"throughput\": \"\",\n \"volumeType\": \"\"\n },\n \"smallVolumeMaxSize\": 0,\n \"tags\": {},\n \"targetInstanceTypeRightSizingMethod\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/CreateLaunchConfigurationTemplate";
let payload = json!({
"associatePublicIpAddress": false,
"bootMode": "",
"copyPrivateIp": false,
"copyTags": false,
"enableMapAutoTagging": false,
"largeVolumeConf": json!({
"iops": "",
"throughput": "",
"volumeType": ""
}),
"launchDisposition": "",
"licensing": json!({"osByol": ""}),
"mapAutoTaggingMpeID": "",
"postLaunchActions": json!({
"cloudWatchLogGroupName": "",
"deployment": "",
"s3LogBucket": "",
"s3OutputKeyPrefix": "",
"ssmDocuments": ""
}),
"smallVolumeConf": json!({
"iops": "",
"throughput": "",
"volumeType": ""
}),
"smallVolumeMaxSize": 0,
"tags": json!({}),
"targetInstanceTypeRightSizingMethod": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/CreateLaunchConfigurationTemplate \
--header 'content-type: application/json' \
--data '{
"associatePublicIpAddress": false,
"bootMode": "",
"copyPrivateIp": false,
"copyTags": false,
"enableMapAutoTagging": false,
"largeVolumeConf": {
"iops": "",
"throughput": "",
"volumeType": ""
},
"launchDisposition": "",
"licensing": {
"osByol": ""
},
"mapAutoTaggingMpeID": "",
"postLaunchActions": {
"cloudWatchLogGroupName": "",
"deployment": "",
"s3LogBucket": "",
"s3OutputKeyPrefix": "",
"ssmDocuments": ""
},
"smallVolumeConf": {
"iops": "",
"throughput": "",
"volumeType": ""
},
"smallVolumeMaxSize": 0,
"tags": {},
"targetInstanceTypeRightSizingMethod": ""
}'
echo '{
"associatePublicIpAddress": false,
"bootMode": "",
"copyPrivateIp": false,
"copyTags": false,
"enableMapAutoTagging": false,
"largeVolumeConf": {
"iops": "",
"throughput": "",
"volumeType": ""
},
"launchDisposition": "",
"licensing": {
"osByol": ""
},
"mapAutoTaggingMpeID": "",
"postLaunchActions": {
"cloudWatchLogGroupName": "",
"deployment": "",
"s3LogBucket": "",
"s3OutputKeyPrefix": "",
"ssmDocuments": ""
},
"smallVolumeConf": {
"iops": "",
"throughput": "",
"volumeType": ""
},
"smallVolumeMaxSize": 0,
"tags": {},
"targetInstanceTypeRightSizingMethod": ""
}' | \
http POST {{baseUrl}}/CreateLaunchConfigurationTemplate \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "associatePublicIpAddress": false,\n "bootMode": "",\n "copyPrivateIp": false,\n "copyTags": false,\n "enableMapAutoTagging": false,\n "largeVolumeConf": {\n "iops": "",\n "throughput": "",\n "volumeType": ""\n },\n "launchDisposition": "",\n "licensing": {\n "osByol": ""\n },\n "mapAutoTaggingMpeID": "",\n "postLaunchActions": {\n "cloudWatchLogGroupName": "",\n "deployment": "",\n "s3LogBucket": "",\n "s3OutputKeyPrefix": "",\n "ssmDocuments": ""\n },\n "smallVolumeConf": {\n "iops": "",\n "throughput": "",\n "volumeType": ""\n },\n "smallVolumeMaxSize": 0,\n "tags": {},\n "targetInstanceTypeRightSizingMethod": ""\n}' \
--output-document \
- {{baseUrl}}/CreateLaunchConfigurationTemplate
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"associatePublicIpAddress": false,
"bootMode": "",
"copyPrivateIp": false,
"copyTags": false,
"enableMapAutoTagging": false,
"largeVolumeConf": [
"iops": "",
"throughput": "",
"volumeType": ""
],
"launchDisposition": "",
"licensing": ["osByol": ""],
"mapAutoTaggingMpeID": "",
"postLaunchActions": [
"cloudWatchLogGroupName": "",
"deployment": "",
"s3LogBucket": "",
"s3OutputKeyPrefix": "",
"ssmDocuments": ""
],
"smallVolumeConf": [
"iops": "",
"throughput": "",
"volumeType": ""
],
"smallVolumeMaxSize": 0,
"tags": [],
"targetInstanceTypeRightSizingMethod": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/CreateLaunchConfigurationTemplate")! 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
CreateReplicationConfigurationTemplate
{{baseUrl}}/CreateReplicationConfigurationTemplate
BODY json
{
"associateDefaultSecurityGroup": false,
"bandwidthThrottling": 0,
"createPublicIP": false,
"dataPlaneRouting": "",
"defaultLargeStagingDiskType": "",
"ebsEncryption": "",
"ebsEncryptionKeyArn": "",
"replicationServerInstanceType": "",
"replicationServersSecurityGroupsIDs": [],
"stagingAreaSubnetId": "",
"stagingAreaTags": {},
"tags": {},
"useDedicatedReplicationServer": false
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/CreateReplicationConfigurationTemplate");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"associateDefaultSecurityGroup\": false,\n \"bandwidthThrottling\": 0,\n \"createPublicIP\": false,\n \"dataPlaneRouting\": \"\",\n \"defaultLargeStagingDiskType\": \"\",\n \"ebsEncryption\": \"\",\n \"ebsEncryptionKeyArn\": \"\",\n \"replicationServerInstanceType\": \"\",\n \"replicationServersSecurityGroupsIDs\": [],\n \"stagingAreaSubnetId\": \"\",\n \"stagingAreaTags\": {},\n \"tags\": {},\n \"useDedicatedReplicationServer\": false\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/CreateReplicationConfigurationTemplate" {:content-type :json
:form-params {:associateDefaultSecurityGroup false
:bandwidthThrottling 0
:createPublicIP false
:dataPlaneRouting ""
:defaultLargeStagingDiskType ""
:ebsEncryption ""
:ebsEncryptionKeyArn ""
:replicationServerInstanceType ""
:replicationServersSecurityGroupsIDs []
:stagingAreaSubnetId ""
:stagingAreaTags {}
:tags {}
:useDedicatedReplicationServer false}})
require "http/client"
url = "{{baseUrl}}/CreateReplicationConfigurationTemplate"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"associateDefaultSecurityGroup\": false,\n \"bandwidthThrottling\": 0,\n \"createPublicIP\": false,\n \"dataPlaneRouting\": \"\",\n \"defaultLargeStagingDiskType\": \"\",\n \"ebsEncryption\": \"\",\n \"ebsEncryptionKeyArn\": \"\",\n \"replicationServerInstanceType\": \"\",\n \"replicationServersSecurityGroupsIDs\": [],\n \"stagingAreaSubnetId\": \"\",\n \"stagingAreaTags\": {},\n \"tags\": {},\n \"useDedicatedReplicationServer\": 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}}/CreateReplicationConfigurationTemplate"),
Content = new StringContent("{\n \"associateDefaultSecurityGroup\": false,\n \"bandwidthThrottling\": 0,\n \"createPublicIP\": false,\n \"dataPlaneRouting\": \"\",\n \"defaultLargeStagingDiskType\": \"\",\n \"ebsEncryption\": \"\",\n \"ebsEncryptionKeyArn\": \"\",\n \"replicationServerInstanceType\": \"\",\n \"replicationServersSecurityGroupsIDs\": [],\n \"stagingAreaSubnetId\": \"\",\n \"stagingAreaTags\": {},\n \"tags\": {},\n \"useDedicatedReplicationServer\": 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}}/CreateReplicationConfigurationTemplate");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"associateDefaultSecurityGroup\": false,\n \"bandwidthThrottling\": 0,\n \"createPublicIP\": false,\n \"dataPlaneRouting\": \"\",\n \"defaultLargeStagingDiskType\": \"\",\n \"ebsEncryption\": \"\",\n \"ebsEncryptionKeyArn\": \"\",\n \"replicationServerInstanceType\": \"\",\n \"replicationServersSecurityGroupsIDs\": [],\n \"stagingAreaSubnetId\": \"\",\n \"stagingAreaTags\": {},\n \"tags\": {},\n \"useDedicatedReplicationServer\": false\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/CreateReplicationConfigurationTemplate"
payload := strings.NewReader("{\n \"associateDefaultSecurityGroup\": false,\n \"bandwidthThrottling\": 0,\n \"createPublicIP\": false,\n \"dataPlaneRouting\": \"\",\n \"defaultLargeStagingDiskType\": \"\",\n \"ebsEncryption\": \"\",\n \"ebsEncryptionKeyArn\": \"\",\n \"replicationServerInstanceType\": \"\",\n \"replicationServersSecurityGroupsIDs\": [],\n \"stagingAreaSubnetId\": \"\",\n \"stagingAreaTags\": {},\n \"tags\": {},\n \"useDedicatedReplicationServer\": false\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/CreateReplicationConfigurationTemplate HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 408
{
"associateDefaultSecurityGroup": false,
"bandwidthThrottling": 0,
"createPublicIP": false,
"dataPlaneRouting": "",
"defaultLargeStagingDiskType": "",
"ebsEncryption": "",
"ebsEncryptionKeyArn": "",
"replicationServerInstanceType": "",
"replicationServersSecurityGroupsIDs": [],
"stagingAreaSubnetId": "",
"stagingAreaTags": {},
"tags": {},
"useDedicatedReplicationServer": false
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/CreateReplicationConfigurationTemplate")
.setHeader("content-type", "application/json")
.setBody("{\n \"associateDefaultSecurityGroup\": false,\n \"bandwidthThrottling\": 0,\n \"createPublicIP\": false,\n \"dataPlaneRouting\": \"\",\n \"defaultLargeStagingDiskType\": \"\",\n \"ebsEncryption\": \"\",\n \"ebsEncryptionKeyArn\": \"\",\n \"replicationServerInstanceType\": \"\",\n \"replicationServersSecurityGroupsIDs\": [],\n \"stagingAreaSubnetId\": \"\",\n \"stagingAreaTags\": {},\n \"tags\": {},\n \"useDedicatedReplicationServer\": false\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/CreateReplicationConfigurationTemplate"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"associateDefaultSecurityGroup\": false,\n \"bandwidthThrottling\": 0,\n \"createPublicIP\": false,\n \"dataPlaneRouting\": \"\",\n \"defaultLargeStagingDiskType\": \"\",\n \"ebsEncryption\": \"\",\n \"ebsEncryptionKeyArn\": \"\",\n \"replicationServerInstanceType\": \"\",\n \"replicationServersSecurityGroupsIDs\": [],\n \"stagingAreaSubnetId\": \"\",\n \"stagingAreaTags\": {},\n \"tags\": {},\n \"useDedicatedReplicationServer\": 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 \"associateDefaultSecurityGroup\": false,\n \"bandwidthThrottling\": 0,\n \"createPublicIP\": false,\n \"dataPlaneRouting\": \"\",\n \"defaultLargeStagingDiskType\": \"\",\n \"ebsEncryption\": \"\",\n \"ebsEncryptionKeyArn\": \"\",\n \"replicationServerInstanceType\": \"\",\n \"replicationServersSecurityGroupsIDs\": [],\n \"stagingAreaSubnetId\": \"\",\n \"stagingAreaTags\": {},\n \"tags\": {},\n \"useDedicatedReplicationServer\": false\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/CreateReplicationConfigurationTemplate")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/CreateReplicationConfigurationTemplate")
.header("content-type", "application/json")
.body("{\n \"associateDefaultSecurityGroup\": false,\n \"bandwidthThrottling\": 0,\n \"createPublicIP\": false,\n \"dataPlaneRouting\": \"\",\n \"defaultLargeStagingDiskType\": \"\",\n \"ebsEncryption\": \"\",\n \"ebsEncryptionKeyArn\": \"\",\n \"replicationServerInstanceType\": \"\",\n \"replicationServersSecurityGroupsIDs\": [],\n \"stagingAreaSubnetId\": \"\",\n \"stagingAreaTags\": {},\n \"tags\": {},\n \"useDedicatedReplicationServer\": false\n}")
.asString();
const data = JSON.stringify({
associateDefaultSecurityGroup: false,
bandwidthThrottling: 0,
createPublicIP: false,
dataPlaneRouting: '',
defaultLargeStagingDiskType: '',
ebsEncryption: '',
ebsEncryptionKeyArn: '',
replicationServerInstanceType: '',
replicationServersSecurityGroupsIDs: [],
stagingAreaSubnetId: '',
stagingAreaTags: {},
tags: {},
useDedicatedReplicationServer: 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}}/CreateReplicationConfigurationTemplate');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/CreateReplicationConfigurationTemplate',
headers: {'content-type': 'application/json'},
data: {
associateDefaultSecurityGroup: false,
bandwidthThrottling: 0,
createPublicIP: false,
dataPlaneRouting: '',
defaultLargeStagingDiskType: '',
ebsEncryption: '',
ebsEncryptionKeyArn: '',
replicationServerInstanceType: '',
replicationServersSecurityGroupsIDs: [],
stagingAreaSubnetId: '',
stagingAreaTags: {},
tags: {},
useDedicatedReplicationServer: false
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/CreateReplicationConfigurationTemplate';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"associateDefaultSecurityGroup":false,"bandwidthThrottling":0,"createPublicIP":false,"dataPlaneRouting":"","defaultLargeStagingDiskType":"","ebsEncryption":"","ebsEncryptionKeyArn":"","replicationServerInstanceType":"","replicationServersSecurityGroupsIDs":[],"stagingAreaSubnetId":"","stagingAreaTags":{},"tags":{},"useDedicatedReplicationServer":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}}/CreateReplicationConfigurationTemplate',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "associateDefaultSecurityGroup": false,\n "bandwidthThrottling": 0,\n "createPublicIP": false,\n "dataPlaneRouting": "",\n "defaultLargeStagingDiskType": "",\n "ebsEncryption": "",\n "ebsEncryptionKeyArn": "",\n "replicationServerInstanceType": "",\n "replicationServersSecurityGroupsIDs": [],\n "stagingAreaSubnetId": "",\n "stagingAreaTags": {},\n "tags": {},\n "useDedicatedReplicationServer": 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 \"associateDefaultSecurityGroup\": false,\n \"bandwidthThrottling\": 0,\n \"createPublicIP\": false,\n \"dataPlaneRouting\": \"\",\n \"defaultLargeStagingDiskType\": \"\",\n \"ebsEncryption\": \"\",\n \"ebsEncryptionKeyArn\": \"\",\n \"replicationServerInstanceType\": \"\",\n \"replicationServersSecurityGroupsIDs\": [],\n \"stagingAreaSubnetId\": \"\",\n \"stagingAreaTags\": {},\n \"tags\": {},\n \"useDedicatedReplicationServer\": false\n}")
val request = Request.Builder()
.url("{{baseUrl}}/CreateReplicationConfigurationTemplate")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/CreateReplicationConfigurationTemplate',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
associateDefaultSecurityGroup: false,
bandwidthThrottling: 0,
createPublicIP: false,
dataPlaneRouting: '',
defaultLargeStagingDiskType: '',
ebsEncryption: '',
ebsEncryptionKeyArn: '',
replicationServerInstanceType: '',
replicationServersSecurityGroupsIDs: [],
stagingAreaSubnetId: '',
stagingAreaTags: {},
tags: {},
useDedicatedReplicationServer: false
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/CreateReplicationConfigurationTemplate',
headers: {'content-type': 'application/json'},
body: {
associateDefaultSecurityGroup: false,
bandwidthThrottling: 0,
createPublicIP: false,
dataPlaneRouting: '',
defaultLargeStagingDiskType: '',
ebsEncryption: '',
ebsEncryptionKeyArn: '',
replicationServerInstanceType: '',
replicationServersSecurityGroupsIDs: [],
stagingAreaSubnetId: '',
stagingAreaTags: {},
tags: {},
useDedicatedReplicationServer: 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}}/CreateReplicationConfigurationTemplate');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
associateDefaultSecurityGroup: false,
bandwidthThrottling: 0,
createPublicIP: false,
dataPlaneRouting: '',
defaultLargeStagingDiskType: '',
ebsEncryption: '',
ebsEncryptionKeyArn: '',
replicationServerInstanceType: '',
replicationServersSecurityGroupsIDs: [],
stagingAreaSubnetId: '',
stagingAreaTags: {},
tags: {},
useDedicatedReplicationServer: 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}}/CreateReplicationConfigurationTemplate',
headers: {'content-type': 'application/json'},
data: {
associateDefaultSecurityGroup: false,
bandwidthThrottling: 0,
createPublicIP: false,
dataPlaneRouting: '',
defaultLargeStagingDiskType: '',
ebsEncryption: '',
ebsEncryptionKeyArn: '',
replicationServerInstanceType: '',
replicationServersSecurityGroupsIDs: [],
stagingAreaSubnetId: '',
stagingAreaTags: {},
tags: {},
useDedicatedReplicationServer: false
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/CreateReplicationConfigurationTemplate';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"associateDefaultSecurityGroup":false,"bandwidthThrottling":0,"createPublicIP":false,"dataPlaneRouting":"","defaultLargeStagingDiskType":"","ebsEncryption":"","ebsEncryptionKeyArn":"","replicationServerInstanceType":"","replicationServersSecurityGroupsIDs":[],"stagingAreaSubnetId":"","stagingAreaTags":{},"tags":{},"useDedicatedReplicationServer":false}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"associateDefaultSecurityGroup": @NO,
@"bandwidthThrottling": @0,
@"createPublicIP": @NO,
@"dataPlaneRouting": @"",
@"defaultLargeStagingDiskType": @"",
@"ebsEncryption": @"",
@"ebsEncryptionKeyArn": @"",
@"replicationServerInstanceType": @"",
@"replicationServersSecurityGroupsIDs": @[ ],
@"stagingAreaSubnetId": @"",
@"stagingAreaTags": @{ },
@"tags": @{ },
@"useDedicatedReplicationServer": @NO };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/CreateReplicationConfigurationTemplate"]
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}}/CreateReplicationConfigurationTemplate" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"associateDefaultSecurityGroup\": false,\n \"bandwidthThrottling\": 0,\n \"createPublicIP\": false,\n \"dataPlaneRouting\": \"\",\n \"defaultLargeStagingDiskType\": \"\",\n \"ebsEncryption\": \"\",\n \"ebsEncryptionKeyArn\": \"\",\n \"replicationServerInstanceType\": \"\",\n \"replicationServersSecurityGroupsIDs\": [],\n \"stagingAreaSubnetId\": \"\",\n \"stagingAreaTags\": {},\n \"tags\": {},\n \"useDedicatedReplicationServer\": false\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/CreateReplicationConfigurationTemplate",
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([
'associateDefaultSecurityGroup' => null,
'bandwidthThrottling' => 0,
'createPublicIP' => null,
'dataPlaneRouting' => '',
'defaultLargeStagingDiskType' => '',
'ebsEncryption' => '',
'ebsEncryptionKeyArn' => '',
'replicationServerInstanceType' => '',
'replicationServersSecurityGroupsIDs' => [
],
'stagingAreaSubnetId' => '',
'stagingAreaTags' => [
],
'tags' => [
],
'useDedicatedReplicationServer' => null
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/CreateReplicationConfigurationTemplate', [
'body' => '{
"associateDefaultSecurityGroup": false,
"bandwidthThrottling": 0,
"createPublicIP": false,
"dataPlaneRouting": "",
"defaultLargeStagingDiskType": "",
"ebsEncryption": "",
"ebsEncryptionKeyArn": "",
"replicationServerInstanceType": "",
"replicationServersSecurityGroupsIDs": [],
"stagingAreaSubnetId": "",
"stagingAreaTags": {},
"tags": {},
"useDedicatedReplicationServer": false
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/CreateReplicationConfigurationTemplate');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'associateDefaultSecurityGroup' => null,
'bandwidthThrottling' => 0,
'createPublicIP' => null,
'dataPlaneRouting' => '',
'defaultLargeStagingDiskType' => '',
'ebsEncryption' => '',
'ebsEncryptionKeyArn' => '',
'replicationServerInstanceType' => '',
'replicationServersSecurityGroupsIDs' => [
],
'stagingAreaSubnetId' => '',
'stagingAreaTags' => [
],
'tags' => [
],
'useDedicatedReplicationServer' => null
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'associateDefaultSecurityGroup' => null,
'bandwidthThrottling' => 0,
'createPublicIP' => null,
'dataPlaneRouting' => '',
'defaultLargeStagingDiskType' => '',
'ebsEncryption' => '',
'ebsEncryptionKeyArn' => '',
'replicationServerInstanceType' => '',
'replicationServersSecurityGroupsIDs' => [
],
'stagingAreaSubnetId' => '',
'stagingAreaTags' => [
],
'tags' => [
],
'useDedicatedReplicationServer' => null
]));
$request->setRequestUrl('{{baseUrl}}/CreateReplicationConfigurationTemplate');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/CreateReplicationConfigurationTemplate' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"associateDefaultSecurityGroup": false,
"bandwidthThrottling": 0,
"createPublicIP": false,
"dataPlaneRouting": "",
"defaultLargeStagingDiskType": "",
"ebsEncryption": "",
"ebsEncryptionKeyArn": "",
"replicationServerInstanceType": "",
"replicationServersSecurityGroupsIDs": [],
"stagingAreaSubnetId": "",
"stagingAreaTags": {},
"tags": {},
"useDedicatedReplicationServer": false
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/CreateReplicationConfigurationTemplate' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"associateDefaultSecurityGroup": false,
"bandwidthThrottling": 0,
"createPublicIP": false,
"dataPlaneRouting": "",
"defaultLargeStagingDiskType": "",
"ebsEncryption": "",
"ebsEncryptionKeyArn": "",
"replicationServerInstanceType": "",
"replicationServersSecurityGroupsIDs": [],
"stagingAreaSubnetId": "",
"stagingAreaTags": {},
"tags": {},
"useDedicatedReplicationServer": false
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"associateDefaultSecurityGroup\": false,\n \"bandwidthThrottling\": 0,\n \"createPublicIP\": false,\n \"dataPlaneRouting\": \"\",\n \"defaultLargeStagingDiskType\": \"\",\n \"ebsEncryption\": \"\",\n \"ebsEncryptionKeyArn\": \"\",\n \"replicationServerInstanceType\": \"\",\n \"replicationServersSecurityGroupsIDs\": [],\n \"stagingAreaSubnetId\": \"\",\n \"stagingAreaTags\": {},\n \"tags\": {},\n \"useDedicatedReplicationServer\": false\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/CreateReplicationConfigurationTemplate", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/CreateReplicationConfigurationTemplate"
payload = {
"associateDefaultSecurityGroup": False,
"bandwidthThrottling": 0,
"createPublicIP": False,
"dataPlaneRouting": "",
"defaultLargeStagingDiskType": "",
"ebsEncryption": "",
"ebsEncryptionKeyArn": "",
"replicationServerInstanceType": "",
"replicationServersSecurityGroupsIDs": [],
"stagingAreaSubnetId": "",
"stagingAreaTags": {},
"tags": {},
"useDedicatedReplicationServer": False
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/CreateReplicationConfigurationTemplate"
payload <- "{\n \"associateDefaultSecurityGroup\": false,\n \"bandwidthThrottling\": 0,\n \"createPublicIP\": false,\n \"dataPlaneRouting\": \"\",\n \"defaultLargeStagingDiskType\": \"\",\n \"ebsEncryption\": \"\",\n \"ebsEncryptionKeyArn\": \"\",\n \"replicationServerInstanceType\": \"\",\n \"replicationServersSecurityGroupsIDs\": [],\n \"stagingAreaSubnetId\": \"\",\n \"stagingAreaTags\": {},\n \"tags\": {},\n \"useDedicatedReplicationServer\": false\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/CreateReplicationConfigurationTemplate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"associateDefaultSecurityGroup\": false,\n \"bandwidthThrottling\": 0,\n \"createPublicIP\": false,\n \"dataPlaneRouting\": \"\",\n \"defaultLargeStagingDiskType\": \"\",\n \"ebsEncryption\": \"\",\n \"ebsEncryptionKeyArn\": \"\",\n \"replicationServerInstanceType\": \"\",\n \"replicationServersSecurityGroupsIDs\": [],\n \"stagingAreaSubnetId\": \"\",\n \"stagingAreaTags\": {},\n \"tags\": {},\n \"useDedicatedReplicationServer\": 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/CreateReplicationConfigurationTemplate') do |req|
req.body = "{\n \"associateDefaultSecurityGroup\": false,\n \"bandwidthThrottling\": 0,\n \"createPublicIP\": false,\n \"dataPlaneRouting\": \"\",\n \"defaultLargeStagingDiskType\": \"\",\n \"ebsEncryption\": \"\",\n \"ebsEncryptionKeyArn\": \"\",\n \"replicationServerInstanceType\": \"\",\n \"replicationServersSecurityGroupsIDs\": [],\n \"stagingAreaSubnetId\": \"\",\n \"stagingAreaTags\": {},\n \"tags\": {},\n \"useDedicatedReplicationServer\": false\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/CreateReplicationConfigurationTemplate";
let payload = json!({
"associateDefaultSecurityGroup": false,
"bandwidthThrottling": 0,
"createPublicIP": false,
"dataPlaneRouting": "",
"defaultLargeStagingDiskType": "",
"ebsEncryption": "",
"ebsEncryptionKeyArn": "",
"replicationServerInstanceType": "",
"replicationServersSecurityGroupsIDs": (),
"stagingAreaSubnetId": "",
"stagingAreaTags": json!({}),
"tags": json!({}),
"useDedicatedReplicationServer": false
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/CreateReplicationConfigurationTemplate \
--header 'content-type: application/json' \
--data '{
"associateDefaultSecurityGroup": false,
"bandwidthThrottling": 0,
"createPublicIP": false,
"dataPlaneRouting": "",
"defaultLargeStagingDiskType": "",
"ebsEncryption": "",
"ebsEncryptionKeyArn": "",
"replicationServerInstanceType": "",
"replicationServersSecurityGroupsIDs": [],
"stagingAreaSubnetId": "",
"stagingAreaTags": {},
"tags": {},
"useDedicatedReplicationServer": false
}'
echo '{
"associateDefaultSecurityGroup": false,
"bandwidthThrottling": 0,
"createPublicIP": false,
"dataPlaneRouting": "",
"defaultLargeStagingDiskType": "",
"ebsEncryption": "",
"ebsEncryptionKeyArn": "",
"replicationServerInstanceType": "",
"replicationServersSecurityGroupsIDs": [],
"stagingAreaSubnetId": "",
"stagingAreaTags": {},
"tags": {},
"useDedicatedReplicationServer": false
}' | \
http POST {{baseUrl}}/CreateReplicationConfigurationTemplate \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "associateDefaultSecurityGroup": false,\n "bandwidthThrottling": 0,\n "createPublicIP": false,\n "dataPlaneRouting": "",\n "defaultLargeStagingDiskType": "",\n "ebsEncryption": "",\n "ebsEncryptionKeyArn": "",\n "replicationServerInstanceType": "",\n "replicationServersSecurityGroupsIDs": [],\n "stagingAreaSubnetId": "",\n "stagingAreaTags": {},\n "tags": {},\n "useDedicatedReplicationServer": false\n}' \
--output-document \
- {{baseUrl}}/CreateReplicationConfigurationTemplate
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"associateDefaultSecurityGroup": false,
"bandwidthThrottling": 0,
"createPublicIP": false,
"dataPlaneRouting": "",
"defaultLargeStagingDiskType": "",
"ebsEncryption": "",
"ebsEncryptionKeyArn": "",
"replicationServerInstanceType": "",
"replicationServersSecurityGroupsIDs": [],
"stagingAreaSubnetId": "",
"stagingAreaTags": [],
"tags": [],
"useDedicatedReplicationServer": false
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/CreateReplicationConfigurationTemplate")! 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
CreateWave
{{baseUrl}}/CreateWave
BODY json
{
"description": "",
"name": "",
"tags": {}
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/CreateWave");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"description\": \"\",\n \"name\": \"\",\n \"tags\": {}\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/CreateWave" {:content-type :json
:form-params {:description ""
:name ""
:tags {}}})
require "http/client"
url = "{{baseUrl}}/CreateWave"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"description\": \"\",\n \"name\": \"\",\n \"tags\": {}\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/CreateWave"),
Content = new StringContent("{\n \"description\": \"\",\n \"name\": \"\",\n \"tags\": {}\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/CreateWave");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"description\": \"\",\n \"name\": \"\",\n \"tags\": {}\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/CreateWave"
payload := strings.NewReader("{\n \"description\": \"\",\n \"name\": \"\",\n \"tags\": {}\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/CreateWave HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 51
{
"description": "",
"name": "",
"tags": {}
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/CreateWave")
.setHeader("content-type", "application/json")
.setBody("{\n \"description\": \"\",\n \"name\": \"\",\n \"tags\": {}\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/CreateWave"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"description\": \"\",\n \"name\": \"\",\n \"tags\": {}\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"description\": \"\",\n \"name\": \"\",\n \"tags\": {}\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/CreateWave")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/CreateWave")
.header("content-type", "application/json")
.body("{\n \"description\": \"\",\n \"name\": \"\",\n \"tags\": {}\n}")
.asString();
const data = JSON.stringify({
description: '',
name: '',
tags: {}
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/CreateWave');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/CreateWave',
headers: {'content-type': 'application/json'},
data: {description: '', name: '', tags: {}}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/CreateWave';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"description":"","name":"","tags":{}}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/CreateWave',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "description": "",\n "name": "",\n "tags": {}\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"description\": \"\",\n \"name\": \"\",\n \"tags\": {}\n}")
val request = Request.Builder()
.url("{{baseUrl}}/CreateWave")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/CreateWave',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({description: '', name: '', tags: {}}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/CreateWave',
headers: {'content-type': 'application/json'},
body: {description: '', name: '', tags: {}},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/CreateWave');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
description: '',
name: '',
tags: {}
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/CreateWave',
headers: {'content-type': 'application/json'},
data: {description: '', name: '', tags: {}}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/CreateWave';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"description":"","name":"","tags":{}}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"description": @"",
@"name": @"",
@"tags": @{ } };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/CreateWave"]
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}}/CreateWave" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"description\": \"\",\n \"name\": \"\",\n \"tags\": {}\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/CreateWave",
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([
'description' => '',
'name' => '',
'tags' => [
]
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/CreateWave', [
'body' => '{
"description": "",
"name": "",
"tags": {}
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/CreateWave');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'description' => '',
'name' => '',
'tags' => [
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'description' => '',
'name' => '',
'tags' => [
]
]));
$request->setRequestUrl('{{baseUrl}}/CreateWave');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/CreateWave' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"description": "",
"name": "",
"tags": {}
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/CreateWave' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"description": "",
"name": "",
"tags": {}
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"description\": \"\",\n \"name\": \"\",\n \"tags\": {}\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/CreateWave", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/CreateWave"
payload = {
"description": "",
"name": "",
"tags": {}
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/CreateWave"
payload <- "{\n \"description\": \"\",\n \"name\": \"\",\n \"tags\": {}\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/CreateWave")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"description\": \"\",\n \"name\": \"\",\n \"tags\": {}\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/CreateWave') do |req|
req.body = "{\n \"description\": \"\",\n \"name\": \"\",\n \"tags\": {}\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/CreateWave";
let payload = json!({
"description": "",
"name": "",
"tags": json!({})
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/CreateWave \
--header 'content-type: application/json' \
--data '{
"description": "",
"name": "",
"tags": {}
}'
echo '{
"description": "",
"name": "",
"tags": {}
}' | \
http POST {{baseUrl}}/CreateWave \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "description": "",\n "name": "",\n "tags": {}\n}' \
--output-document \
- {{baseUrl}}/CreateWave
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"description": "",
"name": "",
"tags": []
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/CreateWave")! 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
DeleteApplication
{{baseUrl}}/DeleteApplication
BODY json
{
"applicationID": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/DeleteApplication");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"applicationID\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/DeleteApplication" {:content-type :json
:form-params {:applicationID ""}})
require "http/client"
url = "{{baseUrl}}/DeleteApplication"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"applicationID\": \"\"\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}}/DeleteApplication"),
Content = new StringContent("{\n \"applicationID\": \"\"\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}}/DeleteApplication");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"applicationID\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/DeleteApplication"
payload := strings.NewReader("{\n \"applicationID\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/DeleteApplication HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 25
{
"applicationID": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/DeleteApplication")
.setHeader("content-type", "application/json")
.setBody("{\n \"applicationID\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/DeleteApplication"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"applicationID\": \"\"\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 \"applicationID\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/DeleteApplication")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/DeleteApplication")
.header("content-type", "application/json")
.body("{\n \"applicationID\": \"\"\n}")
.asString();
const data = JSON.stringify({
applicationID: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/DeleteApplication');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/DeleteApplication',
headers: {'content-type': 'application/json'},
data: {applicationID: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/DeleteApplication';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"applicationID":""}'
};
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}}/DeleteApplication',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "applicationID": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"applicationID\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/DeleteApplication")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/DeleteApplication',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({applicationID: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/DeleteApplication',
headers: {'content-type': 'application/json'},
body: {applicationID: ''},
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}}/DeleteApplication');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
applicationID: ''
});
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}}/DeleteApplication',
headers: {'content-type': 'application/json'},
data: {applicationID: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/DeleteApplication';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"applicationID":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"applicationID": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/DeleteApplication"]
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}}/DeleteApplication" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"applicationID\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/DeleteApplication",
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([
'applicationID' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/DeleteApplication', [
'body' => '{
"applicationID": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/DeleteApplication');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'applicationID' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'applicationID' => ''
]));
$request->setRequestUrl('{{baseUrl}}/DeleteApplication');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/DeleteApplication' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"applicationID": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/DeleteApplication' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"applicationID": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"applicationID\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/DeleteApplication", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/DeleteApplication"
payload = { "applicationID": "" }
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/DeleteApplication"
payload <- "{\n \"applicationID\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/DeleteApplication")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"applicationID\": \"\"\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/DeleteApplication') do |req|
req.body = "{\n \"applicationID\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/DeleteApplication";
let payload = json!({"applicationID": ""});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/DeleteApplication \
--header 'content-type: application/json' \
--data '{
"applicationID": ""
}'
echo '{
"applicationID": ""
}' | \
http POST {{baseUrl}}/DeleteApplication \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "applicationID": ""\n}' \
--output-document \
- {{baseUrl}}/DeleteApplication
import Foundation
let headers = ["content-type": "application/json"]
let parameters = ["applicationID": ""] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/DeleteApplication")! 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
DeleteJob
{{baseUrl}}/DeleteJob
BODY json
{
"jobID": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/DeleteJob");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"jobID\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/DeleteJob" {:content-type :json
:form-params {:jobID ""}})
require "http/client"
url = "{{baseUrl}}/DeleteJob"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"jobID\": \"\"\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}}/DeleteJob"),
Content = new StringContent("{\n \"jobID\": \"\"\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}}/DeleteJob");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"jobID\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/DeleteJob"
payload := strings.NewReader("{\n \"jobID\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/DeleteJob HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 17
{
"jobID": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/DeleteJob")
.setHeader("content-type", "application/json")
.setBody("{\n \"jobID\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/DeleteJob"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"jobID\": \"\"\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 \"jobID\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/DeleteJob")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/DeleteJob")
.header("content-type", "application/json")
.body("{\n \"jobID\": \"\"\n}")
.asString();
const data = JSON.stringify({
jobID: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/DeleteJob');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/DeleteJob',
headers: {'content-type': 'application/json'},
data: {jobID: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/DeleteJob';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"jobID":""}'
};
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}}/DeleteJob',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "jobID": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"jobID\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/DeleteJob")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/DeleteJob',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({jobID: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/DeleteJob',
headers: {'content-type': 'application/json'},
body: {jobID: ''},
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}}/DeleteJob');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
jobID: ''
});
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}}/DeleteJob',
headers: {'content-type': 'application/json'},
data: {jobID: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/DeleteJob';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"jobID":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"jobID": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/DeleteJob"]
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}}/DeleteJob" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"jobID\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/DeleteJob",
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([
'jobID' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/DeleteJob', [
'body' => '{
"jobID": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/DeleteJob');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'jobID' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'jobID' => ''
]));
$request->setRequestUrl('{{baseUrl}}/DeleteJob');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/DeleteJob' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"jobID": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/DeleteJob' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"jobID": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"jobID\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/DeleteJob", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/DeleteJob"
payload = { "jobID": "" }
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/DeleteJob"
payload <- "{\n \"jobID\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/DeleteJob")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"jobID\": \"\"\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/DeleteJob') do |req|
req.body = "{\n \"jobID\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/DeleteJob";
let payload = json!({"jobID": ""});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/DeleteJob \
--header 'content-type: application/json' \
--data '{
"jobID": ""
}'
echo '{
"jobID": ""
}' | \
http POST {{baseUrl}}/DeleteJob \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "jobID": ""\n}' \
--output-document \
- {{baseUrl}}/DeleteJob
import Foundation
let headers = ["content-type": "application/json"]
let parameters = ["jobID": ""] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/DeleteJob")! 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
DeleteLaunchConfigurationTemplate
{{baseUrl}}/DeleteLaunchConfigurationTemplate
BODY json
{
"launchConfigurationTemplateID": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/DeleteLaunchConfigurationTemplate");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"launchConfigurationTemplateID\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/DeleteLaunchConfigurationTemplate" {:content-type :json
:form-params {:launchConfigurationTemplateID ""}})
require "http/client"
url = "{{baseUrl}}/DeleteLaunchConfigurationTemplate"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"launchConfigurationTemplateID\": \"\"\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}}/DeleteLaunchConfigurationTemplate"),
Content = new StringContent("{\n \"launchConfigurationTemplateID\": \"\"\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}}/DeleteLaunchConfigurationTemplate");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"launchConfigurationTemplateID\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/DeleteLaunchConfigurationTemplate"
payload := strings.NewReader("{\n \"launchConfigurationTemplateID\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/DeleteLaunchConfigurationTemplate HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 41
{
"launchConfigurationTemplateID": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/DeleteLaunchConfigurationTemplate")
.setHeader("content-type", "application/json")
.setBody("{\n \"launchConfigurationTemplateID\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/DeleteLaunchConfigurationTemplate"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"launchConfigurationTemplateID\": \"\"\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 \"launchConfigurationTemplateID\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/DeleteLaunchConfigurationTemplate")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/DeleteLaunchConfigurationTemplate")
.header("content-type", "application/json")
.body("{\n \"launchConfigurationTemplateID\": \"\"\n}")
.asString();
const data = JSON.stringify({
launchConfigurationTemplateID: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/DeleteLaunchConfigurationTemplate');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/DeleteLaunchConfigurationTemplate',
headers: {'content-type': 'application/json'},
data: {launchConfigurationTemplateID: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/DeleteLaunchConfigurationTemplate';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"launchConfigurationTemplateID":""}'
};
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}}/DeleteLaunchConfigurationTemplate',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "launchConfigurationTemplateID": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"launchConfigurationTemplateID\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/DeleteLaunchConfigurationTemplate")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/DeleteLaunchConfigurationTemplate',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({launchConfigurationTemplateID: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/DeleteLaunchConfigurationTemplate',
headers: {'content-type': 'application/json'},
body: {launchConfigurationTemplateID: ''},
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}}/DeleteLaunchConfigurationTemplate');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
launchConfigurationTemplateID: ''
});
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}}/DeleteLaunchConfigurationTemplate',
headers: {'content-type': 'application/json'},
data: {launchConfigurationTemplateID: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/DeleteLaunchConfigurationTemplate';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"launchConfigurationTemplateID":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"launchConfigurationTemplateID": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/DeleteLaunchConfigurationTemplate"]
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}}/DeleteLaunchConfigurationTemplate" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"launchConfigurationTemplateID\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/DeleteLaunchConfigurationTemplate",
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([
'launchConfigurationTemplateID' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/DeleteLaunchConfigurationTemplate', [
'body' => '{
"launchConfigurationTemplateID": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/DeleteLaunchConfigurationTemplate');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'launchConfigurationTemplateID' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'launchConfigurationTemplateID' => ''
]));
$request->setRequestUrl('{{baseUrl}}/DeleteLaunchConfigurationTemplate');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/DeleteLaunchConfigurationTemplate' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"launchConfigurationTemplateID": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/DeleteLaunchConfigurationTemplate' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"launchConfigurationTemplateID": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"launchConfigurationTemplateID\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/DeleteLaunchConfigurationTemplate", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/DeleteLaunchConfigurationTemplate"
payload = { "launchConfigurationTemplateID": "" }
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/DeleteLaunchConfigurationTemplate"
payload <- "{\n \"launchConfigurationTemplateID\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/DeleteLaunchConfigurationTemplate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"launchConfigurationTemplateID\": \"\"\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/DeleteLaunchConfigurationTemplate') do |req|
req.body = "{\n \"launchConfigurationTemplateID\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/DeleteLaunchConfigurationTemplate";
let payload = json!({"launchConfigurationTemplateID": ""});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/DeleteLaunchConfigurationTemplate \
--header 'content-type: application/json' \
--data '{
"launchConfigurationTemplateID": ""
}'
echo '{
"launchConfigurationTemplateID": ""
}' | \
http POST {{baseUrl}}/DeleteLaunchConfigurationTemplate \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "launchConfigurationTemplateID": ""\n}' \
--output-document \
- {{baseUrl}}/DeleteLaunchConfigurationTemplate
import Foundation
let headers = ["content-type": "application/json"]
let parameters = ["launchConfigurationTemplateID": ""] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/DeleteLaunchConfigurationTemplate")! 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
DeleteReplicationConfigurationTemplate
{{baseUrl}}/DeleteReplicationConfigurationTemplate
BODY json
{
"replicationConfigurationTemplateID": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/DeleteReplicationConfigurationTemplate");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"replicationConfigurationTemplateID\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/DeleteReplicationConfigurationTemplate" {:content-type :json
:form-params {:replicationConfigurationTemplateID ""}})
require "http/client"
url = "{{baseUrl}}/DeleteReplicationConfigurationTemplate"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"replicationConfigurationTemplateID\": \"\"\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}}/DeleteReplicationConfigurationTemplate"),
Content = new StringContent("{\n \"replicationConfigurationTemplateID\": \"\"\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}}/DeleteReplicationConfigurationTemplate");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"replicationConfigurationTemplateID\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/DeleteReplicationConfigurationTemplate"
payload := strings.NewReader("{\n \"replicationConfigurationTemplateID\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/DeleteReplicationConfigurationTemplate HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 46
{
"replicationConfigurationTemplateID": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/DeleteReplicationConfigurationTemplate")
.setHeader("content-type", "application/json")
.setBody("{\n \"replicationConfigurationTemplateID\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/DeleteReplicationConfigurationTemplate"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"replicationConfigurationTemplateID\": \"\"\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 \"replicationConfigurationTemplateID\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/DeleteReplicationConfigurationTemplate")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/DeleteReplicationConfigurationTemplate")
.header("content-type", "application/json")
.body("{\n \"replicationConfigurationTemplateID\": \"\"\n}")
.asString();
const data = JSON.stringify({
replicationConfigurationTemplateID: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/DeleteReplicationConfigurationTemplate');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/DeleteReplicationConfigurationTemplate',
headers: {'content-type': 'application/json'},
data: {replicationConfigurationTemplateID: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/DeleteReplicationConfigurationTemplate';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"replicationConfigurationTemplateID":""}'
};
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}}/DeleteReplicationConfigurationTemplate',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "replicationConfigurationTemplateID": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"replicationConfigurationTemplateID\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/DeleteReplicationConfigurationTemplate")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/DeleteReplicationConfigurationTemplate',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({replicationConfigurationTemplateID: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/DeleteReplicationConfigurationTemplate',
headers: {'content-type': 'application/json'},
body: {replicationConfigurationTemplateID: ''},
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}}/DeleteReplicationConfigurationTemplate');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
replicationConfigurationTemplateID: ''
});
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}}/DeleteReplicationConfigurationTemplate',
headers: {'content-type': 'application/json'},
data: {replicationConfigurationTemplateID: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/DeleteReplicationConfigurationTemplate';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"replicationConfigurationTemplateID":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"replicationConfigurationTemplateID": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/DeleteReplicationConfigurationTemplate"]
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}}/DeleteReplicationConfigurationTemplate" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"replicationConfigurationTemplateID\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/DeleteReplicationConfigurationTemplate",
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([
'replicationConfigurationTemplateID' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/DeleteReplicationConfigurationTemplate', [
'body' => '{
"replicationConfigurationTemplateID": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/DeleteReplicationConfigurationTemplate');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'replicationConfigurationTemplateID' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'replicationConfigurationTemplateID' => ''
]));
$request->setRequestUrl('{{baseUrl}}/DeleteReplicationConfigurationTemplate');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/DeleteReplicationConfigurationTemplate' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"replicationConfigurationTemplateID": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/DeleteReplicationConfigurationTemplate' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"replicationConfigurationTemplateID": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"replicationConfigurationTemplateID\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/DeleteReplicationConfigurationTemplate", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/DeleteReplicationConfigurationTemplate"
payload = { "replicationConfigurationTemplateID": "" }
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/DeleteReplicationConfigurationTemplate"
payload <- "{\n \"replicationConfigurationTemplateID\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/DeleteReplicationConfigurationTemplate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"replicationConfigurationTemplateID\": \"\"\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/DeleteReplicationConfigurationTemplate') do |req|
req.body = "{\n \"replicationConfigurationTemplateID\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/DeleteReplicationConfigurationTemplate";
let payload = json!({"replicationConfigurationTemplateID": ""});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/DeleteReplicationConfigurationTemplate \
--header 'content-type: application/json' \
--data '{
"replicationConfigurationTemplateID": ""
}'
echo '{
"replicationConfigurationTemplateID": ""
}' | \
http POST {{baseUrl}}/DeleteReplicationConfigurationTemplate \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "replicationConfigurationTemplateID": ""\n}' \
--output-document \
- {{baseUrl}}/DeleteReplicationConfigurationTemplate
import Foundation
let headers = ["content-type": "application/json"]
let parameters = ["replicationConfigurationTemplateID": ""] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/DeleteReplicationConfigurationTemplate")! 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
DeleteSourceServer
{{baseUrl}}/DeleteSourceServer
BODY json
{
"sourceServerID": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/DeleteSourceServer");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"sourceServerID\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/DeleteSourceServer" {:content-type :json
:form-params {:sourceServerID ""}})
require "http/client"
url = "{{baseUrl}}/DeleteSourceServer"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"sourceServerID\": \"\"\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}}/DeleteSourceServer"),
Content = new StringContent("{\n \"sourceServerID\": \"\"\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}}/DeleteSourceServer");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"sourceServerID\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/DeleteSourceServer"
payload := strings.NewReader("{\n \"sourceServerID\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/DeleteSourceServer HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 26
{
"sourceServerID": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/DeleteSourceServer")
.setHeader("content-type", "application/json")
.setBody("{\n \"sourceServerID\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/DeleteSourceServer"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"sourceServerID\": \"\"\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 \"sourceServerID\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/DeleteSourceServer")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/DeleteSourceServer")
.header("content-type", "application/json")
.body("{\n \"sourceServerID\": \"\"\n}")
.asString();
const data = JSON.stringify({
sourceServerID: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/DeleteSourceServer');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/DeleteSourceServer',
headers: {'content-type': 'application/json'},
data: {sourceServerID: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/DeleteSourceServer';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"sourceServerID":""}'
};
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}}/DeleteSourceServer',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "sourceServerID": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"sourceServerID\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/DeleteSourceServer")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/DeleteSourceServer',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({sourceServerID: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/DeleteSourceServer',
headers: {'content-type': 'application/json'},
body: {sourceServerID: ''},
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}}/DeleteSourceServer');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
sourceServerID: ''
});
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}}/DeleteSourceServer',
headers: {'content-type': 'application/json'},
data: {sourceServerID: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/DeleteSourceServer';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"sourceServerID":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"sourceServerID": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/DeleteSourceServer"]
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}}/DeleteSourceServer" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"sourceServerID\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/DeleteSourceServer",
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([
'sourceServerID' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/DeleteSourceServer', [
'body' => '{
"sourceServerID": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/DeleteSourceServer');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'sourceServerID' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'sourceServerID' => ''
]));
$request->setRequestUrl('{{baseUrl}}/DeleteSourceServer');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/DeleteSourceServer' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"sourceServerID": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/DeleteSourceServer' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"sourceServerID": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"sourceServerID\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/DeleteSourceServer", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/DeleteSourceServer"
payload = { "sourceServerID": "" }
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/DeleteSourceServer"
payload <- "{\n \"sourceServerID\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/DeleteSourceServer")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"sourceServerID\": \"\"\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/DeleteSourceServer') do |req|
req.body = "{\n \"sourceServerID\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/DeleteSourceServer";
let payload = json!({"sourceServerID": ""});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/DeleteSourceServer \
--header 'content-type: application/json' \
--data '{
"sourceServerID": ""
}'
echo '{
"sourceServerID": ""
}' | \
http POST {{baseUrl}}/DeleteSourceServer \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "sourceServerID": ""\n}' \
--output-document \
- {{baseUrl}}/DeleteSourceServer
import Foundation
let headers = ["content-type": "application/json"]
let parameters = ["sourceServerID": ""] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/DeleteSourceServer")! 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
DeleteVcenterClient
{{baseUrl}}/DeleteVcenterClient
BODY json
{
"vcenterClientID": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/DeleteVcenterClient");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"vcenterClientID\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/DeleteVcenterClient" {:content-type :json
:form-params {:vcenterClientID ""}})
require "http/client"
url = "{{baseUrl}}/DeleteVcenterClient"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"vcenterClientID\": \"\"\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}}/DeleteVcenterClient"),
Content = new StringContent("{\n \"vcenterClientID\": \"\"\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}}/DeleteVcenterClient");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"vcenterClientID\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/DeleteVcenterClient"
payload := strings.NewReader("{\n \"vcenterClientID\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/DeleteVcenterClient HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 27
{
"vcenterClientID": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/DeleteVcenterClient")
.setHeader("content-type", "application/json")
.setBody("{\n \"vcenterClientID\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/DeleteVcenterClient"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"vcenterClientID\": \"\"\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 \"vcenterClientID\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/DeleteVcenterClient")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/DeleteVcenterClient")
.header("content-type", "application/json")
.body("{\n \"vcenterClientID\": \"\"\n}")
.asString();
const data = JSON.stringify({
vcenterClientID: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/DeleteVcenterClient');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/DeleteVcenterClient',
headers: {'content-type': 'application/json'},
data: {vcenterClientID: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/DeleteVcenterClient';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"vcenterClientID":""}'
};
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}}/DeleteVcenterClient',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "vcenterClientID": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"vcenterClientID\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/DeleteVcenterClient")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/DeleteVcenterClient',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({vcenterClientID: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/DeleteVcenterClient',
headers: {'content-type': 'application/json'},
body: {vcenterClientID: ''},
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}}/DeleteVcenterClient');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
vcenterClientID: ''
});
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}}/DeleteVcenterClient',
headers: {'content-type': 'application/json'},
data: {vcenterClientID: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/DeleteVcenterClient';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"vcenterClientID":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"vcenterClientID": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/DeleteVcenterClient"]
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}}/DeleteVcenterClient" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"vcenterClientID\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/DeleteVcenterClient",
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([
'vcenterClientID' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/DeleteVcenterClient', [
'body' => '{
"vcenterClientID": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/DeleteVcenterClient');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'vcenterClientID' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'vcenterClientID' => ''
]));
$request->setRequestUrl('{{baseUrl}}/DeleteVcenterClient');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/DeleteVcenterClient' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"vcenterClientID": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/DeleteVcenterClient' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"vcenterClientID": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"vcenterClientID\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/DeleteVcenterClient", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/DeleteVcenterClient"
payload = { "vcenterClientID": "" }
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/DeleteVcenterClient"
payload <- "{\n \"vcenterClientID\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/DeleteVcenterClient")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"vcenterClientID\": \"\"\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/DeleteVcenterClient') do |req|
req.body = "{\n \"vcenterClientID\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/DeleteVcenterClient";
let payload = json!({"vcenterClientID": ""});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/DeleteVcenterClient \
--header 'content-type: application/json' \
--data '{
"vcenterClientID": ""
}'
echo '{
"vcenterClientID": ""
}' | \
http POST {{baseUrl}}/DeleteVcenterClient \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "vcenterClientID": ""\n}' \
--output-document \
- {{baseUrl}}/DeleteVcenterClient
import Foundation
let headers = ["content-type": "application/json"]
let parameters = ["vcenterClientID": ""] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/DeleteVcenterClient")! 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
DeleteWave
{{baseUrl}}/DeleteWave
BODY json
{
"waveID": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/DeleteWave");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"waveID\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/DeleteWave" {:content-type :json
:form-params {:waveID ""}})
require "http/client"
url = "{{baseUrl}}/DeleteWave"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"waveID\": \"\"\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}}/DeleteWave"),
Content = new StringContent("{\n \"waveID\": \"\"\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}}/DeleteWave");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"waveID\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/DeleteWave"
payload := strings.NewReader("{\n \"waveID\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/DeleteWave HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 18
{
"waveID": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/DeleteWave")
.setHeader("content-type", "application/json")
.setBody("{\n \"waveID\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/DeleteWave"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"waveID\": \"\"\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 \"waveID\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/DeleteWave")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/DeleteWave")
.header("content-type", "application/json")
.body("{\n \"waveID\": \"\"\n}")
.asString();
const data = JSON.stringify({
waveID: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/DeleteWave');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/DeleteWave',
headers: {'content-type': 'application/json'},
data: {waveID: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/DeleteWave';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"waveID":""}'
};
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}}/DeleteWave',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "waveID": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"waveID\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/DeleteWave")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/DeleteWave',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({waveID: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/DeleteWave',
headers: {'content-type': 'application/json'},
body: {waveID: ''},
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}}/DeleteWave');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
waveID: ''
});
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}}/DeleteWave',
headers: {'content-type': 'application/json'},
data: {waveID: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/DeleteWave';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"waveID":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"waveID": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/DeleteWave"]
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}}/DeleteWave" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"waveID\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/DeleteWave",
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([
'waveID' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/DeleteWave', [
'body' => '{
"waveID": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/DeleteWave');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'waveID' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'waveID' => ''
]));
$request->setRequestUrl('{{baseUrl}}/DeleteWave');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/DeleteWave' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"waveID": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/DeleteWave' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"waveID": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"waveID\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/DeleteWave", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/DeleteWave"
payload = { "waveID": "" }
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/DeleteWave"
payload <- "{\n \"waveID\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/DeleteWave")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"waveID\": \"\"\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/DeleteWave') do |req|
req.body = "{\n \"waveID\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/DeleteWave";
let payload = json!({"waveID": ""});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/DeleteWave \
--header 'content-type: application/json' \
--data '{
"waveID": ""
}'
echo '{
"waveID": ""
}' | \
http POST {{baseUrl}}/DeleteWave \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "waveID": ""\n}' \
--output-document \
- {{baseUrl}}/DeleteWave
import Foundation
let headers = ["content-type": "application/json"]
let parameters = ["waveID": ""] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/DeleteWave")! 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
DescribeJobLogItems
{{baseUrl}}/DescribeJobLogItems
BODY json
{
"jobID": "",
"maxResults": 0,
"nextToken": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/DescribeJobLogItems");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"jobID\": \"\",\n \"maxResults\": 0,\n \"nextToken\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/DescribeJobLogItems" {:content-type :json
:form-params {:jobID ""
:maxResults 0
:nextToken ""}})
require "http/client"
url = "{{baseUrl}}/DescribeJobLogItems"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"jobID\": \"\",\n \"maxResults\": 0,\n \"nextToken\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/DescribeJobLogItems"),
Content = new StringContent("{\n \"jobID\": \"\",\n \"maxResults\": 0,\n \"nextToken\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/DescribeJobLogItems");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"jobID\": \"\",\n \"maxResults\": 0,\n \"nextToken\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/DescribeJobLogItems"
payload := strings.NewReader("{\n \"jobID\": \"\",\n \"maxResults\": 0,\n \"nextToken\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/DescribeJobLogItems HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 55
{
"jobID": "",
"maxResults": 0,
"nextToken": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/DescribeJobLogItems")
.setHeader("content-type", "application/json")
.setBody("{\n \"jobID\": \"\",\n \"maxResults\": 0,\n \"nextToken\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/DescribeJobLogItems"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"jobID\": \"\",\n \"maxResults\": 0,\n \"nextToken\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"jobID\": \"\",\n \"maxResults\": 0,\n \"nextToken\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/DescribeJobLogItems")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/DescribeJobLogItems")
.header("content-type", "application/json")
.body("{\n \"jobID\": \"\",\n \"maxResults\": 0,\n \"nextToken\": \"\"\n}")
.asString();
const data = JSON.stringify({
jobID: '',
maxResults: 0,
nextToken: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/DescribeJobLogItems');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/DescribeJobLogItems',
headers: {'content-type': 'application/json'},
data: {jobID: '', maxResults: 0, nextToken: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/DescribeJobLogItems';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"jobID":"","maxResults":0,"nextToken":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/DescribeJobLogItems',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "jobID": "",\n "maxResults": 0,\n "nextToken": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"jobID\": \"\",\n \"maxResults\": 0,\n \"nextToken\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/DescribeJobLogItems")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/DescribeJobLogItems',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({jobID: '', maxResults: 0, nextToken: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/DescribeJobLogItems',
headers: {'content-type': 'application/json'},
body: {jobID: '', maxResults: 0, nextToken: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/DescribeJobLogItems');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
jobID: '',
maxResults: 0,
nextToken: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/DescribeJobLogItems',
headers: {'content-type': 'application/json'},
data: {jobID: '', maxResults: 0, nextToken: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/DescribeJobLogItems';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"jobID":"","maxResults":0,"nextToken":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"jobID": @"",
@"maxResults": @0,
@"nextToken": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/DescribeJobLogItems"]
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}}/DescribeJobLogItems" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"jobID\": \"\",\n \"maxResults\": 0,\n \"nextToken\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/DescribeJobLogItems",
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([
'jobID' => '',
'maxResults' => 0,
'nextToken' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/DescribeJobLogItems', [
'body' => '{
"jobID": "",
"maxResults": 0,
"nextToken": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/DescribeJobLogItems');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'jobID' => '',
'maxResults' => 0,
'nextToken' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'jobID' => '',
'maxResults' => 0,
'nextToken' => ''
]));
$request->setRequestUrl('{{baseUrl}}/DescribeJobLogItems');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/DescribeJobLogItems' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"jobID": "",
"maxResults": 0,
"nextToken": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/DescribeJobLogItems' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"jobID": "",
"maxResults": 0,
"nextToken": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"jobID\": \"\",\n \"maxResults\": 0,\n \"nextToken\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/DescribeJobLogItems", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/DescribeJobLogItems"
payload = {
"jobID": "",
"maxResults": 0,
"nextToken": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/DescribeJobLogItems"
payload <- "{\n \"jobID\": \"\",\n \"maxResults\": 0,\n \"nextToken\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/DescribeJobLogItems")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"jobID\": \"\",\n \"maxResults\": 0,\n \"nextToken\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/DescribeJobLogItems') do |req|
req.body = "{\n \"jobID\": \"\",\n \"maxResults\": 0,\n \"nextToken\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/DescribeJobLogItems";
let payload = json!({
"jobID": "",
"maxResults": 0,
"nextToken": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/DescribeJobLogItems \
--header 'content-type: application/json' \
--data '{
"jobID": "",
"maxResults": 0,
"nextToken": ""
}'
echo '{
"jobID": "",
"maxResults": 0,
"nextToken": ""
}' | \
http POST {{baseUrl}}/DescribeJobLogItems \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "jobID": "",\n "maxResults": 0,\n "nextToken": ""\n}' \
--output-document \
- {{baseUrl}}/DescribeJobLogItems
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"jobID": "",
"maxResults": 0,
"nextToken": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/DescribeJobLogItems")! 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
DescribeJobs
{{baseUrl}}/DescribeJobs
BODY json
{
"filters": {
"fromDate": "",
"jobIDs": "",
"toDate": ""
},
"maxResults": 0,
"nextToken": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/DescribeJobs");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"filters\": {\n \"fromDate\": \"\",\n \"jobIDs\": \"\",\n \"toDate\": \"\"\n },\n \"maxResults\": 0,\n \"nextToken\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/DescribeJobs" {:content-type :json
:form-params {:filters {:fromDate ""
:jobIDs ""
:toDate ""}
:maxResults 0
:nextToken ""}})
require "http/client"
url = "{{baseUrl}}/DescribeJobs"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"filters\": {\n \"fromDate\": \"\",\n \"jobIDs\": \"\",\n \"toDate\": \"\"\n },\n \"maxResults\": 0,\n \"nextToken\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/DescribeJobs"),
Content = new StringContent("{\n \"filters\": {\n \"fromDate\": \"\",\n \"jobIDs\": \"\",\n \"toDate\": \"\"\n },\n \"maxResults\": 0,\n \"nextToken\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/DescribeJobs");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"filters\": {\n \"fromDate\": \"\",\n \"jobIDs\": \"\",\n \"toDate\": \"\"\n },\n \"maxResults\": 0,\n \"nextToken\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/DescribeJobs"
payload := strings.NewReader("{\n \"filters\": {\n \"fromDate\": \"\",\n \"jobIDs\": \"\",\n \"toDate\": \"\"\n },\n \"maxResults\": 0,\n \"nextToken\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/DescribeJobs HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 115
{
"filters": {
"fromDate": "",
"jobIDs": "",
"toDate": ""
},
"maxResults": 0,
"nextToken": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/DescribeJobs")
.setHeader("content-type", "application/json")
.setBody("{\n \"filters\": {\n \"fromDate\": \"\",\n \"jobIDs\": \"\",\n \"toDate\": \"\"\n },\n \"maxResults\": 0,\n \"nextToken\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/DescribeJobs"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"filters\": {\n \"fromDate\": \"\",\n \"jobIDs\": \"\",\n \"toDate\": \"\"\n },\n \"maxResults\": 0,\n \"nextToken\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"filters\": {\n \"fromDate\": \"\",\n \"jobIDs\": \"\",\n \"toDate\": \"\"\n },\n \"maxResults\": 0,\n \"nextToken\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/DescribeJobs")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/DescribeJobs")
.header("content-type", "application/json")
.body("{\n \"filters\": {\n \"fromDate\": \"\",\n \"jobIDs\": \"\",\n \"toDate\": \"\"\n },\n \"maxResults\": 0,\n \"nextToken\": \"\"\n}")
.asString();
const data = JSON.stringify({
filters: {
fromDate: '',
jobIDs: '',
toDate: ''
},
maxResults: 0,
nextToken: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/DescribeJobs');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/DescribeJobs',
headers: {'content-type': 'application/json'},
data: {filters: {fromDate: '', jobIDs: '', toDate: ''}, maxResults: 0, nextToken: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/DescribeJobs';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"filters":{"fromDate":"","jobIDs":"","toDate":""},"maxResults":0,"nextToken":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/DescribeJobs',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "filters": {\n "fromDate": "",\n "jobIDs": "",\n "toDate": ""\n },\n "maxResults": 0,\n "nextToken": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"filters\": {\n \"fromDate\": \"\",\n \"jobIDs\": \"\",\n \"toDate\": \"\"\n },\n \"maxResults\": 0,\n \"nextToken\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/DescribeJobs")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/DescribeJobs',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({filters: {fromDate: '', jobIDs: '', toDate: ''}, maxResults: 0, nextToken: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/DescribeJobs',
headers: {'content-type': 'application/json'},
body: {filters: {fromDate: '', jobIDs: '', toDate: ''}, maxResults: 0, nextToken: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/DescribeJobs');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
filters: {
fromDate: '',
jobIDs: '',
toDate: ''
},
maxResults: 0,
nextToken: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/DescribeJobs',
headers: {'content-type': 'application/json'},
data: {filters: {fromDate: '', jobIDs: '', toDate: ''}, maxResults: 0, nextToken: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/DescribeJobs';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"filters":{"fromDate":"","jobIDs":"","toDate":""},"maxResults":0,"nextToken":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"filters": @{ @"fromDate": @"", @"jobIDs": @"", @"toDate": @"" },
@"maxResults": @0,
@"nextToken": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/DescribeJobs"]
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}}/DescribeJobs" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"filters\": {\n \"fromDate\": \"\",\n \"jobIDs\": \"\",\n \"toDate\": \"\"\n },\n \"maxResults\": 0,\n \"nextToken\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/DescribeJobs",
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([
'filters' => [
'fromDate' => '',
'jobIDs' => '',
'toDate' => ''
],
'maxResults' => 0,
'nextToken' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/DescribeJobs', [
'body' => '{
"filters": {
"fromDate": "",
"jobIDs": "",
"toDate": ""
},
"maxResults": 0,
"nextToken": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/DescribeJobs');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'filters' => [
'fromDate' => '',
'jobIDs' => '',
'toDate' => ''
],
'maxResults' => 0,
'nextToken' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'filters' => [
'fromDate' => '',
'jobIDs' => '',
'toDate' => ''
],
'maxResults' => 0,
'nextToken' => ''
]));
$request->setRequestUrl('{{baseUrl}}/DescribeJobs');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/DescribeJobs' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"filters": {
"fromDate": "",
"jobIDs": "",
"toDate": ""
},
"maxResults": 0,
"nextToken": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/DescribeJobs' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"filters": {
"fromDate": "",
"jobIDs": "",
"toDate": ""
},
"maxResults": 0,
"nextToken": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"filters\": {\n \"fromDate\": \"\",\n \"jobIDs\": \"\",\n \"toDate\": \"\"\n },\n \"maxResults\": 0,\n \"nextToken\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/DescribeJobs", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/DescribeJobs"
payload = {
"filters": {
"fromDate": "",
"jobIDs": "",
"toDate": ""
},
"maxResults": 0,
"nextToken": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/DescribeJobs"
payload <- "{\n \"filters\": {\n \"fromDate\": \"\",\n \"jobIDs\": \"\",\n \"toDate\": \"\"\n },\n \"maxResults\": 0,\n \"nextToken\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/DescribeJobs")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"filters\": {\n \"fromDate\": \"\",\n \"jobIDs\": \"\",\n \"toDate\": \"\"\n },\n \"maxResults\": 0,\n \"nextToken\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/DescribeJobs') do |req|
req.body = "{\n \"filters\": {\n \"fromDate\": \"\",\n \"jobIDs\": \"\",\n \"toDate\": \"\"\n },\n \"maxResults\": 0,\n \"nextToken\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/DescribeJobs";
let payload = json!({
"filters": json!({
"fromDate": "",
"jobIDs": "",
"toDate": ""
}),
"maxResults": 0,
"nextToken": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/DescribeJobs \
--header 'content-type: application/json' \
--data '{
"filters": {
"fromDate": "",
"jobIDs": "",
"toDate": ""
},
"maxResults": 0,
"nextToken": ""
}'
echo '{
"filters": {
"fromDate": "",
"jobIDs": "",
"toDate": ""
},
"maxResults": 0,
"nextToken": ""
}' | \
http POST {{baseUrl}}/DescribeJobs \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "filters": {\n "fromDate": "",\n "jobIDs": "",\n "toDate": ""\n },\n "maxResults": 0,\n "nextToken": ""\n}' \
--output-document \
- {{baseUrl}}/DescribeJobs
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"filters": [
"fromDate": "",
"jobIDs": "",
"toDate": ""
],
"maxResults": 0,
"nextToken": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/DescribeJobs")! 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
DescribeLaunchConfigurationTemplates
{{baseUrl}}/DescribeLaunchConfigurationTemplates
BODY json
{
"launchConfigurationTemplateIDs": [],
"maxResults": 0,
"nextToken": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/DescribeLaunchConfigurationTemplates");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"launchConfigurationTemplateIDs\": [],\n \"maxResults\": 0,\n \"nextToken\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/DescribeLaunchConfigurationTemplates" {:content-type :json
:form-params {:launchConfigurationTemplateIDs []
:maxResults 0
:nextToken ""}})
require "http/client"
url = "{{baseUrl}}/DescribeLaunchConfigurationTemplates"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"launchConfigurationTemplateIDs\": [],\n \"maxResults\": 0,\n \"nextToken\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/DescribeLaunchConfigurationTemplates"),
Content = new StringContent("{\n \"launchConfigurationTemplateIDs\": [],\n \"maxResults\": 0,\n \"nextToken\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/DescribeLaunchConfigurationTemplates");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"launchConfigurationTemplateIDs\": [],\n \"maxResults\": 0,\n \"nextToken\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/DescribeLaunchConfigurationTemplates"
payload := strings.NewReader("{\n \"launchConfigurationTemplateIDs\": [],\n \"maxResults\": 0,\n \"nextToken\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/DescribeLaunchConfigurationTemplates HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 80
{
"launchConfigurationTemplateIDs": [],
"maxResults": 0,
"nextToken": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/DescribeLaunchConfigurationTemplates")
.setHeader("content-type", "application/json")
.setBody("{\n \"launchConfigurationTemplateIDs\": [],\n \"maxResults\": 0,\n \"nextToken\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/DescribeLaunchConfigurationTemplates"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"launchConfigurationTemplateIDs\": [],\n \"maxResults\": 0,\n \"nextToken\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"launchConfigurationTemplateIDs\": [],\n \"maxResults\": 0,\n \"nextToken\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/DescribeLaunchConfigurationTemplates")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/DescribeLaunchConfigurationTemplates")
.header("content-type", "application/json")
.body("{\n \"launchConfigurationTemplateIDs\": [],\n \"maxResults\": 0,\n \"nextToken\": \"\"\n}")
.asString();
const data = JSON.stringify({
launchConfigurationTemplateIDs: [],
maxResults: 0,
nextToken: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/DescribeLaunchConfigurationTemplates');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/DescribeLaunchConfigurationTemplates',
headers: {'content-type': 'application/json'},
data: {launchConfigurationTemplateIDs: [], maxResults: 0, nextToken: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/DescribeLaunchConfigurationTemplates';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"launchConfigurationTemplateIDs":[],"maxResults":0,"nextToken":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/DescribeLaunchConfigurationTemplates',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "launchConfigurationTemplateIDs": [],\n "maxResults": 0,\n "nextToken": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"launchConfigurationTemplateIDs\": [],\n \"maxResults\": 0,\n \"nextToken\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/DescribeLaunchConfigurationTemplates")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/DescribeLaunchConfigurationTemplates',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({launchConfigurationTemplateIDs: [], maxResults: 0, nextToken: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/DescribeLaunchConfigurationTemplates',
headers: {'content-type': 'application/json'},
body: {launchConfigurationTemplateIDs: [], maxResults: 0, nextToken: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/DescribeLaunchConfigurationTemplates');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
launchConfigurationTemplateIDs: [],
maxResults: 0,
nextToken: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/DescribeLaunchConfigurationTemplates',
headers: {'content-type': 'application/json'},
data: {launchConfigurationTemplateIDs: [], maxResults: 0, nextToken: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/DescribeLaunchConfigurationTemplates';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"launchConfigurationTemplateIDs":[],"maxResults":0,"nextToken":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"launchConfigurationTemplateIDs": @[ ],
@"maxResults": @0,
@"nextToken": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/DescribeLaunchConfigurationTemplates"]
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}}/DescribeLaunchConfigurationTemplates" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"launchConfigurationTemplateIDs\": [],\n \"maxResults\": 0,\n \"nextToken\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/DescribeLaunchConfigurationTemplates",
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([
'launchConfigurationTemplateIDs' => [
],
'maxResults' => 0,
'nextToken' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/DescribeLaunchConfigurationTemplates', [
'body' => '{
"launchConfigurationTemplateIDs": [],
"maxResults": 0,
"nextToken": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/DescribeLaunchConfigurationTemplates');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'launchConfigurationTemplateIDs' => [
],
'maxResults' => 0,
'nextToken' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'launchConfigurationTemplateIDs' => [
],
'maxResults' => 0,
'nextToken' => ''
]));
$request->setRequestUrl('{{baseUrl}}/DescribeLaunchConfigurationTemplates');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/DescribeLaunchConfigurationTemplates' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"launchConfigurationTemplateIDs": [],
"maxResults": 0,
"nextToken": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/DescribeLaunchConfigurationTemplates' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"launchConfigurationTemplateIDs": [],
"maxResults": 0,
"nextToken": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"launchConfigurationTemplateIDs\": [],\n \"maxResults\": 0,\n \"nextToken\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/DescribeLaunchConfigurationTemplates", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/DescribeLaunchConfigurationTemplates"
payload = {
"launchConfigurationTemplateIDs": [],
"maxResults": 0,
"nextToken": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/DescribeLaunchConfigurationTemplates"
payload <- "{\n \"launchConfigurationTemplateIDs\": [],\n \"maxResults\": 0,\n \"nextToken\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/DescribeLaunchConfigurationTemplates")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"launchConfigurationTemplateIDs\": [],\n \"maxResults\": 0,\n \"nextToken\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/DescribeLaunchConfigurationTemplates') do |req|
req.body = "{\n \"launchConfigurationTemplateIDs\": [],\n \"maxResults\": 0,\n \"nextToken\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/DescribeLaunchConfigurationTemplates";
let payload = json!({
"launchConfigurationTemplateIDs": (),
"maxResults": 0,
"nextToken": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/DescribeLaunchConfigurationTemplates \
--header 'content-type: application/json' \
--data '{
"launchConfigurationTemplateIDs": [],
"maxResults": 0,
"nextToken": ""
}'
echo '{
"launchConfigurationTemplateIDs": [],
"maxResults": 0,
"nextToken": ""
}' | \
http POST {{baseUrl}}/DescribeLaunchConfigurationTemplates \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "launchConfigurationTemplateIDs": [],\n "maxResults": 0,\n "nextToken": ""\n}' \
--output-document \
- {{baseUrl}}/DescribeLaunchConfigurationTemplates
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"launchConfigurationTemplateIDs": [],
"maxResults": 0,
"nextToken": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/DescribeLaunchConfigurationTemplates")! 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
DescribeReplicationConfigurationTemplates
{{baseUrl}}/DescribeReplicationConfigurationTemplates
BODY json
{
"maxResults": 0,
"nextToken": "",
"replicationConfigurationTemplateIDs": []
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/DescribeReplicationConfigurationTemplates");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"maxResults\": 0,\n \"nextToken\": \"\",\n \"replicationConfigurationTemplateIDs\": []\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/DescribeReplicationConfigurationTemplates" {:content-type :json
:form-params {:maxResults 0
:nextToken ""
:replicationConfigurationTemplateIDs []}})
require "http/client"
url = "{{baseUrl}}/DescribeReplicationConfigurationTemplates"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"maxResults\": 0,\n \"nextToken\": \"\",\n \"replicationConfigurationTemplateIDs\": []\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}}/DescribeReplicationConfigurationTemplates"),
Content = new StringContent("{\n \"maxResults\": 0,\n \"nextToken\": \"\",\n \"replicationConfigurationTemplateIDs\": []\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}}/DescribeReplicationConfigurationTemplates");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"maxResults\": 0,\n \"nextToken\": \"\",\n \"replicationConfigurationTemplateIDs\": []\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/DescribeReplicationConfigurationTemplates"
payload := strings.NewReader("{\n \"maxResults\": 0,\n \"nextToken\": \"\",\n \"replicationConfigurationTemplateIDs\": []\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/DescribeReplicationConfigurationTemplates HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 85
{
"maxResults": 0,
"nextToken": "",
"replicationConfigurationTemplateIDs": []
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/DescribeReplicationConfigurationTemplates")
.setHeader("content-type", "application/json")
.setBody("{\n \"maxResults\": 0,\n \"nextToken\": \"\",\n \"replicationConfigurationTemplateIDs\": []\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/DescribeReplicationConfigurationTemplates"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"maxResults\": 0,\n \"nextToken\": \"\",\n \"replicationConfigurationTemplateIDs\": []\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 \"maxResults\": 0,\n \"nextToken\": \"\",\n \"replicationConfigurationTemplateIDs\": []\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/DescribeReplicationConfigurationTemplates")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/DescribeReplicationConfigurationTemplates")
.header("content-type", "application/json")
.body("{\n \"maxResults\": 0,\n \"nextToken\": \"\",\n \"replicationConfigurationTemplateIDs\": []\n}")
.asString();
const data = JSON.stringify({
maxResults: 0,
nextToken: '',
replicationConfigurationTemplateIDs: []
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/DescribeReplicationConfigurationTemplates');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/DescribeReplicationConfigurationTemplates',
headers: {'content-type': 'application/json'},
data: {maxResults: 0, nextToken: '', replicationConfigurationTemplateIDs: []}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/DescribeReplicationConfigurationTemplates';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"maxResults":0,"nextToken":"","replicationConfigurationTemplateIDs":[]}'
};
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}}/DescribeReplicationConfigurationTemplates',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "maxResults": 0,\n "nextToken": "",\n "replicationConfigurationTemplateIDs": []\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"maxResults\": 0,\n \"nextToken\": \"\",\n \"replicationConfigurationTemplateIDs\": []\n}")
val request = Request.Builder()
.url("{{baseUrl}}/DescribeReplicationConfigurationTemplates")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/DescribeReplicationConfigurationTemplates',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({maxResults: 0, nextToken: '', replicationConfigurationTemplateIDs: []}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/DescribeReplicationConfigurationTemplates',
headers: {'content-type': 'application/json'},
body: {maxResults: 0, nextToken: '', replicationConfigurationTemplateIDs: []},
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}}/DescribeReplicationConfigurationTemplates');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
maxResults: 0,
nextToken: '',
replicationConfigurationTemplateIDs: []
});
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}}/DescribeReplicationConfigurationTemplates',
headers: {'content-type': 'application/json'},
data: {maxResults: 0, nextToken: '', replicationConfigurationTemplateIDs: []}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/DescribeReplicationConfigurationTemplates';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"maxResults":0,"nextToken":"","replicationConfigurationTemplateIDs":[]}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"maxResults": @0,
@"nextToken": @"",
@"replicationConfigurationTemplateIDs": @[ ] };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/DescribeReplicationConfigurationTemplates"]
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}}/DescribeReplicationConfigurationTemplates" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"maxResults\": 0,\n \"nextToken\": \"\",\n \"replicationConfigurationTemplateIDs\": []\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/DescribeReplicationConfigurationTemplates",
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([
'maxResults' => 0,
'nextToken' => '',
'replicationConfigurationTemplateIDs' => [
]
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/DescribeReplicationConfigurationTemplates', [
'body' => '{
"maxResults": 0,
"nextToken": "",
"replicationConfigurationTemplateIDs": []
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/DescribeReplicationConfigurationTemplates');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'maxResults' => 0,
'nextToken' => '',
'replicationConfigurationTemplateIDs' => [
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'maxResults' => 0,
'nextToken' => '',
'replicationConfigurationTemplateIDs' => [
]
]));
$request->setRequestUrl('{{baseUrl}}/DescribeReplicationConfigurationTemplates');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/DescribeReplicationConfigurationTemplates' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"maxResults": 0,
"nextToken": "",
"replicationConfigurationTemplateIDs": []
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/DescribeReplicationConfigurationTemplates' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"maxResults": 0,
"nextToken": "",
"replicationConfigurationTemplateIDs": []
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"maxResults\": 0,\n \"nextToken\": \"\",\n \"replicationConfigurationTemplateIDs\": []\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/DescribeReplicationConfigurationTemplates", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/DescribeReplicationConfigurationTemplates"
payload = {
"maxResults": 0,
"nextToken": "",
"replicationConfigurationTemplateIDs": []
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/DescribeReplicationConfigurationTemplates"
payload <- "{\n \"maxResults\": 0,\n \"nextToken\": \"\",\n \"replicationConfigurationTemplateIDs\": []\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/DescribeReplicationConfigurationTemplates")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"maxResults\": 0,\n \"nextToken\": \"\",\n \"replicationConfigurationTemplateIDs\": []\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/DescribeReplicationConfigurationTemplates') do |req|
req.body = "{\n \"maxResults\": 0,\n \"nextToken\": \"\",\n \"replicationConfigurationTemplateIDs\": []\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/DescribeReplicationConfigurationTemplates";
let payload = json!({
"maxResults": 0,
"nextToken": "",
"replicationConfigurationTemplateIDs": ()
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/DescribeReplicationConfigurationTemplates \
--header 'content-type: application/json' \
--data '{
"maxResults": 0,
"nextToken": "",
"replicationConfigurationTemplateIDs": []
}'
echo '{
"maxResults": 0,
"nextToken": "",
"replicationConfigurationTemplateIDs": []
}' | \
http POST {{baseUrl}}/DescribeReplicationConfigurationTemplates \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "maxResults": 0,\n "nextToken": "",\n "replicationConfigurationTemplateIDs": []\n}' \
--output-document \
- {{baseUrl}}/DescribeReplicationConfigurationTemplates
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"maxResults": 0,
"nextToken": "",
"replicationConfigurationTemplateIDs": []
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/DescribeReplicationConfigurationTemplates")! 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
DescribeSourceServers
{{baseUrl}}/DescribeSourceServers
BODY json
{
"filters": {
"applicationIDs": "",
"isArchived": "",
"lifeCycleStates": "",
"replicationTypes": "",
"sourceServerIDs": ""
},
"maxResults": 0,
"nextToken": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/DescribeSourceServers");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"filters\": {\n \"applicationIDs\": \"\",\n \"isArchived\": \"\",\n \"lifeCycleStates\": \"\",\n \"replicationTypes\": \"\",\n \"sourceServerIDs\": \"\"\n },\n \"maxResults\": 0,\n \"nextToken\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/DescribeSourceServers" {:content-type :json
:form-params {:filters {:applicationIDs ""
:isArchived ""
:lifeCycleStates ""
:replicationTypes ""
:sourceServerIDs ""}
:maxResults 0
:nextToken ""}})
require "http/client"
url = "{{baseUrl}}/DescribeSourceServers"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"filters\": {\n \"applicationIDs\": \"\",\n \"isArchived\": \"\",\n \"lifeCycleStates\": \"\",\n \"replicationTypes\": \"\",\n \"sourceServerIDs\": \"\"\n },\n \"maxResults\": 0,\n \"nextToken\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/DescribeSourceServers"),
Content = new StringContent("{\n \"filters\": {\n \"applicationIDs\": \"\",\n \"isArchived\": \"\",\n \"lifeCycleStates\": \"\",\n \"replicationTypes\": \"\",\n \"sourceServerIDs\": \"\"\n },\n \"maxResults\": 0,\n \"nextToken\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/DescribeSourceServers");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"filters\": {\n \"applicationIDs\": \"\",\n \"isArchived\": \"\",\n \"lifeCycleStates\": \"\",\n \"replicationTypes\": \"\",\n \"sourceServerIDs\": \"\"\n },\n \"maxResults\": 0,\n \"nextToken\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/DescribeSourceServers"
payload := strings.NewReader("{\n \"filters\": {\n \"applicationIDs\": \"\",\n \"isArchived\": \"\",\n \"lifeCycleStates\": \"\",\n \"replicationTypes\": \"\",\n \"sourceServerIDs\": \"\"\n },\n \"maxResults\": 0,\n \"nextToken\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/DescribeSourceServers HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 189
{
"filters": {
"applicationIDs": "",
"isArchived": "",
"lifeCycleStates": "",
"replicationTypes": "",
"sourceServerIDs": ""
},
"maxResults": 0,
"nextToken": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/DescribeSourceServers")
.setHeader("content-type", "application/json")
.setBody("{\n \"filters\": {\n \"applicationIDs\": \"\",\n \"isArchived\": \"\",\n \"lifeCycleStates\": \"\",\n \"replicationTypes\": \"\",\n \"sourceServerIDs\": \"\"\n },\n \"maxResults\": 0,\n \"nextToken\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/DescribeSourceServers"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"filters\": {\n \"applicationIDs\": \"\",\n \"isArchived\": \"\",\n \"lifeCycleStates\": \"\",\n \"replicationTypes\": \"\",\n \"sourceServerIDs\": \"\"\n },\n \"maxResults\": 0,\n \"nextToken\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"filters\": {\n \"applicationIDs\": \"\",\n \"isArchived\": \"\",\n \"lifeCycleStates\": \"\",\n \"replicationTypes\": \"\",\n \"sourceServerIDs\": \"\"\n },\n \"maxResults\": 0,\n \"nextToken\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/DescribeSourceServers")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/DescribeSourceServers")
.header("content-type", "application/json")
.body("{\n \"filters\": {\n \"applicationIDs\": \"\",\n \"isArchived\": \"\",\n \"lifeCycleStates\": \"\",\n \"replicationTypes\": \"\",\n \"sourceServerIDs\": \"\"\n },\n \"maxResults\": 0,\n \"nextToken\": \"\"\n}")
.asString();
const data = JSON.stringify({
filters: {
applicationIDs: '',
isArchived: '',
lifeCycleStates: '',
replicationTypes: '',
sourceServerIDs: ''
},
maxResults: 0,
nextToken: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/DescribeSourceServers');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/DescribeSourceServers',
headers: {'content-type': 'application/json'},
data: {
filters: {
applicationIDs: '',
isArchived: '',
lifeCycleStates: '',
replicationTypes: '',
sourceServerIDs: ''
},
maxResults: 0,
nextToken: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/DescribeSourceServers';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"filters":{"applicationIDs":"","isArchived":"","lifeCycleStates":"","replicationTypes":"","sourceServerIDs":""},"maxResults":0,"nextToken":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/DescribeSourceServers',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "filters": {\n "applicationIDs": "",\n "isArchived": "",\n "lifeCycleStates": "",\n "replicationTypes": "",\n "sourceServerIDs": ""\n },\n "maxResults": 0,\n "nextToken": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"filters\": {\n \"applicationIDs\": \"\",\n \"isArchived\": \"\",\n \"lifeCycleStates\": \"\",\n \"replicationTypes\": \"\",\n \"sourceServerIDs\": \"\"\n },\n \"maxResults\": 0,\n \"nextToken\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/DescribeSourceServers")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/DescribeSourceServers',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
filters: {
applicationIDs: '',
isArchived: '',
lifeCycleStates: '',
replicationTypes: '',
sourceServerIDs: ''
},
maxResults: 0,
nextToken: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/DescribeSourceServers',
headers: {'content-type': 'application/json'},
body: {
filters: {
applicationIDs: '',
isArchived: '',
lifeCycleStates: '',
replicationTypes: '',
sourceServerIDs: ''
},
maxResults: 0,
nextToken: ''
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/DescribeSourceServers');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
filters: {
applicationIDs: '',
isArchived: '',
lifeCycleStates: '',
replicationTypes: '',
sourceServerIDs: ''
},
maxResults: 0,
nextToken: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/DescribeSourceServers',
headers: {'content-type': 'application/json'},
data: {
filters: {
applicationIDs: '',
isArchived: '',
lifeCycleStates: '',
replicationTypes: '',
sourceServerIDs: ''
},
maxResults: 0,
nextToken: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/DescribeSourceServers';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"filters":{"applicationIDs":"","isArchived":"","lifeCycleStates":"","replicationTypes":"","sourceServerIDs":""},"maxResults":0,"nextToken":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"filters": @{ @"applicationIDs": @"", @"isArchived": @"", @"lifeCycleStates": @"", @"replicationTypes": @"", @"sourceServerIDs": @"" },
@"maxResults": @0,
@"nextToken": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/DescribeSourceServers"]
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}}/DescribeSourceServers" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"filters\": {\n \"applicationIDs\": \"\",\n \"isArchived\": \"\",\n \"lifeCycleStates\": \"\",\n \"replicationTypes\": \"\",\n \"sourceServerIDs\": \"\"\n },\n \"maxResults\": 0,\n \"nextToken\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/DescribeSourceServers",
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([
'filters' => [
'applicationIDs' => '',
'isArchived' => '',
'lifeCycleStates' => '',
'replicationTypes' => '',
'sourceServerIDs' => ''
],
'maxResults' => 0,
'nextToken' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/DescribeSourceServers', [
'body' => '{
"filters": {
"applicationIDs": "",
"isArchived": "",
"lifeCycleStates": "",
"replicationTypes": "",
"sourceServerIDs": ""
},
"maxResults": 0,
"nextToken": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/DescribeSourceServers');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'filters' => [
'applicationIDs' => '',
'isArchived' => '',
'lifeCycleStates' => '',
'replicationTypes' => '',
'sourceServerIDs' => ''
],
'maxResults' => 0,
'nextToken' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'filters' => [
'applicationIDs' => '',
'isArchived' => '',
'lifeCycleStates' => '',
'replicationTypes' => '',
'sourceServerIDs' => ''
],
'maxResults' => 0,
'nextToken' => ''
]));
$request->setRequestUrl('{{baseUrl}}/DescribeSourceServers');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/DescribeSourceServers' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"filters": {
"applicationIDs": "",
"isArchived": "",
"lifeCycleStates": "",
"replicationTypes": "",
"sourceServerIDs": ""
},
"maxResults": 0,
"nextToken": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/DescribeSourceServers' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"filters": {
"applicationIDs": "",
"isArchived": "",
"lifeCycleStates": "",
"replicationTypes": "",
"sourceServerIDs": ""
},
"maxResults": 0,
"nextToken": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"filters\": {\n \"applicationIDs\": \"\",\n \"isArchived\": \"\",\n \"lifeCycleStates\": \"\",\n \"replicationTypes\": \"\",\n \"sourceServerIDs\": \"\"\n },\n \"maxResults\": 0,\n \"nextToken\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/DescribeSourceServers", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/DescribeSourceServers"
payload = {
"filters": {
"applicationIDs": "",
"isArchived": "",
"lifeCycleStates": "",
"replicationTypes": "",
"sourceServerIDs": ""
},
"maxResults": 0,
"nextToken": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/DescribeSourceServers"
payload <- "{\n \"filters\": {\n \"applicationIDs\": \"\",\n \"isArchived\": \"\",\n \"lifeCycleStates\": \"\",\n \"replicationTypes\": \"\",\n \"sourceServerIDs\": \"\"\n },\n \"maxResults\": 0,\n \"nextToken\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/DescribeSourceServers")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"filters\": {\n \"applicationIDs\": \"\",\n \"isArchived\": \"\",\n \"lifeCycleStates\": \"\",\n \"replicationTypes\": \"\",\n \"sourceServerIDs\": \"\"\n },\n \"maxResults\": 0,\n \"nextToken\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/DescribeSourceServers') do |req|
req.body = "{\n \"filters\": {\n \"applicationIDs\": \"\",\n \"isArchived\": \"\",\n \"lifeCycleStates\": \"\",\n \"replicationTypes\": \"\",\n \"sourceServerIDs\": \"\"\n },\n \"maxResults\": 0,\n \"nextToken\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/DescribeSourceServers";
let payload = json!({
"filters": json!({
"applicationIDs": "",
"isArchived": "",
"lifeCycleStates": "",
"replicationTypes": "",
"sourceServerIDs": ""
}),
"maxResults": 0,
"nextToken": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/DescribeSourceServers \
--header 'content-type: application/json' \
--data '{
"filters": {
"applicationIDs": "",
"isArchived": "",
"lifeCycleStates": "",
"replicationTypes": "",
"sourceServerIDs": ""
},
"maxResults": 0,
"nextToken": ""
}'
echo '{
"filters": {
"applicationIDs": "",
"isArchived": "",
"lifeCycleStates": "",
"replicationTypes": "",
"sourceServerIDs": ""
},
"maxResults": 0,
"nextToken": ""
}' | \
http POST {{baseUrl}}/DescribeSourceServers \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "filters": {\n "applicationIDs": "",\n "isArchived": "",\n "lifeCycleStates": "",\n "replicationTypes": "",\n "sourceServerIDs": ""\n },\n "maxResults": 0,\n "nextToken": ""\n}' \
--output-document \
- {{baseUrl}}/DescribeSourceServers
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"filters": [
"applicationIDs": "",
"isArchived": "",
"lifeCycleStates": "",
"replicationTypes": "",
"sourceServerIDs": ""
],
"maxResults": 0,
"nextToken": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/DescribeSourceServers")! 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()
GET
DescribeVcenterClients
{{baseUrl}}/DescribeVcenterClients
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/DescribeVcenterClients");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/DescribeVcenterClients")
require "http/client"
url = "{{baseUrl}}/DescribeVcenterClients"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/DescribeVcenterClients"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/DescribeVcenterClients");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/DescribeVcenterClients"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/DescribeVcenterClients HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/DescribeVcenterClients")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/DescribeVcenterClients"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/DescribeVcenterClients")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/DescribeVcenterClients")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/DescribeVcenterClients');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/DescribeVcenterClients'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/DescribeVcenterClients';
const options = {method: 'GET'};
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}}/DescribeVcenterClients',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/DescribeVcenterClients")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/DescribeVcenterClients',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {method: 'GET', url: '{{baseUrl}}/DescribeVcenterClients'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/DescribeVcenterClients');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {method: 'GET', url: '{{baseUrl}}/DescribeVcenterClients'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/DescribeVcenterClients';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/DescribeVcenterClients"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
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}}/DescribeVcenterClients" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/DescribeVcenterClients",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/DescribeVcenterClients');
echo $response->getBody();
setUrl('{{baseUrl}}/DescribeVcenterClients');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/DescribeVcenterClients');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/DescribeVcenterClients' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/DescribeVcenterClients' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/DescribeVcenterClients")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/DescribeVcenterClients"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/DescribeVcenterClients"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/DescribeVcenterClients")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/DescribeVcenterClients') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/DescribeVcenterClients";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/DescribeVcenterClients
http GET {{baseUrl}}/DescribeVcenterClients
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/DescribeVcenterClients
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/DescribeVcenterClients")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
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
DisassociateApplications
{{baseUrl}}/DisassociateApplications
BODY json
{
"applicationIDs": [],
"waveID": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/DisassociateApplications");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"applicationIDs\": [],\n \"waveID\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/DisassociateApplications" {:content-type :json
:form-params {:applicationIDs []
:waveID ""}})
require "http/client"
url = "{{baseUrl}}/DisassociateApplications"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"applicationIDs\": [],\n \"waveID\": \"\"\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}}/DisassociateApplications"),
Content = new StringContent("{\n \"applicationIDs\": [],\n \"waveID\": \"\"\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}}/DisassociateApplications");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"applicationIDs\": [],\n \"waveID\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/DisassociateApplications"
payload := strings.NewReader("{\n \"applicationIDs\": [],\n \"waveID\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/DisassociateApplications HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 42
{
"applicationIDs": [],
"waveID": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/DisassociateApplications")
.setHeader("content-type", "application/json")
.setBody("{\n \"applicationIDs\": [],\n \"waveID\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/DisassociateApplications"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"applicationIDs\": [],\n \"waveID\": \"\"\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 \"applicationIDs\": [],\n \"waveID\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/DisassociateApplications")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/DisassociateApplications")
.header("content-type", "application/json")
.body("{\n \"applicationIDs\": [],\n \"waveID\": \"\"\n}")
.asString();
const data = JSON.stringify({
applicationIDs: [],
waveID: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/DisassociateApplications');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/DisassociateApplications',
headers: {'content-type': 'application/json'},
data: {applicationIDs: [], waveID: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/DisassociateApplications';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"applicationIDs":[],"waveID":""}'
};
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}}/DisassociateApplications',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "applicationIDs": [],\n "waveID": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"applicationIDs\": [],\n \"waveID\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/DisassociateApplications")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/DisassociateApplications',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({applicationIDs: [], waveID: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/DisassociateApplications',
headers: {'content-type': 'application/json'},
body: {applicationIDs: [], waveID: ''},
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}}/DisassociateApplications');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
applicationIDs: [],
waveID: ''
});
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}}/DisassociateApplications',
headers: {'content-type': 'application/json'},
data: {applicationIDs: [], waveID: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/DisassociateApplications';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"applicationIDs":[],"waveID":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"applicationIDs": @[ ],
@"waveID": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/DisassociateApplications"]
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}}/DisassociateApplications" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"applicationIDs\": [],\n \"waveID\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/DisassociateApplications",
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([
'applicationIDs' => [
],
'waveID' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/DisassociateApplications', [
'body' => '{
"applicationIDs": [],
"waveID": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/DisassociateApplications');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'applicationIDs' => [
],
'waveID' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'applicationIDs' => [
],
'waveID' => ''
]));
$request->setRequestUrl('{{baseUrl}}/DisassociateApplications');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/DisassociateApplications' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"applicationIDs": [],
"waveID": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/DisassociateApplications' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"applicationIDs": [],
"waveID": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"applicationIDs\": [],\n \"waveID\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/DisassociateApplications", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/DisassociateApplications"
payload = {
"applicationIDs": [],
"waveID": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/DisassociateApplications"
payload <- "{\n \"applicationIDs\": [],\n \"waveID\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/DisassociateApplications")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"applicationIDs\": [],\n \"waveID\": \"\"\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/DisassociateApplications') do |req|
req.body = "{\n \"applicationIDs\": [],\n \"waveID\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/DisassociateApplications";
let payload = json!({
"applicationIDs": (),
"waveID": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/DisassociateApplications \
--header 'content-type: application/json' \
--data '{
"applicationIDs": [],
"waveID": ""
}'
echo '{
"applicationIDs": [],
"waveID": ""
}' | \
http POST {{baseUrl}}/DisassociateApplications \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "applicationIDs": [],\n "waveID": ""\n}' \
--output-document \
- {{baseUrl}}/DisassociateApplications
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"applicationIDs": [],
"waveID": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/DisassociateApplications")! 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
DisassociateSourceServers
{{baseUrl}}/DisassociateSourceServers
BODY json
{
"applicationID": "",
"sourceServerIDs": []
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/DisassociateSourceServers");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"applicationID\": \"\",\n \"sourceServerIDs\": []\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/DisassociateSourceServers" {:content-type :json
:form-params {:applicationID ""
:sourceServerIDs []}})
require "http/client"
url = "{{baseUrl}}/DisassociateSourceServers"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"applicationID\": \"\",\n \"sourceServerIDs\": []\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}}/DisassociateSourceServers"),
Content = new StringContent("{\n \"applicationID\": \"\",\n \"sourceServerIDs\": []\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}}/DisassociateSourceServers");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"applicationID\": \"\",\n \"sourceServerIDs\": []\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/DisassociateSourceServers"
payload := strings.NewReader("{\n \"applicationID\": \"\",\n \"sourceServerIDs\": []\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/DisassociateSourceServers HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 50
{
"applicationID": "",
"sourceServerIDs": []
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/DisassociateSourceServers")
.setHeader("content-type", "application/json")
.setBody("{\n \"applicationID\": \"\",\n \"sourceServerIDs\": []\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/DisassociateSourceServers"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"applicationID\": \"\",\n \"sourceServerIDs\": []\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 \"applicationID\": \"\",\n \"sourceServerIDs\": []\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/DisassociateSourceServers")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/DisassociateSourceServers")
.header("content-type", "application/json")
.body("{\n \"applicationID\": \"\",\n \"sourceServerIDs\": []\n}")
.asString();
const data = JSON.stringify({
applicationID: '',
sourceServerIDs: []
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/DisassociateSourceServers');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/DisassociateSourceServers',
headers: {'content-type': 'application/json'},
data: {applicationID: '', sourceServerIDs: []}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/DisassociateSourceServers';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"applicationID":"","sourceServerIDs":[]}'
};
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}}/DisassociateSourceServers',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "applicationID": "",\n "sourceServerIDs": []\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"applicationID\": \"\",\n \"sourceServerIDs\": []\n}")
val request = Request.Builder()
.url("{{baseUrl}}/DisassociateSourceServers")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/DisassociateSourceServers',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({applicationID: '', sourceServerIDs: []}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/DisassociateSourceServers',
headers: {'content-type': 'application/json'},
body: {applicationID: '', sourceServerIDs: []},
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}}/DisassociateSourceServers');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
applicationID: '',
sourceServerIDs: []
});
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}}/DisassociateSourceServers',
headers: {'content-type': 'application/json'},
data: {applicationID: '', sourceServerIDs: []}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/DisassociateSourceServers';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"applicationID":"","sourceServerIDs":[]}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"applicationID": @"",
@"sourceServerIDs": @[ ] };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/DisassociateSourceServers"]
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}}/DisassociateSourceServers" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"applicationID\": \"\",\n \"sourceServerIDs\": []\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/DisassociateSourceServers",
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([
'applicationID' => '',
'sourceServerIDs' => [
]
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/DisassociateSourceServers', [
'body' => '{
"applicationID": "",
"sourceServerIDs": []
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/DisassociateSourceServers');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'applicationID' => '',
'sourceServerIDs' => [
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'applicationID' => '',
'sourceServerIDs' => [
]
]));
$request->setRequestUrl('{{baseUrl}}/DisassociateSourceServers');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/DisassociateSourceServers' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"applicationID": "",
"sourceServerIDs": []
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/DisassociateSourceServers' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"applicationID": "",
"sourceServerIDs": []
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"applicationID\": \"\",\n \"sourceServerIDs\": []\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/DisassociateSourceServers", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/DisassociateSourceServers"
payload = {
"applicationID": "",
"sourceServerIDs": []
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/DisassociateSourceServers"
payload <- "{\n \"applicationID\": \"\",\n \"sourceServerIDs\": []\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/DisassociateSourceServers")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"applicationID\": \"\",\n \"sourceServerIDs\": []\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/DisassociateSourceServers') do |req|
req.body = "{\n \"applicationID\": \"\",\n \"sourceServerIDs\": []\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/DisassociateSourceServers";
let payload = json!({
"applicationID": "",
"sourceServerIDs": ()
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/DisassociateSourceServers \
--header 'content-type: application/json' \
--data '{
"applicationID": "",
"sourceServerIDs": []
}'
echo '{
"applicationID": "",
"sourceServerIDs": []
}' | \
http POST {{baseUrl}}/DisassociateSourceServers \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "applicationID": "",\n "sourceServerIDs": []\n}' \
--output-document \
- {{baseUrl}}/DisassociateSourceServers
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"applicationID": "",
"sourceServerIDs": []
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/DisassociateSourceServers")! 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
DisconnectFromService
{{baseUrl}}/DisconnectFromService
BODY json
{
"sourceServerID": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/DisconnectFromService");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"sourceServerID\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/DisconnectFromService" {:content-type :json
:form-params {:sourceServerID ""}})
require "http/client"
url = "{{baseUrl}}/DisconnectFromService"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"sourceServerID\": \"\"\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}}/DisconnectFromService"),
Content = new StringContent("{\n \"sourceServerID\": \"\"\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}}/DisconnectFromService");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"sourceServerID\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/DisconnectFromService"
payload := strings.NewReader("{\n \"sourceServerID\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/DisconnectFromService HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 26
{
"sourceServerID": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/DisconnectFromService")
.setHeader("content-type", "application/json")
.setBody("{\n \"sourceServerID\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/DisconnectFromService"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"sourceServerID\": \"\"\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 \"sourceServerID\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/DisconnectFromService")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/DisconnectFromService")
.header("content-type", "application/json")
.body("{\n \"sourceServerID\": \"\"\n}")
.asString();
const data = JSON.stringify({
sourceServerID: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/DisconnectFromService');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/DisconnectFromService',
headers: {'content-type': 'application/json'},
data: {sourceServerID: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/DisconnectFromService';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"sourceServerID":""}'
};
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}}/DisconnectFromService',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "sourceServerID": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"sourceServerID\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/DisconnectFromService")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/DisconnectFromService',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({sourceServerID: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/DisconnectFromService',
headers: {'content-type': 'application/json'},
body: {sourceServerID: ''},
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}}/DisconnectFromService');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
sourceServerID: ''
});
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}}/DisconnectFromService',
headers: {'content-type': 'application/json'},
data: {sourceServerID: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/DisconnectFromService';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"sourceServerID":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"sourceServerID": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/DisconnectFromService"]
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}}/DisconnectFromService" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"sourceServerID\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/DisconnectFromService",
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([
'sourceServerID' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/DisconnectFromService', [
'body' => '{
"sourceServerID": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/DisconnectFromService');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'sourceServerID' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'sourceServerID' => ''
]));
$request->setRequestUrl('{{baseUrl}}/DisconnectFromService');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/DisconnectFromService' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"sourceServerID": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/DisconnectFromService' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"sourceServerID": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"sourceServerID\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/DisconnectFromService", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/DisconnectFromService"
payload = { "sourceServerID": "" }
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/DisconnectFromService"
payload <- "{\n \"sourceServerID\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/DisconnectFromService")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"sourceServerID\": \"\"\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/DisconnectFromService') do |req|
req.body = "{\n \"sourceServerID\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/DisconnectFromService";
let payload = json!({"sourceServerID": ""});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/DisconnectFromService \
--header 'content-type: application/json' \
--data '{
"sourceServerID": ""
}'
echo '{
"sourceServerID": ""
}' | \
http POST {{baseUrl}}/DisconnectFromService \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "sourceServerID": ""\n}' \
--output-document \
- {{baseUrl}}/DisconnectFromService
import Foundation
let headers = ["content-type": "application/json"]
let parameters = ["sourceServerID": ""] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/DisconnectFromService")! 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
FinalizeCutover
{{baseUrl}}/FinalizeCutover
BODY json
{
"sourceServerID": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/FinalizeCutover");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"sourceServerID\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/FinalizeCutover" {:content-type :json
:form-params {:sourceServerID ""}})
require "http/client"
url = "{{baseUrl}}/FinalizeCutover"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"sourceServerID\": \"\"\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}}/FinalizeCutover"),
Content = new StringContent("{\n \"sourceServerID\": \"\"\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}}/FinalizeCutover");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"sourceServerID\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/FinalizeCutover"
payload := strings.NewReader("{\n \"sourceServerID\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/FinalizeCutover HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 26
{
"sourceServerID": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/FinalizeCutover")
.setHeader("content-type", "application/json")
.setBody("{\n \"sourceServerID\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/FinalizeCutover"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"sourceServerID\": \"\"\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 \"sourceServerID\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/FinalizeCutover")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/FinalizeCutover")
.header("content-type", "application/json")
.body("{\n \"sourceServerID\": \"\"\n}")
.asString();
const data = JSON.stringify({
sourceServerID: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/FinalizeCutover');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/FinalizeCutover',
headers: {'content-type': 'application/json'},
data: {sourceServerID: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/FinalizeCutover';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"sourceServerID":""}'
};
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}}/FinalizeCutover',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "sourceServerID": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"sourceServerID\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/FinalizeCutover")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/FinalizeCutover',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({sourceServerID: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/FinalizeCutover',
headers: {'content-type': 'application/json'},
body: {sourceServerID: ''},
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}}/FinalizeCutover');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
sourceServerID: ''
});
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}}/FinalizeCutover',
headers: {'content-type': 'application/json'},
data: {sourceServerID: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/FinalizeCutover';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"sourceServerID":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"sourceServerID": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/FinalizeCutover"]
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}}/FinalizeCutover" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"sourceServerID\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/FinalizeCutover",
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([
'sourceServerID' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/FinalizeCutover', [
'body' => '{
"sourceServerID": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/FinalizeCutover');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'sourceServerID' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'sourceServerID' => ''
]));
$request->setRequestUrl('{{baseUrl}}/FinalizeCutover');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/FinalizeCutover' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"sourceServerID": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/FinalizeCutover' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"sourceServerID": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"sourceServerID\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/FinalizeCutover", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/FinalizeCutover"
payload = { "sourceServerID": "" }
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/FinalizeCutover"
payload <- "{\n \"sourceServerID\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/FinalizeCutover")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"sourceServerID\": \"\"\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/FinalizeCutover') do |req|
req.body = "{\n \"sourceServerID\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/FinalizeCutover";
let payload = json!({"sourceServerID": ""});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/FinalizeCutover \
--header 'content-type: application/json' \
--data '{
"sourceServerID": ""
}'
echo '{
"sourceServerID": ""
}' | \
http POST {{baseUrl}}/FinalizeCutover \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "sourceServerID": ""\n}' \
--output-document \
- {{baseUrl}}/FinalizeCutover
import Foundation
let headers = ["content-type": "application/json"]
let parameters = ["sourceServerID": ""] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/FinalizeCutover")! 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
GetLaunchConfiguration
{{baseUrl}}/GetLaunchConfiguration
BODY json
{
"sourceServerID": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/GetLaunchConfiguration");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"sourceServerID\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/GetLaunchConfiguration" {:content-type :json
:form-params {:sourceServerID ""}})
require "http/client"
url = "{{baseUrl}}/GetLaunchConfiguration"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"sourceServerID\": \"\"\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}}/GetLaunchConfiguration"),
Content = new StringContent("{\n \"sourceServerID\": \"\"\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}}/GetLaunchConfiguration");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"sourceServerID\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/GetLaunchConfiguration"
payload := strings.NewReader("{\n \"sourceServerID\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/GetLaunchConfiguration HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 26
{
"sourceServerID": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/GetLaunchConfiguration")
.setHeader("content-type", "application/json")
.setBody("{\n \"sourceServerID\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/GetLaunchConfiguration"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"sourceServerID\": \"\"\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 \"sourceServerID\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/GetLaunchConfiguration")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/GetLaunchConfiguration")
.header("content-type", "application/json")
.body("{\n \"sourceServerID\": \"\"\n}")
.asString();
const data = JSON.stringify({
sourceServerID: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/GetLaunchConfiguration');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/GetLaunchConfiguration',
headers: {'content-type': 'application/json'},
data: {sourceServerID: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/GetLaunchConfiguration';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"sourceServerID":""}'
};
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}}/GetLaunchConfiguration',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "sourceServerID": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"sourceServerID\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/GetLaunchConfiguration")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/GetLaunchConfiguration',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({sourceServerID: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/GetLaunchConfiguration',
headers: {'content-type': 'application/json'},
body: {sourceServerID: ''},
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}}/GetLaunchConfiguration');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
sourceServerID: ''
});
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}}/GetLaunchConfiguration',
headers: {'content-type': 'application/json'},
data: {sourceServerID: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/GetLaunchConfiguration';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"sourceServerID":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"sourceServerID": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/GetLaunchConfiguration"]
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}}/GetLaunchConfiguration" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"sourceServerID\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/GetLaunchConfiguration",
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([
'sourceServerID' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/GetLaunchConfiguration', [
'body' => '{
"sourceServerID": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/GetLaunchConfiguration');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'sourceServerID' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'sourceServerID' => ''
]));
$request->setRequestUrl('{{baseUrl}}/GetLaunchConfiguration');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/GetLaunchConfiguration' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"sourceServerID": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/GetLaunchConfiguration' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"sourceServerID": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"sourceServerID\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/GetLaunchConfiguration", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/GetLaunchConfiguration"
payload = { "sourceServerID": "" }
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/GetLaunchConfiguration"
payload <- "{\n \"sourceServerID\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/GetLaunchConfiguration")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"sourceServerID\": \"\"\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/GetLaunchConfiguration') do |req|
req.body = "{\n \"sourceServerID\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/GetLaunchConfiguration";
let payload = json!({"sourceServerID": ""});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/GetLaunchConfiguration \
--header 'content-type: application/json' \
--data '{
"sourceServerID": ""
}'
echo '{
"sourceServerID": ""
}' | \
http POST {{baseUrl}}/GetLaunchConfiguration \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "sourceServerID": ""\n}' \
--output-document \
- {{baseUrl}}/GetLaunchConfiguration
import Foundation
let headers = ["content-type": "application/json"]
let parameters = ["sourceServerID": ""] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/GetLaunchConfiguration")! 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
GetReplicationConfiguration
{{baseUrl}}/GetReplicationConfiguration
BODY json
{
"sourceServerID": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/GetReplicationConfiguration");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"sourceServerID\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/GetReplicationConfiguration" {:content-type :json
:form-params {:sourceServerID ""}})
require "http/client"
url = "{{baseUrl}}/GetReplicationConfiguration"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"sourceServerID\": \"\"\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}}/GetReplicationConfiguration"),
Content = new StringContent("{\n \"sourceServerID\": \"\"\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}}/GetReplicationConfiguration");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"sourceServerID\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/GetReplicationConfiguration"
payload := strings.NewReader("{\n \"sourceServerID\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/GetReplicationConfiguration HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 26
{
"sourceServerID": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/GetReplicationConfiguration")
.setHeader("content-type", "application/json")
.setBody("{\n \"sourceServerID\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/GetReplicationConfiguration"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"sourceServerID\": \"\"\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 \"sourceServerID\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/GetReplicationConfiguration")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/GetReplicationConfiguration")
.header("content-type", "application/json")
.body("{\n \"sourceServerID\": \"\"\n}")
.asString();
const data = JSON.stringify({
sourceServerID: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/GetReplicationConfiguration');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/GetReplicationConfiguration',
headers: {'content-type': 'application/json'},
data: {sourceServerID: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/GetReplicationConfiguration';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"sourceServerID":""}'
};
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}}/GetReplicationConfiguration',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "sourceServerID": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"sourceServerID\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/GetReplicationConfiguration")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/GetReplicationConfiguration',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({sourceServerID: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/GetReplicationConfiguration',
headers: {'content-type': 'application/json'},
body: {sourceServerID: ''},
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}}/GetReplicationConfiguration');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
sourceServerID: ''
});
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}}/GetReplicationConfiguration',
headers: {'content-type': 'application/json'},
data: {sourceServerID: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/GetReplicationConfiguration';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"sourceServerID":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"sourceServerID": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/GetReplicationConfiguration"]
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}}/GetReplicationConfiguration" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"sourceServerID\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/GetReplicationConfiguration",
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([
'sourceServerID' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/GetReplicationConfiguration', [
'body' => '{
"sourceServerID": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/GetReplicationConfiguration');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'sourceServerID' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'sourceServerID' => ''
]));
$request->setRequestUrl('{{baseUrl}}/GetReplicationConfiguration');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/GetReplicationConfiguration' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"sourceServerID": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/GetReplicationConfiguration' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"sourceServerID": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"sourceServerID\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/GetReplicationConfiguration", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/GetReplicationConfiguration"
payload = { "sourceServerID": "" }
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/GetReplicationConfiguration"
payload <- "{\n \"sourceServerID\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/GetReplicationConfiguration")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"sourceServerID\": \"\"\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/GetReplicationConfiguration') do |req|
req.body = "{\n \"sourceServerID\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/GetReplicationConfiguration";
let payload = json!({"sourceServerID": ""});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/GetReplicationConfiguration \
--header 'content-type: application/json' \
--data '{
"sourceServerID": ""
}'
echo '{
"sourceServerID": ""
}' | \
http POST {{baseUrl}}/GetReplicationConfiguration \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "sourceServerID": ""\n}' \
--output-document \
- {{baseUrl}}/GetReplicationConfiguration
import Foundation
let headers = ["content-type": "application/json"]
let parameters = ["sourceServerID": ""] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/GetReplicationConfiguration")! 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
InitializeService
{{baseUrl}}/InitializeService
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/InitializeService");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/InitializeService")
require "http/client"
url = "{{baseUrl}}/InitializeService"
response = HTTP::Client.post url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/InitializeService"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/InitializeService");
var request = new RestRequest("", Method.Post);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/InitializeService"
req, _ := http.NewRequest("POST", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/InitializeService HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/InitializeService")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/InitializeService"))
.method("POST", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/InitializeService")
.post(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/InitializeService")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/InitializeService');
xhr.send(data);
import axios from 'axios';
const options = {method: 'POST', url: '{{baseUrl}}/InitializeService'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/InitializeService';
const options = {method: 'POST'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/InitializeService',
method: 'POST',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/InitializeService")
.post(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/InitializeService',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {method: 'POST', url: '{{baseUrl}}/InitializeService'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/InitializeService');
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}}/InitializeService'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/InitializeService';
const options = {method: 'POST'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/InitializeService"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/InitializeService" in
Client.call `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/InitializeService",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/InitializeService');
echo $response->getBody();
setUrl('{{baseUrl}}/InitializeService');
$request->setMethod(HTTP_METH_POST);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/InitializeService');
$request->setRequestMethod('POST');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/InitializeService' -Method POST
$response = Invoke-RestMethod -Uri '{{baseUrl}}/InitializeService' -Method POST
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("POST", "/baseUrl/InitializeService")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/InitializeService"
response = requests.post(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/InitializeService"
response <- VERB("POST", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/InitializeService")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.post('/baseUrl/InitializeService') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/InitializeService";
let client = reqwest::Client::new();
let response = client.post(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/InitializeService
http POST {{baseUrl}}/InitializeService
wget --quiet \
--method POST \
--output-document \
- {{baseUrl}}/InitializeService
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/InitializeService")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
ListApplications
{{baseUrl}}/ListApplications
BODY json
{
"filters": {
"applicationIDs": "",
"isArchived": "",
"waveIDs": ""
},
"maxResults": 0,
"nextToken": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/ListApplications");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"filters\": {\n \"applicationIDs\": \"\",\n \"isArchived\": \"\",\n \"waveIDs\": \"\"\n },\n \"maxResults\": 0,\n \"nextToken\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/ListApplications" {:content-type :json
:form-params {:filters {:applicationIDs ""
:isArchived ""
:waveIDs ""}
:maxResults 0
:nextToken ""}})
require "http/client"
url = "{{baseUrl}}/ListApplications"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"filters\": {\n \"applicationIDs\": \"\",\n \"isArchived\": \"\",\n \"waveIDs\": \"\"\n },\n \"maxResults\": 0,\n \"nextToken\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/ListApplications"),
Content = new StringContent("{\n \"filters\": {\n \"applicationIDs\": \"\",\n \"isArchived\": \"\",\n \"waveIDs\": \"\"\n },\n \"maxResults\": 0,\n \"nextToken\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/ListApplications");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"filters\": {\n \"applicationIDs\": \"\",\n \"isArchived\": \"\",\n \"waveIDs\": \"\"\n },\n \"maxResults\": 0,\n \"nextToken\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/ListApplications"
payload := strings.NewReader("{\n \"filters\": {\n \"applicationIDs\": \"\",\n \"isArchived\": \"\",\n \"waveIDs\": \"\"\n },\n \"maxResults\": 0,\n \"nextToken\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/ListApplications HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 126
{
"filters": {
"applicationIDs": "",
"isArchived": "",
"waveIDs": ""
},
"maxResults": 0,
"nextToken": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/ListApplications")
.setHeader("content-type", "application/json")
.setBody("{\n \"filters\": {\n \"applicationIDs\": \"\",\n \"isArchived\": \"\",\n \"waveIDs\": \"\"\n },\n \"maxResults\": 0,\n \"nextToken\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/ListApplications"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"filters\": {\n \"applicationIDs\": \"\",\n \"isArchived\": \"\",\n \"waveIDs\": \"\"\n },\n \"maxResults\": 0,\n \"nextToken\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"filters\": {\n \"applicationIDs\": \"\",\n \"isArchived\": \"\",\n \"waveIDs\": \"\"\n },\n \"maxResults\": 0,\n \"nextToken\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/ListApplications")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/ListApplications")
.header("content-type", "application/json")
.body("{\n \"filters\": {\n \"applicationIDs\": \"\",\n \"isArchived\": \"\",\n \"waveIDs\": \"\"\n },\n \"maxResults\": 0,\n \"nextToken\": \"\"\n}")
.asString();
const data = JSON.stringify({
filters: {
applicationIDs: '',
isArchived: '',
waveIDs: ''
},
maxResults: 0,
nextToken: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/ListApplications');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/ListApplications',
headers: {'content-type': 'application/json'},
data: {
filters: {applicationIDs: '', isArchived: '', waveIDs: ''},
maxResults: 0,
nextToken: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/ListApplications';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"filters":{"applicationIDs":"","isArchived":"","waveIDs":""},"maxResults":0,"nextToken":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/ListApplications',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "filters": {\n "applicationIDs": "",\n "isArchived": "",\n "waveIDs": ""\n },\n "maxResults": 0,\n "nextToken": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"filters\": {\n \"applicationIDs\": \"\",\n \"isArchived\": \"\",\n \"waveIDs\": \"\"\n },\n \"maxResults\": 0,\n \"nextToken\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/ListApplications")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/ListApplications',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
filters: {applicationIDs: '', isArchived: '', waveIDs: ''},
maxResults: 0,
nextToken: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/ListApplications',
headers: {'content-type': 'application/json'},
body: {
filters: {applicationIDs: '', isArchived: '', waveIDs: ''},
maxResults: 0,
nextToken: ''
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/ListApplications');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
filters: {
applicationIDs: '',
isArchived: '',
waveIDs: ''
},
maxResults: 0,
nextToken: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/ListApplications',
headers: {'content-type': 'application/json'},
data: {
filters: {applicationIDs: '', isArchived: '', waveIDs: ''},
maxResults: 0,
nextToken: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/ListApplications';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"filters":{"applicationIDs":"","isArchived":"","waveIDs":""},"maxResults":0,"nextToken":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"filters": @{ @"applicationIDs": @"", @"isArchived": @"", @"waveIDs": @"" },
@"maxResults": @0,
@"nextToken": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/ListApplications"]
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}}/ListApplications" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"filters\": {\n \"applicationIDs\": \"\",\n \"isArchived\": \"\",\n \"waveIDs\": \"\"\n },\n \"maxResults\": 0,\n \"nextToken\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/ListApplications",
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([
'filters' => [
'applicationIDs' => '',
'isArchived' => '',
'waveIDs' => ''
],
'maxResults' => 0,
'nextToken' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/ListApplications', [
'body' => '{
"filters": {
"applicationIDs": "",
"isArchived": "",
"waveIDs": ""
},
"maxResults": 0,
"nextToken": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/ListApplications');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'filters' => [
'applicationIDs' => '',
'isArchived' => '',
'waveIDs' => ''
],
'maxResults' => 0,
'nextToken' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'filters' => [
'applicationIDs' => '',
'isArchived' => '',
'waveIDs' => ''
],
'maxResults' => 0,
'nextToken' => ''
]));
$request->setRequestUrl('{{baseUrl}}/ListApplications');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/ListApplications' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"filters": {
"applicationIDs": "",
"isArchived": "",
"waveIDs": ""
},
"maxResults": 0,
"nextToken": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/ListApplications' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"filters": {
"applicationIDs": "",
"isArchived": "",
"waveIDs": ""
},
"maxResults": 0,
"nextToken": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"filters\": {\n \"applicationIDs\": \"\",\n \"isArchived\": \"\",\n \"waveIDs\": \"\"\n },\n \"maxResults\": 0,\n \"nextToken\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/ListApplications", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/ListApplications"
payload = {
"filters": {
"applicationIDs": "",
"isArchived": "",
"waveIDs": ""
},
"maxResults": 0,
"nextToken": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/ListApplications"
payload <- "{\n \"filters\": {\n \"applicationIDs\": \"\",\n \"isArchived\": \"\",\n \"waveIDs\": \"\"\n },\n \"maxResults\": 0,\n \"nextToken\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/ListApplications")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"filters\": {\n \"applicationIDs\": \"\",\n \"isArchived\": \"\",\n \"waveIDs\": \"\"\n },\n \"maxResults\": 0,\n \"nextToken\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/ListApplications') do |req|
req.body = "{\n \"filters\": {\n \"applicationIDs\": \"\",\n \"isArchived\": \"\",\n \"waveIDs\": \"\"\n },\n \"maxResults\": 0,\n \"nextToken\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/ListApplications";
let payload = json!({
"filters": json!({
"applicationIDs": "",
"isArchived": "",
"waveIDs": ""
}),
"maxResults": 0,
"nextToken": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/ListApplications \
--header 'content-type: application/json' \
--data '{
"filters": {
"applicationIDs": "",
"isArchived": "",
"waveIDs": ""
},
"maxResults": 0,
"nextToken": ""
}'
echo '{
"filters": {
"applicationIDs": "",
"isArchived": "",
"waveIDs": ""
},
"maxResults": 0,
"nextToken": ""
}' | \
http POST {{baseUrl}}/ListApplications \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "filters": {\n "applicationIDs": "",\n "isArchived": "",\n "waveIDs": ""\n },\n "maxResults": 0,\n "nextToken": ""\n}' \
--output-document \
- {{baseUrl}}/ListApplications
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"filters": [
"applicationIDs": "",
"isArchived": "",
"waveIDs": ""
],
"maxResults": 0,
"nextToken": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/ListApplications")! 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
ListExportErrors
{{baseUrl}}/ListExportErrors
BODY json
{
"exportID": "",
"maxResults": 0,
"nextToken": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/ListExportErrors");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"exportID\": \"\",\n \"maxResults\": 0,\n \"nextToken\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/ListExportErrors" {:content-type :json
:form-params {:exportID ""
:maxResults 0
:nextToken ""}})
require "http/client"
url = "{{baseUrl}}/ListExportErrors"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"exportID\": \"\",\n \"maxResults\": 0,\n \"nextToken\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/ListExportErrors"),
Content = new StringContent("{\n \"exportID\": \"\",\n \"maxResults\": 0,\n \"nextToken\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/ListExportErrors");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"exportID\": \"\",\n \"maxResults\": 0,\n \"nextToken\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/ListExportErrors"
payload := strings.NewReader("{\n \"exportID\": \"\",\n \"maxResults\": 0,\n \"nextToken\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/ListExportErrors HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 58
{
"exportID": "",
"maxResults": 0,
"nextToken": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/ListExportErrors")
.setHeader("content-type", "application/json")
.setBody("{\n \"exportID\": \"\",\n \"maxResults\": 0,\n \"nextToken\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/ListExportErrors"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"exportID\": \"\",\n \"maxResults\": 0,\n \"nextToken\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"exportID\": \"\",\n \"maxResults\": 0,\n \"nextToken\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/ListExportErrors")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/ListExportErrors")
.header("content-type", "application/json")
.body("{\n \"exportID\": \"\",\n \"maxResults\": 0,\n \"nextToken\": \"\"\n}")
.asString();
const data = JSON.stringify({
exportID: '',
maxResults: 0,
nextToken: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/ListExportErrors');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/ListExportErrors',
headers: {'content-type': 'application/json'},
data: {exportID: '', maxResults: 0, nextToken: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/ListExportErrors';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"exportID":"","maxResults":0,"nextToken":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/ListExportErrors',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "exportID": "",\n "maxResults": 0,\n "nextToken": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"exportID\": \"\",\n \"maxResults\": 0,\n \"nextToken\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/ListExportErrors")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/ListExportErrors',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({exportID: '', maxResults: 0, nextToken: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/ListExportErrors',
headers: {'content-type': 'application/json'},
body: {exportID: '', maxResults: 0, nextToken: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/ListExportErrors');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
exportID: '',
maxResults: 0,
nextToken: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/ListExportErrors',
headers: {'content-type': 'application/json'},
data: {exportID: '', maxResults: 0, nextToken: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/ListExportErrors';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"exportID":"","maxResults":0,"nextToken":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"exportID": @"",
@"maxResults": @0,
@"nextToken": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/ListExportErrors"]
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}}/ListExportErrors" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"exportID\": \"\",\n \"maxResults\": 0,\n \"nextToken\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/ListExportErrors",
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([
'exportID' => '',
'maxResults' => 0,
'nextToken' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/ListExportErrors', [
'body' => '{
"exportID": "",
"maxResults": 0,
"nextToken": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/ListExportErrors');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'exportID' => '',
'maxResults' => 0,
'nextToken' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'exportID' => '',
'maxResults' => 0,
'nextToken' => ''
]));
$request->setRequestUrl('{{baseUrl}}/ListExportErrors');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/ListExportErrors' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"exportID": "",
"maxResults": 0,
"nextToken": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/ListExportErrors' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"exportID": "",
"maxResults": 0,
"nextToken": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"exportID\": \"\",\n \"maxResults\": 0,\n \"nextToken\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/ListExportErrors", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/ListExportErrors"
payload = {
"exportID": "",
"maxResults": 0,
"nextToken": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/ListExportErrors"
payload <- "{\n \"exportID\": \"\",\n \"maxResults\": 0,\n \"nextToken\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/ListExportErrors")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"exportID\": \"\",\n \"maxResults\": 0,\n \"nextToken\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/ListExportErrors') do |req|
req.body = "{\n \"exportID\": \"\",\n \"maxResults\": 0,\n \"nextToken\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/ListExportErrors";
let payload = json!({
"exportID": "",
"maxResults": 0,
"nextToken": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/ListExportErrors \
--header 'content-type: application/json' \
--data '{
"exportID": "",
"maxResults": 0,
"nextToken": ""
}'
echo '{
"exportID": "",
"maxResults": 0,
"nextToken": ""
}' | \
http POST {{baseUrl}}/ListExportErrors \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "exportID": "",\n "maxResults": 0,\n "nextToken": ""\n}' \
--output-document \
- {{baseUrl}}/ListExportErrors
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"exportID": "",
"maxResults": 0,
"nextToken": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/ListExportErrors")! 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
ListExports
{{baseUrl}}/ListExports
BODY json
{
"filters": {
"exportIDs": ""
},
"maxResults": 0,
"nextToken": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/ListExports");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"filters\": {\n \"exportIDs\": \"\"\n },\n \"maxResults\": 0,\n \"nextToken\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/ListExports" {:content-type :json
:form-params {:filters {:exportIDs ""}
:maxResults 0
:nextToken ""}})
require "http/client"
url = "{{baseUrl}}/ListExports"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"filters\": {\n \"exportIDs\": \"\"\n },\n \"maxResults\": 0,\n \"nextToken\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/ListExports"),
Content = new StringContent("{\n \"filters\": {\n \"exportIDs\": \"\"\n },\n \"maxResults\": 0,\n \"nextToken\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/ListExports");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"filters\": {\n \"exportIDs\": \"\"\n },\n \"maxResults\": 0,\n \"nextToken\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/ListExports"
payload := strings.NewReader("{\n \"filters\": {\n \"exportIDs\": \"\"\n },\n \"maxResults\": 0,\n \"nextToken\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/ListExports HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 80
{
"filters": {
"exportIDs": ""
},
"maxResults": 0,
"nextToken": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/ListExports")
.setHeader("content-type", "application/json")
.setBody("{\n \"filters\": {\n \"exportIDs\": \"\"\n },\n \"maxResults\": 0,\n \"nextToken\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/ListExports"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"filters\": {\n \"exportIDs\": \"\"\n },\n \"maxResults\": 0,\n \"nextToken\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"filters\": {\n \"exportIDs\": \"\"\n },\n \"maxResults\": 0,\n \"nextToken\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/ListExports")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/ListExports")
.header("content-type", "application/json")
.body("{\n \"filters\": {\n \"exportIDs\": \"\"\n },\n \"maxResults\": 0,\n \"nextToken\": \"\"\n}")
.asString();
const data = JSON.stringify({
filters: {
exportIDs: ''
},
maxResults: 0,
nextToken: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/ListExports');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/ListExports',
headers: {'content-type': 'application/json'},
data: {filters: {exportIDs: ''}, maxResults: 0, nextToken: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/ListExports';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"filters":{"exportIDs":""},"maxResults":0,"nextToken":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/ListExports',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "filters": {\n "exportIDs": ""\n },\n "maxResults": 0,\n "nextToken": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"filters\": {\n \"exportIDs\": \"\"\n },\n \"maxResults\": 0,\n \"nextToken\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/ListExports")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/ListExports',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({filters: {exportIDs: ''}, maxResults: 0, nextToken: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/ListExports',
headers: {'content-type': 'application/json'},
body: {filters: {exportIDs: ''}, maxResults: 0, nextToken: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/ListExports');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
filters: {
exportIDs: ''
},
maxResults: 0,
nextToken: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/ListExports',
headers: {'content-type': 'application/json'},
data: {filters: {exportIDs: ''}, maxResults: 0, nextToken: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/ListExports';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"filters":{"exportIDs":""},"maxResults":0,"nextToken":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"filters": @{ @"exportIDs": @"" },
@"maxResults": @0,
@"nextToken": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/ListExports"]
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}}/ListExports" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"filters\": {\n \"exportIDs\": \"\"\n },\n \"maxResults\": 0,\n \"nextToken\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/ListExports",
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([
'filters' => [
'exportIDs' => ''
],
'maxResults' => 0,
'nextToken' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/ListExports', [
'body' => '{
"filters": {
"exportIDs": ""
},
"maxResults": 0,
"nextToken": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/ListExports');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'filters' => [
'exportIDs' => ''
],
'maxResults' => 0,
'nextToken' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'filters' => [
'exportIDs' => ''
],
'maxResults' => 0,
'nextToken' => ''
]));
$request->setRequestUrl('{{baseUrl}}/ListExports');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/ListExports' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"filters": {
"exportIDs": ""
},
"maxResults": 0,
"nextToken": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/ListExports' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"filters": {
"exportIDs": ""
},
"maxResults": 0,
"nextToken": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"filters\": {\n \"exportIDs\": \"\"\n },\n \"maxResults\": 0,\n \"nextToken\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/ListExports", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/ListExports"
payload = {
"filters": { "exportIDs": "" },
"maxResults": 0,
"nextToken": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/ListExports"
payload <- "{\n \"filters\": {\n \"exportIDs\": \"\"\n },\n \"maxResults\": 0,\n \"nextToken\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/ListExports")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"filters\": {\n \"exportIDs\": \"\"\n },\n \"maxResults\": 0,\n \"nextToken\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/ListExports') do |req|
req.body = "{\n \"filters\": {\n \"exportIDs\": \"\"\n },\n \"maxResults\": 0,\n \"nextToken\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/ListExports";
let payload = json!({
"filters": json!({"exportIDs": ""}),
"maxResults": 0,
"nextToken": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/ListExports \
--header 'content-type: application/json' \
--data '{
"filters": {
"exportIDs": ""
},
"maxResults": 0,
"nextToken": ""
}'
echo '{
"filters": {
"exportIDs": ""
},
"maxResults": 0,
"nextToken": ""
}' | \
http POST {{baseUrl}}/ListExports \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "filters": {\n "exportIDs": ""\n },\n "maxResults": 0,\n "nextToken": ""\n}' \
--output-document \
- {{baseUrl}}/ListExports
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"filters": ["exportIDs": ""],
"maxResults": 0,
"nextToken": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/ListExports")! 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
ListImportErrors
{{baseUrl}}/ListImportErrors
BODY json
{
"importID": "",
"maxResults": 0,
"nextToken": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/ListImportErrors");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"importID\": \"\",\n \"maxResults\": 0,\n \"nextToken\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/ListImportErrors" {:content-type :json
:form-params {:importID ""
:maxResults 0
:nextToken ""}})
require "http/client"
url = "{{baseUrl}}/ListImportErrors"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"importID\": \"\",\n \"maxResults\": 0,\n \"nextToken\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/ListImportErrors"),
Content = new StringContent("{\n \"importID\": \"\",\n \"maxResults\": 0,\n \"nextToken\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/ListImportErrors");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"importID\": \"\",\n \"maxResults\": 0,\n \"nextToken\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/ListImportErrors"
payload := strings.NewReader("{\n \"importID\": \"\",\n \"maxResults\": 0,\n \"nextToken\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/ListImportErrors HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 58
{
"importID": "",
"maxResults": 0,
"nextToken": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/ListImportErrors")
.setHeader("content-type", "application/json")
.setBody("{\n \"importID\": \"\",\n \"maxResults\": 0,\n \"nextToken\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/ListImportErrors"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"importID\": \"\",\n \"maxResults\": 0,\n \"nextToken\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"importID\": \"\",\n \"maxResults\": 0,\n \"nextToken\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/ListImportErrors")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/ListImportErrors")
.header("content-type", "application/json")
.body("{\n \"importID\": \"\",\n \"maxResults\": 0,\n \"nextToken\": \"\"\n}")
.asString();
const data = JSON.stringify({
importID: '',
maxResults: 0,
nextToken: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/ListImportErrors');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/ListImportErrors',
headers: {'content-type': 'application/json'},
data: {importID: '', maxResults: 0, nextToken: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/ListImportErrors';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"importID":"","maxResults":0,"nextToken":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/ListImportErrors',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "importID": "",\n "maxResults": 0,\n "nextToken": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"importID\": \"\",\n \"maxResults\": 0,\n \"nextToken\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/ListImportErrors")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/ListImportErrors',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({importID: '', maxResults: 0, nextToken: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/ListImportErrors',
headers: {'content-type': 'application/json'},
body: {importID: '', maxResults: 0, nextToken: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/ListImportErrors');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
importID: '',
maxResults: 0,
nextToken: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/ListImportErrors',
headers: {'content-type': 'application/json'},
data: {importID: '', maxResults: 0, nextToken: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/ListImportErrors';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"importID":"","maxResults":0,"nextToken":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"importID": @"",
@"maxResults": @0,
@"nextToken": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/ListImportErrors"]
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}}/ListImportErrors" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"importID\": \"\",\n \"maxResults\": 0,\n \"nextToken\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/ListImportErrors",
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([
'importID' => '',
'maxResults' => 0,
'nextToken' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/ListImportErrors', [
'body' => '{
"importID": "",
"maxResults": 0,
"nextToken": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/ListImportErrors');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'importID' => '',
'maxResults' => 0,
'nextToken' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'importID' => '',
'maxResults' => 0,
'nextToken' => ''
]));
$request->setRequestUrl('{{baseUrl}}/ListImportErrors');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/ListImportErrors' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"importID": "",
"maxResults": 0,
"nextToken": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/ListImportErrors' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"importID": "",
"maxResults": 0,
"nextToken": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"importID\": \"\",\n \"maxResults\": 0,\n \"nextToken\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/ListImportErrors", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/ListImportErrors"
payload = {
"importID": "",
"maxResults": 0,
"nextToken": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/ListImportErrors"
payload <- "{\n \"importID\": \"\",\n \"maxResults\": 0,\n \"nextToken\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/ListImportErrors")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"importID\": \"\",\n \"maxResults\": 0,\n \"nextToken\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/ListImportErrors') do |req|
req.body = "{\n \"importID\": \"\",\n \"maxResults\": 0,\n \"nextToken\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/ListImportErrors";
let payload = json!({
"importID": "",
"maxResults": 0,
"nextToken": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/ListImportErrors \
--header 'content-type: application/json' \
--data '{
"importID": "",
"maxResults": 0,
"nextToken": ""
}'
echo '{
"importID": "",
"maxResults": 0,
"nextToken": ""
}' | \
http POST {{baseUrl}}/ListImportErrors \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "importID": "",\n "maxResults": 0,\n "nextToken": ""\n}' \
--output-document \
- {{baseUrl}}/ListImportErrors
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"importID": "",
"maxResults": 0,
"nextToken": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/ListImportErrors")! 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
ListImports
{{baseUrl}}/ListImports
BODY json
{
"filters": {
"importIDs": ""
},
"maxResults": 0,
"nextToken": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/ListImports");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"filters\": {\n \"importIDs\": \"\"\n },\n \"maxResults\": 0,\n \"nextToken\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/ListImports" {:content-type :json
:form-params {:filters {:importIDs ""}
:maxResults 0
:nextToken ""}})
require "http/client"
url = "{{baseUrl}}/ListImports"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"filters\": {\n \"importIDs\": \"\"\n },\n \"maxResults\": 0,\n \"nextToken\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/ListImports"),
Content = new StringContent("{\n \"filters\": {\n \"importIDs\": \"\"\n },\n \"maxResults\": 0,\n \"nextToken\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/ListImports");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"filters\": {\n \"importIDs\": \"\"\n },\n \"maxResults\": 0,\n \"nextToken\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/ListImports"
payload := strings.NewReader("{\n \"filters\": {\n \"importIDs\": \"\"\n },\n \"maxResults\": 0,\n \"nextToken\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/ListImports HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 80
{
"filters": {
"importIDs": ""
},
"maxResults": 0,
"nextToken": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/ListImports")
.setHeader("content-type", "application/json")
.setBody("{\n \"filters\": {\n \"importIDs\": \"\"\n },\n \"maxResults\": 0,\n \"nextToken\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/ListImports"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"filters\": {\n \"importIDs\": \"\"\n },\n \"maxResults\": 0,\n \"nextToken\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"filters\": {\n \"importIDs\": \"\"\n },\n \"maxResults\": 0,\n \"nextToken\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/ListImports")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/ListImports")
.header("content-type", "application/json")
.body("{\n \"filters\": {\n \"importIDs\": \"\"\n },\n \"maxResults\": 0,\n \"nextToken\": \"\"\n}")
.asString();
const data = JSON.stringify({
filters: {
importIDs: ''
},
maxResults: 0,
nextToken: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/ListImports');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/ListImports',
headers: {'content-type': 'application/json'},
data: {filters: {importIDs: ''}, maxResults: 0, nextToken: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/ListImports';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"filters":{"importIDs":""},"maxResults":0,"nextToken":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/ListImports',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "filters": {\n "importIDs": ""\n },\n "maxResults": 0,\n "nextToken": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"filters\": {\n \"importIDs\": \"\"\n },\n \"maxResults\": 0,\n \"nextToken\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/ListImports")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/ListImports',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({filters: {importIDs: ''}, maxResults: 0, nextToken: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/ListImports',
headers: {'content-type': 'application/json'},
body: {filters: {importIDs: ''}, maxResults: 0, nextToken: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/ListImports');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
filters: {
importIDs: ''
},
maxResults: 0,
nextToken: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/ListImports',
headers: {'content-type': 'application/json'},
data: {filters: {importIDs: ''}, maxResults: 0, nextToken: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/ListImports';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"filters":{"importIDs":""},"maxResults":0,"nextToken":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"filters": @{ @"importIDs": @"" },
@"maxResults": @0,
@"nextToken": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/ListImports"]
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}}/ListImports" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"filters\": {\n \"importIDs\": \"\"\n },\n \"maxResults\": 0,\n \"nextToken\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/ListImports",
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([
'filters' => [
'importIDs' => ''
],
'maxResults' => 0,
'nextToken' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/ListImports', [
'body' => '{
"filters": {
"importIDs": ""
},
"maxResults": 0,
"nextToken": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/ListImports');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'filters' => [
'importIDs' => ''
],
'maxResults' => 0,
'nextToken' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'filters' => [
'importIDs' => ''
],
'maxResults' => 0,
'nextToken' => ''
]));
$request->setRequestUrl('{{baseUrl}}/ListImports');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/ListImports' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"filters": {
"importIDs": ""
},
"maxResults": 0,
"nextToken": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/ListImports' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"filters": {
"importIDs": ""
},
"maxResults": 0,
"nextToken": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"filters\": {\n \"importIDs\": \"\"\n },\n \"maxResults\": 0,\n \"nextToken\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/ListImports", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/ListImports"
payload = {
"filters": { "importIDs": "" },
"maxResults": 0,
"nextToken": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/ListImports"
payload <- "{\n \"filters\": {\n \"importIDs\": \"\"\n },\n \"maxResults\": 0,\n \"nextToken\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/ListImports")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"filters\": {\n \"importIDs\": \"\"\n },\n \"maxResults\": 0,\n \"nextToken\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/ListImports') do |req|
req.body = "{\n \"filters\": {\n \"importIDs\": \"\"\n },\n \"maxResults\": 0,\n \"nextToken\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/ListImports";
let payload = json!({
"filters": json!({"importIDs": ""}),
"maxResults": 0,
"nextToken": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/ListImports \
--header 'content-type: application/json' \
--data '{
"filters": {
"importIDs": ""
},
"maxResults": 0,
"nextToken": ""
}'
echo '{
"filters": {
"importIDs": ""
},
"maxResults": 0,
"nextToken": ""
}' | \
http POST {{baseUrl}}/ListImports \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "filters": {\n "importIDs": ""\n },\n "maxResults": 0,\n "nextToken": ""\n}' \
--output-document \
- {{baseUrl}}/ListImports
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"filters": ["importIDs": ""],
"maxResults": 0,
"nextToken": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/ListImports")! 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
ListSourceServerActions
{{baseUrl}}/ListSourceServerActions
BODY json
{
"filters": {
"actionIDs": ""
},
"maxResults": 0,
"nextToken": "",
"sourceServerID": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/ListSourceServerActions");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"filters\": {\n \"actionIDs\": \"\"\n },\n \"maxResults\": 0,\n \"nextToken\": \"\",\n \"sourceServerID\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/ListSourceServerActions" {:content-type :json
:form-params {:filters {:actionIDs ""}
:maxResults 0
:nextToken ""
:sourceServerID ""}})
require "http/client"
url = "{{baseUrl}}/ListSourceServerActions"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"filters\": {\n \"actionIDs\": \"\"\n },\n \"maxResults\": 0,\n \"nextToken\": \"\",\n \"sourceServerID\": \"\"\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}}/ListSourceServerActions"),
Content = new StringContent("{\n \"filters\": {\n \"actionIDs\": \"\"\n },\n \"maxResults\": 0,\n \"nextToken\": \"\",\n \"sourceServerID\": \"\"\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}}/ListSourceServerActions");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"filters\": {\n \"actionIDs\": \"\"\n },\n \"maxResults\": 0,\n \"nextToken\": \"\",\n \"sourceServerID\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/ListSourceServerActions"
payload := strings.NewReader("{\n \"filters\": {\n \"actionIDs\": \"\"\n },\n \"maxResults\": 0,\n \"nextToken\": \"\",\n \"sourceServerID\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/ListSourceServerActions HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 104
{
"filters": {
"actionIDs": ""
},
"maxResults": 0,
"nextToken": "",
"sourceServerID": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/ListSourceServerActions")
.setHeader("content-type", "application/json")
.setBody("{\n \"filters\": {\n \"actionIDs\": \"\"\n },\n \"maxResults\": 0,\n \"nextToken\": \"\",\n \"sourceServerID\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/ListSourceServerActions"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"filters\": {\n \"actionIDs\": \"\"\n },\n \"maxResults\": 0,\n \"nextToken\": \"\",\n \"sourceServerID\": \"\"\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 \"filters\": {\n \"actionIDs\": \"\"\n },\n \"maxResults\": 0,\n \"nextToken\": \"\",\n \"sourceServerID\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/ListSourceServerActions")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/ListSourceServerActions")
.header("content-type", "application/json")
.body("{\n \"filters\": {\n \"actionIDs\": \"\"\n },\n \"maxResults\": 0,\n \"nextToken\": \"\",\n \"sourceServerID\": \"\"\n}")
.asString();
const data = JSON.stringify({
filters: {
actionIDs: ''
},
maxResults: 0,
nextToken: '',
sourceServerID: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/ListSourceServerActions');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/ListSourceServerActions',
headers: {'content-type': 'application/json'},
data: {filters: {actionIDs: ''}, maxResults: 0, nextToken: '', sourceServerID: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/ListSourceServerActions';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"filters":{"actionIDs":""},"maxResults":0,"nextToken":"","sourceServerID":""}'
};
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}}/ListSourceServerActions',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "filters": {\n "actionIDs": ""\n },\n "maxResults": 0,\n "nextToken": "",\n "sourceServerID": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"filters\": {\n \"actionIDs\": \"\"\n },\n \"maxResults\": 0,\n \"nextToken\": \"\",\n \"sourceServerID\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/ListSourceServerActions")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/ListSourceServerActions',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({filters: {actionIDs: ''}, maxResults: 0, nextToken: '', sourceServerID: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/ListSourceServerActions',
headers: {'content-type': 'application/json'},
body: {filters: {actionIDs: ''}, maxResults: 0, nextToken: '', sourceServerID: ''},
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}}/ListSourceServerActions');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
filters: {
actionIDs: ''
},
maxResults: 0,
nextToken: '',
sourceServerID: ''
});
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}}/ListSourceServerActions',
headers: {'content-type': 'application/json'},
data: {filters: {actionIDs: ''}, maxResults: 0, nextToken: '', sourceServerID: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/ListSourceServerActions';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"filters":{"actionIDs":""},"maxResults":0,"nextToken":"","sourceServerID":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"filters": @{ @"actionIDs": @"" },
@"maxResults": @0,
@"nextToken": @"",
@"sourceServerID": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/ListSourceServerActions"]
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}}/ListSourceServerActions" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"filters\": {\n \"actionIDs\": \"\"\n },\n \"maxResults\": 0,\n \"nextToken\": \"\",\n \"sourceServerID\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/ListSourceServerActions",
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([
'filters' => [
'actionIDs' => ''
],
'maxResults' => 0,
'nextToken' => '',
'sourceServerID' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/ListSourceServerActions', [
'body' => '{
"filters": {
"actionIDs": ""
},
"maxResults": 0,
"nextToken": "",
"sourceServerID": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/ListSourceServerActions');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'filters' => [
'actionIDs' => ''
],
'maxResults' => 0,
'nextToken' => '',
'sourceServerID' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'filters' => [
'actionIDs' => ''
],
'maxResults' => 0,
'nextToken' => '',
'sourceServerID' => ''
]));
$request->setRequestUrl('{{baseUrl}}/ListSourceServerActions');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/ListSourceServerActions' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"filters": {
"actionIDs": ""
},
"maxResults": 0,
"nextToken": "",
"sourceServerID": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/ListSourceServerActions' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"filters": {
"actionIDs": ""
},
"maxResults": 0,
"nextToken": "",
"sourceServerID": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"filters\": {\n \"actionIDs\": \"\"\n },\n \"maxResults\": 0,\n \"nextToken\": \"\",\n \"sourceServerID\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/ListSourceServerActions", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/ListSourceServerActions"
payload = {
"filters": { "actionIDs": "" },
"maxResults": 0,
"nextToken": "",
"sourceServerID": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/ListSourceServerActions"
payload <- "{\n \"filters\": {\n \"actionIDs\": \"\"\n },\n \"maxResults\": 0,\n \"nextToken\": \"\",\n \"sourceServerID\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/ListSourceServerActions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"filters\": {\n \"actionIDs\": \"\"\n },\n \"maxResults\": 0,\n \"nextToken\": \"\",\n \"sourceServerID\": \"\"\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/ListSourceServerActions') do |req|
req.body = "{\n \"filters\": {\n \"actionIDs\": \"\"\n },\n \"maxResults\": 0,\n \"nextToken\": \"\",\n \"sourceServerID\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/ListSourceServerActions";
let payload = json!({
"filters": json!({"actionIDs": ""}),
"maxResults": 0,
"nextToken": "",
"sourceServerID": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/ListSourceServerActions \
--header 'content-type: application/json' \
--data '{
"filters": {
"actionIDs": ""
},
"maxResults": 0,
"nextToken": "",
"sourceServerID": ""
}'
echo '{
"filters": {
"actionIDs": ""
},
"maxResults": 0,
"nextToken": "",
"sourceServerID": ""
}' | \
http POST {{baseUrl}}/ListSourceServerActions \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "filters": {\n "actionIDs": ""\n },\n "maxResults": 0,\n "nextToken": "",\n "sourceServerID": ""\n}' \
--output-document \
- {{baseUrl}}/ListSourceServerActions
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"filters": ["actionIDs": ""],
"maxResults": 0,
"nextToken": "",
"sourceServerID": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/ListSourceServerActions")! 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()
GET
ListTagsForResource
{{baseUrl}}/tags/:resourceArn
QUERY PARAMS
resourceArn
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/tags/:resourceArn");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/tags/:resourceArn")
require "http/client"
url = "{{baseUrl}}/tags/:resourceArn"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/tags/:resourceArn"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/tags/:resourceArn");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/tags/:resourceArn"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/tags/:resourceArn HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/tags/:resourceArn")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/tags/:resourceArn"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/tags/:resourceArn")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/tags/:resourceArn")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/tags/:resourceArn');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/tags/:resourceArn'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/tags/:resourceArn';
const options = {method: 'GET'};
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}}/tags/:resourceArn',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/tags/:resourceArn")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/tags/:resourceArn',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {method: 'GET', url: '{{baseUrl}}/tags/:resourceArn'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/tags/:resourceArn');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {method: 'GET', url: '{{baseUrl}}/tags/:resourceArn'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/tags/:resourceArn';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/tags/:resourceArn"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
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}}/tags/:resourceArn" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/tags/:resourceArn",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/tags/:resourceArn');
echo $response->getBody();
setUrl('{{baseUrl}}/tags/:resourceArn');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/tags/:resourceArn');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/tags/:resourceArn' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/tags/:resourceArn' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/tags/:resourceArn")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/tags/:resourceArn"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/tags/:resourceArn"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/tags/:resourceArn")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/tags/:resourceArn') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/tags/:resourceArn";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/tags/:resourceArn
http GET {{baseUrl}}/tags/:resourceArn
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/tags/:resourceArn
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/tags/:resourceArn")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
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
ListTemplateActions
{{baseUrl}}/ListTemplateActions
BODY json
{
"filters": {
"actionIDs": ""
},
"launchConfigurationTemplateID": "",
"maxResults": 0,
"nextToken": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/ListTemplateActions");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"filters\": {\n \"actionIDs\": \"\"\n },\n \"launchConfigurationTemplateID\": \"\",\n \"maxResults\": 0,\n \"nextToken\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/ListTemplateActions" {:content-type :json
:form-params {:filters {:actionIDs ""}
:launchConfigurationTemplateID ""
:maxResults 0
:nextToken ""}})
require "http/client"
url = "{{baseUrl}}/ListTemplateActions"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"filters\": {\n \"actionIDs\": \"\"\n },\n \"launchConfigurationTemplateID\": \"\",\n \"maxResults\": 0,\n \"nextToken\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/ListTemplateActions"),
Content = new StringContent("{\n \"filters\": {\n \"actionIDs\": \"\"\n },\n \"launchConfigurationTemplateID\": \"\",\n \"maxResults\": 0,\n \"nextToken\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/ListTemplateActions");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"filters\": {\n \"actionIDs\": \"\"\n },\n \"launchConfigurationTemplateID\": \"\",\n \"maxResults\": 0,\n \"nextToken\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/ListTemplateActions"
payload := strings.NewReader("{\n \"filters\": {\n \"actionIDs\": \"\"\n },\n \"launchConfigurationTemplateID\": \"\",\n \"maxResults\": 0,\n \"nextToken\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/ListTemplateActions HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 119
{
"filters": {
"actionIDs": ""
},
"launchConfigurationTemplateID": "",
"maxResults": 0,
"nextToken": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/ListTemplateActions")
.setHeader("content-type", "application/json")
.setBody("{\n \"filters\": {\n \"actionIDs\": \"\"\n },\n \"launchConfigurationTemplateID\": \"\",\n \"maxResults\": 0,\n \"nextToken\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/ListTemplateActions"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"filters\": {\n \"actionIDs\": \"\"\n },\n \"launchConfigurationTemplateID\": \"\",\n \"maxResults\": 0,\n \"nextToken\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"filters\": {\n \"actionIDs\": \"\"\n },\n \"launchConfigurationTemplateID\": \"\",\n \"maxResults\": 0,\n \"nextToken\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/ListTemplateActions")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/ListTemplateActions")
.header("content-type", "application/json")
.body("{\n \"filters\": {\n \"actionIDs\": \"\"\n },\n \"launchConfigurationTemplateID\": \"\",\n \"maxResults\": 0,\n \"nextToken\": \"\"\n}")
.asString();
const data = JSON.stringify({
filters: {
actionIDs: ''
},
launchConfigurationTemplateID: '',
maxResults: 0,
nextToken: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/ListTemplateActions');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/ListTemplateActions',
headers: {'content-type': 'application/json'},
data: {
filters: {actionIDs: ''},
launchConfigurationTemplateID: '',
maxResults: 0,
nextToken: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/ListTemplateActions';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"filters":{"actionIDs":""},"launchConfigurationTemplateID":"","maxResults":0,"nextToken":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/ListTemplateActions',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "filters": {\n "actionIDs": ""\n },\n "launchConfigurationTemplateID": "",\n "maxResults": 0,\n "nextToken": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"filters\": {\n \"actionIDs\": \"\"\n },\n \"launchConfigurationTemplateID\": \"\",\n \"maxResults\": 0,\n \"nextToken\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/ListTemplateActions")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/ListTemplateActions',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
filters: {actionIDs: ''},
launchConfigurationTemplateID: '',
maxResults: 0,
nextToken: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/ListTemplateActions',
headers: {'content-type': 'application/json'},
body: {
filters: {actionIDs: ''},
launchConfigurationTemplateID: '',
maxResults: 0,
nextToken: ''
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/ListTemplateActions');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
filters: {
actionIDs: ''
},
launchConfigurationTemplateID: '',
maxResults: 0,
nextToken: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/ListTemplateActions',
headers: {'content-type': 'application/json'},
data: {
filters: {actionIDs: ''},
launchConfigurationTemplateID: '',
maxResults: 0,
nextToken: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/ListTemplateActions';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"filters":{"actionIDs":""},"launchConfigurationTemplateID":"","maxResults":0,"nextToken":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"filters": @{ @"actionIDs": @"" },
@"launchConfigurationTemplateID": @"",
@"maxResults": @0,
@"nextToken": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/ListTemplateActions"]
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}}/ListTemplateActions" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"filters\": {\n \"actionIDs\": \"\"\n },\n \"launchConfigurationTemplateID\": \"\",\n \"maxResults\": 0,\n \"nextToken\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/ListTemplateActions",
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([
'filters' => [
'actionIDs' => ''
],
'launchConfigurationTemplateID' => '',
'maxResults' => 0,
'nextToken' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/ListTemplateActions', [
'body' => '{
"filters": {
"actionIDs": ""
},
"launchConfigurationTemplateID": "",
"maxResults": 0,
"nextToken": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/ListTemplateActions');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'filters' => [
'actionIDs' => ''
],
'launchConfigurationTemplateID' => '',
'maxResults' => 0,
'nextToken' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'filters' => [
'actionIDs' => ''
],
'launchConfigurationTemplateID' => '',
'maxResults' => 0,
'nextToken' => ''
]));
$request->setRequestUrl('{{baseUrl}}/ListTemplateActions');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/ListTemplateActions' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"filters": {
"actionIDs": ""
},
"launchConfigurationTemplateID": "",
"maxResults": 0,
"nextToken": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/ListTemplateActions' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"filters": {
"actionIDs": ""
},
"launchConfigurationTemplateID": "",
"maxResults": 0,
"nextToken": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"filters\": {\n \"actionIDs\": \"\"\n },\n \"launchConfigurationTemplateID\": \"\",\n \"maxResults\": 0,\n \"nextToken\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/ListTemplateActions", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/ListTemplateActions"
payload = {
"filters": { "actionIDs": "" },
"launchConfigurationTemplateID": "",
"maxResults": 0,
"nextToken": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/ListTemplateActions"
payload <- "{\n \"filters\": {\n \"actionIDs\": \"\"\n },\n \"launchConfigurationTemplateID\": \"\",\n \"maxResults\": 0,\n \"nextToken\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/ListTemplateActions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"filters\": {\n \"actionIDs\": \"\"\n },\n \"launchConfigurationTemplateID\": \"\",\n \"maxResults\": 0,\n \"nextToken\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/ListTemplateActions') do |req|
req.body = "{\n \"filters\": {\n \"actionIDs\": \"\"\n },\n \"launchConfigurationTemplateID\": \"\",\n \"maxResults\": 0,\n \"nextToken\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/ListTemplateActions";
let payload = json!({
"filters": json!({"actionIDs": ""}),
"launchConfigurationTemplateID": "",
"maxResults": 0,
"nextToken": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/ListTemplateActions \
--header 'content-type: application/json' \
--data '{
"filters": {
"actionIDs": ""
},
"launchConfigurationTemplateID": "",
"maxResults": 0,
"nextToken": ""
}'
echo '{
"filters": {
"actionIDs": ""
},
"launchConfigurationTemplateID": "",
"maxResults": 0,
"nextToken": ""
}' | \
http POST {{baseUrl}}/ListTemplateActions \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "filters": {\n "actionIDs": ""\n },\n "launchConfigurationTemplateID": "",\n "maxResults": 0,\n "nextToken": ""\n}' \
--output-document \
- {{baseUrl}}/ListTemplateActions
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"filters": ["actionIDs": ""],
"launchConfigurationTemplateID": "",
"maxResults": 0,
"nextToken": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/ListTemplateActions")! 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
ListWaves
{{baseUrl}}/ListWaves
BODY json
{
"filters": {
"isArchived": "",
"waveIDs": ""
},
"maxResults": 0,
"nextToken": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/ListWaves");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"filters\": {\n \"isArchived\": \"\",\n \"waveIDs\": \"\"\n },\n \"maxResults\": 0,\n \"nextToken\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/ListWaves" {:content-type :json
:form-params {:filters {:isArchived ""
:waveIDs ""}
:maxResults 0
:nextToken ""}})
require "http/client"
url = "{{baseUrl}}/ListWaves"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"filters\": {\n \"isArchived\": \"\",\n \"waveIDs\": \"\"\n },\n \"maxResults\": 0,\n \"nextToken\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/ListWaves"),
Content = new StringContent("{\n \"filters\": {\n \"isArchived\": \"\",\n \"waveIDs\": \"\"\n },\n \"maxResults\": 0,\n \"nextToken\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/ListWaves");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"filters\": {\n \"isArchived\": \"\",\n \"waveIDs\": \"\"\n },\n \"maxResults\": 0,\n \"nextToken\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/ListWaves"
payload := strings.NewReader("{\n \"filters\": {\n \"isArchived\": \"\",\n \"waveIDs\": \"\"\n },\n \"maxResults\": 0,\n \"nextToken\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/ListWaves HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 100
{
"filters": {
"isArchived": "",
"waveIDs": ""
},
"maxResults": 0,
"nextToken": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/ListWaves")
.setHeader("content-type", "application/json")
.setBody("{\n \"filters\": {\n \"isArchived\": \"\",\n \"waveIDs\": \"\"\n },\n \"maxResults\": 0,\n \"nextToken\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/ListWaves"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"filters\": {\n \"isArchived\": \"\",\n \"waveIDs\": \"\"\n },\n \"maxResults\": 0,\n \"nextToken\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"filters\": {\n \"isArchived\": \"\",\n \"waveIDs\": \"\"\n },\n \"maxResults\": 0,\n \"nextToken\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/ListWaves")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/ListWaves")
.header("content-type", "application/json")
.body("{\n \"filters\": {\n \"isArchived\": \"\",\n \"waveIDs\": \"\"\n },\n \"maxResults\": 0,\n \"nextToken\": \"\"\n}")
.asString();
const data = JSON.stringify({
filters: {
isArchived: '',
waveIDs: ''
},
maxResults: 0,
nextToken: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/ListWaves');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/ListWaves',
headers: {'content-type': 'application/json'},
data: {filters: {isArchived: '', waveIDs: ''}, maxResults: 0, nextToken: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/ListWaves';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"filters":{"isArchived":"","waveIDs":""},"maxResults":0,"nextToken":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/ListWaves',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "filters": {\n "isArchived": "",\n "waveIDs": ""\n },\n "maxResults": 0,\n "nextToken": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"filters\": {\n \"isArchived\": \"\",\n \"waveIDs\": \"\"\n },\n \"maxResults\": 0,\n \"nextToken\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/ListWaves")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/ListWaves',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({filters: {isArchived: '', waveIDs: ''}, maxResults: 0, nextToken: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/ListWaves',
headers: {'content-type': 'application/json'},
body: {filters: {isArchived: '', waveIDs: ''}, maxResults: 0, nextToken: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/ListWaves');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
filters: {
isArchived: '',
waveIDs: ''
},
maxResults: 0,
nextToken: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/ListWaves',
headers: {'content-type': 'application/json'},
data: {filters: {isArchived: '', waveIDs: ''}, maxResults: 0, nextToken: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/ListWaves';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"filters":{"isArchived":"","waveIDs":""},"maxResults":0,"nextToken":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"filters": @{ @"isArchived": @"", @"waveIDs": @"" },
@"maxResults": @0,
@"nextToken": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/ListWaves"]
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}}/ListWaves" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"filters\": {\n \"isArchived\": \"\",\n \"waveIDs\": \"\"\n },\n \"maxResults\": 0,\n \"nextToken\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/ListWaves",
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([
'filters' => [
'isArchived' => '',
'waveIDs' => ''
],
'maxResults' => 0,
'nextToken' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/ListWaves', [
'body' => '{
"filters": {
"isArchived": "",
"waveIDs": ""
},
"maxResults": 0,
"nextToken": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/ListWaves');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'filters' => [
'isArchived' => '',
'waveIDs' => ''
],
'maxResults' => 0,
'nextToken' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'filters' => [
'isArchived' => '',
'waveIDs' => ''
],
'maxResults' => 0,
'nextToken' => ''
]));
$request->setRequestUrl('{{baseUrl}}/ListWaves');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/ListWaves' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"filters": {
"isArchived": "",
"waveIDs": ""
},
"maxResults": 0,
"nextToken": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/ListWaves' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"filters": {
"isArchived": "",
"waveIDs": ""
},
"maxResults": 0,
"nextToken": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"filters\": {\n \"isArchived\": \"\",\n \"waveIDs\": \"\"\n },\n \"maxResults\": 0,\n \"nextToken\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/ListWaves", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/ListWaves"
payload = {
"filters": {
"isArchived": "",
"waveIDs": ""
},
"maxResults": 0,
"nextToken": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/ListWaves"
payload <- "{\n \"filters\": {\n \"isArchived\": \"\",\n \"waveIDs\": \"\"\n },\n \"maxResults\": 0,\n \"nextToken\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/ListWaves")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"filters\": {\n \"isArchived\": \"\",\n \"waveIDs\": \"\"\n },\n \"maxResults\": 0,\n \"nextToken\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/ListWaves') do |req|
req.body = "{\n \"filters\": {\n \"isArchived\": \"\",\n \"waveIDs\": \"\"\n },\n \"maxResults\": 0,\n \"nextToken\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/ListWaves";
let payload = json!({
"filters": json!({
"isArchived": "",
"waveIDs": ""
}),
"maxResults": 0,
"nextToken": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/ListWaves \
--header 'content-type: application/json' \
--data '{
"filters": {
"isArchived": "",
"waveIDs": ""
},
"maxResults": 0,
"nextToken": ""
}'
echo '{
"filters": {
"isArchived": "",
"waveIDs": ""
},
"maxResults": 0,
"nextToken": ""
}' | \
http POST {{baseUrl}}/ListWaves \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "filters": {\n "isArchived": "",\n "waveIDs": ""\n },\n "maxResults": 0,\n "nextToken": ""\n}' \
--output-document \
- {{baseUrl}}/ListWaves
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"filters": [
"isArchived": "",
"waveIDs": ""
],
"maxResults": 0,
"nextToken": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/ListWaves")! 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
MarkAsArchived
{{baseUrl}}/MarkAsArchived
BODY json
{
"sourceServerID": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/MarkAsArchived");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"sourceServerID\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/MarkAsArchived" {:content-type :json
:form-params {:sourceServerID ""}})
require "http/client"
url = "{{baseUrl}}/MarkAsArchived"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"sourceServerID\": \"\"\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}}/MarkAsArchived"),
Content = new StringContent("{\n \"sourceServerID\": \"\"\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}}/MarkAsArchived");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"sourceServerID\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/MarkAsArchived"
payload := strings.NewReader("{\n \"sourceServerID\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/MarkAsArchived HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 26
{
"sourceServerID": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/MarkAsArchived")
.setHeader("content-type", "application/json")
.setBody("{\n \"sourceServerID\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/MarkAsArchived"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"sourceServerID\": \"\"\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 \"sourceServerID\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/MarkAsArchived")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/MarkAsArchived")
.header("content-type", "application/json")
.body("{\n \"sourceServerID\": \"\"\n}")
.asString();
const data = JSON.stringify({
sourceServerID: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/MarkAsArchived');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/MarkAsArchived',
headers: {'content-type': 'application/json'},
data: {sourceServerID: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/MarkAsArchived';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"sourceServerID":""}'
};
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}}/MarkAsArchived',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "sourceServerID": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"sourceServerID\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/MarkAsArchived")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/MarkAsArchived',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({sourceServerID: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/MarkAsArchived',
headers: {'content-type': 'application/json'},
body: {sourceServerID: ''},
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}}/MarkAsArchived');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
sourceServerID: ''
});
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}}/MarkAsArchived',
headers: {'content-type': 'application/json'},
data: {sourceServerID: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/MarkAsArchived';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"sourceServerID":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"sourceServerID": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/MarkAsArchived"]
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}}/MarkAsArchived" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"sourceServerID\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/MarkAsArchived",
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([
'sourceServerID' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/MarkAsArchived', [
'body' => '{
"sourceServerID": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/MarkAsArchived');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'sourceServerID' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'sourceServerID' => ''
]));
$request->setRequestUrl('{{baseUrl}}/MarkAsArchived');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/MarkAsArchived' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"sourceServerID": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/MarkAsArchived' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"sourceServerID": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"sourceServerID\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/MarkAsArchived", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/MarkAsArchived"
payload = { "sourceServerID": "" }
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/MarkAsArchived"
payload <- "{\n \"sourceServerID\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/MarkAsArchived")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"sourceServerID\": \"\"\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/MarkAsArchived') do |req|
req.body = "{\n \"sourceServerID\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/MarkAsArchived";
let payload = json!({"sourceServerID": ""});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/MarkAsArchived \
--header 'content-type: application/json' \
--data '{
"sourceServerID": ""
}'
echo '{
"sourceServerID": ""
}' | \
http POST {{baseUrl}}/MarkAsArchived \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "sourceServerID": ""\n}' \
--output-document \
- {{baseUrl}}/MarkAsArchived
import Foundation
let headers = ["content-type": "application/json"]
let parameters = ["sourceServerID": ""] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/MarkAsArchived")! 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
PutSourceServerAction
{{baseUrl}}/PutSourceServerAction
BODY json
{
"actionID": "",
"actionName": "",
"active": false,
"category": "",
"description": "",
"documentIdentifier": "",
"documentVersion": "",
"externalParameters": {},
"mustSucceedForCutover": false,
"order": 0,
"parameters": {},
"sourceServerID": "",
"timeoutSeconds": 0
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/PutSourceServerAction");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"actionID\": \"\",\n \"actionName\": \"\",\n \"active\": false,\n \"category\": \"\",\n \"description\": \"\",\n \"documentIdentifier\": \"\",\n \"documentVersion\": \"\",\n \"externalParameters\": {},\n \"mustSucceedForCutover\": false,\n \"order\": 0,\n \"parameters\": {},\n \"sourceServerID\": \"\",\n \"timeoutSeconds\": 0\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/PutSourceServerAction" {:content-type :json
:form-params {:actionID ""
:actionName ""
:active false
:category ""
:description ""
:documentIdentifier ""
:documentVersion ""
:externalParameters {}
:mustSucceedForCutover false
:order 0
:parameters {}
:sourceServerID ""
:timeoutSeconds 0}})
require "http/client"
url = "{{baseUrl}}/PutSourceServerAction"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"actionID\": \"\",\n \"actionName\": \"\",\n \"active\": false,\n \"category\": \"\",\n \"description\": \"\",\n \"documentIdentifier\": \"\",\n \"documentVersion\": \"\",\n \"externalParameters\": {},\n \"mustSucceedForCutover\": false,\n \"order\": 0,\n \"parameters\": {},\n \"sourceServerID\": \"\",\n \"timeoutSeconds\": 0\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}}/PutSourceServerAction"),
Content = new StringContent("{\n \"actionID\": \"\",\n \"actionName\": \"\",\n \"active\": false,\n \"category\": \"\",\n \"description\": \"\",\n \"documentIdentifier\": \"\",\n \"documentVersion\": \"\",\n \"externalParameters\": {},\n \"mustSucceedForCutover\": false,\n \"order\": 0,\n \"parameters\": {},\n \"sourceServerID\": \"\",\n \"timeoutSeconds\": 0\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}}/PutSourceServerAction");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"actionID\": \"\",\n \"actionName\": \"\",\n \"active\": false,\n \"category\": \"\",\n \"description\": \"\",\n \"documentIdentifier\": \"\",\n \"documentVersion\": \"\",\n \"externalParameters\": {},\n \"mustSucceedForCutover\": false,\n \"order\": 0,\n \"parameters\": {},\n \"sourceServerID\": \"\",\n \"timeoutSeconds\": 0\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/PutSourceServerAction"
payload := strings.NewReader("{\n \"actionID\": \"\",\n \"actionName\": \"\",\n \"active\": false,\n \"category\": \"\",\n \"description\": \"\",\n \"documentIdentifier\": \"\",\n \"documentVersion\": \"\",\n \"externalParameters\": {},\n \"mustSucceedForCutover\": false,\n \"order\": 0,\n \"parameters\": {},\n \"sourceServerID\": \"\",\n \"timeoutSeconds\": 0\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/PutSourceServerAction HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 294
{
"actionID": "",
"actionName": "",
"active": false,
"category": "",
"description": "",
"documentIdentifier": "",
"documentVersion": "",
"externalParameters": {},
"mustSucceedForCutover": false,
"order": 0,
"parameters": {},
"sourceServerID": "",
"timeoutSeconds": 0
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/PutSourceServerAction")
.setHeader("content-type", "application/json")
.setBody("{\n \"actionID\": \"\",\n \"actionName\": \"\",\n \"active\": false,\n \"category\": \"\",\n \"description\": \"\",\n \"documentIdentifier\": \"\",\n \"documentVersion\": \"\",\n \"externalParameters\": {},\n \"mustSucceedForCutover\": false,\n \"order\": 0,\n \"parameters\": {},\n \"sourceServerID\": \"\",\n \"timeoutSeconds\": 0\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/PutSourceServerAction"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"actionID\": \"\",\n \"actionName\": \"\",\n \"active\": false,\n \"category\": \"\",\n \"description\": \"\",\n \"documentIdentifier\": \"\",\n \"documentVersion\": \"\",\n \"externalParameters\": {},\n \"mustSucceedForCutover\": false,\n \"order\": 0,\n \"parameters\": {},\n \"sourceServerID\": \"\",\n \"timeoutSeconds\": 0\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 \"actionID\": \"\",\n \"actionName\": \"\",\n \"active\": false,\n \"category\": \"\",\n \"description\": \"\",\n \"documentIdentifier\": \"\",\n \"documentVersion\": \"\",\n \"externalParameters\": {},\n \"mustSucceedForCutover\": false,\n \"order\": 0,\n \"parameters\": {},\n \"sourceServerID\": \"\",\n \"timeoutSeconds\": 0\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/PutSourceServerAction")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/PutSourceServerAction")
.header("content-type", "application/json")
.body("{\n \"actionID\": \"\",\n \"actionName\": \"\",\n \"active\": false,\n \"category\": \"\",\n \"description\": \"\",\n \"documentIdentifier\": \"\",\n \"documentVersion\": \"\",\n \"externalParameters\": {},\n \"mustSucceedForCutover\": false,\n \"order\": 0,\n \"parameters\": {},\n \"sourceServerID\": \"\",\n \"timeoutSeconds\": 0\n}")
.asString();
const data = JSON.stringify({
actionID: '',
actionName: '',
active: false,
category: '',
description: '',
documentIdentifier: '',
documentVersion: '',
externalParameters: {},
mustSucceedForCutover: false,
order: 0,
parameters: {},
sourceServerID: '',
timeoutSeconds: 0
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/PutSourceServerAction');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/PutSourceServerAction',
headers: {'content-type': 'application/json'},
data: {
actionID: '',
actionName: '',
active: false,
category: '',
description: '',
documentIdentifier: '',
documentVersion: '',
externalParameters: {},
mustSucceedForCutover: false,
order: 0,
parameters: {},
sourceServerID: '',
timeoutSeconds: 0
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/PutSourceServerAction';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"actionID":"","actionName":"","active":false,"category":"","description":"","documentIdentifier":"","documentVersion":"","externalParameters":{},"mustSucceedForCutover":false,"order":0,"parameters":{},"sourceServerID":"","timeoutSeconds":0}'
};
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}}/PutSourceServerAction',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "actionID": "",\n "actionName": "",\n "active": false,\n "category": "",\n "description": "",\n "documentIdentifier": "",\n "documentVersion": "",\n "externalParameters": {},\n "mustSucceedForCutover": false,\n "order": 0,\n "parameters": {},\n "sourceServerID": "",\n "timeoutSeconds": 0\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"actionID\": \"\",\n \"actionName\": \"\",\n \"active\": false,\n \"category\": \"\",\n \"description\": \"\",\n \"documentIdentifier\": \"\",\n \"documentVersion\": \"\",\n \"externalParameters\": {},\n \"mustSucceedForCutover\": false,\n \"order\": 0,\n \"parameters\": {},\n \"sourceServerID\": \"\",\n \"timeoutSeconds\": 0\n}")
val request = Request.Builder()
.url("{{baseUrl}}/PutSourceServerAction")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/PutSourceServerAction',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
actionID: '',
actionName: '',
active: false,
category: '',
description: '',
documentIdentifier: '',
documentVersion: '',
externalParameters: {},
mustSucceedForCutover: false,
order: 0,
parameters: {},
sourceServerID: '',
timeoutSeconds: 0
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/PutSourceServerAction',
headers: {'content-type': 'application/json'},
body: {
actionID: '',
actionName: '',
active: false,
category: '',
description: '',
documentIdentifier: '',
documentVersion: '',
externalParameters: {},
mustSucceedForCutover: false,
order: 0,
parameters: {},
sourceServerID: '',
timeoutSeconds: 0
},
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}}/PutSourceServerAction');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
actionID: '',
actionName: '',
active: false,
category: '',
description: '',
documentIdentifier: '',
documentVersion: '',
externalParameters: {},
mustSucceedForCutover: false,
order: 0,
parameters: {},
sourceServerID: '',
timeoutSeconds: 0
});
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}}/PutSourceServerAction',
headers: {'content-type': 'application/json'},
data: {
actionID: '',
actionName: '',
active: false,
category: '',
description: '',
documentIdentifier: '',
documentVersion: '',
externalParameters: {},
mustSucceedForCutover: false,
order: 0,
parameters: {},
sourceServerID: '',
timeoutSeconds: 0
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/PutSourceServerAction';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"actionID":"","actionName":"","active":false,"category":"","description":"","documentIdentifier":"","documentVersion":"","externalParameters":{},"mustSucceedForCutover":false,"order":0,"parameters":{},"sourceServerID":"","timeoutSeconds":0}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"actionID": @"",
@"actionName": @"",
@"active": @NO,
@"category": @"",
@"description": @"",
@"documentIdentifier": @"",
@"documentVersion": @"",
@"externalParameters": @{ },
@"mustSucceedForCutover": @NO,
@"order": @0,
@"parameters": @{ },
@"sourceServerID": @"",
@"timeoutSeconds": @0 };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/PutSourceServerAction"]
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}}/PutSourceServerAction" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"actionID\": \"\",\n \"actionName\": \"\",\n \"active\": false,\n \"category\": \"\",\n \"description\": \"\",\n \"documentIdentifier\": \"\",\n \"documentVersion\": \"\",\n \"externalParameters\": {},\n \"mustSucceedForCutover\": false,\n \"order\": 0,\n \"parameters\": {},\n \"sourceServerID\": \"\",\n \"timeoutSeconds\": 0\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/PutSourceServerAction",
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([
'actionID' => '',
'actionName' => '',
'active' => null,
'category' => '',
'description' => '',
'documentIdentifier' => '',
'documentVersion' => '',
'externalParameters' => [
],
'mustSucceedForCutover' => null,
'order' => 0,
'parameters' => [
],
'sourceServerID' => '',
'timeoutSeconds' => 0
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/PutSourceServerAction', [
'body' => '{
"actionID": "",
"actionName": "",
"active": false,
"category": "",
"description": "",
"documentIdentifier": "",
"documentVersion": "",
"externalParameters": {},
"mustSucceedForCutover": false,
"order": 0,
"parameters": {},
"sourceServerID": "",
"timeoutSeconds": 0
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/PutSourceServerAction');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'actionID' => '',
'actionName' => '',
'active' => null,
'category' => '',
'description' => '',
'documentIdentifier' => '',
'documentVersion' => '',
'externalParameters' => [
],
'mustSucceedForCutover' => null,
'order' => 0,
'parameters' => [
],
'sourceServerID' => '',
'timeoutSeconds' => 0
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'actionID' => '',
'actionName' => '',
'active' => null,
'category' => '',
'description' => '',
'documentIdentifier' => '',
'documentVersion' => '',
'externalParameters' => [
],
'mustSucceedForCutover' => null,
'order' => 0,
'parameters' => [
],
'sourceServerID' => '',
'timeoutSeconds' => 0
]));
$request->setRequestUrl('{{baseUrl}}/PutSourceServerAction');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/PutSourceServerAction' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"actionID": "",
"actionName": "",
"active": false,
"category": "",
"description": "",
"documentIdentifier": "",
"documentVersion": "",
"externalParameters": {},
"mustSucceedForCutover": false,
"order": 0,
"parameters": {},
"sourceServerID": "",
"timeoutSeconds": 0
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/PutSourceServerAction' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"actionID": "",
"actionName": "",
"active": false,
"category": "",
"description": "",
"documentIdentifier": "",
"documentVersion": "",
"externalParameters": {},
"mustSucceedForCutover": false,
"order": 0,
"parameters": {},
"sourceServerID": "",
"timeoutSeconds": 0
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"actionID\": \"\",\n \"actionName\": \"\",\n \"active\": false,\n \"category\": \"\",\n \"description\": \"\",\n \"documentIdentifier\": \"\",\n \"documentVersion\": \"\",\n \"externalParameters\": {},\n \"mustSucceedForCutover\": false,\n \"order\": 0,\n \"parameters\": {},\n \"sourceServerID\": \"\",\n \"timeoutSeconds\": 0\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/PutSourceServerAction", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/PutSourceServerAction"
payload = {
"actionID": "",
"actionName": "",
"active": False,
"category": "",
"description": "",
"documentIdentifier": "",
"documentVersion": "",
"externalParameters": {},
"mustSucceedForCutover": False,
"order": 0,
"parameters": {},
"sourceServerID": "",
"timeoutSeconds": 0
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/PutSourceServerAction"
payload <- "{\n \"actionID\": \"\",\n \"actionName\": \"\",\n \"active\": false,\n \"category\": \"\",\n \"description\": \"\",\n \"documentIdentifier\": \"\",\n \"documentVersion\": \"\",\n \"externalParameters\": {},\n \"mustSucceedForCutover\": false,\n \"order\": 0,\n \"parameters\": {},\n \"sourceServerID\": \"\",\n \"timeoutSeconds\": 0\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/PutSourceServerAction")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"actionID\": \"\",\n \"actionName\": \"\",\n \"active\": false,\n \"category\": \"\",\n \"description\": \"\",\n \"documentIdentifier\": \"\",\n \"documentVersion\": \"\",\n \"externalParameters\": {},\n \"mustSucceedForCutover\": false,\n \"order\": 0,\n \"parameters\": {},\n \"sourceServerID\": \"\",\n \"timeoutSeconds\": 0\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/PutSourceServerAction') do |req|
req.body = "{\n \"actionID\": \"\",\n \"actionName\": \"\",\n \"active\": false,\n \"category\": \"\",\n \"description\": \"\",\n \"documentIdentifier\": \"\",\n \"documentVersion\": \"\",\n \"externalParameters\": {},\n \"mustSucceedForCutover\": false,\n \"order\": 0,\n \"parameters\": {},\n \"sourceServerID\": \"\",\n \"timeoutSeconds\": 0\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/PutSourceServerAction";
let payload = json!({
"actionID": "",
"actionName": "",
"active": false,
"category": "",
"description": "",
"documentIdentifier": "",
"documentVersion": "",
"externalParameters": json!({}),
"mustSucceedForCutover": false,
"order": 0,
"parameters": json!({}),
"sourceServerID": "",
"timeoutSeconds": 0
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/PutSourceServerAction \
--header 'content-type: application/json' \
--data '{
"actionID": "",
"actionName": "",
"active": false,
"category": "",
"description": "",
"documentIdentifier": "",
"documentVersion": "",
"externalParameters": {},
"mustSucceedForCutover": false,
"order": 0,
"parameters": {},
"sourceServerID": "",
"timeoutSeconds": 0
}'
echo '{
"actionID": "",
"actionName": "",
"active": false,
"category": "",
"description": "",
"documentIdentifier": "",
"documentVersion": "",
"externalParameters": {},
"mustSucceedForCutover": false,
"order": 0,
"parameters": {},
"sourceServerID": "",
"timeoutSeconds": 0
}' | \
http POST {{baseUrl}}/PutSourceServerAction \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "actionID": "",\n "actionName": "",\n "active": false,\n "category": "",\n "description": "",\n "documentIdentifier": "",\n "documentVersion": "",\n "externalParameters": {},\n "mustSucceedForCutover": false,\n "order": 0,\n "parameters": {},\n "sourceServerID": "",\n "timeoutSeconds": 0\n}' \
--output-document \
- {{baseUrl}}/PutSourceServerAction
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"actionID": "",
"actionName": "",
"active": false,
"category": "",
"description": "",
"documentIdentifier": "",
"documentVersion": "",
"externalParameters": [],
"mustSucceedForCutover": false,
"order": 0,
"parameters": [],
"sourceServerID": "",
"timeoutSeconds": 0
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/PutSourceServerAction")! 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
PutTemplateAction
{{baseUrl}}/PutTemplateAction
BODY json
{
"actionID": "",
"actionName": "",
"active": false,
"category": "",
"description": "",
"documentIdentifier": "",
"documentVersion": "",
"externalParameters": {},
"launchConfigurationTemplateID": "",
"mustSucceedForCutover": false,
"operatingSystem": "",
"order": 0,
"parameters": {},
"timeoutSeconds": 0
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/PutTemplateAction");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"actionID\": \"\",\n \"actionName\": \"\",\n \"active\": false,\n \"category\": \"\",\n \"description\": \"\",\n \"documentIdentifier\": \"\",\n \"documentVersion\": \"\",\n \"externalParameters\": {},\n \"launchConfigurationTemplateID\": \"\",\n \"mustSucceedForCutover\": false,\n \"operatingSystem\": \"\",\n \"order\": 0,\n \"parameters\": {},\n \"timeoutSeconds\": 0\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/PutTemplateAction" {:content-type :json
:form-params {:actionID ""
:actionName ""
:active false
:category ""
:description ""
:documentIdentifier ""
:documentVersion ""
:externalParameters {}
:launchConfigurationTemplateID ""
:mustSucceedForCutover false
:operatingSystem ""
:order 0
:parameters {}
:timeoutSeconds 0}})
require "http/client"
url = "{{baseUrl}}/PutTemplateAction"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"actionID\": \"\",\n \"actionName\": \"\",\n \"active\": false,\n \"category\": \"\",\n \"description\": \"\",\n \"documentIdentifier\": \"\",\n \"documentVersion\": \"\",\n \"externalParameters\": {},\n \"launchConfigurationTemplateID\": \"\",\n \"mustSucceedForCutover\": false,\n \"operatingSystem\": \"\",\n \"order\": 0,\n \"parameters\": {},\n \"timeoutSeconds\": 0\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}}/PutTemplateAction"),
Content = new StringContent("{\n \"actionID\": \"\",\n \"actionName\": \"\",\n \"active\": false,\n \"category\": \"\",\n \"description\": \"\",\n \"documentIdentifier\": \"\",\n \"documentVersion\": \"\",\n \"externalParameters\": {},\n \"launchConfigurationTemplateID\": \"\",\n \"mustSucceedForCutover\": false,\n \"operatingSystem\": \"\",\n \"order\": 0,\n \"parameters\": {},\n \"timeoutSeconds\": 0\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}}/PutTemplateAction");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"actionID\": \"\",\n \"actionName\": \"\",\n \"active\": false,\n \"category\": \"\",\n \"description\": \"\",\n \"documentIdentifier\": \"\",\n \"documentVersion\": \"\",\n \"externalParameters\": {},\n \"launchConfigurationTemplateID\": \"\",\n \"mustSucceedForCutover\": false,\n \"operatingSystem\": \"\",\n \"order\": 0,\n \"parameters\": {},\n \"timeoutSeconds\": 0\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/PutTemplateAction"
payload := strings.NewReader("{\n \"actionID\": \"\",\n \"actionName\": \"\",\n \"active\": false,\n \"category\": \"\",\n \"description\": \"\",\n \"documentIdentifier\": \"\",\n \"documentVersion\": \"\",\n \"externalParameters\": {},\n \"launchConfigurationTemplateID\": \"\",\n \"mustSucceedForCutover\": false,\n \"operatingSystem\": \"\",\n \"order\": 0,\n \"parameters\": {},\n \"timeoutSeconds\": 0\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/PutTemplateAction HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 334
{
"actionID": "",
"actionName": "",
"active": false,
"category": "",
"description": "",
"documentIdentifier": "",
"documentVersion": "",
"externalParameters": {},
"launchConfigurationTemplateID": "",
"mustSucceedForCutover": false,
"operatingSystem": "",
"order": 0,
"parameters": {},
"timeoutSeconds": 0
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/PutTemplateAction")
.setHeader("content-type", "application/json")
.setBody("{\n \"actionID\": \"\",\n \"actionName\": \"\",\n \"active\": false,\n \"category\": \"\",\n \"description\": \"\",\n \"documentIdentifier\": \"\",\n \"documentVersion\": \"\",\n \"externalParameters\": {},\n \"launchConfigurationTemplateID\": \"\",\n \"mustSucceedForCutover\": false,\n \"operatingSystem\": \"\",\n \"order\": 0,\n \"parameters\": {},\n \"timeoutSeconds\": 0\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/PutTemplateAction"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"actionID\": \"\",\n \"actionName\": \"\",\n \"active\": false,\n \"category\": \"\",\n \"description\": \"\",\n \"documentIdentifier\": \"\",\n \"documentVersion\": \"\",\n \"externalParameters\": {},\n \"launchConfigurationTemplateID\": \"\",\n \"mustSucceedForCutover\": false,\n \"operatingSystem\": \"\",\n \"order\": 0,\n \"parameters\": {},\n \"timeoutSeconds\": 0\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 \"actionID\": \"\",\n \"actionName\": \"\",\n \"active\": false,\n \"category\": \"\",\n \"description\": \"\",\n \"documentIdentifier\": \"\",\n \"documentVersion\": \"\",\n \"externalParameters\": {},\n \"launchConfigurationTemplateID\": \"\",\n \"mustSucceedForCutover\": false,\n \"operatingSystem\": \"\",\n \"order\": 0,\n \"parameters\": {},\n \"timeoutSeconds\": 0\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/PutTemplateAction")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/PutTemplateAction")
.header("content-type", "application/json")
.body("{\n \"actionID\": \"\",\n \"actionName\": \"\",\n \"active\": false,\n \"category\": \"\",\n \"description\": \"\",\n \"documentIdentifier\": \"\",\n \"documentVersion\": \"\",\n \"externalParameters\": {},\n \"launchConfigurationTemplateID\": \"\",\n \"mustSucceedForCutover\": false,\n \"operatingSystem\": \"\",\n \"order\": 0,\n \"parameters\": {},\n \"timeoutSeconds\": 0\n}")
.asString();
const data = JSON.stringify({
actionID: '',
actionName: '',
active: false,
category: '',
description: '',
documentIdentifier: '',
documentVersion: '',
externalParameters: {},
launchConfigurationTemplateID: '',
mustSucceedForCutover: false,
operatingSystem: '',
order: 0,
parameters: {},
timeoutSeconds: 0
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/PutTemplateAction');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/PutTemplateAction',
headers: {'content-type': 'application/json'},
data: {
actionID: '',
actionName: '',
active: false,
category: '',
description: '',
documentIdentifier: '',
documentVersion: '',
externalParameters: {},
launchConfigurationTemplateID: '',
mustSucceedForCutover: false,
operatingSystem: '',
order: 0,
parameters: {},
timeoutSeconds: 0
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/PutTemplateAction';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"actionID":"","actionName":"","active":false,"category":"","description":"","documentIdentifier":"","documentVersion":"","externalParameters":{},"launchConfigurationTemplateID":"","mustSucceedForCutover":false,"operatingSystem":"","order":0,"parameters":{},"timeoutSeconds":0}'
};
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}}/PutTemplateAction',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "actionID": "",\n "actionName": "",\n "active": false,\n "category": "",\n "description": "",\n "documentIdentifier": "",\n "documentVersion": "",\n "externalParameters": {},\n "launchConfigurationTemplateID": "",\n "mustSucceedForCutover": false,\n "operatingSystem": "",\n "order": 0,\n "parameters": {},\n "timeoutSeconds": 0\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"actionID\": \"\",\n \"actionName\": \"\",\n \"active\": false,\n \"category\": \"\",\n \"description\": \"\",\n \"documentIdentifier\": \"\",\n \"documentVersion\": \"\",\n \"externalParameters\": {},\n \"launchConfigurationTemplateID\": \"\",\n \"mustSucceedForCutover\": false,\n \"operatingSystem\": \"\",\n \"order\": 0,\n \"parameters\": {},\n \"timeoutSeconds\": 0\n}")
val request = Request.Builder()
.url("{{baseUrl}}/PutTemplateAction")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/PutTemplateAction',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
actionID: '',
actionName: '',
active: false,
category: '',
description: '',
documentIdentifier: '',
documentVersion: '',
externalParameters: {},
launchConfigurationTemplateID: '',
mustSucceedForCutover: false,
operatingSystem: '',
order: 0,
parameters: {},
timeoutSeconds: 0
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/PutTemplateAction',
headers: {'content-type': 'application/json'},
body: {
actionID: '',
actionName: '',
active: false,
category: '',
description: '',
documentIdentifier: '',
documentVersion: '',
externalParameters: {},
launchConfigurationTemplateID: '',
mustSucceedForCutover: false,
operatingSystem: '',
order: 0,
parameters: {},
timeoutSeconds: 0
},
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}}/PutTemplateAction');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
actionID: '',
actionName: '',
active: false,
category: '',
description: '',
documentIdentifier: '',
documentVersion: '',
externalParameters: {},
launchConfigurationTemplateID: '',
mustSucceedForCutover: false,
operatingSystem: '',
order: 0,
parameters: {},
timeoutSeconds: 0
});
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}}/PutTemplateAction',
headers: {'content-type': 'application/json'},
data: {
actionID: '',
actionName: '',
active: false,
category: '',
description: '',
documentIdentifier: '',
documentVersion: '',
externalParameters: {},
launchConfigurationTemplateID: '',
mustSucceedForCutover: false,
operatingSystem: '',
order: 0,
parameters: {},
timeoutSeconds: 0
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/PutTemplateAction';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"actionID":"","actionName":"","active":false,"category":"","description":"","documentIdentifier":"","documentVersion":"","externalParameters":{},"launchConfigurationTemplateID":"","mustSucceedForCutover":false,"operatingSystem":"","order":0,"parameters":{},"timeoutSeconds":0}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"actionID": @"",
@"actionName": @"",
@"active": @NO,
@"category": @"",
@"description": @"",
@"documentIdentifier": @"",
@"documentVersion": @"",
@"externalParameters": @{ },
@"launchConfigurationTemplateID": @"",
@"mustSucceedForCutover": @NO,
@"operatingSystem": @"",
@"order": @0,
@"parameters": @{ },
@"timeoutSeconds": @0 };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/PutTemplateAction"]
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}}/PutTemplateAction" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"actionID\": \"\",\n \"actionName\": \"\",\n \"active\": false,\n \"category\": \"\",\n \"description\": \"\",\n \"documentIdentifier\": \"\",\n \"documentVersion\": \"\",\n \"externalParameters\": {},\n \"launchConfigurationTemplateID\": \"\",\n \"mustSucceedForCutover\": false,\n \"operatingSystem\": \"\",\n \"order\": 0,\n \"parameters\": {},\n \"timeoutSeconds\": 0\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/PutTemplateAction",
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([
'actionID' => '',
'actionName' => '',
'active' => null,
'category' => '',
'description' => '',
'documentIdentifier' => '',
'documentVersion' => '',
'externalParameters' => [
],
'launchConfigurationTemplateID' => '',
'mustSucceedForCutover' => null,
'operatingSystem' => '',
'order' => 0,
'parameters' => [
],
'timeoutSeconds' => 0
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/PutTemplateAction', [
'body' => '{
"actionID": "",
"actionName": "",
"active": false,
"category": "",
"description": "",
"documentIdentifier": "",
"documentVersion": "",
"externalParameters": {},
"launchConfigurationTemplateID": "",
"mustSucceedForCutover": false,
"operatingSystem": "",
"order": 0,
"parameters": {},
"timeoutSeconds": 0
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/PutTemplateAction');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'actionID' => '',
'actionName' => '',
'active' => null,
'category' => '',
'description' => '',
'documentIdentifier' => '',
'documentVersion' => '',
'externalParameters' => [
],
'launchConfigurationTemplateID' => '',
'mustSucceedForCutover' => null,
'operatingSystem' => '',
'order' => 0,
'parameters' => [
],
'timeoutSeconds' => 0
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'actionID' => '',
'actionName' => '',
'active' => null,
'category' => '',
'description' => '',
'documentIdentifier' => '',
'documentVersion' => '',
'externalParameters' => [
],
'launchConfigurationTemplateID' => '',
'mustSucceedForCutover' => null,
'operatingSystem' => '',
'order' => 0,
'parameters' => [
],
'timeoutSeconds' => 0
]));
$request->setRequestUrl('{{baseUrl}}/PutTemplateAction');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/PutTemplateAction' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"actionID": "",
"actionName": "",
"active": false,
"category": "",
"description": "",
"documentIdentifier": "",
"documentVersion": "",
"externalParameters": {},
"launchConfigurationTemplateID": "",
"mustSucceedForCutover": false,
"operatingSystem": "",
"order": 0,
"parameters": {},
"timeoutSeconds": 0
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/PutTemplateAction' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"actionID": "",
"actionName": "",
"active": false,
"category": "",
"description": "",
"documentIdentifier": "",
"documentVersion": "",
"externalParameters": {},
"launchConfigurationTemplateID": "",
"mustSucceedForCutover": false,
"operatingSystem": "",
"order": 0,
"parameters": {},
"timeoutSeconds": 0
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"actionID\": \"\",\n \"actionName\": \"\",\n \"active\": false,\n \"category\": \"\",\n \"description\": \"\",\n \"documentIdentifier\": \"\",\n \"documentVersion\": \"\",\n \"externalParameters\": {},\n \"launchConfigurationTemplateID\": \"\",\n \"mustSucceedForCutover\": false,\n \"operatingSystem\": \"\",\n \"order\": 0,\n \"parameters\": {},\n \"timeoutSeconds\": 0\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/PutTemplateAction", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/PutTemplateAction"
payload = {
"actionID": "",
"actionName": "",
"active": False,
"category": "",
"description": "",
"documentIdentifier": "",
"documentVersion": "",
"externalParameters": {},
"launchConfigurationTemplateID": "",
"mustSucceedForCutover": False,
"operatingSystem": "",
"order": 0,
"parameters": {},
"timeoutSeconds": 0
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/PutTemplateAction"
payload <- "{\n \"actionID\": \"\",\n \"actionName\": \"\",\n \"active\": false,\n \"category\": \"\",\n \"description\": \"\",\n \"documentIdentifier\": \"\",\n \"documentVersion\": \"\",\n \"externalParameters\": {},\n \"launchConfigurationTemplateID\": \"\",\n \"mustSucceedForCutover\": false,\n \"operatingSystem\": \"\",\n \"order\": 0,\n \"parameters\": {},\n \"timeoutSeconds\": 0\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/PutTemplateAction")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"actionID\": \"\",\n \"actionName\": \"\",\n \"active\": false,\n \"category\": \"\",\n \"description\": \"\",\n \"documentIdentifier\": \"\",\n \"documentVersion\": \"\",\n \"externalParameters\": {},\n \"launchConfigurationTemplateID\": \"\",\n \"mustSucceedForCutover\": false,\n \"operatingSystem\": \"\",\n \"order\": 0,\n \"parameters\": {},\n \"timeoutSeconds\": 0\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/PutTemplateAction') do |req|
req.body = "{\n \"actionID\": \"\",\n \"actionName\": \"\",\n \"active\": false,\n \"category\": \"\",\n \"description\": \"\",\n \"documentIdentifier\": \"\",\n \"documentVersion\": \"\",\n \"externalParameters\": {},\n \"launchConfigurationTemplateID\": \"\",\n \"mustSucceedForCutover\": false,\n \"operatingSystem\": \"\",\n \"order\": 0,\n \"parameters\": {},\n \"timeoutSeconds\": 0\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/PutTemplateAction";
let payload = json!({
"actionID": "",
"actionName": "",
"active": false,
"category": "",
"description": "",
"documentIdentifier": "",
"documentVersion": "",
"externalParameters": json!({}),
"launchConfigurationTemplateID": "",
"mustSucceedForCutover": false,
"operatingSystem": "",
"order": 0,
"parameters": json!({}),
"timeoutSeconds": 0
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/PutTemplateAction \
--header 'content-type: application/json' \
--data '{
"actionID": "",
"actionName": "",
"active": false,
"category": "",
"description": "",
"documentIdentifier": "",
"documentVersion": "",
"externalParameters": {},
"launchConfigurationTemplateID": "",
"mustSucceedForCutover": false,
"operatingSystem": "",
"order": 0,
"parameters": {},
"timeoutSeconds": 0
}'
echo '{
"actionID": "",
"actionName": "",
"active": false,
"category": "",
"description": "",
"documentIdentifier": "",
"documentVersion": "",
"externalParameters": {},
"launchConfigurationTemplateID": "",
"mustSucceedForCutover": false,
"operatingSystem": "",
"order": 0,
"parameters": {},
"timeoutSeconds": 0
}' | \
http POST {{baseUrl}}/PutTemplateAction \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "actionID": "",\n "actionName": "",\n "active": false,\n "category": "",\n "description": "",\n "documentIdentifier": "",\n "documentVersion": "",\n "externalParameters": {},\n "launchConfigurationTemplateID": "",\n "mustSucceedForCutover": false,\n "operatingSystem": "",\n "order": 0,\n "parameters": {},\n "timeoutSeconds": 0\n}' \
--output-document \
- {{baseUrl}}/PutTemplateAction
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"actionID": "",
"actionName": "",
"active": false,
"category": "",
"description": "",
"documentIdentifier": "",
"documentVersion": "",
"externalParameters": [],
"launchConfigurationTemplateID": "",
"mustSucceedForCutover": false,
"operatingSystem": "",
"order": 0,
"parameters": [],
"timeoutSeconds": 0
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/PutTemplateAction")! 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
RemoveSourceServerAction
{{baseUrl}}/RemoveSourceServerAction
BODY json
{
"actionID": "",
"sourceServerID": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/RemoveSourceServerAction");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"actionID\": \"\",\n \"sourceServerID\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/RemoveSourceServerAction" {:content-type :json
:form-params {:actionID ""
:sourceServerID ""}})
require "http/client"
url = "{{baseUrl}}/RemoveSourceServerAction"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"actionID\": \"\",\n \"sourceServerID\": \"\"\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}}/RemoveSourceServerAction"),
Content = new StringContent("{\n \"actionID\": \"\",\n \"sourceServerID\": \"\"\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}}/RemoveSourceServerAction");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"actionID\": \"\",\n \"sourceServerID\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/RemoveSourceServerAction"
payload := strings.NewReader("{\n \"actionID\": \"\",\n \"sourceServerID\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/RemoveSourceServerAction HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 44
{
"actionID": "",
"sourceServerID": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/RemoveSourceServerAction")
.setHeader("content-type", "application/json")
.setBody("{\n \"actionID\": \"\",\n \"sourceServerID\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/RemoveSourceServerAction"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"actionID\": \"\",\n \"sourceServerID\": \"\"\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 \"actionID\": \"\",\n \"sourceServerID\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/RemoveSourceServerAction")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/RemoveSourceServerAction")
.header("content-type", "application/json")
.body("{\n \"actionID\": \"\",\n \"sourceServerID\": \"\"\n}")
.asString();
const data = JSON.stringify({
actionID: '',
sourceServerID: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/RemoveSourceServerAction');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/RemoveSourceServerAction',
headers: {'content-type': 'application/json'},
data: {actionID: '', sourceServerID: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/RemoveSourceServerAction';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"actionID":"","sourceServerID":""}'
};
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}}/RemoveSourceServerAction',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "actionID": "",\n "sourceServerID": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"actionID\": \"\",\n \"sourceServerID\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/RemoveSourceServerAction")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/RemoveSourceServerAction',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({actionID: '', sourceServerID: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/RemoveSourceServerAction',
headers: {'content-type': 'application/json'},
body: {actionID: '', sourceServerID: ''},
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}}/RemoveSourceServerAction');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
actionID: '',
sourceServerID: ''
});
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}}/RemoveSourceServerAction',
headers: {'content-type': 'application/json'},
data: {actionID: '', sourceServerID: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/RemoveSourceServerAction';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"actionID":"","sourceServerID":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"actionID": @"",
@"sourceServerID": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/RemoveSourceServerAction"]
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}}/RemoveSourceServerAction" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"actionID\": \"\",\n \"sourceServerID\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/RemoveSourceServerAction",
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([
'actionID' => '',
'sourceServerID' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/RemoveSourceServerAction', [
'body' => '{
"actionID": "",
"sourceServerID": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/RemoveSourceServerAction');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'actionID' => '',
'sourceServerID' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'actionID' => '',
'sourceServerID' => ''
]));
$request->setRequestUrl('{{baseUrl}}/RemoveSourceServerAction');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/RemoveSourceServerAction' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"actionID": "",
"sourceServerID": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/RemoveSourceServerAction' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"actionID": "",
"sourceServerID": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"actionID\": \"\",\n \"sourceServerID\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/RemoveSourceServerAction", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/RemoveSourceServerAction"
payload = {
"actionID": "",
"sourceServerID": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/RemoveSourceServerAction"
payload <- "{\n \"actionID\": \"\",\n \"sourceServerID\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/RemoveSourceServerAction")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"actionID\": \"\",\n \"sourceServerID\": \"\"\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/RemoveSourceServerAction') do |req|
req.body = "{\n \"actionID\": \"\",\n \"sourceServerID\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/RemoveSourceServerAction";
let payload = json!({
"actionID": "",
"sourceServerID": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/RemoveSourceServerAction \
--header 'content-type: application/json' \
--data '{
"actionID": "",
"sourceServerID": ""
}'
echo '{
"actionID": "",
"sourceServerID": ""
}' | \
http POST {{baseUrl}}/RemoveSourceServerAction \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "actionID": "",\n "sourceServerID": ""\n}' \
--output-document \
- {{baseUrl}}/RemoveSourceServerAction
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"actionID": "",
"sourceServerID": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/RemoveSourceServerAction")! 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
RemoveTemplateAction
{{baseUrl}}/RemoveTemplateAction
BODY json
{
"actionID": "",
"launchConfigurationTemplateID": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/RemoveTemplateAction");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"actionID\": \"\",\n \"launchConfigurationTemplateID\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/RemoveTemplateAction" {:content-type :json
:form-params {:actionID ""
:launchConfigurationTemplateID ""}})
require "http/client"
url = "{{baseUrl}}/RemoveTemplateAction"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"actionID\": \"\",\n \"launchConfigurationTemplateID\": \"\"\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}}/RemoveTemplateAction"),
Content = new StringContent("{\n \"actionID\": \"\",\n \"launchConfigurationTemplateID\": \"\"\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}}/RemoveTemplateAction");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"actionID\": \"\",\n \"launchConfigurationTemplateID\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/RemoveTemplateAction"
payload := strings.NewReader("{\n \"actionID\": \"\",\n \"launchConfigurationTemplateID\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/RemoveTemplateAction HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 59
{
"actionID": "",
"launchConfigurationTemplateID": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/RemoveTemplateAction")
.setHeader("content-type", "application/json")
.setBody("{\n \"actionID\": \"\",\n \"launchConfigurationTemplateID\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/RemoveTemplateAction"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"actionID\": \"\",\n \"launchConfigurationTemplateID\": \"\"\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 \"actionID\": \"\",\n \"launchConfigurationTemplateID\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/RemoveTemplateAction")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/RemoveTemplateAction")
.header("content-type", "application/json")
.body("{\n \"actionID\": \"\",\n \"launchConfigurationTemplateID\": \"\"\n}")
.asString();
const data = JSON.stringify({
actionID: '',
launchConfigurationTemplateID: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/RemoveTemplateAction');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/RemoveTemplateAction',
headers: {'content-type': 'application/json'},
data: {actionID: '', launchConfigurationTemplateID: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/RemoveTemplateAction';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"actionID":"","launchConfigurationTemplateID":""}'
};
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}}/RemoveTemplateAction',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "actionID": "",\n "launchConfigurationTemplateID": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"actionID\": \"\",\n \"launchConfigurationTemplateID\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/RemoveTemplateAction")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/RemoveTemplateAction',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({actionID: '', launchConfigurationTemplateID: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/RemoveTemplateAction',
headers: {'content-type': 'application/json'},
body: {actionID: '', launchConfigurationTemplateID: ''},
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}}/RemoveTemplateAction');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
actionID: '',
launchConfigurationTemplateID: ''
});
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}}/RemoveTemplateAction',
headers: {'content-type': 'application/json'},
data: {actionID: '', launchConfigurationTemplateID: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/RemoveTemplateAction';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"actionID":"","launchConfigurationTemplateID":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"actionID": @"",
@"launchConfigurationTemplateID": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/RemoveTemplateAction"]
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}}/RemoveTemplateAction" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"actionID\": \"\",\n \"launchConfigurationTemplateID\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/RemoveTemplateAction",
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([
'actionID' => '',
'launchConfigurationTemplateID' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/RemoveTemplateAction', [
'body' => '{
"actionID": "",
"launchConfigurationTemplateID": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/RemoveTemplateAction');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'actionID' => '',
'launchConfigurationTemplateID' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'actionID' => '',
'launchConfigurationTemplateID' => ''
]));
$request->setRequestUrl('{{baseUrl}}/RemoveTemplateAction');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/RemoveTemplateAction' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"actionID": "",
"launchConfigurationTemplateID": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/RemoveTemplateAction' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"actionID": "",
"launchConfigurationTemplateID": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"actionID\": \"\",\n \"launchConfigurationTemplateID\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/RemoveTemplateAction", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/RemoveTemplateAction"
payload = {
"actionID": "",
"launchConfigurationTemplateID": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/RemoveTemplateAction"
payload <- "{\n \"actionID\": \"\",\n \"launchConfigurationTemplateID\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/RemoveTemplateAction")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"actionID\": \"\",\n \"launchConfigurationTemplateID\": \"\"\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/RemoveTemplateAction') do |req|
req.body = "{\n \"actionID\": \"\",\n \"launchConfigurationTemplateID\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/RemoveTemplateAction";
let payload = json!({
"actionID": "",
"launchConfigurationTemplateID": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/RemoveTemplateAction \
--header 'content-type: application/json' \
--data '{
"actionID": "",
"launchConfigurationTemplateID": ""
}'
echo '{
"actionID": "",
"launchConfigurationTemplateID": ""
}' | \
http POST {{baseUrl}}/RemoveTemplateAction \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "actionID": "",\n "launchConfigurationTemplateID": ""\n}' \
--output-document \
- {{baseUrl}}/RemoveTemplateAction
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"actionID": "",
"launchConfigurationTemplateID": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/RemoveTemplateAction")! 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
RetryDataReplication
{{baseUrl}}/RetryDataReplication
BODY json
{
"sourceServerID": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/RetryDataReplication");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"sourceServerID\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/RetryDataReplication" {:content-type :json
:form-params {:sourceServerID ""}})
require "http/client"
url = "{{baseUrl}}/RetryDataReplication"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"sourceServerID\": \"\"\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}}/RetryDataReplication"),
Content = new StringContent("{\n \"sourceServerID\": \"\"\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}}/RetryDataReplication");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"sourceServerID\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/RetryDataReplication"
payload := strings.NewReader("{\n \"sourceServerID\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/RetryDataReplication HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 26
{
"sourceServerID": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/RetryDataReplication")
.setHeader("content-type", "application/json")
.setBody("{\n \"sourceServerID\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/RetryDataReplication"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"sourceServerID\": \"\"\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 \"sourceServerID\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/RetryDataReplication")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/RetryDataReplication")
.header("content-type", "application/json")
.body("{\n \"sourceServerID\": \"\"\n}")
.asString();
const data = JSON.stringify({
sourceServerID: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/RetryDataReplication');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/RetryDataReplication',
headers: {'content-type': 'application/json'},
data: {sourceServerID: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/RetryDataReplication';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"sourceServerID":""}'
};
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}}/RetryDataReplication',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "sourceServerID": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"sourceServerID\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/RetryDataReplication")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/RetryDataReplication',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({sourceServerID: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/RetryDataReplication',
headers: {'content-type': 'application/json'},
body: {sourceServerID: ''},
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}}/RetryDataReplication');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
sourceServerID: ''
});
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}}/RetryDataReplication',
headers: {'content-type': 'application/json'},
data: {sourceServerID: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/RetryDataReplication';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"sourceServerID":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"sourceServerID": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/RetryDataReplication"]
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}}/RetryDataReplication" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"sourceServerID\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/RetryDataReplication",
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([
'sourceServerID' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/RetryDataReplication', [
'body' => '{
"sourceServerID": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/RetryDataReplication');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'sourceServerID' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'sourceServerID' => ''
]));
$request->setRequestUrl('{{baseUrl}}/RetryDataReplication');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/RetryDataReplication' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"sourceServerID": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/RetryDataReplication' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"sourceServerID": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"sourceServerID\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/RetryDataReplication", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/RetryDataReplication"
payload = { "sourceServerID": "" }
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/RetryDataReplication"
payload <- "{\n \"sourceServerID\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/RetryDataReplication")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"sourceServerID\": \"\"\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/RetryDataReplication') do |req|
req.body = "{\n \"sourceServerID\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/RetryDataReplication";
let payload = json!({"sourceServerID": ""});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/RetryDataReplication \
--header 'content-type: application/json' \
--data '{
"sourceServerID": ""
}'
echo '{
"sourceServerID": ""
}' | \
http POST {{baseUrl}}/RetryDataReplication \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "sourceServerID": ""\n}' \
--output-document \
- {{baseUrl}}/RetryDataReplication
import Foundation
let headers = ["content-type": "application/json"]
let parameters = ["sourceServerID": ""] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/RetryDataReplication")! 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
StartCutover
{{baseUrl}}/StartCutover
BODY json
{
"sourceServerIDs": [],
"tags": {}
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/StartCutover");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"sourceServerIDs\": [],\n \"tags\": {}\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/StartCutover" {:content-type :json
:form-params {:sourceServerIDs []
:tags {}}})
require "http/client"
url = "{{baseUrl}}/StartCutover"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"sourceServerIDs\": [],\n \"tags\": {}\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/StartCutover"),
Content = new StringContent("{\n \"sourceServerIDs\": [],\n \"tags\": {}\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/StartCutover");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"sourceServerIDs\": [],\n \"tags\": {}\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/StartCutover"
payload := strings.NewReader("{\n \"sourceServerIDs\": [],\n \"tags\": {}\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/StartCutover HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 41
{
"sourceServerIDs": [],
"tags": {}
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/StartCutover")
.setHeader("content-type", "application/json")
.setBody("{\n \"sourceServerIDs\": [],\n \"tags\": {}\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/StartCutover"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"sourceServerIDs\": [],\n \"tags\": {}\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"sourceServerIDs\": [],\n \"tags\": {}\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/StartCutover")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/StartCutover")
.header("content-type", "application/json")
.body("{\n \"sourceServerIDs\": [],\n \"tags\": {}\n}")
.asString();
const data = JSON.stringify({
sourceServerIDs: [],
tags: {}
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/StartCutover');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/StartCutover',
headers: {'content-type': 'application/json'},
data: {sourceServerIDs: [], tags: {}}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/StartCutover';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"sourceServerIDs":[],"tags":{}}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/StartCutover',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "sourceServerIDs": [],\n "tags": {}\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"sourceServerIDs\": [],\n \"tags\": {}\n}")
val request = Request.Builder()
.url("{{baseUrl}}/StartCutover")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/StartCutover',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({sourceServerIDs: [], tags: {}}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/StartCutover',
headers: {'content-type': 'application/json'},
body: {sourceServerIDs: [], tags: {}},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/StartCutover');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
sourceServerIDs: [],
tags: {}
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/StartCutover',
headers: {'content-type': 'application/json'},
data: {sourceServerIDs: [], tags: {}}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/StartCutover';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"sourceServerIDs":[],"tags":{}}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"sourceServerIDs": @[ ],
@"tags": @{ } };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/StartCutover"]
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}}/StartCutover" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"sourceServerIDs\": [],\n \"tags\": {}\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/StartCutover",
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([
'sourceServerIDs' => [
],
'tags' => [
]
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/StartCutover', [
'body' => '{
"sourceServerIDs": [],
"tags": {}
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/StartCutover');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'sourceServerIDs' => [
],
'tags' => [
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'sourceServerIDs' => [
],
'tags' => [
]
]));
$request->setRequestUrl('{{baseUrl}}/StartCutover');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/StartCutover' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"sourceServerIDs": [],
"tags": {}
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/StartCutover' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"sourceServerIDs": [],
"tags": {}
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"sourceServerIDs\": [],\n \"tags\": {}\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/StartCutover", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/StartCutover"
payload = {
"sourceServerIDs": [],
"tags": {}
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/StartCutover"
payload <- "{\n \"sourceServerIDs\": [],\n \"tags\": {}\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/StartCutover")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"sourceServerIDs\": [],\n \"tags\": {}\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/StartCutover') do |req|
req.body = "{\n \"sourceServerIDs\": [],\n \"tags\": {}\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/StartCutover";
let payload = json!({
"sourceServerIDs": (),
"tags": json!({})
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/StartCutover \
--header 'content-type: application/json' \
--data '{
"sourceServerIDs": [],
"tags": {}
}'
echo '{
"sourceServerIDs": [],
"tags": {}
}' | \
http POST {{baseUrl}}/StartCutover \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "sourceServerIDs": [],\n "tags": {}\n}' \
--output-document \
- {{baseUrl}}/StartCutover
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"sourceServerIDs": [],
"tags": []
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/StartCutover")! 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
StartExport
{{baseUrl}}/StartExport
BODY json
{
"s3Bucket": "",
"s3BucketOwner": "",
"s3Key": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/StartExport");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"s3Bucket\": \"\",\n \"s3BucketOwner\": \"\",\n \"s3Key\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/StartExport" {:content-type :json
:form-params {:s3Bucket ""
:s3BucketOwner ""
:s3Key ""}})
require "http/client"
url = "{{baseUrl}}/StartExport"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"s3Bucket\": \"\",\n \"s3BucketOwner\": \"\",\n \"s3Key\": \"\"\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}}/StartExport"),
Content = new StringContent("{\n \"s3Bucket\": \"\",\n \"s3BucketOwner\": \"\",\n \"s3Key\": \"\"\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}}/StartExport");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"s3Bucket\": \"\",\n \"s3BucketOwner\": \"\",\n \"s3Key\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/StartExport"
payload := strings.NewReader("{\n \"s3Bucket\": \"\",\n \"s3BucketOwner\": \"\",\n \"s3Key\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/StartExport HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 58
{
"s3Bucket": "",
"s3BucketOwner": "",
"s3Key": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/StartExport")
.setHeader("content-type", "application/json")
.setBody("{\n \"s3Bucket\": \"\",\n \"s3BucketOwner\": \"\",\n \"s3Key\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/StartExport"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"s3Bucket\": \"\",\n \"s3BucketOwner\": \"\",\n \"s3Key\": \"\"\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 \"s3Bucket\": \"\",\n \"s3BucketOwner\": \"\",\n \"s3Key\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/StartExport")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/StartExport")
.header("content-type", "application/json")
.body("{\n \"s3Bucket\": \"\",\n \"s3BucketOwner\": \"\",\n \"s3Key\": \"\"\n}")
.asString();
const data = JSON.stringify({
s3Bucket: '',
s3BucketOwner: '',
s3Key: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/StartExport');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/StartExport',
headers: {'content-type': 'application/json'},
data: {s3Bucket: '', s3BucketOwner: '', s3Key: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/StartExport';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"s3Bucket":"","s3BucketOwner":"","s3Key":""}'
};
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}}/StartExport',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "s3Bucket": "",\n "s3BucketOwner": "",\n "s3Key": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"s3Bucket\": \"\",\n \"s3BucketOwner\": \"\",\n \"s3Key\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/StartExport")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/StartExport',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({s3Bucket: '', s3BucketOwner: '', s3Key: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/StartExport',
headers: {'content-type': 'application/json'},
body: {s3Bucket: '', s3BucketOwner: '', s3Key: ''},
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}}/StartExport');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
s3Bucket: '',
s3BucketOwner: '',
s3Key: ''
});
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}}/StartExport',
headers: {'content-type': 'application/json'},
data: {s3Bucket: '', s3BucketOwner: '', s3Key: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/StartExport';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"s3Bucket":"","s3BucketOwner":"","s3Key":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"s3Bucket": @"",
@"s3BucketOwner": @"",
@"s3Key": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/StartExport"]
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}}/StartExport" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"s3Bucket\": \"\",\n \"s3BucketOwner\": \"\",\n \"s3Key\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/StartExport",
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([
's3Bucket' => '',
's3BucketOwner' => '',
's3Key' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/StartExport', [
'body' => '{
"s3Bucket": "",
"s3BucketOwner": "",
"s3Key": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/StartExport');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
's3Bucket' => '',
's3BucketOwner' => '',
's3Key' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
's3Bucket' => '',
's3BucketOwner' => '',
's3Key' => ''
]));
$request->setRequestUrl('{{baseUrl}}/StartExport');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/StartExport' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"s3Bucket": "",
"s3BucketOwner": "",
"s3Key": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/StartExport' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"s3Bucket": "",
"s3BucketOwner": "",
"s3Key": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"s3Bucket\": \"\",\n \"s3BucketOwner\": \"\",\n \"s3Key\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/StartExport", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/StartExport"
payload = {
"s3Bucket": "",
"s3BucketOwner": "",
"s3Key": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/StartExport"
payload <- "{\n \"s3Bucket\": \"\",\n \"s3BucketOwner\": \"\",\n \"s3Key\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/StartExport")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"s3Bucket\": \"\",\n \"s3BucketOwner\": \"\",\n \"s3Key\": \"\"\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/StartExport') do |req|
req.body = "{\n \"s3Bucket\": \"\",\n \"s3BucketOwner\": \"\",\n \"s3Key\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/StartExport";
let payload = json!({
"s3Bucket": "",
"s3BucketOwner": "",
"s3Key": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/StartExport \
--header 'content-type: application/json' \
--data '{
"s3Bucket": "",
"s3BucketOwner": "",
"s3Key": ""
}'
echo '{
"s3Bucket": "",
"s3BucketOwner": "",
"s3Key": ""
}' | \
http POST {{baseUrl}}/StartExport \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "s3Bucket": "",\n "s3BucketOwner": "",\n "s3Key": ""\n}' \
--output-document \
- {{baseUrl}}/StartExport
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"s3Bucket": "",
"s3BucketOwner": "",
"s3Key": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/StartExport")! 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
StartImport
{{baseUrl}}/StartImport
BODY json
{
"clientToken": "",
"s3BucketSource": {
"s3Bucket": "",
"s3BucketOwner": "",
"s3Key": ""
}
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/StartImport");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"clientToken\": \"\",\n \"s3BucketSource\": {\n \"s3Bucket\": \"\",\n \"s3BucketOwner\": \"\",\n \"s3Key\": \"\"\n }\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/StartImport" {:content-type :json
:form-params {:clientToken ""
:s3BucketSource {:s3Bucket ""
:s3BucketOwner ""
:s3Key ""}}})
require "http/client"
url = "{{baseUrl}}/StartImport"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"clientToken\": \"\",\n \"s3BucketSource\": {\n \"s3Bucket\": \"\",\n \"s3BucketOwner\": \"\",\n \"s3Key\": \"\"\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}}/StartImport"),
Content = new StringContent("{\n \"clientToken\": \"\",\n \"s3BucketSource\": {\n \"s3Bucket\": \"\",\n \"s3BucketOwner\": \"\",\n \"s3Key\": \"\"\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}}/StartImport");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"clientToken\": \"\",\n \"s3BucketSource\": {\n \"s3Bucket\": \"\",\n \"s3BucketOwner\": \"\",\n \"s3Key\": \"\"\n }\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/StartImport"
payload := strings.NewReader("{\n \"clientToken\": \"\",\n \"s3BucketSource\": {\n \"s3Bucket\": \"\",\n \"s3BucketOwner\": \"\",\n \"s3Key\": \"\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/StartImport HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 111
{
"clientToken": "",
"s3BucketSource": {
"s3Bucket": "",
"s3BucketOwner": "",
"s3Key": ""
}
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/StartImport")
.setHeader("content-type", "application/json")
.setBody("{\n \"clientToken\": \"\",\n \"s3BucketSource\": {\n \"s3Bucket\": \"\",\n \"s3BucketOwner\": \"\",\n \"s3Key\": \"\"\n }\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/StartImport"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"clientToken\": \"\",\n \"s3BucketSource\": {\n \"s3Bucket\": \"\",\n \"s3BucketOwner\": \"\",\n \"s3Key\": \"\"\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 \"clientToken\": \"\",\n \"s3BucketSource\": {\n \"s3Bucket\": \"\",\n \"s3BucketOwner\": \"\",\n \"s3Key\": \"\"\n }\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/StartImport")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/StartImport")
.header("content-type", "application/json")
.body("{\n \"clientToken\": \"\",\n \"s3BucketSource\": {\n \"s3Bucket\": \"\",\n \"s3BucketOwner\": \"\",\n \"s3Key\": \"\"\n }\n}")
.asString();
const data = JSON.stringify({
clientToken: '',
s3BucketSource: {
s3Bucket: '',
s3BucketOwner: '',
s3Key: ''
}
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/StartImport');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/StartImport',
headers: {'content-type': 'application/json'},
data: {clientToken: '', s3BucketSource: {s3Bucket: '', s3BucketOwner: '', s3Key: ''}}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/StartImport';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"clientToken":"","s3BucketSource":{"s3Bucket":"","s3BucketOwner":"","s3Key":""}}'
};
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}}/StartImport',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "clientToken": "",\n "s3BucketSource": {\n "s3Bucket": "",\n "s3BucketOwner": "",\n "s3Key": ""\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 \"clientToken\": \"\",\n \"s3BucketSource\": {\n \"s3Bucket\": \"\",\n \"s3BucketOwner\": \"\",\n \"s3Key\": \"\"\n }\n}")
val request = Request.Builder()
.url("{{baseUrl}}/StartImport")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/StartImport',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({clientToken: '', s3BucketSource: {s3Bucket: '', s3BucketOwner: '', s3Key: ''}}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/StartImport',
headers: {'content-type': 'application/json'},
body: {clientToken: '', s3BucketSource: {s3Bucket: '', s3BucketOwner: '', s3Key: ''}},
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}}/StartImport');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
clientToken: '',
s3BucketSource: {
s3Bucket: '',
s3BucketOwner: '',
s3Key: ''
}
});
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}}/StartImport',
headers: {'content-type': 'application/json'},
data: {clientToken: '', s3BucketSource: {s3Bucket: '', s3BucketOwner: '', s3Key: ''}}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/StartImport';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"clientToken":"","s3BucketSource":{"s3Bucket":"","s3BucketOwner":"","s3Key":""}}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"clientToken": @"",
@"s3BucketSource": @{ @"s3Bucket": @"", @"s3BucketOwner": @"", @"s3Key": @"" } };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/StartImport"]
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}}/StartImport" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"clientToken\": \"\",\n \"s3BucketSource\": {\n \"s3Bucket\": \"\",\n \"s3BucketOwner\": \"\",\n \"s3Key\": \"\"\n }\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/StartImport",
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' => '',
's3BucketSource' => [
's3Bucket' => '',
's3BucketOwner' => '',
's3Key' => ''
]
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/StartImport', [
'body' => '{
"clientToken": "",
"s3BucketSource": {
"s3Bucket": "",
"s3BucketOwner": "",
"s3Key": ""
}
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/StartImport');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'clientToken' => '',
's3BucketSource' => [
's3Bucket' => '',
's3BucketOwner' => '',
's3Key' => ''
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'clientToken' => '',
's3BucketSource' => [
's3Bucket' => '',
's3BucketOwner' => '',
's3Key' => ''
]
]));
$request->setRequestUrl('{{baseUrl}}/StartImport');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/StartImport' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"clientToken": "",
"s3BucketSource": {
"s3Bucket": "",
"s3BucketOwner": "",
"s3Key": ""
}
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/StartImport' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"clientToken": "",
"s3BucketSource": {
"s3Bucket": "",
"s3BucketOwner": "",
"s3Key": ""
}
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"clientToken\": \"\",\n \"s3BucketSource\": {\n \"s3Bucket\": \"\",\n \"s3BucketOwner\": \"\",\n \"s3Key\": \"\"\n }\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/StartImport", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/StartImport"
payload = {
"clientToken": "",
"s3BucketSource": {
"s3Bucket": "",
"s3BucketOwner": "",
"s3Key": ""
}
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/StartImport"
payload <- "{\n \"clientToken\": \"\",\n \"s3BucketSource\": {\n \"s3Bucket\": \"\",\n \"s3BucketOwner\": \"\",\n \"s3Key\": \"\"\n }\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/StartImport")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"clientToken\": \"\",\n \"s3BucketSource\": {\n \"s3Bucket\": \"\",\n \"s3BucketOwner\": \"\",\n \"s3Key\": \"\"\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/StartImport') do |req|
req.body = "{\n \"clientToken\": \"\",\n \"s3BucketSource\": {\n \"s3Bucket\": \"\",\n \"s3BucketOwner\": \"\",\n \"s3Key\": \"\"\n }\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/StartImport";
let payload = json!({
"clientToken": "",
"s3BucketSource": json!({
"s3Bucket": "",
"s3BucketOwner": "",
"s3Key": ""
})
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/StartImport \
--header 'content-type: application/json' \
--data '{
"clientToken": "",
"s3BucketSource": {
"s3Bucket": "",
"s3BucketOwner": "",
"s3Key": ""
}
}'
echo '{
"clientToken": "",
"s3BucketSource": {
"s3Bucket": "",
"s3BucketOwner": "",
"s3Key": ""
}
}' | \
http POST {{baseUrl}}/StartImport \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "clientToken": "",\n "s3BucketSource": {\n "s3Bucket": "",\n "s3BucketOwner": "",\n "s3Key": ""\n }\n}' \
--output-document \
- {{baseUrl}}/StartImport
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"clientToken": "",
"s3BucketSource": [
"s3Bucket": "",
"s3BucketOwner": "",
"s3Key": ""
]
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/StartImport")! 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
StartReplication
{{baseUrl}}/StartReplication
BODY json
{
"sourceServerID": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/StartReplication");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"sourceServerID\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/StartReplication" {:content-type :json
:form-params {:sourceServerID ""}})
require "http/client"
url = "{{baseUrl}}/StartReplication"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"sourceServerID\": \"\"\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}}/StartReplication"),
Content = new StringContent("{\n \"sourceServerID\": \"\"\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}}/StartReplication");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"sourceServerID\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/StartReplication"
payload := strings.NewReader("{\n \"sourceServerID\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/StartReplication HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 26
{
"sourceServerID": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/StartReplication")
.setHeader("content-type", "application/json")
.setBody("{\n \"sourceServerID\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/StartReplication"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"sourceServerID\": \"\"\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 \"sourceServerID\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/StartReplication")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/StartReplication")
.header("content-type", "application/json")
.body("{\n \"sourceServerID\": \"\"\n}")
.asString();
const data = JSON.stringify({
sourceServerID: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/StartReplication');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/StartReplication',
headers: {'content-type': 'application/json'},
data: {sourceServerID: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/StartReplication';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"sourceServerID":""}'
};
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}}/StartReplication',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "sourceServerID": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"sourceServerID\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/StartReplication")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/StartReplication',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({sourceServerID: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/StartReplication',
headers: {'content-type': 'application/json'},
body: {sourceServerID: ''},
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}}/StartReplication');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
sourceServerID: ''
});
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}}/StartReplication',
headers: {'content-type': 'application/json'},
data: {sourceServerID: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/StartReplication';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"sourceServerID":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"sourceServerID": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/StartReplication"]
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}}/StartReplication" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"sourceServerID\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/StartReplication",
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([
'sourceServerID' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/StartReplication', [
'body' => '{
"sourceServerID": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/StartReplication');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'sourceServerID' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'sourceServerID' => ''
]));
$request->setRequestUrl('{{baseUrl}}/StartReplication');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/StartReplication' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"sourceServerID": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/StartReplication' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"sourceServerID": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"sourceServerID\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/StartReplication", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/StartReplication"
payload = { "sourceServerID": "" }
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/StartReplication"
payload <- "{\n \"sourceServerID\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/StartReplication")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"sourceServerID\": \"\"\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/StartReplication') do |req|
req.body = "{\n \"sourceServerID\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/StartReplication";
let payload = json!({"sourceServerID": ""});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/StartReplication \
--header 'content-type: application/json' \
--data '{
"sourceServerID": ""
}'
echo '{
"sourceServerID": ""
}' | \
http POST {{baseUrl}}/StartReplication \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "sourceServerID": ""\n}' \
--output-document \
- {{baseUrl}}/StartReplication
import Foundation
let headers = ["content-type": "application/json"]
let parameters = ["sourceServerID": ""] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/StartReplication")! 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
StartTest
{{baseUrl}}/StartTest
BODY json
{
"sourceServerIDs": [],
"tags": {}
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/StartTest");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"sourceServerIDs\": [],\n \"tags\": {}\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/StartTest" {:content-type :json
:form-params {:sourceServerIDs []
:tags {}}})
require "http/client"
url = "{{baseUrl}}/StartTest"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"sourceServerIDs\": [],\n \"tags\": {}\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/StartTest"),
Content = new StringContent("{\n \"sourceServerIDs\": [],\n \"tags\": {}\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/StartTest");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"sourceServerIDs\": [],\n \"tags\": {}\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/StartTest"
payload := strings.NewReader("{\n \"sourceServerIDs\": [],\n \"tags\": {}\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/StartTest HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 41
{
"sourceServerIDs": [],
"tags": {}
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/StartTest")
.setHeader("content-type", "application/json")
.setBody("{\n \"sourceServerIDs\": [],\n \"tags\": {}\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/StartTest"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"sourceServerIDs\": [],\n \"tags\": {}\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"sourceServerIDs\": [],\n \"tags\": {}\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/StartTest")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/StartTest")
.header("content-type", "application/json")
.body("{\n \"sourceServerIDs\": [],\n \"tags\": {}\n}")
.asString();
const data = JSON.stringify({
sourceServerIDs: [],
tags: {}
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/StartTest');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/StartTest',
headers: {'content-type': 'application/json'},
data: {sourceServerIDs: [], tags: {}}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/StartTest';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"sourceServerIDs":[],"tags":{}}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/StartTest',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "sourceServerIDs": [],\n "tags": {}\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"sourceServerIDs\": [],\n \"tags\": {}\n}")
val request = Request.Builder()
.url("{{baseUrl}}/StartTest")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/StartTest',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({sourceServerIDs: [], tags: {}}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/StartTest',
headers: {'content-type': 'application/json'},
body: {sourceServerIDs: [], tags: {}},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/StartTest');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
sourceServerIDs: [],
tags: {}
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/StartTest',
headers: {'content-type': 'application/json'},
data: {sourceServerIDs: [], tags: {}}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/StartTest';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"sourceServerIDs":[],"tags":{}}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"sourceServerIDs": @[ ],
@"tags": @{ } };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/StartTest"]
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}}/StartTest" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"sourceServerIDs\": [],\n \"tags\": {}\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/StartTest",
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([
'sourceServerIDs' => [
],
'tags' => [
]
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/StartTest', [
'body' => '{
"sourceServerIDs": [],
"tags": {}
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/StartTest');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'sourceServerIDs' => [
],
'tags' => [
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'sourceServerIDs' => [
],
'tags' => [
]
]));
$request->setRequestUrl('{{baseUrl}}/StartTest');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/StartTest' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"sourceServerIDs": [],
"tags": {}
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/StartTest' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"sourceServerIDs": [],
"tags": {}
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"sourceServerIDs\": [],\n \"tags\": {}\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/StartTest", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/StartTest"
payload = {
"sourceServerIDs": [],
"tags": {}
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/StartTest"
payload <- "{\n \"sourceServerIDs\": [],\n \"tags\": {}\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/StartTest")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"sourceServerIDs\": [],\n \"tags\": {}\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/StartTest') do |req|
req.body = "{\n \"sourceServerIDs\": [],\n \"tags\": {}\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/StartTest";
let payload = json!({
"sourceServerIDs": (),
"tags": json!({})
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/StartTest \
--header 'content-type: application/json' \
--data '{
"sourceServerIDs": [],
"tags": {}
}'
echo '{
"sourceServerIDs": [],
"tags": {}
}' | \
http POST {{baseUrl}}/StartTest \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "sourceServerIDs": [],\n "tags": {}\n}' \
--output-document \
- {{baseUrl}}/StartTest
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"sourceServerIDs": [],
"tags": []
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/StartTest")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
TagResource
{{baseUrl}}/tags/:resourceArn
QUERY PARAMS
resourceArn
BODY json
{
"tags": {}
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/tags/:resourceArn");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"tags\": {}\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/tags/:resourceArn" {:content-type :json
:form-params {:tags {}}})
require "http/client"
url = "{{baseUrl}}/tags/:resourceArn"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"tags\": {}\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/tags/:resourceArn"),
Content = new StringContent("{\n \"tags\": {}\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/tags/:resourceArn");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"tags\": {}\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/tags/:resourceArn"
payload := strings.NewReader("{\n \"tags\": {}\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/tags/:resourceArn HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 16
{
"tags": {}
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/tags/:resourceArn")
.setHeader("content-type", "application/json")
.setBody("{\n \"tags\": {}\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/tags/:resourceArn"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"tags\": {}\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"tags\": {}\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/tags/:resourceArn")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/tags/:resourceArn")
.header("content-type", "application/json")
.body("{\n \"tags\": {}\n}")
.asString();
const data = JSON.stringify({
tags: {}
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/tags/:resourceArn');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/tags/:resourceArn',
headers: {'content-type': 'application/json'},
data: {tags: {}}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/tags/:resourceArn';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"tags":{}}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/tags/:resourceArn',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "tags": {}\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"tags\": {}\n}")
val request = Request.Builder()
.url("{{baseUrl}}/tags/:resourceArn")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/tags/:resourceArn',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({tags: {}}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/tags/:resourceArn',
headers: {'content-type': 'application/json'},
body: {tags: {}},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/tags/:resourceArn');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
tags: {}
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/tags/:resourceArn',
headers: {'content-type': 'application/json'},
data: {tags: {}}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/tags/:resourceArn';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"tags":{}}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"tags": @{ } };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/tags/:resourceArn"]
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}}/tags/:resourceArn" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"tags\": {}\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/tags/:resourceArn",
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([
'tags' => [
]
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/tags/:resourceArn', [
'body' => '{
"tags": {}
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/tags/:resourceArn');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'tags' => [
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'tags' => [
]
]));
$request->setRequestUrl('{{baseUrl}}/tags/:resourceArn');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/tags/:resourceArn' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"tags": {}
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/tags/:resourceArn' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"tags": {}
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"tags\": {}\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/tags/:resourceArn", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/tags/:resourceArn"
payload = { "tags": {} }
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/tags/:resourceArn"
payload <- "{\n \"tags\": {}\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/tags/:resourceArn")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"tags\": {}\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/tags/:resourceArn') do |req|
req.body = "{\n \"tags\": {}\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/tags/:resourceArn";
let payload = json!({"tags": json!({})});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/tags/:resourceArn \
--header 'content-type: application/json' \
--data '{
"tags": {}
}'
echo '{
"tags": {}
}' | \
http POST {{baseUrl}}/tags/:resourceArn \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "tags": {}\n}' \
--output-document \
- {{baseUrl}}/tags/:resourceArn
import Foundation
let headers = ["content-type": "application/json"]
let parameters = ["tags": []] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/tags/:resourceArn")! 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
TerminateTargetInstances
{{baseUrl}}/TerminateTargetInstances
BODY json
{
"sourceServerIDs": [],
"tags": {}
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/TerminateTargetInstances");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"sourceServerIDs\": [],\n \"tags\": {}\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/TerminateTargetInstances" {:content-type :json
:form-params {:sourceServerIDs []
:tags {}}})
require "http/client"
url = "{{baseUrl}}/TerminateTargetInstances"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"sourceServerIDs\": [],\n \"tags\": {}\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/TerminateTargetInstances"),
Content = new StringContent("{\n \"sourceServerIDs\": [],\n \"tags\": {}\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/TerminateTargetInstances");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"sourceServerIDs\": [],\n \"tags\": {}\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/TerminateTargetInstances"
payload := strings.NewReader("{\n \"sourceServerIDs\": [],\n \"tags\": {}\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/TerminateTargetInstances HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 41
{
"sourceServerIDs": [],
"tags": {}
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/TerminateTargetInstances")
.setHeader("content-type", "application/json")
.setBody("{\n \"sourceServerIDs\": [],\n \"tags\": {}\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/TerminateTargetInstances"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"sourceServerIDs\": [],\n \"tags\": {}\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"sourceServerIDs\": [],\n \"tags\": {}\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/TerminateTargetInstances")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/TerminateTargetInstances")
.header("content-type", "application/json")
.body("{\n \"sourceServerIDs\": [],\n \"tags\": {}\n}")
.asString();
const data = JSON.stringify({
sourceServerIDs: [],
tags: {}
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/TerminateTargetInstances');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/TerminateTargetInstances',
headers: {'content-type': 'application/json'},
data: {sourceServerIDs: [], tags: {}}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/TerminateTargetInstances';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"sourceServerIDs":[],"tags":{}}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/TerminateTargetInstances',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "sourceServerIDs": [],\n "tags": {}\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"sourceServerIDs\": [],\n \"tags\": {}\n}")
val request = Request.Builder()
.url("{{baseUrl}}/TerminateTargetInstances")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/TerminateTargetInstances',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({sourceServerIDs: [], tags: {}}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/TerminateTargetInstances',
headers: {'content-type': 'application/json'},
body: {sourceServerIDs: [], tags: {}},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/TerminateTargetInstances');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
sourceServerIDs: [],
tags: {}
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/TerminateTargetInstances',
headers: {'content-type': 'application/json'},
data: {sourceServerIDs: [], tags: {}}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/TerminateTargetInstances';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"sourceServerIDs":[],"tags":{}}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"sourceServerIDs": @[ ],
@"tags": @{ } };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/TerminateTargetInstances"]
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}}/TerminateTargetInstances" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"sourceServerIDs\": [],\n \"tags\": {}\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/TerminateTargetInstances",
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([
'sourceServerIDs' => [
],
'tags' => [
]
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/TerminateTargetInstances', [
'body' => '{
"sourceServerIDs": [],
"tags": {}
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/TerminateTargetInstances');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'sourceServerIDs' => [
],
'tags' => [
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'sourceServerIDs' => [
],
'tags' => [
]
]));
$request->setRequestUrl('{{baseUrl}}/TerminateTargetInstances');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/TerminateTargetInstances' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"sourceServerIDs": [],
"tags": {}
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/TerminateTargetInstances' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"sourceServerIDs": [],
"tags": {}
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"sourceServerIDs\": [],\n \"tags\": {}\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/TerminateTargetInstances", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/TerminateTargetInstances"
payload = {
"sourceServerIDs": [],
"tags": {}
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/TerminateTargetInstances"
payload <- "{\n \"sourceServerIDs\": [],\n \"tags\": {}\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/TerminateTargetInstances")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"sourceServerIDs\": [],\n \"tags\": {}\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/TerminateTargetInstances') do |req|
req.body = "{\n \"sourceServerIDs\": [],\n \"tags\": {}\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/TerminateTargetInstances";
let payload = json!({
"sourceServerIDs": (),
"tags": json!({})
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/TerminateTargetInstances \
--header 'content-type: application/json' \
--data '{
"sourceServerIDs": [],
"tags": {}
}'
echo '{
"sourceServerIDs": [],
"tags": {}
}' | \
http POST {{baseUrl}}/TerminateTargetInstances \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "sourceServerIDs": [],\n "tags": {}\n}' \
--output-document \
- {{baseUrl}}/TerminateTargetInstances
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"sourceServerIDs": [],
"tags": []
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/TerminateTargetInstances")! 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
UnarchiveApplication
{{baseUrl}}/UnarchiveApplication
BODY json
{
"applicationID": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/UnarchiveApplication");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"applicationID\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/UnarchiveApplication" {:content-type :json
:form-params {:applicationID ""}})
require "http/client"
url = "{{baseUrl}}/UnarchiveApplication"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"applicationID\": \"\"\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}}/UnarchiveApplication"),
Content = new StringContent("{\n \"applicationID\": \"\"\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}}/UnarchiveApplication");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"applicationID\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/UnarchiveApplication"
payload := strings.NewReader("{\n \"applicationID\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/UnarchiveApplication HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 25
{
"applicationID": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/UnarchiveApplication")
.setHeader("content-type", "application/json")
.setBody("{\n \"applicationID\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/UnarchiveApplication"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"applicationID\": \"\"\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 \"applicationID\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/UnarchiveApplication")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/UnarchiveApplication")
.header("content-type", "application/json")
.body("{\n \"applicationID\": \"\"\n}")
.asString();
const data = JSON.stringify({
applicationID: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/UnarchiveApplication');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/UnarchiveApplication',
headers: {'content-type': 'application/json'},
data: {applicationID: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/UnarchiveApplication';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"applicationID":""}'
};
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}}/UnarchiveApplication',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "applicationID": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"applicationID\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/UnarchiveApplication")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/UnarchiveApplication',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({applicationID: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/UnarchiveApplication',
headers: {'content-type': 'application/json'},
body: {applicationID: ''},
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}}/UnarchiveApplication');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
applicationID: ''
});
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}}/UnarchiveApplication',
headers: {'content-type': 'application/json'},
data: {applicationID: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/UnarchiveApplication';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"applicationID":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"applicationID": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/UnarchiveApplication"]
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}}/UnarchiveApplication" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"applicationID\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/UnarchiveApplication",
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([
'applicationID' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/UnarchiveApplication', [
'body' => '{
"applicationID": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/UnarchiveApplication');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'applicationID' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'applicationID' => ''
]));
$request->setRequestUrl('{{baseUrl}}/UnarchiveApplication');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/UnarchiveApplication' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"applicationID": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/UnarchiveApplication' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"applicationID": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"applicationID\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/UnarchiveApplication", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/UnarchiveApplication"
payload = { "applicationID": "" }
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/UnarchiveApplication"
payload <- "{\n \"applicationID\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/UnarchiveApplication")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"applicationID\": \"\"\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/UnarchiveApplication') do |req|
req.body = "{\n \"applicationID\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/UnarchiveApplication";
let payload = json!({"applicationID": ""});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/UnarchiveApplication \
--header 'content-type: application/json' \
--data '{
"applicationID": ""
}'
echo '{
"applicationID": ""
}' | \
http POST {{baseUrl}}/UnarchiveApplication \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "applicationID": ""\n}' \
--output-document \
- {{baseUrl}}/UnarchiveApplication
import Foundation
let headers = ["content-type": "application/json"]
let parameters = ["applicationID": ""] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/UnarchiveApplication")! 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
UnarchiveWave
{{baseUrl}}/UnarchiveWave
BODY json
{
"waveID": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/UnarchiveWave");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"waveID\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/UnarchiveWave" {:content-type :json
:form-params {:waveID ""}})
require "http/client"
url = "{{baseUrl}}/UnarchiveWave"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"waveID\": \"\"\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}}/UnarchiveWave"),
Content = new StringContent("{\n \"waveID\": \"\"\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}}/UnarchiveWave");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"waveID\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/UnarchiveWave"
payload := strings.NewReader("{\n \"waveID\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/UnarchiveWave HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 18
{
"waveID": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/UnarchiveWave")
.setHeader("content-type", "application/json")
.setBody("{\n \"waveID\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/UnarchiveWave"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"waveID\": \"\"\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 \"waveID\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/UnarchiveWave")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/UnarchiveWave")
.header("content-type", "application/json")
.body("{\n \"waveID\": \"\"\n}")
.asString();
const data = JSON.stringify({
waveID: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/UnarchiveWave');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/UnarchiveWave',
headers: {'content-type': 'application/json'},
data: {waveID: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/UnarchiveWave';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"waveID":""}'
};
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}}/UnarchiveWave',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "waveID": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"waveID\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/UnarchiveWave")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/UnarchiveWave',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({waveID: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/UnarchiveWave',
headers: {'content-type': 'application/json'},
body: {waveID: ''},
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}}/UnarchiveWave');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
waveID: ''
});
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}}/UnarchiveWave',
headers: {'content-type': 'application/json'},
data: {waveID: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/UnarchiveWave';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"waveID":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"waveID": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/UnarchiveWave"]
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}}/UnarchiveWave" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"waveID\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/UnarchiveWave",
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([
'waveID' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/UnarchiveWave', [
'body' => '{
"waveID": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/UnarchiveWave');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'waveID' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'waveID' => ''
]));
$request->setRequestUrl('{{baseUrl}}/UnarchiveWave');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/UnarchiveWave' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"waveID": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/UnarchiveWave' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"waveID": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"waveID\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/UnarchiveWave", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/UnarchiveWave"
payload = { "waveID": "" }
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/UnarchiveWave"
payload <- "{\n \"waveID\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/UnarchiveWave")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"waveID\": \"\"\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/UnarchiveWave') do |req|
req.body = "{\n \"waveID\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/UnarchiveWave";
let payload = json!({"waveID": ""});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/UnarchiveWave \
--header 'content-type: application/json' \
--data '{
"waveID": ""
}'
echo '{
"waveID": ""
}' | \
http POST {{baseUrl}}/UnarchiveWave \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "waveID": ""\n}' \
--output-document \
- {{baseUrl}}/UnarchiveWave
import Foundation
let headers = ["content-type": "application/json"]
let parameters = ["waveID": ""] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/UnarchiveWave")! 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()
DELETE
UntagResource
{{baseUrl}}/tags/:resourceArn#tagKeys
QUERY PARAMS
tagKeys
resourceArn
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/tags/:resourceArn?tagKeys=#tagKeys");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/delete "{{baseUrl}}/tags/:resourceArn#tagKeys" {:query-params {:tagKeys ""}})
require "http/client"
url = "{{baseUrl}}/tags/:resourceArn?tagKeys=#tagKeys"
response = HTTP::Client.delete url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Delete,
RequestUri = new Uri("{{baseUrl}}/tags/:resourceArn?tagKeys=#tagKeys"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/tags/:resourceArn?tagKeys=#tagKeys");
var request = new RestRequest("", Method.Delete);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/tags/:resourceArn?tagKeys=#tagKeys"
req, _ := http.NewRequest("DELETE", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
DELETE /baseUrl/tags/:resourceArn?tagKeys= HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/tags/:resourceArn?tagKeys=#tagKeys")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/tags/:resourceArn?tagKeys=#tagKeys"))
.method("DELETE", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/tags/:resourceArn?tagKeys=#tagKeys")
.delete(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/tags/:resourceArn?tagKeys=#tagKeys")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('DELETE', '{{baseUrl}}/tags/:resourceArn?tagKeys=#tagKeys');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'DELETE',
url: '{{baseUrl}}/tags/:resourceArn#tagKeys',
params: {tagKeys: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/tags/:resourceArn?tagKeys=#tagKeys';
const options = {method: 'DELETE'};
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}}/tags/:resourceArn?tagKeys=#tagKeys',
method: 'DELETE',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/tags/:resourceArn?tagKeys=#tagKeys")
.delete(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'DELETE',
hostname: 'example.com',
port: null,
path: '/baseUrl/tags/:resourceArn?tagKeys=',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'DELETE',
url: '{{baseUrl}}/tags/:resourceArn#tagKeys',
qs: {tagKeys: ''}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('DELETE', '{{baseUrl}}/tags/:resourceArn#tagKeys');
req.query({
tagKeys: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'DELETE',
url: '{{baseUrl}}/tags/:resourceArn#tagKeys',
params: {tagKeys: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/tags/:resourceArn?tagKeys=#tagKeys';
const options = {method: 'DELETE'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/tags/:resourceArn?tagKeys=#tagKeys"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"DELETE"];
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}}/tags/:resourceArn?tagKeys=#tagKeys" in
Client.call `DELETE uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/tags/:resourceArn?tagKeys=#tagKeys",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('DELETE', '{{baseUrl}}/tags/:resourceArn?tagKeys=#tagKeys');
echo $response->getBody();
setUrl('{{baseUrl}}/tags/:resourceArn#tagKeys');
$request->setMethod(HTTP_METH_DELETE);
$request->setQueryData([
'tagKeys' => ''
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/tags/:resourceArn#tagKeys');
$request->setRequestMethod('DELETE');
$request->setQuery(new http\QueryString([
'tagKeys' => ''
]));
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/tags/:resourceArn?tagKeys=#tagKeys' -Method DELETE
$response = Invoke-RestMethod -Uri '{{baseUrl}}/tags/:resourceArn?tagKeys=#tagKeys' -Method DELETE
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("DELETE", "/baseUrl/tags/:resourceArn?tagKeys=")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/tags/:resourceArn#tagKeys"
querystring = {"tagKeys":""}
response = requests.delete(url, params=querystring)
print(response.json())
library(httr)
url <- "{{baseUrl}}/tags/:resourceArn#tagKeys"
queryString <- list(tagKeys = "")
response <- VERB("DELETE", url, query = queryString, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/tags/:resourceArn?tagKeys=#tagKeys")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.delete('/baseUrl/tags/:resourceArn') do |req|
req.params['tagKeys'] = ''
end
puts response.status
puts response.body
use std::str::FromStr;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/tags/:resourceArn#tagKeys";
let querystring = [
("tagKeys", ""),
];
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("DELETE").unwrap(), url)
.query(&querystring)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request DELETE \
--url '{{baseUrl}}/tags/:resourceArn?tagKeys=#tagKeys'
http DELETE '{{baseUrl}}/tags/:resourceArn?tagKeys=#tagKeys'
wget --quiet \
--method DELETE \
--output-document \
- '{{baseUrl}}/tags/:resourceArn?tagKeys=#tagKeys'
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/tags/:resourceArn?tagKeys=#tagKeys")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "DELETE"
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
UpdateApplication
{{baseUrl}}/UpdateApplication
BODY json
{
"applicationID": "",
"description": "",
"name": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/UpdateApplication");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"applicationID\": \"\",\n \"description\": \"\",\n \"name\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/UpdateApplication" {:content-type :json
:form-params {:applicationID ""
:description ""
:name ""}})
require "http/client"
url = "{{baseUrl}}/UpdateApplication"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"applicationID\": \"\",\n \"description\": \"\",\n \"name\": \"\"\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}}/UpdateApplication"),
Content = new StringContent("{\n \"applicationID\": \"\",\n \"description\": \"\",\n \"name\": \"\"\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}}/UpdateApplication");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"applicationID\": \"\",\n \"description\": \"\",\n \"name\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/UpdateApplication"
payload := strings.NewReader("{\n \"applicationID\": \"\",\n \"description\": \"\",\n \"name\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/UpdateApplication HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 60
{
"applicationID": "",
"description": "",
"name": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/UpdateApplication")
.setHeader("content-type", "application/json")
.setBody("{\n \"applicationID\": \"\",\n \"description\": \"\",\n \"name\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/UpdateApplication"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"applicationID\": \"\",\n \"description\": \"\",\n \"name\": \"\"\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 \"applicationID\": \"\",\n \"description\": \"\",\n \"name\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/UpdateApplication")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/UpdateApplication")
.header("content-type", "application/json")
.body("{\n \"applicationID\": \"\",\n \"description\": \"\",\n \"name\": \"\"\n}")
.asString();
const data = JSON.stringify({
applicationID: '',
description: '',
name: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/UpdateApplication');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/UpdateApplication',
headers: {'content-type': 'application/json'},
data: {applicationID: '', description: '', name: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/UpdateApplication';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"applicationID":"","description":"","name":""}'
};
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}}/UpdateApplication',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "applicationID": "",\n "description": "",\n "name": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"applicationID\": \"\",\n \"description\": \"\",\n \"name\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/UpdateApplication")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/UpdateApplication',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({applicationID: '', description: '', name: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/UpdateApplication',
headers: {'content-type': 'application/json'},
body: {applicationID: '', description: '', name: ''},
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}}/UpdateApplication');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
applicationID: '',
description: '',
name: ''
});
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}}/UpdateApplication',
headers: {'content-type': 'application/json'},
data: {applicationID: '', description: '', name: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/UpdateApplication';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"applicationID":"","description":"","name":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"applicationID": @"",
@"description": @"",
@"name": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/UpdateApplication"]
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}}/UpdateApplication" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"applicationID\": \"\",\n \"description\": \"\",\n \"name\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/UpdateApplication",
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([
'applicationID' => '',
'description' => '',
'name' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/UpdateApplication', [
'body' => '{
"applicationID": "",
"description": "",
"name": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/UpdateApplication');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'applicationID' => '',
'description' => '',
'name' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'applicationID' => '',
'description' => '',
'name' => ''
]));
$request->setRequestUrl('{{baseUrl}}/UpdateApplication');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/UpdateApplication' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"applicationID": "",
"description": "",
"name": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/UpdateApplication' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"applicationID": "",
"description": "",
"name": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"applicationID\": \"\",\n \"description\": \"\",\n \"name\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/UpdateApplication", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/UpdateApplication"
payload = {
"applicationID": "",
"description": "",
"name": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/UpdateApplication"
payload <- "{\n \"applicationID\": \"\",\n \"description\": \"\",\n \"name\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/UpdateApplication")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"applicationID\": \"\",\n \"description\": \"\",\n \"name\": \"\"\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/UpdateApplication') do |req|
req.body = "{\n \"applicationID\": \"\",\n \"description\": \"\",\n \"name\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/UpdateApplication";
let payload = json!({
"applicationID": "",
"description": "",
"name": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/UpdateApplication \
--header 'content-type: application/json' \
--data '{
"applicationID": "",
"description": "",
"name": ""
}'
echo '{
"applicationID": "",
"description": "",
"name": ""
}' | \
http POST {{baseUrl}}/UpdateApplication \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "applicationID": "",\n "description": "",\n "name": ""\n}' \
--output-document \
- {{baseUrl}}/UpdateApplication
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"applicationID": "",
"description": "",
"name": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/UpdateApplication")! 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
UpdateLaunchConfiguration
{{baseUrl}}/UpdateLaunchConfiguration
BODY json
{
"bootMode": "",
"copyPrivateIp": false,
"copyTags": false,
"enableMapAutoTagging": false,
"launchDisposition": "",
"licensing": {
"osByol": ""
},
"mapAutoTaggingMpeID": "",
"name": "",
"postLaunchActions": {
"cloudWatchLogGroupName": "",
"deployment": "",
"s3LogBucket": "",
"s3OutputKeyPrefix": "",
"ssmDocuments": ""
},
"sourceServerID": "",
"targetInstanceTypeRightSizingMethod": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/UpdateLaunchConfiguration");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"bootMode\": \"\",\n \"copyPrivateIp\": false,\n \"copyTags\": false,\n \"enableMapAutoTagging\": false,\n \"launchDisposition\": \"\",\n \"licensing\": {\n \"osByol\": \"\"\n },\n \"mapAutoTaggingMpeID\": \"\",\n \"name\": \"\",\n \"postLaunchActions\": {\n \"cloudWatchLogGroupName\": \"\",\n \"deployment\": \"\",\n \"s3LogBucket\": \"\",\n \"s3OutputKeyPrefix\": \"\",\n \"ssmDocuments\": \"\"\n },\n \"sourceServerID\": \"\",\n \"targetInstanceTypeRightSizingMethod\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/UpdateLaunchConfiguration" {:content-type :json
:form-params {:bootMode ""
:copyPrivateIp false
:copyTags false
:enableMapAutoTagging false
:launchDisposition ""
:licensing {:osByol ""}
:mapAutoTaggingMpeID ""
:name ""
:postLaunchActions {:cloudWatchLogGroupName ""
:deployment ""
:s3LogBucket ""
:s3OutputKeyPrefix ""
:ssmDocuments ""}
:sourceServerID ""
:targetInstanceTypeRightSizingMethod ""}})
require "http/client"
url = "{{baseUrl}}/UpdateLaunchConfiguration"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"bootMode\": \"\",\n \"copyPrivateIp\": false,\n \"copyTags\": false,\n \"enableMapAutoTagging\": false,\n \"launchDisposition\": \"\",\n \"licensing\": {\n \"osByol\": \"\"\n },\n \"mapAutoTaggingMpeID\": \"\",\n \"name\": \"\",\n \"postLaunchActions\": {\n \"cloudWatchLogGroupName\": \"\",\n \"deployment\": \"\",\n \"s3LogBucket\": \"\",\n \"s3OutputKeyPrefix\": \"\",\n \"ssmDocuments\": \"\"\n },\n \"sourceServerID\": \"\",\n \"targetInstanceTypeRightSizingMethod\": \"\"\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}}/UpdateLaunchConfiguration"),
Content = new StringContent("{\n \"bootMode\": \"\",\n \"copyPrivateIp\": false,\n \"copyTags\": false,\n \"enableMapAutoTagging\": false,\n \"launchDisposition\": \"\",\n \"licensing\": {\n \"osByol\": \"\"\n },\n \"mapAutoTaggingMpeID\": \"\",\n \"name\": \"\",\n \"postLaunchActions\": {\n \"cloudWatchLogGroupName\": \"\",\n \"deployment\": \"\",\n \"s3LogBucket\": \"\",\n \"s3OutputKeyPrefix\": \"\",\n \"ssmDocuments\": \"\"\n },\n \"sourceServerID\": \"\",\n \"targetInstanceTypeRightSizingMethod\": \"\"\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}}/UpdateLaunchConfiguration");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"bootMode\": \"\",\n \"copyPrivateIp\": false,\n \"copyTags\": false,\n \"enableMapAutoTagging\": false,\n \"launchDisposition\": \"\",\n \"licensing\": {\n \"osByol\": \"\"\n },\n \"mapAutoTaggingMpeID\": \"\",\n \"name\": \"\",\n \"postLaunchActions\": {\n \"cloudWatchLogGroupName\": \"\",\n \"deployment\": \"\",\n \"s3LogBucket\": \"\",\n \"s3OutputKeyPrefix\": \"\",\n \"ssmDocuments\": \"\"\n },\n \"sourceServerID\": \"\",\n \"targetInstanceTypeRightSizingMethod\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/UpdateLaunchConfiguration"
payload := strings.NewReader("{\n \"bootMode\": \"\",\n \"copyPrivateIp\": false,\n \"copyTags\": false,\n \"enableMapAutoTagging\": false,\n \"launchDisposition\": \"\",\n \"licensing\": {\n \"osByol\": \"\"\n },\n \"mapAutoTaggingMpeID\": \"\",\n \"name\": \"\",\n \"postLaunchActions\": {\n \"cloudWatchLogGroupName\": \"\",\n \"deployment\": \"\",\n \"s3LogBucket\": \"\",\n \"s3OutputKeyPrefix\": \"\",\n \"ssmDocuments\": \"\"\n },\n \"sourceServerID\": \"\",\n \"targetInstanceTypeRightSizingMethod\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/UpdateLaunchConfiguration HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 439
{
"bootMode": "",
"copyPrivateIp": false,
"copyTags": false,
"enableMapAutoTagging": false,
"launchDisposition": "",
"licensing": {
"osByol": ""
},
"mapAutoTaggingMpeID": "",
"name": "",
"postLaunchActions": {
"cloudWatchLogGroupName": "",
"deployment": "",
"s3LogBucket": "",
"s3OutputKeyPrefix": "",
"ssmDocuments": ""
},
"sourceServerID": "",
"targetInstanceTypeRightSizingMethod": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/UpdateLaunchConfiguration")
.setHeader("content-type", "application/json")
.setBody("{\n \"bootMode\": \"\",\n \"copyPrivateIp\": false,\n \"copyTags\": false,\n \"enableMapAutoTagging\": false,\n \"launchDisposition\": \"\",\n \"licensing\": {\n \"osByol\": \"\"\n },\n \"mapAutoTaggingMpeID\": \"\",\n \"name\": \"\",\n \"postLaunchActions\": {\n \"cloudWatchLogGroupName\": \"\",\n \"deployment\": \"\",\n \"s3LogBucket\": \"\",\n \"s3OutputKeyPrefix\": \"\",\n \"ssmDocuments\": \"\"\n },\n \"sourceServerID\": \"\",\n \"targetInstanceTypeRightSizingMethod\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/UpdateLaunchConfiguration"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"bootMode\": \"\",\n \"copyPrivateIp\": false,\n \"copyTags\": false,\n \"enableMapAutoTagging\": false,\n \"launchDisposition\": \"\",\n \"licensing\": {\n \"osByol\": \"\"\n },\n \"mapAutoTaggingMpeID\": \"\",\n \"name\": \"\",\n \"postLaunchActions\": {\n \"cloudWatchLogGroupName\": \"\",\n \"deployment\": \"\",\n \"s3LogBucket\": \"\",\n \"s3OutputKeyPrefix\": \"\",\n \"ssmDocuments\": \"\"\n },\n \"sourceServerID\": \"\",\n \"targetInstanceTypeRightSizingMethod\": \"\"\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 \"bootMode\": \"\",\n \"copyPrivateIp\": false,\n \"copyTags\": false,\n \"enableMapAutoTagging\": false,\n \"launchDisposition\": \"\",\n \"licensing\": {\n \"osByol\": \"\"\n },\n \"mapAutoTaggingMpeID\": \"\",\n \"name\": \"\",\n \"postLaunchActions\": {\n \"cloudWatchLogGroupName\": \"\",\n \"deployment\": \"\",\n \"s3LogBucket\": \"\",\n \"s3OutputKeyPrefix\": \"\",\n \"ssmDocuments\": \"\"\n },\n \"sourceServerID\": \"\",\n \"targetInstanceTypeRightSizingMethod\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/UpdateLaunchConfiguration")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/UpdateLaunchConfiguration")
.header("content-type", "application/json")
.body("{\n \"bootMode\": \"\",\n \"copyPrivateIp\": false,\n \"copyTags\": false,\n \"enableMapAutoTagging\": false,\n \"launchDisposition\": \"\",\n \"licensing\": {\n \"osByol\": \"\"\n },\n \"mapAutoTaggingMpeID\": \"\",\n \"name\": \"\",\n \"postLaunchActions\": {\n \"cloudWatchLogGroupName\": \"\",\n \"deployment\": \"\",\n \"s3LogBucket\": \"\",\n \"s3OutputKeyPrefix\": \"\",\n \"ssmDocuments\": \"\"\n },\n \"sourceServerID\": \"\",\n \"targetInstanceTypeRightSizingMethod\": \"\"\n}")
.asString();
const data = JSON.stringify({
bootMode: '',
copyPrivateIp: false,
copyTags: false,
enableMapAutoTagging: false,
launchDisposition: '',
licensing: {
osByol: ''
},
mapAutoTaggingMpeID: '',
name: '',
postLaunchActions: {
cloudWatchLogGroupName: '',
deployment: '',
s3LogBucket: '',
s3OutputKeyPrefix: '',
ssmDocuments: ''
},
sourceServerID: '',
targetInstanceTypeRightSizingMethod: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/UpdateLaunchConfiguration');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/UpdateLaunchConfiguration',
headers: {'content-type': 'application/json'},
data: {
bootMode: '',
copyPrivateIp: false,
copyTags: false,
enableMapAutoTagging: false,
launchDisposition: '',
licensing: {osByol: ''},
mapAutoTaggingMpeID: '',
name: '',
postLaunchActions: {
cloudWatchLogGroupName: '',
deployment: '',
s3LogBucket: '',
s3OutputKeyPrefix: '',
ssmDocuments: ''
},
sourceServerID: '',
targetInstanceTypeRightSizingMethod: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/UpdateLaunchConfiguration';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"bootMode":"","copyPrivateIp":false,"copyTags":false,"enableMapAutoTagging":false,"launchDisposition":"","licensing":{"osByol":""},"mapAutoTaggingMpeID":"","name":"","postLaunchActions":{"cloudWatchLogGroupName":"","deployment":"","s3LogBucket":"","s3OutputKeyPrefix":"","ssmDocuments":""},"sourceServerID":"","targetInstanceTypeRightSizingMethod":""}'
};
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}}/UpdateLaunchConfiguration',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "bootMode": "",\n "copyPrivateIp": false,\n "copyTags": false,\n "enableMapAutoTagging": false,\n "launchDisposition": "",\n "licensing": {\n "osByol": ""\n },\n "mapAutoTaggingMpeID": "",\n "name": "",\n "postLaunchActions": {\n "cloudWatchLogGroupName": "",\n "deployment": "",\n "s3LogBucket": "",\n "s3OutputKeyPrefix": "",\n "ssmDocuments": ""\n },\n "sourceServerID": "",\n "targetInstanceTypeRightSizingMethod": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"bootMode\": \"\",\n \"copyPrivateIp\": false,\n \"copyTags\": false,\n \"enableMapAutoTagging\": false,\n \"launchDisposition\": \"\",\n \"licensing\": {\n \"osByol\": \"\"\n },\n \"mapAutoTaggingMpeID\": \"\",\n \"name\": \"\",\n \"postLaunchActions\": {\n \"cloudWatchLogGroupName\": \"\",\n \"deployment\": \"\",\n \"s3LogBucket\": \"\",\n \"s3OutputKeyPrefix\": \"\",\n \"ssmDocuments\": \"\"\n },\n \"sourceServerID\": \"\",\n \"targetInstanceTypeRightSizingMethod\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/UpdateLaunchConfiguration")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/UpdateLaunchConfiguration',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
bootMode: '',
copyPrivateIp: false,
copyTags: false,
enableMapAutoTagging: false,
launchDisposition: '',
licensing: {osByol: ''},
mapAutoTaggingMpeID: '',
name: '',
postLaunchActions: {
cloudWatchLogGroupName: '',
deployment: '',
s3LogBucket: '',
s3OutputKeyPrefix: '',
ssmDocuments: ''
},
sourceServerID: '',
targetInstanceTypeRightSizingMethod: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/UpdateLaunchConfiguration',
headers: {'content-type': 'application/json'},
body: {
bootMode: '',
copyPrivateIp: false,
copyTags: false,
enableMapAutoTagging: false,
launchDisposition: '',
licensing: {osByol: ''},
mapAutoTaggingMpeID: '',
name: '',
postLaunchActions: {
cloudWatchLogGroupName: '',
deployment: '',
s3LogBucket: '',
s3OutputKeyPrefix: '',
ssmDocuments: ''
},
sourceServerID: '',
targetInstanceTypeRightSizingMethod: ''
},
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}}/UpdateLaunchConfiguration');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
bootMode: '',
copyPrivateIp: false,
copyTags: false,
enableMapAutoTagging: false,
launchDisposition: '',
licensing: {
osByol: ''
},
mapAutoTaggingMpeID: '',
name: '',
postLaunchActions: {
cloudWatchLogGroupName: '',
deployment: '',
s3LogBucket: '',
s3OutputKeyPrefix: '',
ssmDocuments: ''
},
sourceServerID: '',
targetInstanceTypeRightSizingMethod: ''
});
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}}/UpdateLaunchConfiguration',
headers: {'content-type': 'application/json'},
data: {
bootMode: '',
copyPrivateIp: false,
copyTags: false,
enableMapAutoTagging: false,
launchDisposition: '',
licensing: {osByol: ''},
mapAutoTaggingMpeID: '',
name: '',
postLaunchActions: {
cloudWatchLogGroupName: '',
deployment: '',
s3LogBucket: '',
s3OutputKeyPrefix: '',
ssmDocuments: ''
},
sourceServerID: '',
targetInstanceTypeRightSizingMethod: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/UpdateLaunchConfiguration';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"bootMode":"","copyPrivateIp":false,"copyTags":false,"enableMapAutoTagging":false,"launchDisposition":"","licensing":{"osByol":""},"mapAutoTaggingMpeID":"","name":"","postLaunchActions":{"cloudWatchLogGroupName":"","deployment":"","s3LogBucket":"","s3OutputKeyPrefix":"","ssmDocuments":""},"sourceServerID":"","targetInstanceTypeRightSizingMethod":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"bootMode": @"",
@"copyPrivateIp": @NO,
@"copyTags": @NO,
@"enableMapAutoTagging": @NO,
@"launchDisposition": @"",
@"licensing": @{ @"osByol": @"" },
@"mapAutoTaggingMpeID": @"",
@"name": @"",
@"postLaunchActions": @{ @"cloudWatchLogGroupName": @"", @"deployment": @"", @"s3LogBucket": @"", @"s3OutputKeyPrefix": @"", @"ssmDocuments": @"" },
@"sourceServerID": @"",
@"targetInstanceTypeRightSizingMethod": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/UpdateLaunchConfiguration"]
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}}/UpdateLaunchConfiguration" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"bootMode\": \"\",\n \"copyPrivateIp\": false,\n \"copyTags\": false,\n \"enableMapAutoTagging\": false,\n \"launchDisposition\": \"\",\n \"licensing\": {\n \"osByol\": \"\"\n },\n \"mapAutoTaggingMpeID\": \"\",\n \"name\": \"\",\n \"postLaunchActions\": {\n \"cloudWatchLogGroupName\": \"\",\n \"deployment\": \"\",\n \"s3LogBucket\": \"\",\n \"s3OutputKeyPrefix\": \"\",\n \"ssmDocuments\": \"\"\n },\n \"sourceServerID\": \"\",\n \"targetInstanceTypeRightSizingMethod\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/UpdateLaunchConfiguration",
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([
'bootMode' => '',
'copyPrivateIp' => null,
'copyTags' => null,
'enableMapAutoTagging' => null,
'launchDisposition' => '',
'licensing' => [
'osByol' => ''
],
'mapAutoTaggingMpeID' => '',
'name' => '',
'postLaunchActions' => [
'cloudWatchLogGroupName' => '',
'deployment' => '',
's3LogBucket' => '',
's3OutputKeyPrefix' => '',
'ssmDocuments' => ''
],
'sourceServerID' => '',
'targetInstanceTypeRightSizingMethod' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/UpdateLaunchConfiguration', [
'body' => '{
"bootMode": "",
"copyPrivateIp": false,
"copyTags": false,
"enableMapAutoTagging": false,
"launchDisposition": "",
"licensing": {
"osByol": ""
},
"mapAutoTaggingMpeID": "",
"name": "",
"postLaunchActions": {
"cloudWatchLogGroupName": "",
"deployment": "",
"s3LogBucket": "",
"s3OutputKeyPrefix": "",
"ssmDocuments": ""
},
"sourceServerID": "",
"targetInstanceTypeRightSizingMethod": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/UpdateLaunchConfiguration');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'bootMode' => '',
'copyPrivateIp' => null,
'copyTags' => null,
'enableMapAutoTagging' => null,
'launchDisposition' => '',
'licensing' => [
'osByol' => ''
],
'mapAutoTaggingMpeID' => '',
'name' => '',
'postLaunchActions' => [
'cloudWatchLogGroupName' => '',
'deployment' => '',
's3LogBucket' => '',
's3OutputKeyPrefix' => '',
'ssmDocuments' => ''
],
'sourceServerID' => '',
'targetInstanceTypeRightSizingMethod' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'bootMode' => '',
'copyPrivateIp' => null,
'copyTags' => null,
'enableMapAutoTagging' => null,
'launchDisposition' => '',
'licensing' => [
'osByol' => ''
],
'mapAutoTaggingMpeID' => '',
'name' => '',
'postLaunchActions' => [
'cloudWatchLogGroupName' => '',
'deployment' => '',
's3LogBucket' => '',
's3OutputKeyPrefix' => '',
'ssmDocuments' => ''
],
'sourceServerID' => '',
'targetInstanceTypeRightSizingMethod' => ''
]));
$request->setRequestUrl('{{baseUrl}}/UpdateLaunchConfiguration');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/UpdateLaunchConfiguration' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"bootMode": "",
"copyPrivateIp": false,
"copyTags": false,
"enableMapAutoTagging": false,
"launchDisposition": "",
"licensing": {
"osByol": ""
},
"mapAutoTaggingMpeID": "",
"name": "",
"postLaunchActions": {
"cloudWatchLogGroupName": "",
"deployment": "",
"s3LogBucket": "",
"s3OutputKeyPrefix": "",
"ssmDocuments": ""
},
"sourceServerID": "",
"targetInstanceTypeRightSizingMethod": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/UpdateLaunchConfiguration' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"bootMode": "",
"copyPrivateIp": false,
"copyTags": false,
"enableMapAutoTagging": false,
"launchDisposition": "",
"licensing": {
"osByol": ""
},
"mapAutoTaggingMpeID": "",
"name": "",
"postLaunchActions": {
"cloudWatchLogGroupName": "",
"deployment": "",
"s3LogBucket": "",
"s3OutputKeyPrefix": "",
"ssmDocuments": ""
},
"sourceServerID": "",
"targetInstanceTypeRightSizingMethod": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"bootMode\": \"\",\n \"copyPrivateIp\": false,\n \"copyTags\": false,\n \"enableMapAutoTagging\": false,\n \"launchDisposition\": \"\",\n \"licensing\": {\n \"osByol\": \"\"\n },\n \"mapAutoTaggingMpeID\": \"\",\n \"name\": \"\",\n \"postLaunchActions\": {\n \"cloudWatchLogGroupName\": \"\",\n \"deployment\": \"\",\n \"s3LogBucket\": \"\",\n \"s3OutputKeyPrefix\": \"\",\n \"ssmDocuments\": \"\"\n },\n \"sourceServerID\": \"\",\n \"targetInstanceTypeRightSizingMethod\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/UpdateLaunchConfiguration", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/UpdateLaunchConfiguration"
payload = {
"bootMode": "",
"copyPrivateIp": False,
"copyTags": False,
"enableMapAutoTagging": False,
"launchDisposition": "",
"licensing": { "osByol": "" },
"mapAutoTaggingMpeID": "",
"name": "",
"postLaunchActions": {
"cloudWatchLogGroupName": "",
"deployment": "",
"s3LogBucket": "",
"s3OutputKeyPrefix": "",
"ssmDocuments": ""
},
"sourceServerID": "",
"targetInstanceTypeRightSizingMethod": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/UpdateLaunchConfiguration"
payload <- "{\n \"bootMode\": \"\",\n \"copyPrivateIp\": false,\n \"copyTags\": false,\n \"enableMapAutoTagging\": false,\n \"launchDisposition\": \"\",\n \"licensing\": {\n \"osByol\": \"\"\n },\n \"mapAutoTaggingMpeID\": \"\",\n \"name\": \"\",\n \"postLaunchActions\": {\n \"cloudWatchLogGroupName\": \"\",\n \"deployment\": \"\",\n \"s3LogBucket\": \"\",\n \"s3OutputKeyPrefix\": \"\",\n \"ssmDocuments\": \"\"\n },\n \"sourceServerID\": \"\",\n \"targetInstanceTypeRightSizingMethod\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/UpdateLaunchConfiguration")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"bootMode\": \"\",\n \"copyPrivateIp\": false,\n \"copyTags\": false,\n \"enableMapAutoTagging\": false,\n \"launchDisposition\": \"\",\n \"licensing\": {\n \"osByol\": \"\"\n },\n \"mapAutoTaggingMpeID\": \"\",\n \"name\": \"\",\n \"postLaunchActions\": {\n \"cloudWatchLogGroupName\": \"\",\n \"deployment\": \"\",\n \"s3LogBucket\": \"\",\n \"s3OutputKeyPrefix\": \"\",\n \"ssmDocuments\": \"\"\n },\n \"sourceServerID\": \"\",\n \"targetInstanceTypeRightSizingMethod\": \"\"\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/UpdateLaunchConfiguration') do |req|
req.body = "{\n \"bootMode\": \"\",\n \"copyPrivateIp\": false,\n \"copyTags\": false,\n \"enableMapAutoTagging\": false,\n \"launchDisposition\": \"\",\n \"licensing\": {\n \"osByol\": \"\"\n },\n \"mapAutoTaggingMpeID\": \"\",\n \"name\": \"\",\n \"postLaunchActions\": {\n \"cloudWatchLogGroupName\": \"\",\n \"deployment\": \"\",\n \"s3LogBucket\": \"\",\n \"s3OutputKeyPrefix\": \"\",\n \"ssmDocuments\": \"\"\n },\n \"sourceServerID\": \"\",\n \"targetInstanceTypeRightSizingMethod\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/UpdateLaunchConfiguration";
let payload = json!({
"bootMode": "",
"copyPrivateIp": false,
"copyTags": false,
"enableMapAutoTagging": false,
"launchDisposition": "",
"licensing": json!({"osByol": ""}),
"mapAutoTaggingMpeID": "",
"name": "",
"postLaunchActions": json!({
"cloudWatchLogGroupName": "",
"deployment": "",
"s3LogBucket": "",
"s3OutputKeyPrefix": "",
"ssmDocuments": ""
}),
"sourceServerID": "",
"targetInstanceTypeRightSizingMethod": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/UpdateLaunchConfiguration \
--header 'content-type: application/json' \
--data '{
"bootMode": "",
"copyPrivateIp": false,
"copyTags": false,
"enableMapAutoTagging": false,
"launchDisposition": "",
"licensing": {
"osByol": ""
},
"mapAutoTaggingMpeID": "",
"name": "",
"postLaunchActions": {
"cloudWatchLogGroupName": "",
"deployment": "",
"s3LogBucket": "",
"s3OutputKeyPrefix": "",
"ssmDocuments": ""
},
"sourceServerID": "",
"targetInstanceTypeRightSizingMethod": ""
}'
echo '{
"bootMode": "",
"copyPrivateIp": false,
"copyTags": false,
"enableMapAutoTagging": false,
"launchDisposition": "",
"licensing": {
"osByol": ""
},
"mapAutoTaggingMpeID": "",
"name": "",
"postLaunchActions": {
"cloudWatchLogGroupName": "",
"deployment": "",
"s3LogBucket": "",
"s3OutputKeyPrefix": "",
"ssmDocuments": ""
},
"sourceServerID": "",
"targetInstanceTypeRightSizingMethod": ""
}' | \
http POST {{baseUrl}}/UpdateLaunchConfiguration \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "bootMode": "",\n "copyPrivateIp": false,\n "copyTags": false,\n "enableMapAutoTagging": false,\n "launchDisposition": "",\n "licensing": {\n "osByol": ""\n },\n "mapAutoTaggingMpeID": "",\n "name": "",\n "postLaunchActions": {\n "cloudWatchLogGroupName": "",\n "deployment": "",\n "s3LogBucket": "",\n "s3OutputKeyPrefix": "",\n "ssmDocuments": ""\n },\n "sourceServerID": "",\n "targetInstanceTypeRightSizingMethod": ""\n}' \
--output-document \
- {{baseUrl}}/UpdateLaunchConfiguration
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"bootMode": "",
"copyPrivateIp": false,
"copyTags": false,
"enableMapAutoTagging": false,
"launchDisposition": "",
"licensing": ["osByol": ""],
"mapAutoTaggingMpeID": "",
"name": "",
"postLaunchActions": [
"cloudWatchLogGroupName": "",
"deployment": "",
"s3LogBucket": "",
"s3OutputKeyPrefix": "",
"ssmDocuments": ""
],
"sourceServerID": "",
"targetInstanceTypeRightSizingMethod": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/UpdateLaunchConfiguration")! 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
UpdateLaunchConfigurationTemplate
{{baseUrl}}/UpdateLaunchConfigurationTemplate
BODY json
{
"associatePublicIpAddress": false,
"bootMode": "",
"copyPrivateIp": false,
"copyTags": false,
"enableMapAutoTagging": false,
"largeVolumeConf": {
"iops": "",
"throughput": "",
"volumeType": ""
},
"launchConfigurationTemplateID": "",
"launchDisposition": "",
"licensing": {
"osByol": ""
},
"mapAutoTaggingMpeID": "",
"postLaunchActions": {
"cloudWatchLogGroupName": "",
"deployment": "",
"s3LogBucket": "",
"s3OutputKeyPrefix": "",
"ssmDocuments": ""
},
"smallVolumeConf": {
"iops": "",
"throughput": "",
"volumeType": ""
},
"smallVolumeMaxSize": 0,
"targetInstanceTypeRightSizingMethod": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/UpdateLaunchConfigurationTemplate");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"associatePublicIpAddress\": false,\n \"bootMode\": \"\",\n \"copyPrivateIp\": false,\n \"copyTags\": false,\n \"enableMapAutoTagging\": false,\n \"largeVolumeConf\": {\n \"iops\": \"\",\n \"throughput\": \"\",\n \"volumeType\": \"\"\n },\n \"launchConfigurationTemplateID\": \"\",\n \"launchDisposition\": \"\",\n \"licensing\": {\n \"osByol\": \"\"\n },\n \"mapAutoTaggingMpeID\": \"\",\n \"postLaunchActions\": {\n \"cloudWatchLogGroupName\": \"\",\n \"deployment\": \"\",\n \"s3LogBucket\": \"\",\n \"s3OutputKeyPrefix\": \"\",\n \"ssmDocuments\": \"\"\n },\n \"smallVolumeConf\": {\n \"iops\": \"\",\n \"throughput\": \"\",\n \"volumeType\": \"\"\n },\n \"smallVolumeMaxSize\": 0,\n \"targetInstanceTypeRightSizingMethod\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/UpdateLaunchConfigurationTemplate" {:content-type :json
:form-params {:associatePublicIpAddress false
:bootMode ""
:copyPrivateIp false
:copyTags false
:enableMapAutoTagging false
:largeVolumeConf {:iops ""
:throughput ""
:volumeType ""}
:launchConfigurationTemplateID ""
:launchDisposition ""
:licensing {:osByol ""}
:mapAutoTaggingMpeID ""
:postLaunchActions {:cloudWatchLogGroupName ""
:deployment ""
:s3LogBucket ""
:s3OutputKeyPrefix ""
:ssmDocuments ""}
:smallVolumeConf {:iops ""
:throughput ""
:volumeType ""}
:smallVolumeMaxSize 0
:targetInstanceTypeRightSizingMethod ""}})
require "http/client"
url = "{{baseUrl}}/UpdateLaunchConfigurationTemplate"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"associatePublicIpAddress\": false,\n \"bootMode\": \"\",\n \"copyPrivateIp\": false,\n \"copyTags\": false,\n \"enableMapAutoTagging\": false,\n \"largeVolumeConf\": {\n \"iops\": \"\",\n \"throughput\": \"\",\n \"volumeType\": \"\"\n },\n \"launchConfigurationTemplateID\": \"\",\n \"launchDisposition\": \"\",\n \"licensing\": {\n \"osByol\": \"\"\n },\n \"mapAutoTaggingMpeID\": \"\",\n \"postLaunchActions\": {\n \"cloudWatchLogGroupName\": \"\",\n \"deployment\": \"\",\n \"s3LogBucket\": \"\",\n \"s3OutputKeyPrefix\": \"\",\n \"ssmDocuments\": \"\"\n },\n \"smallVolumeConf\": {\n \"iops\": \"\",\n \"throughput\": \"\",\n \"volumeType\": \"\"\n },\n \"smallVolumeMaxSize\": 0,\n \"targetInstanceTypeRightSizingMethod\": \"\"\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}}/UpdateLaunchConfigurationTemplate"),
Content = new StringContent("{\n \"associatePublicIpAddress\": false,\n \"bootMode\": \"\",\n \"copyPrivateIp\": false,\n \"copyTags\": false,\n \"enableMapAutoTagging\": false,\n \"largeVolumeConf\": {\n \"iops\": \"\",\n \"throughput\": \"\",\n \"volumeType\": \"\"\n },\n \"launchConfigurationTemplateID\": \"\",\n \"launchDisposition\": \"\",\n \"licensing\": {\n \"osByol\": \"\"\n },\n \"mapAutoTaggingMpeID\": \"\",\n \"postLaunchActions\": {\n \"cloudWatchLogGroupName\": \"\",\n \"deployment\": \"\",\n \"s3LogBucket\": \"\",\n \"s3OutputKeyPrefix\": \"\",\n \"ssmDocuments\": \"\"\n },\n \"smallVolumeConf\": {\n \"iops\": \"\",\n \"throughput\": \"\",\n \"volumeType\": \"\"\n },\n \"smallVolumeMaxSize\": 0,\n \"targetInstanceTypeRightSizingMethod\": \"\"\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}}/UpdateLaunchConfigurationTemplate");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"associatePublicIpAddress\": false,\n \"bootMode\": \"\",\n \"copyPrivateIp\": false,\n \"copyTags\": false,\n \"enableMapAutoTagging\": false,\n \"largeVolumeConf\": {\n \"iops\": \"\",\n \"throughput\": \"\",\n \"volumeType\": \"\"\n },\n \"launchConfigurationTemplateID\": \"\",\n \"launchDisposition\": \"\",\n \"licensing\": {\n \"osByol\": \"\"\n },\n \"mapAutoTaggingMpeID\": \"\",\n \"postLaunchActions\": {\n \"cloudWatchLogGroupName\": \"\",\n \"deployment\": \"\",\n \"s3LogBucket\": \"\",\n \"s3OutputKeyPrefix\": \"\",\n \"ssmDocuments\": \"\"\n },\n \"smallVolumeConf\": {\n \"iops\": \"\",\n \"throughput\": \"\",\n \"volumeType\": \"\"\n },\n \"smallVolumeMaxSize\": 0,\n \"targetInstanceTypeRightSizingMethod\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/UpdateLaunchConfigurationTemplate"
payload := strings.NewReader("{\n \"associatePublicIpAddress\": false,\n \"bootMode\": \"\",\n \"copyPrivateIp\": false,\n \"copyTags\": false,\n \"enableMapAutoTagging\": false,\n \"largeVolumeConf\": {\n \"iops\": \"\",\n \"throughput\": \"\",\n \"volumeType\": \"\"\n },\n \"launchConfigurationTemplateID\": \"\",\n \"launchDisposition\": \"\",\n \"licensing\": {\n \"osByol\": \"\"\n },\n \"mapAutoTaggingMpeID\": \"\",\n \"postLaunchActions\": {\n \"cloudWatchLogGroupName\": \"\",\n \"deployment\": \"\",\n \"s3LogBucket\": \"\",\n \"s3OutputKeyPrefix\": \"\",\n \"ssmDocuments\": \"\"\n },\n \"smallVolumeConf\": {\n \"iops\": \"\",\n \"throughput\": \"\",\n \"volumeType\": \"\"\n },\n \"smallVolumeMaxSize\": 0,\n \"targetInstanceTypeRightSizingMethod\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/UpdateLaunchConfigurationTemplate HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 678
{
"associatePublicIpAddress": false,
"bootMode": "",
"copyPrivateIp": false,
"copyTags": false,
"enableMapAutoTagging": false,
"largeVolumeConf": {
"iops": "",
"throughput": "",
"volumeType": ""
},
"launchConfigurationTemplateID": "",
"launchDisposition": "",
"licensing": {
"osByol": ""
},
"mapAutoTaggingMpeID": "",
"postLaunchActions": {
"cloudWatchLogGroupName": "",
"deployment": "",
"s3LogBucket": "",
"s3OutputKeyPrefix": "",
"ssmDocuments": ""
},
"smallVolumeConf": {
"iops": "",
"throughput": "",
"volumeType": ""
},
"smallVolumeMaxSize": 0,
"targetInstanceTypeRightSizingMethod": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/UpdateLaunchConfigurationTemplate")
.setHeader("content-type", "application/json")
.setBody("{\n \"associatePublicIpAddress\": false,\n \"bootMode\": \"\",\n \"copyPrivateIp\": false,\n \"copyTags\": false,\n \"enableMapAutoTagging\": false,\n \"largeVolumeConf\": {\n \"iops\": \"\",\n \"throughput\": \"\",\n \"volumeType\": \"\"\n },\n \"launchConfigurationTemplateID\": \"\",\n \"launchDisposition\": \"\",\n \"licensing\": {\n \"osByol\": \"\"\n },\n \"mapAutoTaggingMpeID\": \"\",\n \"postLaunchActions\": {\n \"cloudWatchLogGroupName\": \"\",\n \"deployment\": \"\",\n \"s3LogBucket\": \"\",\n \"s3OutputKeyPrefix\": \"\",\n \"ssmDocuments\": \"\"\n },\n \"smallVolumeConf\": {\n \"iops\": \"\",\n \"throughput\": \"\",\n \"volumeType\": \"\"\n },\n \"smallVolumeMaxSize\": 0,\n \"targetInstanceTypeRightSizingMethod\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/UpdateLaunchConfigurationTemplate"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"associatePublicIpAddress\": false,\n \"bootMode\": \"\",\n \"copyPrivateIp\": false,\n \"copyTags\": false,\n \"enableMapAutoTagging\": false,\n \"largeVolumeConf\": {\n \"iops\": \"\",\n \"throughput\": \"\",\n \"volumeType\": \"\"\n },\n \"launchConfigurationTemplateID\": \"\",\n \"launchDisposition\": \"\",\n \"licensing\": {\n \"osByol\": \"\"\n },\n \"mapAutoTaggingMpeID\": \"\",\n \"postLaunchActions\": {\n \"cloudWatchLogGroupName\": \"\",\n \"deployment\": \"\",\n \"s3LogBucket\": \"\",\n \"s3OutputKeyPrefix\": \"\",\n \"ssmDocuments\": \"\"\n },\n \"smallVolumeConf\": {\n \"iops\": \"\",\n \"throughput\": \"\",\n \"volumeType\": \"\"\n },\n \"smallVolumeMaxSize\": 0,\n \"targetInstanceTypeRightSizingMethod\": \"\"\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 \"associatePublicIpAddress\": false,\n \"bootMode\": \"\",\n \"copyPrivateIp\": false,\n \"copyTags\": false,\n \"enableMapAutoTagging\": false,\n \"largeVolumeConf\": {\n \"iops\": \"\",\n \"throughput\": \"\",\n \"volumeType\": \"\"\n },\n \"launchConfigurationTemplateID\": \"\",\n \"launchDisposition\": \"\",\n \"licensing\": {\n \"osByol\": \"\"\n },\n \"mapAutoTaggingMpeID\": \"\",\n \"postLaunchActions\": {\n \"cloudWatchLogGroupName\": \"\",\n \"deployment\": \"\",\n \"s3LogBucket\": \"\",\n \"s3OutputKeyPrefix\": \"\",\n \"ssmDocuments\": \"\"\n },\n \"smallVolumeConf\": {\n \"iops\": \"\",\n \"throughput\": \"\",\n \"volumeType\": \"\"\n },\n \"smallVolumeMaxSize\": 0,\n \"targetInstanceTypeRightSizingMethod\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/UpdateLaunchConfigurationTemplate")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/UpdateLaunchConfigurationTemplate")
.header("content-type", "application/json")
.body("{\n \"associatePublicIpAddress\": false,\n \"bootMode\": \"\",\n \"copyPrivateIp\": false,\n \"copyTags\": false,\n \"enableMapAutoTagging\": false,\n \"largeVolumeConf\": {\n \"iops\": \"\",\n \"throughput\": \"\",\n \"volumeType\": \"\"\n },\n \"launchConfigurationTemplateID\": \"\",\n \"launchDisposition\": \"\",\n \"licensing\": {\n \"osByol\": \"\"\n },\n \"mapAutoTaggingMpeID\": \"\",\n \"postLaunchActions\": {\n \"cloudWatchLogGroupName\": \"\",\n \"deployment\": \"\",\n \"s3LogBucket\": \"\",\n \"s3OutputKeyPrefix\": \"\",\n \"ssmDocuments\": \"\"\n },\n \"smallVolumeConf\": {\n \"iops\": \"\",\n \"throughput\": \"\",\n \"volumeType\": \"\"\n },\n \"smallVolumeMaxSize\": 0,\n \"targetInstanceTypeRightSizingMethod\": \"\"\n}")
.asString();
const data = JSON.stringify({
associatePublicIpAddress: false,
bootMode: '',
copyPrivateIp: false,
copyTags: false,
enableMapAutoTagging: false,
largeVolumeConf: {
iops: '',
throughput: '',
volumeType: ''
},
launchConfigurationTemplateID: '',
launchDisposition: '',
licensing: {
osByol: ''
},
mapAutoTaggingMpeID: '',
postLaunchActions: {
cloudWatchLogGroupName: '',
deployment: '',
s3LogBucket: '',
s3OutputKeyPrefix: '',
ssmDocuments: ''
},
smallVolumeConf: {
iops: '',
throughput: '',
volumeType: ''
},
smallVolumeMaxSize: 0,
targetInstanceTypeRightSizingMethod: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/UpdateLaunchConfigurationTemplate');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/UpdateLaunchConfigurationTemplate',
headers: {'content-type': 'application/json'},
data: {
associatePublicIpAddress: false,
bootMode: '',
copyPrivateIp: false,
copyTags: false,
enableMapAutoTagging: false,
largeVolumeConf: {iops: '', throughput: '', volumeType: ''},
launchConfigurationTemplateID: '',
launchDisposition: '',
licensing: {osByol: ''},
mapAutoTaggingMpeID: '',
postLaunchActions: {
cloudWatchLogGroupName: '',
deployment: '',
s3LogBucket: '',
s3OutputKeyPrefix: '',
ssmDocuments: ''
},
smallVolumeConf: {iops: '', throughput: '', volumeType: ''},
smallVolumeMaxSize: 0,
targetInstanceTypeRightSizingMethod: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/UpdateLaunchConfigurationTemplate';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"associatePublicIpAddress":false,"bootMode":"","copyPrivateIp":false,"copyTags":false,"enableMapAutoTagging":false,"largeVolumeConf":{"iops":"","throughput":"","volumeType":""},"launchConfigurationTemplateID":"","launchDisposition":"","licensing":{"osByol":""},"mapAutoTaggingMpeID":"","postLaunchActions":{"cloudWatchLogGroupName":"","deployment":"","s3LogBucket":"","s3OutputKeyPrefix":"","ssmDocuments":""},"smallVolumeConf":{"iops":"","throughput":"","volumeType":""},"smallVolumeMaxSize":0,"targetInstanceTypeRightSizingMethod":""}'
};
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}}/UpdateLaunchConfigurationTemplate',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "associatePublicIpAddress": false,\n "bootMode": "",\n "copyPrivateIp": false,\n "copyTags": false,\n "enableMapAutoTagging": false,\n "largeVolumeConf": {\n "iops": "",\n "throughput": "",\n "volumeType": ""\n },\n "launchConfigurationTemplateID": "",\n "launchDisposition": "",\n "licensing": {\n "osByol": ""\n },\n "mapAutoTaggingMpeID": "",\n "postLaunchActions": {\n "cloudWatchLogGroupName": "",\n "deployment": "",\n "s3LogBucket": "",\n "s3OutputKeyPrefix": "",\n "ssmDocuments": ""\n },\n "smallVolumeConf": {\n "iops": "",\n "throughput": "",\n "volumeType": ""\n },\n "smallVolumeMaxSize": 0,\n "targetInstanceTypeRightSizingMethod": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"associatePublicIpAddress\": false,\n \"bootMode\": \"\",\n \"copyPrivateIp\": false,\n \"copyTags\": false,\n \"enableMapAutoTagging\": false,\n \"largeVolumeConf\": {\n \"iops\": \"\",\n \"throughput\": \"\",\n \"volumeType\": \"\"\n },\n \"launchConfigurationTemplateID\": \"\",\n \"launchDisposition\": \"\",\n \"licensing\": {\n \"osByol\": \"\"\n },\n \"mapAutoTaggingMpeID\": \"\",\n \"postLaunchActions\": {\n \"cloudWatchLogGroupName\": \"\",\n \"deployment\": \"\",\n \"s3LogBucket\": \"\",\n \"s3OutputKeyPrefix\": \"\",\n \"ssmDocuments\": \"\"\n },\n \"smallVolumeConf\": {\n \"iops\": \"\",\n \"throughput\": \"\",\n \"volumeType\": \"\"\n },\n \"smallVolumeMaxSize\": 0,\n \"targetInstanceTypeRightSizingMethod\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/UpdateLaunchConfigurationTemplate")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/UpdateLaunchConfigurationTemplate',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
associatePublicIpAddress: false,
bootMode: '',
copyPrivateIp: false,
copyTags: false,
enableMapAutoTagging: false,
largeVolumeConf: {iops: '', throughput: '', volumeType: ''},
launchConfigurationTemplateID: '',
launchDisposition: '',
licensing: {osByol: ''},
mapAutoTaggingMpeID: '',
postLaunchActions: {
cloudWatchLogGroupName: '',
deployment: '',
s3LogBucket: '',
s3OutputKeyPrefix: '',
ssmDocuments: ''
},
smallVolumeConf: {iops: '', throughput: '', volumeType: ''},
smallVolumeMaxSize: 0,
targetInstanceTypeRightSizingMethod: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/UpdateLaunchConfigurationTemplate',
headers: {'content-type': 'application/json'},
body: {
associatePublicIpAddress: false,
bootMode: '',
copyPrivateIp: false,
copyTags: false,
enableMapAutoTagging: false,
largeVolumeConf: {iops: '', throughput: '', volumeType: ''},
launchConfigurationTemplateID: '',
launchDisposition: '',
licensing: {osByol: ''},
mapAutoTaggingMpeID: '',
postLaunchActions: {
cloudWatchLogGroupName: '',
deployment: '',
s3LogBucket: '',
s3OutputKeyPrefix: '',
ssmDocuments: ''
},
smallVolumeConf: {iops: '', throughput: '', volumeType: ''},
smallVolumeMaxSize: 0,
targetInstanceTypeRightSizingMethod: ''
},
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}}/UpdateLaunchConfigurationTemplate');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
associatePublicIpAddress: false,
bootMode: '',
copyPrivateIp: false,
copyTags: false,
enableMapAutoTagging: false,
largeVolumeConf: {
iops: '',
throughput: '',
volumeType: ''
},
launchConfigurationTemplateID: '',
launchDisposition: '',
licensing: {
osByol: ''
},
mapAutoTaggingMpeID: '',
postLaunchActions: {
cloudWatchLogGroupName: '',
deployment: '',
s3LogBucket: '',
s3OutputKeyPrefix: '',
ssmDocuments: ''
},
smallVolumeConf: {
iops: '',
throughput: '',
volumeType: ''
},
smallVolumeMaxSize: 0,
targetInstanceTypeRightSizingMethod: ''
});
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}}/UpdateLaunchConfigurationTemplate',
headers: {'content-type': 'application/json'},
data: {
associatePublicIpAddress: false,
bootMode: '',
copyPrivateIp: false,
copyTags: false,
enableMapAutoTagging: false,
largeVolumeConf: {iops: '', throughput: '', volumeType: ''},
launchConfigurationTemplateID: '',
launchDisposition: '',
licensing: {osByol: ''},
mapAutoTaggingMpeID: '',
postLaunchActions: {
cloudWatchLogGroupName: '',
deployment: '',
s3LogBucket: '',
s3OutputKeyPrefix: '',
ssmDocuments: ''
},
smallVolumeConf: {iops: '', throughput: '', volumeType: ''},
smallVolumeMaxSize: 0,
targetInstanceTypeRightSizingMethod: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/UpdateLaunchConfigurationTemplate';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"associatePublicIpAddress":false,"bootMode":"","copyPrivateIp":false,"copyTags":false,"enableMapAutoTagging":false,"largeVolumeConf":{"iops":"","throughput":"","volumeType":""},"launchConfigurationTemplateID":"","launchDisposition":"","licensing":{"osByol":""},"mapAutoTaggingMpeID":"","postLaunchActions":{"cloudWatchLogGroupName":"","deployment":"","s3LogBucket":"","s3OutputKeyPrefix":"","ssmDocuments":""},"smallVolumeConf":{"iops":"","throughput":"","volumeType":""},"smallVolumeMaxSize":0,"targetInstanceTypeRightSizingMethod":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"associatePublicIpAddress": @NO,
@"bootMode": @"",
@"copyPrivateIp": @NO,
@"copyTags": @NO,
@"enableMapAutoTagging": @NO,
@"largeVolumeConf": @{ @"iops": @"", @"throughput": @"", @"volumeType": @"" },
@"launchConfigurationTemplateID": @"",
@"launchDisposition": @"",
@"licensing": @{ @"osByol": @"" },
@"mapAutoTaggingMpeID": @"",
@"postLaunchActions": @{ @"cloudWatchLogGroupName": @"", @"deployment": @"", @"s3LogBucket": @"", @"s3OutputKeyPrefix": @"", @"ssmDocuments": @"" },
@"smallVolumeConf": @{ @"iops": @"", @"throughput": @"", @"volumeType": @"" },
@"smallVolumeMaxSize": @0,
@"targetInstanceTypeRightSizingMethod": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/UpdateLaunchConfigurationTemplate"]
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}}/UpdateLaunchConfigurationTemplate" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"associatePublicIpAddress\": false,\n \"bootMode\": \"\",\n \"copyPrivateIp\": false,\n \"copyTags\": false,\n \"enableMapAutoTagging\": false,\n \"largeVolumeConf\": {\n \"iops\": \"\",\n \"throughput\": \"\",\n \"volumeType\": \"\"\n },\n \"launchConfigurationTemplateID\": \"\",\n \"launchDisposition\": \"\",\n \"licensing\": {\n \"osByol\": \"\"\n },\n \"mapAutoTaggingMpeID\": \"\",\n \"postLaunchActions\": {\n \"cloudWatchLogGroupName\": \"\",\n \"deployment\": \"\",\n \"s3LogBucket\": \"\",\n \"s3OutputKeyPrefix\": \"\",\n \"ssmDocuments\": \"\"\n },\n \"smallVolumeConf\": {\n \"iops\": \"\",\n \"throughput\": \"\",\n \"volumeType\": \"\"\n },\n \"smallVolumeMaxSize\": 0,\n \"targetInstanceTypeRightSizingMethod\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/UpdateLaunchConfigurationTemplate",
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([
'associatePublicIpAddress' => null,
'bootMode' => '',
'copyPrivateIp' => null,
'copyTags' => null,
'enableMapAutoTagging' => null,
'largeVolumeConf' => [
'iops' => '',
'throughput' => '',
'volumeType' => ''
],
'launchConfigurationTemplateID' => '',
'launchDisposition' => '',
'licensing' => [
'osByol' => ''
],
'mapAutoTaggingMpeID' => '',
'postLaunchActions' => [
'cloudWatchLogGroupName' => '',
'deployment' => '',
's3LogBucket' => '',
's3OutputKeyPrefix' => '',
'ssmDocuments' => ''
],
'smallVolumeConf' => [
'iops' => '',
'throughput' => '',
'volumeType' => ''
],
'smallVolumeMaxSize' => 0,
'targetInstanceTypeRightSizingMethod' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/UpdateLaunchConfigurationTemplate', [
'body' => '{
"associatePublicIpAddress": false,
"bootMode": "",
"copyPrivateIp": false,
"copyTags": false,
"enableMapAutoTagging": false,
"largeVolumeConf": {
"iops": "",
"throughput": "",
"volumeType": ""
},
"launchConfigurationTemplateID": "",
"launchDisposition": "",
"licensing": {
"osByol": ""
},
"mapAutoTaggingMpeID": "",
"postLaunchActions": {
"cloudWatchLogGroupName": "",
"deployment": "",
"s3LogBucket": "",
"s3OutputKeyPrefix": "",
"ssmDocuments": ""
},
"smallVolumeConf": {
"iops": "",
"throughput": "",
"volumeType": ""
},
"smallVolumeMaxSize": 0,
"targetInstanceTypeRightSizingMethod": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/UpdateLaunchConfigurationTemplate');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'associatePublicIpAddress' => null,
'bootMode' => '',
'copyPrivateIp' => null,
'copyTags' => null,
'enableMapAutoTagging' => null,
'largeVolumeConf' => [
'iops' => '',
'throughput' => '',
'volumeType' => ''
],
'launchConfigurationTemplateID' => '',
'launchDisposition' => '',
'licensing' => [
'osByol' => ''
],
'mapAutoTaggingMpeID' => '',
'postLaunchActions' => [
'cloudWatchLogGroupName' => '',
'deployment' => '',
's3LogBucket' => '',
's3OutputKeyPrefix' => '',
'ssmDocuments' => ''
],
'smallVolumeConf' => [
'iops' => '',
'throughput' => '',
'volumeType' => ''
],
'smallVolumeMaxSize' => 0,
'targetInstanceTypeRightSizingMethod' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'associatePublicIpAddress' => null,
'bootMode' => '',
'copyPrivateIp' => null,
'copyTags' => null,
'enableMapAutoTagging' => null,
'largeVolumeConf' => [
'iops' => '',
'throughput' => '',
'volumeType' => ''
],
'launchConfigurationTemplateID' => '',
'launchDisposition' => '',
'licensing' => [
'osByol' => ''
],
'mapAutoTaggingMpeID' => '',
'postLaunchActions' => [
'cloudWatchLogGroupName' => '',
'deployment' => '',
's3LogBucket' => '',
's3OutputKeyPrefix' => '',
'ssmDocuments' => ''
],
'smallVolumeConf' => [
'iops' => '',
'throughput' => '',
'volumeType' => ''
],
'smallVolumeMaxSize' => 0,
'targetInstanceTypeRightSizingMethod' => ''
]));
$request->setRequestUrl('{{baseUrl}}/UpdateLaunchConfigurationTemplate');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/UpdateLaunchConfigurationTemplate' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"associatePublicIpAddress": false,
"bootMode": "",
"copyPrivateIp": false,
"copyTags": false,
"enableMapAutoTagging": false,
"largeVolumeConf": {
"iops": "",
"throughput": "",
"volumeType": ""
},
"launchConfigurationTemplateID": "",
"launchDisposition": "",
"licensing": {
"osByol": ""
},
"mapAutoTaggingMpeID": "",
"postLaunchActions": {
"cloudWatchLogGroupName": "",
"deployment": "",
"s3LogBucket": "",
"s3OutputKeyPrefix": "",
"ssmDocuments": ""
},
"smallVolumeConf": {
"iops": "",
"throughput": "",
"volumeType": ""
},
"smallVolumeMaxSize": 0,
"targetInstanceTypeRightSizingMethod": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/UpdateLaunchConfigurationTemplate' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"associatePublicIpAddress": false,
"bootMode": "",
"copyPrivateIp": false,
"copyTags": false,
"enableMapAutoTagging": false,
"largeVolumeConf": {
"iops": "",
"throughput": "",
"volumeType": ""
},
"launchConfigurationTemplateID": "",
"launchDisposition": "",
"licensing": {
"osByol": ""
},
"mapAutoTaggingMpeID": "",
"postLaunchActions": {
"cloudWatchLogGroupName": "",
"deployment": "",
"s3LogBucket": "",
"s3OutputKeyPrefix": "",
"ssmDocuments": ""
},
"smallVolumeConf": {
"iops": "",
"throughput": "",
"volumeType": ""
},
"smallVolumeMaxSize": 0,
"targetInstanceTypeRightSizingMethod": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"associatePublicIpAddress\": false,\n \"bootMode\": \"\",\n \"copyPrivateIp\": false,\n \"copyTags\": false,\n \"enableMapAutoTagging\": false,\n \"largeVolumeConf\": {\n \"iops\": \"\",\n \"throughput\": \"\",\n \"volumeType\": \"\"\n },\n \"launchConfigurationTemplateID\": \"\",\n \"launchDisposition\": \"\",\n \"licensing\": {\n \"osByol\": \"\"\n },\n \"mapAutoTaggingMpeID\": \"\",\n \"postLaunchActions\": {\n \"cloudWatchLogGroupName\": \"\",\n \"deployment\": \"\",\n \"s3LogBucket\": \"\",\n \"s3OutputKeyPrefix\": \"\",\n \"ssmDocuments\": \"\"\n },\n \"smallVolumeConf\": {\n \"iops\": \"\",\n \"throughput\": \"\",\n \"volumeType\": \"\"\n },\n \"smallVolumeMaxSize\": 0,\n \"targetInstanceTypeRightSizingMethod\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/UpdateLaunchConfigurationTemplate", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/UpdateLaunchConfigurationTemplate"
payload = {
"associatePublicIpAddress": False,
"bootMode": "",
"copyPrivateIp": False,
"copyTags": False,
"enableMapAutoTagging": False,
"largeVolumeConf": {
"iops": "",
"throughput": "",
"volumeType": ""
},
"launchConfigurationTemplateID": "",
"launchDisposition": "",
"licensing": { "osByol": "" },
"mapAutoTaggingMpeID": "",
"postLaunchActions": {
"cloudWatchLogGroupName": "",
"deployment": "",
"s3LogBucket": "",
"s3OutputKeyPrefix": "",
"ssmDocuments": ""
},
"smallVolumeConf": {
"iops": "",
"throughput": "",
"volumeType": ""
},
"smallVolumeMaxSize": 0,
"targetInstanceTypeRightSizingMethod": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/UpdateLaunchConfigurationTemplate"
payload <- "{\n \"associatePublicIpAddress\": false,\n \"bootMode\": \"\",\n \"copyPrivateIp\": false,\n \"copyTags\": false,\n \"enableMapAutoTagging\": false,\n \"largeVolumeConf\": {\n \"iops\": \"\",\n \"throughput\": \"\",\n \"volumeType\": \"\"\n },\n \"launchConfigurationTemplateID\": \"\",\n \"launchDisposition\": \"\",\n \"licensing\": {\n \"osByol\": \"\"\n },\n \"mapAutoTaggingMpeID\": \"\",\n \"postLaunchActions\": {\n \"cloudWatchLogGroupName\": \"\",\n \"deployment\": \"\",\n \"s3LogBucket\": \"\",\n \"s3OutputKeyPrefix\": \"\",\n \"ssmDocuments\": \"\"\n },\n \"smallVolumeConf\": {\n \"iops\": \"\",\n \"throughput\": \"\",\n \"volumeType\": \"\"\n },\n \"smallVolumeMaxSize\": 0,\n \"targetInstanceTypeRightSizingMethod\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/UpdateLaunchConfigurationTemplate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"associatePublicIpAddress\": false,\n \"bootMode\": \"\",\n \"copyPrivateIp\": false,\n \"copyTags\": false,\n \"enableMapAutoTagging\": false,\n \"largeVolumeConf\": {\n \"iops\": \"\",\n \"throughput\": \"\",\n \"volumeType\": \"\"\n },\n \"launchConfigurationTemplateID\": \"\",\n \"launchDisposition\": \"\",\n \"licensing\": {\n \"osByol\": \"\"\n },\n \"mapAutoTaggingMpeID\": \"\",\n \"postLaunchActions\": {\n \"cloudWatchLogGroupName\": \"\",\n \"deployment\": \"\",\n \"s3LogBucket\": \"\",\n \"s3OutputKeyPrefix\": \"\",\n \"ssmDocuments\": \"\"\n },\n \"smallVolumeConf\": {\n \"iops\": \"\",\n \"throughput\": \"\",\n \"volumeType\": \"\"\n },\n \"smallVolumeMaxSize\": 0,\n \"targetInstanceTypeRightSizingMethod\": \"\"\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/UpdateLaunchConfigurationTemplate') do |req|
req.body = "{\n \"associatePublicIpAddress\": false,\n \"bootMode\": \"\",\n \"copyPrivateIp\": false,\n \"copyTags\": false,\n \"enableMapAutoTagging\": false,\n \"largeVolumeConf\": {\n \"iops\": \"\",\n \"throughput\": \"\",\n \"volumeType\": \"\"\n },\n \"launchConfigurationTemplateID\": \"\",\n \"launchDisposition\": \"\",\n \"licensing\": {\n \"osByol\": \"\"\n },\n \"mapAutoTaggingMpeID\": \"\",\n \"postLaunchActions\": {\n \"cloudWatchLogGroupName\": \"\",\n \"deployment\": \"\",\n \"s3LogBucket\": \"\",\n \"s3OutputKeyPrefix\": \"\",\n \"ssmDocuments\": \"\"\n },\n \"smallVolumeConf\": {\n \"iops\": \"\",\n \"throughput\": \"\",\n \"volumeType\": \"\"\n },\n \"smallVolumeMaxSize\": 0,\n \"targetInstanceTypeRightSizingMethod\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/UpdateLaunchConfigurationTemplate";
let payload = json!({
"associatePublicIpAddress": false,
"bootMode": "",
"copyPrivateIp": false,
"copyTags": false,
"enableMapAutoTagging": false,
"largeVolumeConf": json!({
"iops": "",
"throughput": "",
"volumeType": ""
}),
"launchConfigurationTemplateID": "",
"launchDisposition": "",
"licensing": json!({"osByol": ""}),
"mapAutoTaggingMpeID": "",
"postLaunchActions": json!({
"cloudWatchLogGroupName": "",
"deployment": "",
"s3LogBucket": "",
"s3OutputKeyPrefix": "",
"ssmDocuments": ""
}),
"smallVolumeConf": json!({
"iops": "",
"throughput": "",
"volumeType": ""
}),
"smallVolumeMaxSize": 0,
"targetInstanceTypeRightSizingMethod": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/UpdateLaunchConfigurationTemplate \
--header 'content-type: application/json' \
--data '{
"associatePublicIpAddress": false,
"bootMode": "",
"copyPrivateIp": false,
"copyTags": false,
"enableMapAutoTagging": false,
"largeVolumeConf": {
"iops": "",
"throughput": "",
"volumeType": ""
},
"launchConfigurationTemplateID": "",
"launchDisposition": "",
"licensing": {
"osByol": ""
},
"mapAutoTaggingMpeID": "",
"postLaunchActions": {
"cloudWatchLogGroupName": "",
"deployment": "",
"s3LogBucket": "",
"s3OutputKeyPrefix": "",
"ssmDocuments": ""
},
"smallVolumeConf": {
"iops": "",
"throughput": "",
"volumeType": ""
},
"smallVolumeMaxSize": 0,
"targetInstanceTypeRightSizingMethod": ""
}'
echo '{
"associatePublicIpAddress": false,
"bootMode": "",
"copyPrivateIp": false,
"copyTags": false,
"enableMapAutoTagging": false,
"largeVolumeConf": {
"iops": "",
"throughput": "",
"volumeType": ""
},
"launchConfigurationTemplateID": "",
"launchDisposition": "",
"licensing": {
"osByol": ""
},
"mapAutoTaggingMpeID": "",
"postLaunchActions": {
"cloudWatchLogGroupName": "",
"deployment": "",
"s3LogBucket": "",
"s3OutputKeyPrefix": "",
"ssmDocuments": ""
},
"smallVolumeConf": {
"iops": "",
"throughput": "",
"volumeType": ""
},
"smallVolumeMaxSize": 0,
"targetInstanceTypeRightSizingMethod": ""
}' | \
http POST {{baseUrl}}/UpdateLaunchConfigurationTemplate \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "associatePublicIpAddress": false,\n "bootMode": "",\n "copyPrivateIp": false,\n "copyTags": false,\n "enableMapAutoTagging": false,\n "largeVolumeConf": {\n "iops": "",\n "throughput": "",\n "volumeType": ""\n },\n "launchConfigurationTemplateID": "",\n "launchDisposition": "",\n "licensing": {\n "osByol": ""\n },\n "mapAutoTaggingMpeID": "",\n "postLaunchActions": {\n "cloudWatchLogGroupName": "",\n "deployment": "",\n "s3LogBucket": "",\n "s3OutputKeyPrefix": "",\n "ssmDocuments": ""\n },\n "smallVolumeConf": {\n "iops": "",\n "throughput": "",\n "volumeType": ""\n },\n "smallVolumeMaxSize": 0,\n "targetInstanceTypeRightSizingMethod": ""\n}' \
--output-document \
- {{baseUrl}}/UpdateLaunchConfigurationTemplate
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"associatePublicIpAddress": false,
"bootMode": "",
"copyPrivateIp": false,
"copyTags": false,
"enableMapAutoTagging": false,
"largeVolumeConf": [
"iops": "",
"throughput": "",
"volumeType": ""
],
"launchConfigurationTemplateID": "",
"launchDisposition": "",
"licensing": ["osByol": ""],
"mapAutoTaggingMpeID": "",
"postLaunchActions": [
"cloudWatchLogGroupName": "",
"deployment": "",
"s3LogBucket": "",
"s3OutputKeyPrefix": "",
"ssmDocuments": ""
],
"smallVolumeConf": [
"iops": "",
"throughput": "",
"volumeType": ""
],
"smallVolumeMaxSize": 0,
"targetInstanceTypeRightSizingMethod": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/UpdateLaunchConfigurationTemplate")! 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
UpdateReplicationConfiguration
{{baseUrl}}/UpdateReplicationConfiguration
BODY json
{
"associateDefaultSecurityGroup": false,
"bandwidthThrottling": 0,
"createPublicIP": false,
"dataPlaneRouting": "",
"defaultLargeStagingDiskType": "",
"ebsEncryption": "",
"ebsEncryptionKeyArn": "",
"name": "",
"replicatedDisks": [
{
"deviceName": "",
"iops": "",
"isBootDisk": "",
"stagingDiskType": "",
"throughput": ""
}
],
"replicationServerInstanceType": "",
"replicationServersSecurityGroupsIDs": [],
"sourceServerID": "",
"stagingAreaSubnetId": "",
"stagingAreaTags": {},
"useDedicatedReplicationServer": false
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/UpdateReplicationConfiguration");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"associateDefaultSecurityGroup\": false,\n \"bandwidthThrottling\": 0,\n \"createPublicIP\": false,\n \"dataPlaneRouting\": \"\",\n \"defaultLargeStagingDiskType\": \"\",\n \"ebsEncryption\": \"\",\n \"ebsEncryptionKeyArn\": \"\",\n \"name\": \"\",\n \"replicatedDisks\": [\n {\n \"deviceName\": \"\",\n \"iops\": \"\",\n \"isBootDisk\": \"\",\n \"stagingDiskType\": \"\",\n \"throughput\": \"\"\n }\n ],\n \"replicationServerInstanceType\": \"\",\n \"replicationServersSecurityGroupsIDs\": [],\n \"sourceServerID\": \"\",\n \"stagingAreaSubnetId\": \"\",\n \"stagingAreaTags\": {},\n \"useDedicatedReplicationServer\": false\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/UpdateReplicationConfiguration" {:content-type :json
:form-params {:associateDefaultSecurityGroup false
:bandwidthThrottling 0
:createPublicIP false
:dataPlaneRouting ""
:defaultLargeStagingDiskType ""
:ebsEncryption ""
:ebsEncryptionKeyArn ""
:name ""
:replicatedDisks [{:deviceName ""
:iops ""
:isBootDisk ""
:stagingDiskType ""
:throughput ""}]
:replicationServerInstanceType ""
:replicationServersSecurityGroupsIDs []
:sourceServerID ""
:stagingAreaSubnetId ""
:stagingAreaTags {}
:useDedicatedReplicationServer false}})
require "http/client"
url = "{{baseUrl}}/UpdateReplicationConfiguration"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"associateDefaultSecurityGroup\": false,\n \"bandwidthThrottling\": 0,\n \"createPublicIP\": false,\n \"dataPlaneRouting\": \"\",\n \"defaultLargeStagingDiskType\": \"\",\n \"ebsEncryption\": \"\",\n \"ebsEncryptionKeyArn\": \"\",\n \"name\": \"\",\n \"replicatedDisks\": [\n {\n \"deviceName\": \"\",\n \"iops\": \"\",\n \"isBootDisk\": \"\",\n \"stagingDiskType\": \"\",\n \"throughput\": \"\"\n }\n ],\n \"replicationServerInstanceType\": \"\",\n \"replicationServersSecurityGroupsIDs\": [],\n \"sourceServerID\": \"\",\n \"stagingAreaSubnetId\": \"\",\n \"stagingAreaTags\": {},\n \"useDedicatedReplicationServer\": 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}}/UpdateReplicationConfiguration"),
Content = new StringContent("{\n \"associateDefaultSecurityGroup\": false,\n \"bandwidthThrottling\": 0,\n \"createPublicIP\": false,\n \"dataPlaneRouting\": \"\",\n \"defaultLargeStagingDiskType\": \"\",\n \"ebsEncryption\": \"\",\n \"ebsEncryptionKeyArn\": \"\",\n \"name\": \"\",\n \"replicatedDisks\": [\n {\n \"deviceName\": \"\",\n \"iops\": \"\",\n \"isBootDisk\": \"\",\n \"stagingDiskType\": \"\",\n \"throughput\": \"\"\n }\n ],\n \"replicationServerInstanceType\": \"\",\n \"replicationServersSecurityGroupsIDs\": [],\n \"sourceServerID\": \"\",\n \"stagingAreaSubnetId\": \"\",\n \"stagingAreaTags\": {},\n \"useDedicatedReplicationServer\": 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}}/UpdateReplicationConfiguration");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"associateDefaultSecurityGroup\": false,\n \"bandwidthThrottling\": 0,\n \"createPublicIP\": false,\n \"dataPlaneRouting\": \"\",\n \"defaultLargeStagingDiskType\": \"\",\n \"ebsEncryption\": \"\",\n \"ebsEncryptionKeyArn\": \"\",\n \"name\": \"\",\n \"replicatedDisks\": [\n {\n \"deviceName\": \"\",\n \"iops\": \"\",\n \"isBootDisk\": \"\",\n \"stagingDiskType\": \"\",\n \"throughput\": \"\"\n }\n ],\n \"replicationServerInstanceType\": \"\",\n \"replicationServersSecurityGroupsIDs\": [],\n \"sourceServerID\": \"\",\n \"stagingAreaSubnetId\": \"\",\n \"stagingAreaTags\": {},\n \"useDedicatedReplicationServer\": false\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/UpdateReplicationConfiguration"
payload := strings.NewReader("{\n \"associateDefaultSecurityGroup\": false,\n \"bandwidthThrottling\": 0,\n \"createPublicIP\": false,\n \"dataPlaneRouting\": \"\",\n \"defaultLargeStagingDiskType\": \"\",\n \"ebsEncryption\": \"\",\n \"ebsEncryptionKeyArn\": \"\",\n \"name\": \"\",\n \"replicatedDisks\": [\n {\n \"deviceName\": \"\",\n \"iops\": \"\",\n \"isBootDisk\": \"\",\n \"stagingDiskType\": \"\",\n \"throughput\": \"\"\n }\n ],\n \"replicationServerInstanceType\": \"\",\n \"replicationServersSecurityGroupsIDs\": [],\n \"sourceServerID\": \"\",\n \"stagingAreaSubnetId\": \"\",\n \"stagingAreaTags\": {},\n \"useDedicatedReplicationServer\": false\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/UpdateReplicationConfiguration HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 590
{
"associateDefaultSecurityGroup": false,
"bandwidthThrottling": 0,
"createPublicIP": false,
"dataPlaneRouting": "",
"defaultLargeStagingDiskType": "",
"ebsEncryption": "",
"ebsEncryptionKeyArn": "",
"name": "",
"replicatedDisks": [
{
"deviceName": "",
"iops": "",
"isBootDisk": "",
"stagingDiskType": "",
"throughput": ""
}
],
"replicationServerInstanceType": "",
"replicationServersSecurityGroupsIDs": [],
"sourceServerID": "",
"stagingAreaSubnetId": "",
"stagingAreaTags": {},
"useDedicatedReplicationServer": false
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/UpdateReplicationConfiguration")
.setHeader("content-type", "application/json")
.setBody("{\n \"associateDefaultSecurityGroup\": false,\n \"bandwidthThrottling\": 0,\n \"createPublicIP\": false,\n \"dataPlaneRouting\": \"\",\n \"defaultLargeStagingDiskType\": \"\",\n \"ebsEncryption\": \"\",\n \"ebsEncryptionKeyArn\": \"\",\n \"name\": \"\",\n \"replicatedDisks\": [\n {\n \"deviceName\": \"\",\n \"iops\": \"\",\n \"isBootDisk\": \"\",\n \"stagingDiskType\": \"\",\n \"throughput\": \"\"\n }\n ],\n \"replicationServerInstanceType\": \"\",\n \"replicationServersSecurityGroupsIDs\": [],\n \"sourceServerID\": \"\",\n \"stagingAreaSubnetId\": \"\",\n \"stagingAreaTags\": {},\n \"useDedicatedReplicationServer\": false\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/UpdateReplicationConfiguration"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"associateDefaultSecurityGroup\": false,\n \"bandwidthThrottling\": 0,\n \"createPublicIP\": false,\n \"dataPlaneRouting\": \"\",\n \"defaultLargeStagingDiskType\": \"\",\n \"ebsEncryption\": \"\",\n \"ebsEncryptionKeyArn\": \"\",\n \"name\": \"\",\n \"replicatedDisks\": [\n {\n \"deviceName\": \"\",\n \"iops\": \"\",\n \"isBootDisk\": \"\",\n \"stagingDiskType\": \"\",\n \"throughput\": \"\"\n }\n ],\n \"replicationServerInstanceType\": \"\",\n \"replicationServersSecurityGroupsIDs\": [],\n \"sourceServerID\": \"\",\n \"stagingAreaSubnetId\": \"\",\n \"stagingAreaTags\": {},\n \"useDedicatedReplicationServer\": 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 \"associateDefaultSecurityGroup\": false,\n \"bandwidthThrottling\": 0,\n \"createPublicIP\": false,\n \"dataPlaneRouting\": \"\",\n \"defaultLargeStagingDiskType\": \"\",\n \"ebsEncryption\": \"\",\n \"ebsEncryptionKeyArn\": \"\",\n \"name\": \"\",\n \"replicatedDisks\": [\n {\n \"deviceName\": \"\",\n \"iops\": \"\",\n \"isBootDisk\": \"\",\n \"stagingDiskType\": \"\",\n \"throughput\": \"\"\n }\n ],\n \"replicationServerInstanceType\": \"\",\n \"replicationServersSecurityGroupsIDs\": [],\n \"sourceServerID\": \"\",\n \"stagingAreaSubnetId\": \"\",\n \"stagingAreaTags\": {},\n \"useDedicatedReplicationServer\": false\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/UpdateReplicationConfiguration")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/UpdateReplicationConfiguration")
.header("content-type", "application/json")
.body("{\n \"associateDefaultSecurityGroup\": false,\n \"bandwidthThrottling\": 0,\n \"createPublicIP\": false,\n \"dataPlaneRouting\": \"\",\n \"defaultLargeStagingDiskType\": \"\",\n \"ebsEncryption\": \"\",\n \"ebsEncryptionKeyArn\": \"\",\n \"name\": \"\",\n \"replicatedDisks\": [\n {\n \"deviceName\": \"\",\n \"iops\": \"\",\n \"isBootDisk\": \"\",\n \"stagingDiskType\": \"\",\n \"throughput\": \"\"\n }\n ],\n \"replicationServerInstanceType\": \"\",\n \"replicationServersSecurityGroupsIDs\": [],\n \"sourceServerID\": \"\",\n \"stagingAreaSubnetId\": \"\",\n \"stagingAreaTags\": {},\n \"useDedicatedReplicationServer\": false\n}")
.asString();
const data = JSON.stringify({
associateDefaultSecurityGroup: false,
bandwidthThrottling: 0,
createPublicIP: false,
dataPlaneRouting: '',
defaultLargeStagingDiskType: '',
ebsEncryption: '',
ebsEncryptionKeyArn: '',
name: '',
replicatedDisks: [
{
deviceName: '',
iops: '',
isBootDisk: '',
stagingDiskType: '',
throughput: ''
}
],
replicationServerInstanceType: '',
replicationServersSecurityGroupsIDs: [],
sourceServerID: '',
stagingAreaSubnetId: '',
stagingAreaTags: {},
useDedicatedReplicationServer: 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}}/UpdateReplicationConfiguration');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/UpdateReplicationConfiguration',
headers: {'content-type': 'application/json'},
data: {
associateDefaultSecurityGroup: false,
bandwidthThrottling: 0,
createPublicIP: false,
dataPlaneRouting: '',
defaultLargeStagingDiskType: '',
ebsEncryption: '',
ebsEncryptionKeyArn: '',
name: '',
replicatedDisks: [
{deviceName: '', iops: '', isBootDisk: '', stagingDiskType: '', throughput: ''}
],
replicationServerInstanceType: '',
replicationServersSecurityGroupsIDs: [],
sourceServerID: '',
stagingAreaSubnetId: '',
stagingAreaTags: {},
useDedicatedReplicationServer: false
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/UpdateReplicationConfiguration';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"associateDefaultSecurityGroup":false,"bandwidthThrottling":0,"createPublicIP":false,"dataPlaneRouting":"","defaultLargeStagingDiskType":"","ebsEncryption":"","ebsEncryptionKeyArn":"","name":"","replicatedDisks":[{"deviceName":"","iops":"","isBootDisk":"","stagingDiskType":"","throughput":""}],"replicationServerInstanceType":"","replicationServersSecurityGroupsIDs":[],"sourceServerID":"","stagingAreaSubnetId":"","stagingAreaTags":{},"useDedicatedReplicationServer":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}}/UpdateReplicationConfiguration',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "associateDefaultSecurityGroup": false,\n "bandwidthThrottling": 0,\n "createPublicIP": false,\n "dataPlaneRouting": "",\n "defaultLargeStagingDiskType": "",\n "ebsEncryption": "",\n "ebsEncryptionKeyArn": "",\n "name": "",\n "replicatedDisks": [\n {\n "deviceName": "",\n "iops": "",\n "isBootDisk": "",\n "stagingDiskType": "",\n "throughput": ""\n }\n ],\n "replicationServerInstanceType": "",\n "replicationServersSecurityGroupsIDs": [],\n "sourceServerID": "",\n "stagingAreaSubnetId": "",\n "stagingAreaTags": {},\n "useDedicatedReplicationServer": 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 \"associateDefaultSecurityGroup\": false,\n \"bandwidthThrottling\": 0,\n \"createPublicIP\": false,\n \"dataPlaneRouting\": \"\",\n \"defaultLargeStagingDiskType\": \"\",\n \"ebsEncryption\": \"\",\n \"ebsEncryptionKeyArn\": \"\",\n \"name\": \"\",\n \"replicatedDisks\": [\n {\n \"deviceName\": \"\",\n \"iops\": \"\",\n \"isBootDisk\": \"\",\n \"stagingDiskType\": \"\",\n \"throughput\": \"\"\n }\n ],\n \"replicationServerInstanceType\": \"\",\n \"replicationServersSecurityGroupsIDs\": [],\n \"sourceServerID\": \"\",\n \"stagingAreaSubnetId\": \"\",\n \"stagingAreaTags\": {},\n \"useDedicatedReplicationServer\": false\n}")
val request = Request.Builder()
.url("{{baseUrl}}/UpdateReplicationConfiguration")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/UpdateReplicationConfiguration',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
associateDefaultSecurityGroup: false,
bandwidthThrottling: 0,
createPublicIP: false,
dataPlaneRouting: '',
defaultLargeStagingDiskType: '',
ebsEncryption: '',
ebsEncryptionKeyArn: '',
name: '',
replicatedDisks: [
{deviceName: '', iops: '', isBootDisk: '', stagingDiskType: '', throughput: ''}
],
replicationServerInstanceType: '',
replicationServersSecurityGroupsIDs: [],
sourceServerID: '',
stagingAreaSubnetId: '',
stagingAreaTags: {},
useDedicatedReplicationServer: false
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/UpdateReplicationConfiguration',
headers: {'content-type': 'application/json'},
body: {
associateDefaultSecurityGroup: false,
bandwidthThrottling: 0,
createPublicIP: false,
dataPlaneRouting: '',
defaultLargeStagingDiskType: '',
ebsEncryption: '',
ebsEncryptionKeyArn: '',
name: '',
replicatedDisks: [
{deviceName: '', iops: '', isBootDisk: '', stagingDiskType: '', throughput: ''}
],
replicationServerInstanceType: '',
replicationServersSecurityGroupsIDs: [],
sourceServerID: '',
stagingAreaSubnetId: '',
stagingAreaTags: {},
useDedicatedReplicationServer: 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}}/UpdateReplicationConfiguration');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
associateDefaultSecurityGroup: false,
bandwidthThrottling: 0,
createPublicIP: false,
dataPlaneRouting: '',
defaultLargeStagingDiskType: '',
ebsEncryption: '',
ebsEncryptionKeyArn: '',
name: '',
replicatedDisks: [
{
deviceName: '',
iops: '',
isBootDisk: '',
stagingDiskType: '',
throughput: ''
}
],
replicationServerInstanceType: '',
replicationServersSecurityGroupsIDs: [],
sourceServerID: '',
stagingAreaSubnetId: '',
stagingAreaTags: {},
useDedicatedReplicationServer: 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}}/UpdateReplicationConfiguration',
headers: {'content-type': 'application/json'},
data: {
associateDefaultSecurityGroup: false,
bandwidthThrottling: 0,
createPublicIP: false,
dataPlaneRouting: '',
defaultLargeStagingDiskType: '',
ebsEncryption: '',
ebsEncryptionKeyArn: '',
name: '',
replicatedDisks: [
{deviceName: '', iops: '', isBootDisk: '', stagingDiskType: '', throughput: ''}
],
replicationServerInstanceType: '',
replicationServersSecurityGroupsIDs: [],
sourceServerID: '',
stagingAreaSubnetId: '',
stagingAreaTags: {},
useDedicatedReplicationServer: false
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/UpdateReplicationConfiguration';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"associateDefaultSecurityGroup":false,"bandwidthThrottling":0,"createPublicIP":false,"dataPlaneRouting":"","defaultLargeStagingDiskType":"","ebsEncryption":"","ebsEncryptionKeyArn":"","name":"","replicatedDisks":[{"deviceName":"","iops":"","isBootDisk":"","stagingDiskType":"","throughput":""}],"replicationServerInstanceType":"","replicationServersSecurityGroupsIDs":[],"sourceServerID":"","stagingAreaSubnetId":"","stagingAreaTags":{},"useDedicatedReplicationServer":false}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"associateDefaultSecurityGroup": @NO,
@"bandwidthThrottling": @0,
@"createPublicIP": @NO,
@"dataPlaneRouting": @"",
@"defaultLargeStagingDiskType": @"",
@"ebsEncryption": @"",
@"ebsEncryptionKeyArn": @"",
@"name": @"",
@"replicatedDisks": @[ @{ @"deviceName": @"", @"iops": @"", @"isBootDisk": @"", @"stagingDiskType": @"", @"throughput": @"" } ],
@"replicationServerInstanceType": @"",
@"replicationServersSecurityGroupsIDs": @[ ],
@"sourceServerID": @"",
@"stagingAreaSubnetId": @"",
@"stagingAreaTags": @{ },
@"useDedicatedReplicationServer": @NO };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/UpdateReplicationConfiguration"]
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}}/UpdateReplicationConfiguration" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"associateDefaultSecurityGroup\": false,\n \"bandwidthThrottling\": 0,\n \"createPublicIP\": false,\n \"dataPlaneRouting\": \"\",\n \"defaultLargeStagingDiskType\": \"\",\n \"ebsEncryption\": \"\",\n \"ebsEncryptionKeyArn\": \"\",\n \"name\": \"\",\n \"replicatedDisks\": [\n {\n \"deviceName\": \"\",\n \"iops\": \"\",\n \"isBootDisk\": \"\",\n \"stagingDiskType\": \"\",\n \"throughput\": \"\"\n }\n ],\n \"replicationServerInstanceType\": \"\",\n \"replicationServersSecurityGroupsIDs\": [],\n \"sourceServerID\": \"\",\n \"stagingAreaSubnetId\": \"\",\n \"stagingAreaTags\": {},\n \"useDedicatedReplicationServer\": false\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/UpdateReplicationConfiguration",
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([
'associateDefaultSecurityGroup' => null,
'bandwidthThrottling' => 0,
'createPublicIP' => null,
'dataPlaneRouting' => '',
'defaultLargeStagingDiskType' => '',
'ebsEncryption' => '',
'ebsEncryptionKeyArn' => '',
'name' => '',
'replicatedDisks' => [
[
'deviceName' => '',
'iops' => '',
'isBootDisk' => '',
'stagingDiskType' => '',
'throughput' => ''
]
],
'replicationServerInstanceType' => '',
'replicationServersSecurityGroupsIDs' => [
],
'sourceServerID' => '',
'stagingAreaSubnetId' => '',
'stagingAreaTags' => [
],
'useDedicatedReplicationServer' => null
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/UpdateReplicationConfiguration', [
'body' => '{
"associateDefaultSecurityGroup": false,
"bandwidthThrottling": 0,
"createPublicIP": false,
"dataPlaneRouting": "",
"defaultLargeStagingDiskType": "",
"ebsEncryption": "",
"ebsEncryptionKeyArn": "",
"name": "",
"replicatedDisks": [
{
"deviceName": "",
"iops": "",
"isBootDisk": "",
"stagingDiskType": "",
"throughput": ""
}
],
"replicationServerInstanceType": "",
"replicationServersSecurityGroupsIDs": [],
"sourceServerID": "",
"stagingAreaSubnetId": "",
"stagingAreaTags": {},
"useDedicatedReplicationServer": false
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/UpdateReplicationConfiguration');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'associateDefaultSecurityGroup' => null,
'bandwidthThrottling' => 0,
'createPublicIP' => null,
'dataPlaneRouting' => '',
'defaultLargeStagingDiskType' => '',
'ebsEncryption' => '',
'ebsEncryptionKeyArn' => '',
'name' => '',
'replicatedDisks' => [
[
'deviceName' => '',
'iops' => '',
'isBootDisk' => '',
'stagingDiskType' => '',
'throughput' => ''
]
],
'replicationServerInstanceType' => '',
'replicationServersSecurityGroupsIDs' => [
],
'sourceServerID' => '',
'stagingAreaSubnetId' => '',
'stagingAreaTags' => [
],
'useDedicatedReplicationServer' => null
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'associateDefaultSecurityGroup' => null,
'bandwidthThrottling' => 0,
'createPublicIP' => null,
'dataPlaneRouting' => '',
'defaultLargeStagingDiskType' => '',
'ebsEncryption' => '',
'ebsEncryptionKeyArn' => '',
'name' => '',
'replicatedDisks' => [
[
'deviceName' => '',
'iops' => '',
'isBootDisk' => '',
'stagingDiskType' => '',
'throughput' => ''
]
],
'replicationServerInstanceType' => '',
'replicationServersSecurityGroupsIDs' => [
],
'sourceServerID' => '',
'stagingAreaSubnetId' => '',
'stagingAreaTags' => [
],
'useDedicatedReplicationServer' => null
]));
$request->setRequestUrl('{{baseUrl}}/UpdateReplicationConfiguration');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/UpdateReplicationConfiguration' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"associateDefaultSecurityGroup": false,
"bandwidthThrottling": 0,
"createPublicIP": false,
"dataPlaneRouting": "",
"defaultLargeStagingDiskType": "",
"ebsEncryption": "",
"ebsEncryptionKeyArn": "",
"name": "",
"replicatedDisks": [
{
"deviceName": "",
"iops": "",
"isBootDisk": "",
"stagingDiskType": "",
"throughput": ""
}
],
"replicationServerInstanceType": "",
"replicationServersSecurityGroupsIDs": [],
"sourceServerID": "",
"stagingAreaSubnetId": "",
"stagingAreaTags": {},
"useDedicatedReplicationServer": false
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/UpdateReplicationConfiguration' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"associateDefaultSecurityGroup": false,
"bandwidthThrottling": 0,
"createPublicIP": false,
"dataPlaneRouting": "",
"defaultLargeStagingDiskType": "",
"ebsEncryption": "",
"ebsEncryptionKeyArn": "",
"name": "",
"replicatedDisks": [
{
"deviceName": "",
"iops": "",
"isBootDisk": "",
"stagingDiskType": "",
"throughput": ""
}
],
"replicationServerInstanceType": "",
"replicationServersSecurityGroupsIDs": [],
"sourceServerID": "",
"stagingAreaSubnetId": "",
"stagingAreaTags": {},
"useDedicatedReplicationServer": false
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"associateDefaultSecurityGroup\": false,\n \"bandwidthThrottling\": 0,\n \"createPublicIP\": false,\n \"dataPlaneRouting\": \"\",\n \"defaultLargeStagingDiskType\": \"\",\n \"ebsEncryption\": \"\",\n \"ebsEncryptionKeyArn\": \"\",\n \"name\": \"\",\n \"replicatedDisks\": [\n {\n \"deviceName\": \"\",\n \"iops\": \"\",\n \"isBootDisk\": \"\",\n \"stagingDiskType\": \"\",\n \"throughput\": \"\"\n }\n ],\n \"replicationServerInstanceType\": \"\",\n \"replicationServersSecurityGroupsIDs\": [],\n \"sourceServerID\": \"\",\n \"stagingAreaSubnetId\": \"\",\n \"stagingAreaTags\": {},\n \"useDedicatedReplicationServer\": false\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/UpdateReplicationConfiguration", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/UpdateReplicationConfiguration"
payload = {
"associateDefaultSecurityGroup": False,
"bandwidthThrottling": 0,
"createPublicIP": False,
"dataPlaneRouting": "",
"defaultLargeStagingDiskType": "",
"ebsEncryption": "",
"ebsEncryptionKeyArn": "",
"name": "",
"replicatedDisks": [
{
"deviceName": "",
"iops": "",
"isBootDisk": "",
"stagingDiskType": "",
"throughput": ""
}
],
"replicationServerInstanceType": "",
"replicationServersSecurityGroupsIDs": [],
"sourceServerID": "",
"stagingAreaSubnetId": "",
"stagingAreaTags": {},
"useDedicatedReplicationServer": False
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/UpdateReplicationConfiguration"
payload <- "{\n \"associateDefaultSecurityGroup\": false,\n \"bandwidthThrottling\": 0,\n \"createPublicIP\": false,\n \"dataPlaneRouting\": \"\",\n \"defaultLargeStagingDiskType\": \"\",\n \"ebsEncryption\": \"\",\n \"ebsEncryptionKeyArn\": \"\",\n \"name\": \"\",\n \"replicatedDisks\": [\n {\n \"deviceName\": \"\",\n \"iops\": \"\",\n \"isBootDisk\": \"\",\n \"stagingDiskType\": \"\",\n \"throughput\": \"\"\n }\n ],\n \"replicationServerInstanceType\": \"\",\n \"replicationServersSecurityGroupsIDs\": [],\n \"sourceServerID\": \"\",\n \"stagingAreaSubnetId\": \"\",\n \"stagingAreaTags\": {},\n \"useDedicatedReplicationServer\": false\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/UpdateReplicationConfiguration")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"associateDefaultSecurityGroup\": false,\n \"bandwidthThrottling\": 0,\n \"createPublicIP\": false,\n \"dataPlaneRouting\": \"\",\n \"defaultLargeStagingDiskType\": \"\",\n \"ebsEncryption\": \"\",\n \"ebsEncryptionKeyArn\": \"\",\n \"name\": \"\",\n \"replicatedDisks\": [\n {\n \"deviceName\": \"\",\n \"iops\": \"\",\n \"isBootDisk\": \"\",\n \"stagingDiskType\": \"\",\n \"throughput\": \"\"\n }\n ],\n \"replicationServerInstanceType\": \"\",\n \"replicationServersSecurityGroupsIDs\": [],\n \"sourceServerID\": \"\",\n \"stagingAreaSubnetId\": \"\",\n \"stagingAreaTags\": {},\n \"useDedicatedReplicationServer\": 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/UpdateReplicationConfiguration') do |req|
req.body = "{\n \"associateDefaultSecurityGroup\": false,\n \"bandwidthThrottling\": 0,\n \"createPublicIP\": false,\n \"dataPlaneRouting\": \"\",\n \"defaultLargeStagingDiskType\": \"\",\n \"ebsEncryption\": \"\",\n \"ebsEncryptionKeyArn\": \"\",\n \"name\": \"\",\n \"replicatedDisks\": [\n {\n \"deviceName\": \"\",\n \"iops\": \"\",\n \"isBootDisk\": \"\",\n \"stagingDiskType\": \"\",\n \"throughput\": \"\"\n }\n ],\n \"replicationServerInstanceType\": \"\",\n \"replicationServersSecurityGroupsIDs\": [],\n \"sourceServerID\": \"\",\n \"stagingAreaSubnetId\": \"\",\n \"stagingAreaTags\": {},\n \"useDedicatedReplicationServer\": false\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/UpdateReplicationConfiguration";
let payload = json!({
"associateDefaultSecurityGroup": false,
"bandwidthThrottling": 0,
"createPublicIP": false,
"dataPlaneRouting": "",
"defaultLargeStagingDiskType": "",
"ebsEncryption": "",
"ebsEncryptionKeyArn": "",
"name": "",
"replicatedDisks": (
json!({
"deviceName": "",
"iops": "",
"isBootDisk": "",
"stagingDiskType": "",
"throughput": ""
})
),
"replicationServerInstanceType": "",
"replicationServersSecurityGroupsIDs": (),
"sourceServerID": "",
"stagingAreaSubnetId": "",
"stagingAreaTags": json!({}),
"useDedicatedReplicationServer": false
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/UpdateReplicationConfiguration \
--header 'content-type: application/json' \
--data '{
"associateDefaultSecurityGroup": false,
"bandwidthThrottling": 0,
"createPublicIP": false,
"dataPlaneRouting": "",
"defaultLargeStagingDiskType": "",
"ebsEncryption": "",
"ebsEncryptionKeyArn": "",
"name": "",
"replicatedDisks": [
{
"deviceName": "",
"iops": "",
"isBootDisk": "",
"stagingDiskType": "",
"throughput": ""
}
],
"replicationServerInstanceType": "",
"replicationServersSecurityGroupsIDs": [],
"sourceServerID": "",
"stagingAreaSubnetId": "",
"stagingAreaTags": {},
"useDedicatedReplicationServer": false
}'
echo '{
"associateDefaultSecurityGroup": false,
"bandwidthThrottling": 0,
"createPublicIP": false,
"dataPlaneRouting": "",
"defaultLargeStagingDiskType": "",
"ebsEncryption": "",
"ebsEncryptionKeyArn": "",
"name": "",
"replicatedDisks": [
{
"deviceName": "",
"iops": "",
"isBootDisk": "",
"stagingDiskType": "",
"throughput": ""
}
],
"replicationServerInstanceType": "",
"replicationServersSecurityGroupsIDs": [],
"sourceServerID": "",
"stagingAreaSubnetId": "",
"stagingAreaTags": {},
"useDedicatedReplicationServer": false
}' | \
http POST {{baseUrl}}/UpdateReplicationConfiguration \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "associateDefaultSecurityGroup": false,\n "bandwidthThrottling": 0,\n "createPublicIP": false,\n "dataPlaneRouting": "",\n "defaultLargeStagingDiskType": "",\n "ebsEncryption": "",\n "ebsEncryptionKeyArn": "",\n "name": "",\n "replicatedDisks": [\n {\n "deviceName": "",\n "iops": "",\n "isBootDisk": "",\n "stagingDiskType": "",\n "throughput": ""\n }\n ],\n "replicationServerInstanceType": "",\n "replicationServersSecurityGroupsIDs": [],\n "sourceServerID": "",\n "stagingAreaSubnetId": "",\n "stagingAreaTags": {},\n "useDedicatedReplicationServer": false\n}' \
--output-document \
- {{baseUrl}}/UpdateReplicationConfiguration
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"associateDefaultSecurityGroup": false,
"bandwidthThrottling": 0,
"createPublicIP": false,
"dataPlaneRouting": "",
"defaultLargeStagingDiskType": "",
"ebsEncryption": "",
"ebsEncryptionKeyArn": "",
"name": "",
"replicatedDisks": [
[
"deviceName": "",
"iops": "",
"isBootDisk": "",
"stagingDiskType": "",
"throughput": ""
]
],
"replicationServerInstanceType": "",
"replicationServersSecurityGroupsIDs": [],
"sourceServerID": "",
"stagingAreaSubnetId": "",
"stagingAreaTags": [],
"useDedicatedReplicationServer": false
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/UpdateReplicationConfiguration")! 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
UpdateReplicationConfigurationTemplate
{{baseUrl}}/UpdateReplicationConfigurationTemplate
BODY json
{
"arn": "",
"associateDefaultSecurityGroup": false,
"bandwidthThrottling": 0,
"createPublicIP": false,
"dataPlaneRouting": "",
"defaultLargeStagingDiskType": "",
"ebsEncryption": "",
"ebsEncryptionKeyArn": "",
"replicationConfigurationTemplateID": "",
"replicationServerInstanceType": "",
"replicationServersSecurityGroupsIDs": [],
"stagingAreaSubnetId": "",
"stagingAreaTags": {},
"useDedicatedReplicationServer": false
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/UpdateReplicationConfigurationTemplate");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"arn\": \"\",\n \"associateDefaultSecurityGroup\": false,\n \"bandwidthThrottling\": 0,\n \"createPublicIP\": false,\n \"dataPlaneRouting\": \"\",\n \"defaultLargeStagingDiskType\": \"\",\n \"ebsEncryption\": \"\",\n \"ebsEncryptionKeyArn\": \"\",\n \"replicationConfigurationTemplateID\": \"\",\n \"replicationServerInstanceType\": \"\",\n \"replicationServersSecurityGroupsIDs\": [],\n \"stagingAreaSubnetId\": \"\",\n \"stagingAreaTags\": {},\n \"useDedicatedReplicationServer\": false\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/UpdateReplicationConfigurationTemplate" {:content-type :json
:form-params {:arn ""
:associateDefaultSecurityGroup false
:bandwidthThrottling 0
:createPublicIP false
:dataPlaneRouting ""
:defaultLargeStagingDiskType ""
:ebsEncryption ""
:ebsEncryptionKeyArn ""
:replicationConfigurationTemplateID ""
:replicationServerInstanceType ""
:replicationServersSecurityGroupsIDs []
:stagingAreaSubnetId ""
:stagingAreaTags {}
:useDedicatedReplicationServer false}})
require "http/client"
url = "{{baseUrl}}/UpdateReplicationConfigurationTemplate"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"arn\": \"\",\n \"associateDefaultSecurityGroup\": false,\n \"bandwidthThrottling\": 0,\n \"createPublicIP\": false,\n \"dataPlaneRouting\": \"\",\n \"defaultLargeStagingDiskType\": \"\",\n \"ebsEncryption\": \"\",\n \"ebsEncryptionKeyArn\": \"\",\n \"replicationConfigurationTemplateID\": \"\",\n \"replicationServerInstanceType\": \"\",\n \"replicationServersSecurityGroupsIDs\": [],\n \"stagingAreaSubnetId\": \"\",\n \"stagingAreaTags\": {},\n \"useDedicatedReplicationServer\": 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}}/UpdateReplicationConfigurationTemplate"),
Content = new StringContent("{\n \"arn\": \"\",\n \"associateDefaultSecurityGroup\": false,\n \"bandwidthThrottling\": 0,\n \"createPublicIP\": false,\n \"dataPlaneRouting\": \"\",\n \"defaultLargeStagingDiskType\": \"\",\n \"ebsEncryption\": \"\",\n \"ebsEncryptionKeyArn\": \"\",\n \"replicationConfigurationTemplateID\": \"\",\n \"replicationServerInstanceType\": \"\",\n \"replicationServersSecurityGroupsIDs\": [],\n \"stagingAreaSubnetId\": \"\",\n \"stagingAreaTags\": {},\n \"useDedicatedReplicationServer\": 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}}/UpdateReplicationConfigurationTemplate");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"arn\": \"\",\n \"associateDefaultSecurityGroup\": false,\n \"bandwidthThrottling\": 0,\n \"createPublicIP\": false,\n \"dataPlaneRouting\": \"\",\n \"defaultLargeStagingDiskType\": \"\",\n \"ebsEncryption\": \"\",\n \"ebsEncryptionKeyArn\": \"\",\n \"replicationConfigurationTemplateID\": \"\",\n \"replicationServerInstanceType\": \"\",\n \"replicationServersSecurityGroupsIDs\": [],\n \"stagingAreaSubnetId\": \"\",\n \"stagingAreaTags\": {},\n \"useDedicatedReplicationServer\": false\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/UpdateReplicationConfigurationTemplate"
payload := strings.NewReader("{\n \"arn\": \"\",\n \"associateDefaultSecurityGroup\": false,\n \"bandwidthThrottling\": 0,\n \"createPublicIP\": false,\n \"dataPlaneRouting\": \"\",\n \"defaultLargeStagingDiskType\": \"\",\n \"ebsEncryption\": \"\",\n \"ebsEncryptionKeyArn\": \"\",\n \"replicationConfigurationTemplateID\": \"\",\n \"replicationServerInstanceType\": \"\",\n \"replicationServersSecurityGroupsIDs\": [],\n \"stagingAreaSubnetId\": \"\",\n \"stagingAreaTags\": {},\n \"useDedicatedReplicationServer\": false\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/UpdateReplicationConfigurationTemplate HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 451
{
"arn": "",
"associateDefaultSecurityGroup": false,
"bandwidthThrottling": 0,
"createPublicIP": false,
"dataPlaneRouting": "",
"defaultLargeStagingDiskType": "",
"ebsEncryption": "",
"ebsEncryptionKeyArn": "",
"replicationConfigurationTemplateID": "",
"replicationServerInstanceType": "",
"replicationServersSecurityGroupsIDs": [],
"stagingAreaSubnetId": "",
"stagingAreaTags": {},
"useDedicatedReplicationServer": false
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/UpdateReplicationConfigurationTemplate")
.setHeader("content-type", "application/json")
.setBody("{\n \"arn\": \"\",\n \"associateDefaultSecurityGroup\": false,\n \"bandwidthThrottling\": 0,\n \"createPublicIP\": false,\n \"dataPlaneRouting\": \"\",\n \"defaultLargeStagingDiskType\": \"\",\n \"ebsEncryption\": \"\",\n \"ebsEncryptionKeyArn\": \"\",\n \"replicationConfigurationTemplateID\": \"\",\n \"replicationServerInstanceType\": \"\",\n \"replicationServersSecurityGroupsIDs\": [],\n \"stagingAreaSubnetId\": \"\",\n \"stagingAreaTags\": {},\n \"useDedicatedReplicationServer\": false\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/UpdateReplicationConfigurationTemplate"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"arn\": \"\",\n \"associateDefaultSecurityGroup\": false,\n \"bandwidthThrottling\": 0,\n \"createPublicIP\": false,\n \"dataPlaneRouting\": \"\",\n \"defaultLargeStagingDiskType\": \"\",\n \"ebsEncryption\": \"\",\n \"ebsEncryptionKeyArn\": \"\",\n \"replicationConfigurationTemplateID\": \"\",\n \"replicationServerInstanceType\": \"\",\n \"replicationServersSecurityGroupsIDs\": [],\n \"stagingAreaSubnetId\": \"\",\n \"stagingAreaTags\": {},\n \"useDedicatedReplicationServer\": 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 \"arn\": \"\",\n \"associateDefaultSecurityGroup\": false,\n \"bandwidthThrottling\": 0,\n \"createPublicIP\": false,\n \"dataPlaneRouting\": \"\",\n \"defaultLargeStagingDiskType\": \"\",\n \"ebsEncryption\": \"\",\n \"ebsEncryptionKeyArn\": \"\",\n \"replicationConfigurationTemplateID\": \"\",\n \"replicationServerInstanceType\": \"\",\n \"replicationServersSecurityGroupsIDs\": [],\n \"stagingAreaSubnetId\": \"\",\n \"stagingAreaTags\": {},\n \"useDedicatedReplicationServer\": false\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/UpdateReplicationConfigurationTemplate")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/UpdateReplicationConfigurationTemplate")
.header("content-type", "application/json")
.body("{\n \"arn\": \"\",\n \"associateDefaultSecurityGroup\": false,\n \"bandwidthThrottling\": 0,\n \"createPublicIP\": false,\n \"dataPlaneRouting\": \"\",\n \"defaultLargeStagingDiskType\": \"\",\n \"ebsEncryption\": \"\",\n \"ebsEncryptionKeyArn\": \"\",\n \"replicationConfigurationTemplateID\": \"\",\n \"replicationServerInstanceType\": \"\",\n \"replicationServersSecurityGroupsIDs\": [],\n \"stagingAreaSubnetId\": \"\",\n \"stagingAreaTags\": {},\n \"useDedicatedReplicationServer\": false\n}")
.asString();
const data = JSON.stringify({
arn: '',
associateDefaultSecurityGroup: false,
bandwidthThrottling: 0,
createPublicIP: false,
dataPlaneRouting: '',
defaultLargeStagingDiskType: '',
ebsEncryption: '',
ebsEncryptionKeyArn: '',
replicationConfigurationTemplateID: '',
replicationServerInstanceType: '',
replicationServersSecurityGroupsIDs: [],
stagingAreaSubnetId: '',
stagingAreaTags: {},
useDedicatedReplicationServer: 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}}/UpdateReplicationConfigurationTemplate');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/UpdateReplicationConfigurationTemplate',
headers: {'content-type': 'application/json'},
data: {
arn: '',
associateDefaultSecurityGroup: false,
bandwidthThrottling: 0,
createPublicIP: false,
dataPlaneRouting: '',
defaultLargeStagingDiskType: '',
ebsEncryption: '',
ebsEncryptionKeyArn: '',
replicationConfigurationTemplateID: '',
replicationServerInstanceType: '',
replicationServersSecurityGroupsIDs: [],
stagingAreaSubnetId: '',
stagingAreaTags: {},
useDedicatedReplicationServer: false
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/UpdateReplicationConfigurationTemplate';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"arn":"","associateDefaultSecurityGroup":false,"bandwidthThrottling":0,"createPublicIP":false,"dataPlaneRouting":"","defaultLargeStagingDiskType":"","ebsEncryption":"","ebsEncryptionKeyArn":"","replicationConfigurationTemplateID":"","replicationServerInstanceType":"","replicationServersSecurityGroupsIDs":[],"stagingAreaSubnetId":"","stagingAreaTags":{},"useDedicatedReplicationServer":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}}/UpdateReplicationConfigurationTemplate',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "arn": "",\n "associateDefaultSecurityGroup": false,\n "bandwidthThrottling": 0,\n "createPublicIP": false,\n "dataPlaneRouting": "",\n "defaultLargeStagingDiskType": "",\n "ebsEncryption": "",\n "ebsEncryptionKeyArn": "",\n "replicationConfigurationTemplateID": "",\n "replicationServerInstanceType": "",\n "replicationServersSecurityGroupsIDs": [],\n "stagingAreaSubnetId": "",\n "stagingAreaTags": {},\n "useDedicatedReplicationServer": 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 \"arn\": \"\",\n \"associateDefaultSecurityGroup\": false,\n \"bandwidthThrottling\": 0,\n \"createPublicIP\": false,\n \"dataPlaneRouting\": \"\",\n \"defaultLargeStagingDiskType\": \"\",\n \"ebsEncryption\": \"\",\n \"ebsEncryptionKeyArn\": \"\",\n \"replicationConfigurationTemplateID\": \"\",\n \"replicationServerInstanceType\": \"\",\n \"replicationServersSecurityGroupsIDs\": [],\n \"stagingAreaSubnetId\": \"\",\n \"stagingAreaTags\": {},\n \"useDedicatedReplicationServer\": false\n}")
val request = Request.Builder()
.url("{{baseUrl}}/UpdateReplicationConfigurationTemplate")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/UpdateReplicationConfigurationTemplate',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
arn: '',
associateDefaultSecurityGroup: false,
bandwidthThrottling: 0,
createPublicIP: false,
dataPlaneRouting: '',
defaultLargeStagingDiskType: '',
ebsEncryption: '',
ebsEncryptionKeyArn: '',
replicationConfigurationTemplateID: '',
replicationServerInstanceType: '',
replicationServersSecurityGroupsIDs: [],
stagingAreaSubnetId: '',
stagingAreaTags: {},
useDedicatedReplicationServer: false
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/UpdateReplicationConfigurationTemplate',
headers: {'content-type': 'application/json'},
body: {
arn: '',
associateDefaultSecurityGroup: false,
bandwidthThrottling: 0,
createPublicIP: false,
dataPlaneRouting: '',
defaultLargeStagingDiskType: '',
ebsEncryption: '',
ebsEncryptionKeyArn: '',
replicationConfigurationTemplateID: '',
replicationServerInstanceType: '',
replicationServersSecurityGroupsIDs: [],
stagingAreaSubnetId: '',
stagingAreaTags: {},
useDedicatedReplicationServer: 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}}/UpdateReplicationConfigurationTemplate');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
arn: '',
associateDefaultSecurityGroup: false,
bandwidthThrottling: 0,
createPublicIP: false,
dataPlaneRouting: '',
defaultLargeStagingDiskType: '',
ebsEncryption: '',
ebsEncryptionKeyArn: '',
replicationConfigurationTemplateID: '',
replicationServerInstanceType: '',
replicationServersSecurityGroupsIDs: [],
stagingAreaSubnetId: '',
stagingAreaTags: {},
useDedicatedReplicationServer: 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}}/UpdateReplicationConfigurationTemplate',
headers: {'content-type': 'application/json'},
data: {
arn: '',
associateDefaultSecurityGroup: false,
bandwidthThrottling: 0,
createPublicIP: false,
dataPlaneRouting: '',
defaultLargeStagingDiskType: '',
ebsEncryption: '',
ebsEncryptionKeyArn: '',
replicationConfigurationTemplateID: '',
replicationServerInstanceType: '',
replicationServersSecurityGroupsIDs: [],
stagingAreaSubnetId: '',
stagingAreaTags: {},
useDedicatedReplicationServer: false
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/UpdateReplicationConfigurationTemplate';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"arn":"","associateDefaultSecurityGroup":false,"bandwidthThrottling":0,"createPublicIP":false,"dataPlaneRouting":"","defaultLargeStagingDiskType":"","ebsEncryption":"","ebsEncryptionKeyArn":"","replicationConfigurationTemplateID":"","replicationServerInstanceType":"","replicationServersSecurityGroupsIDs":[],"stagingAreaSubnetId":"","stagingAreaTags":{},"useDedicatedReplicationServer":false}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"arn": @"",
@"associateDefaultSecurityGroup": @NO,
@"bandwidthThrottling": @0,
@"createPublicIP": @NO,
@"dataPlaneRouting": @"",
@"defaultLargeStagingDiskType": @"",
@"ebsEncryption": @"",
@"ebsEncryptionKeyArn": @"",
@"replicationConfigurationTemplateID": @"",
@"replicationServerInstanceType": @"",
@"replicationServersSecurityGroupsIDs": @[ ],
@"stagingAreaSubnetId": @"",
@"stagingAreaTags": @{ },
@"useDedicatedReplicationServer": @NO };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/UpdateReplicationConfigurationTemplate"]
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}}/UpdateReplicationConfigurationTemplate" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"arn\": \"\",\n \"associateDefaultSecurityGroup\": false,\n \"bandwidthThrottling\": 0,\n \"createPublicIP\": false,\n \"dataPlaneRouting\": \"\",\n \"defaultLargeStagingDiskType\": \"\",\n \"ebsEncryption\": \"\",\n \"ebsEncryptionKeyArn\": \"\",\n \"replicationConfigurationTemplateID\": \"\",\n \"replicationServerInstanceType\": \"\",\n \"replicationServersSecurityGroupsIDs\": [],\n \"stagingAreaSubnetId\": \"\",\n \"stagingAreaTags\": {},\n \"useDedicatedReplicationServer\": false\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/UpdateReplicationConfigurationTemplate",
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([
'arn' => '',
'associateDefaultSecurityGroup' => null,
'bandwidthThrottling' => 0,
'createPublicIP' => null,
'dataPlaneRouting' => '',
'defaultLargeStagingDiskType' => '',
'ebsEncryption' => '',
'ebsEncryptionKeyArn' => '',
'replicationConfigurationTemplateID' => '',
'replicationServerInstanceType' => '',
'replicationServersSecurityGroupsIDs' => [
],
'stagingAreaSubnetId' => '',
'stagingAreaTags' => [
],
'useDedicatedReplicationServer' => null
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/UpdateReplicationConfigurationTemplate', [
'body' => '{
"arn": "",
"associateDefaultSecurityGroup": false,
"bandwidthThrottling": 0,
"createPublicIP": false,
"dataPlaneRouting": "",
"defaultLargeStagingDiskType": "",
"ebsEncryption": "",
"ebsEncryptionKeyArn": "",
"replicationConfigurationTemplateID": "",
"replicationServerInstanceType": "",
"replicationServersSecurityGroupsIDs": [],
"stagingAreaSubnetId": "",
"stagingAreaTags": {},
"useDedicatedReplicationServer": false
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/UpdateReplicationConfigurationTemplate');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'arn' => '',
'associateDefaultSecurityGroup' => null,
'bandwidthThrottling' => 0,
'createPublicIP' => null,
'dataPlaneRouting' => '',
'defaultLargeStagingDiskType' => '',
'ebsEncryption' => '',
'ebsEncryptionKeyArn' => '',
'replicationConfigurationTemplateID' => '',
'replicationServerInstanceType' => '',
'replicationServersSecurityGroupsIDs' => [
],
'stagingAreaSubnetId' => '',
'stagingAreaTags' => [
],
'useDedicatedReplicationServer' => null
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'arn' => '',
'associateDefaultSecurityGroup' => null,
'bandwidthThrottling' => 0,
'createPublicIP' => null,
'dataPlaneRouting' => '',
'defaultLargeStagingDiskType' => '',
'ebsEncryption' => '',
'ebsEncryptionKeyArn' => '',
'replicationConfigurationTemplateID' => '',
'replicationServerInstanceType' => '',
'replicationServersSecurityGroupsIDs' => [
],
'stagingAreaSubnetId' => '',
'stagingAreaTags' => [
],
'useDedicatedReplicationServer' => null
]));
$request->setRequestUrl('{{baseUrl}}/UpdateReplicationConfigurationTemplate');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/UpdateReplicationConfigurationTemplate' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"arn": "",
"associateDefaultSecurityGroup": false,
"bandwidthThrottling": 0,
"createPublicIP": false,
"dataPlaneRouting": "",
"defaultLargeStagingDiskType": "",
"ebsEncryption": "",
"ebsEncryptionKeyArn": "",
"replicationConfigurationTemplateID": "",
"replicationServerInstanceType": "",
"replicationServersSecurityGroupsIDs": [],
"stagingAreaSubnetId": "",
"stagingAreaTags": {},
"useDedicatedReplicationServer": false
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/UpdateReplicationConfigurationTemplate' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"arn": "",
"associateDefaultSecurityGroup": false,
"bandwidthThrottling": 0,
"createPublicIP": false,
"dataPlaneRouting": "",
"defaultLargeStagingDiskType": "",
"ebsEncryption": "",
"ebsEncryptionKeyArn": "",
"replicationConfigurationTemplateID": "",
"replicationServerInstanceType": "",
"replicationServersSecurityGroupsIDs": [],
"stagingAreaSubnetId": "",
"stagingAreaTags": {},
"useDedicatedReplicationServer": false
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"arn\": \"\",\n \"associateDefaultSecurityGroup\": false,\n \"bandwidthThrottling\": 0,\n \"createPublicIP\": false,\n \"dataPlaneRouting\": \"\",\n \"defaultLargeStagingDiskType\": \"\",\n \"ebsEncryption\": \"\",\n \"ebsEncryptionKeyArn\": \"\",\n \"replicationConfigurationTemplateID\": \"\",\n \"replicationServerInstanceType\": \"\",\n \"replicationServersSecurityGroupsIDs\": [],\n \"stagingAreaSubnetId\": \"\",\n \"stagingAreaTags\": {},\n \"useDedicatedReplicationServer\": false\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/UpdateReplicationConfigurationTemplate", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/UpdateReplicationConfigurationTemplate"
payload = {
"arn": "",
"associateDefaultSecurityGroup": False,
"bandwidthThrottling": 0,
"createPublicIP": False,
"dataPlaneRouting": "",
"defaultLargeStagingDiskType": "",
"ebsEncryption": "",
"ebsEncryptionKeyArn": "",
"replicationConfigurationTemplateID": "",
"replicationServerInstanceType": "",
"replicationServersSecurityGroupsIDs": [],
"stagingAreaSubnetId": "",
"stagingAreaTags": {},
"useDedicatedReplicationServer": False
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/UpdateReplicationConfigurationTemplate"
payload <- "{\n \"arn\": \"\",\n \"associateDefaultSecurityGroup\": false,\n \"bandwidthThrottling\": 0,\n \"createPublicIP\": false,\n \"dataPlaneRouting\": \"\",\n \"defaultLargeStagingDiskType\": \"\",\n \"ebsEncryption\": \"\",\n \"ebsEncryptionKeyArn\": \"\",\n \"replicationConfigurationTemplateID\": \"\",\n \"replicationServerInstanceType\": \"\",\n \"replicationServersSecurityGroupsIDs\": [],\n \"stagingAreaSubnetId\": \"\",\n \"stagingAreaTags\": {},\n \"useDedicatedReplicationServer\": false\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/UpdateReplicationConfigurationTemplate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"arn\": \"\",\n \"associateDefaultSecurityGroup\": false,\n \"bandwidthThrottling\": 0,\n \"createPublicIP\": false,\n \"dataPlaneRouting\": \"\",\n \"defaultLargeStagingDiskType\": \"\",\n \"ebsEncryption\": \"\",\n \"ebsEncryptionKeyArn\": \"\",\n \"replicationConfigurationTemplateID\": \"\",\n \"replicationServerInstanceType\": \"\",\n \"replicationServersSecurityGroupsIDs\": [],\n \"stagingAreaSubnetId\": \"\",\n \"stagingAreaTags\": {},\n \"useDedicatedReplicationServer\": 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/UpdateReplicationConfigurationTemplate') do |req|
req.body = "{\n \"arn\": \"\",\n \"associateDefaultSecurityGroup\": false,\n \"bandwidthThrottling\": 0,\n \"createPublicIP\": false,\n \"dataPlaneRouting\": \"\",\n \"defaultLargeStagingDiskType\": \"\",\n \"ebsEncryption\": \"\",\n \"ebsEncryptionKeyArn\": \"\",\n \"replicationConfigurationTemplateID\": \"\",\n \"replicationServerInstanceType\": \"\",\n \"replicationServersSecurityGroupsIDs\": [],\n \"stagingAreaSubnetId\": \"\",\n \"stagingAreaTags\": {},\n \"useDedicatedReplicationServer\": false\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/UpdateReplicationConfigurationTemplate";
let payload = json!({
"arn": "",
"associateDefaultSecurityGroup": false,
"bandwidthThrottling": 0,
"createPublicIP": false,
"dataPlaneRouting": "",
"defaultLargeStagingDiskType": "",
"ebsEncryption": "",
"ebsEncryptionKeyArn": "",
"replicationConfigurationTemplateID": "",
"replicationServerInstanceType": "",
"replicationServersSecurityGroupsIDs": (),
"stagingAreaSubnetId": "",
"stagingAreaTags": json!({}),
"useDedicatedReplicationServer": false
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/UpdateReplicationConfigurationTemplate \
--header 'content-type: application/json' \
--data '{
"arn": "",
"associateDefaultSecurityGroup": false,
"bandwidthThrottling": 0,
"createPublicIP": false,
"dataPlaneRouting": "",
"defaultLargeStagingDiskType": "",
"ebsEncryption": "",
"ebsEncryptionKeyArn": "",
"replicationConfigurationTemplateID": "",
"replicationServerInstanceType": "",
"replicationServersSecurityGroupsIDs": [],
"stagingAreaSubnetId": "",
"stagingAreaTags": {},
"useDedicatedReplicationServer": false
}'
echo '{
"arn": "",
"associateDefaultSecurityGroup": false,
"bandwidthThrottling": 0,
"createPublicIP": false,
"dataPlaneRouting": "",
"defaultLargeStagingDiskType": "",
"ebsEncryption": "",
"ebsEncryptionKeyArn": "",
"replicationConfigurationTemplateID": "",
"replicationServerInstanceType": "",
"replicationServersSecurityGroupsIDs": [],
"stagingAreaSubnetId": "",
"stagingAreaTags": {},
"useDedicatedReplicationServer": false
}' | \
http POST {{baseUrl}}/UpdateReplicationConfigurationTemplate \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "arn": "",\n "associateDefaultSecurityGroup": false,\n "bandwidthThrottling": 0,\n "createPublicIP": false,\n "dataPlaneRouting": "",\n "defaultLargeStagingDiskType": "",\n "ebsEncryption": "",\n "ebsEncryptionKeyArn": "",\n "replicationConfigurationTemplateID": "",\n "replicationServerInstanceType": "",\n "replicationServersSecurityGroupsIDs": [],\n "stagingAreaSubnetId": "",\n "stagingAreaTags": {},\n "useDedicatedReplicationServer": false\n}' \
--output-document \
- {{baseUrl}}/UpdateReplicationConfigurationTemplate
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"arn": "",
"associateDefaultSecurityGroup": false,
"bandwidthThrottling": 0,
"createPublicIP": false,
"dataPlaneRouting": "",
"defaultLargeStagingDiskType": "",
"ebsEncryption": "",
"ebsEncryptionKeyArn": "",
"replicationConfigurationTemplateID": "",
"replicationServerInstanceType": "",
"replicationServersSecurityGroupsIDs": [],
"stagingAreaSubnetId": "",
"stagingAreaTags": [],
"useDedicatedReplicationServer": false
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/UpdateReplicationConfigurationTemplate")! 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
UpdateSourceServerReplicationType
{{baseUrl}}/UpdateSourceServerReplicationType
BODY json
{
"replicationType": "",
"sourceServerID": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/UpdateSourceServerReplicationType");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"replicationType\": \"\",\n \"sourceServerID\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/UpdateSourceServerReplicationType" {:content-type :json
:form-params {:replicationType ""
:sourceServerID ""}})
require "http/client"
url = "{{baseUrl}}/UpdateSourceServerReplicationType"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"replicationType\": \"\",\n \"sourceServerID\": \"\"\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}}/UpdateSourceServerReplicationType"),
Content = new StringContent("{\n \"replicationType\": \"\",\n \"sourceServerID\": \"\"\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}}/UpdateSourceServerReplicationType");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"replicationType\": \"\",\n \"sourceServerID\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/UpdateSourceServerReplicationType"
payload := strings.NewReader("{\n \"replicationType\": \"\",\n \"sourceServerID\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/UpdateSourceServerReplicationType HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 51
{
"replicationType": "",
"sourceServerID": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/UpdateSourceServerReplicationType")
.setHeader("content-type", "application/json")
.setBody("{\n \"replicationType\": \"\",\n \"sourceServerID\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/UpdateSourceServerReplicationType"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"replicationType\": \"\",\n \"sourceServerID\": \"\"\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 \"replicationType\": \"\",\n \"sourceServerID\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/UpdateSourceServerReplicationType")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/UpdateSourceServerReplicationType")
.header("content-type", "application/json")
.body("{\n \"replicationType\": \"\",\n \"sourceServerID\": \"\"\n}")
.asString();
const data = JSON.stringify({
replicationType: '',
sourceServerID: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/UpdateSourceServerReplicationType');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/UpdateSourceServerReplicationType',
headers: {'content-type': 'application/json'},
data: {replicationType: '', sourceServerID: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/UpdateSourceServerReplicationType';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"replicationType":"","sourceServerID":""}'
};
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}}/UpdateSourceServerReplicationType',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "replicationType": "",\n "sourceServerID": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"replicationType\": \"\",\n \"sourceServerID\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/UpdateSourceServerReplicationType")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/UpdateSourceServerReplicationType',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({replicationType: '', sourceServerID: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/UpdateSourceServerReplicationType',
headers: {'content-type': 'application/json'},
body: {replicationType: '', sourceServerID: ''},
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}}/UpdateSourceServerReplicationType');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
replicationType: '',
sourceServerID: ''
});
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}}/UpdateSourceServerReplicationType',
headers: {'content-type': 'application/json'},
data: {replicationType: '', sourceServerID: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/UpdateSourceServerReplicationType';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"replicationType":"","sourceServerID":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"replicationType": @"",
@"sourceServerID": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/UpdateSourceServerReplicationType"]
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}}/UpdateSourceServerReplicationType" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"replicationType\": \"\",\n \"sourceServerID\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/UpdateSourceServerReplicationType",
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([
'replicationType' => '',
'sourceServerID' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/UpdateSourceServerReplicationType', [
'body' => '{
"replicationType": "",
"sourceServerID": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/UpdateSourceServerReplicationType');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'replicationType' => '',
'sourceServerID' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'replicationType' => '',
'sourceServerID' => ''
]));
$request->setRequestUrl('{{baseUrl}}/UpdateSourceServerReplicationType');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/UpdateSourceServerReplicationType' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"replicationType": "",
"sourceServerID": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/UpdateSourceServerReplicationType' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"replicationType": "",
"sourceServerID": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"replicationType\": \"\",\n \"sourceServerID\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/UpdateSourceServerReplicationType", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/UpdateSourceServerReplicationType"
payload = {
"replicationType": "",
"sourceServerID": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/UpdateSourceServerReplicationType"
payload <- "{\n \"replicationType\": \"\",\n \"sourceServerID\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/UpdateSourceServerReplicationType")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"replicationType\": \"\",\n \"sourceServerID\": \"\"\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/UpdateSourceServerReplicationType') do |req|
req.body = "{\n \"replicationType\": \"\",\n \"sourceServerID\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/UpdateSourceServerReplicationType";
let payload = json!({
"replicationType": "",
"sourceServerID": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/UpdateSourceServerReplicationType \
--header 'content-type: application/json' \
--data '{
"replicationType": "",
"sourceServerID": ""
}'
echo '{
"replicationType": "",
"sourceServerID": ""
}' | \
http POST {{baseUrl}}/UpdateSourceServerReplicationType \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "replicationType": "",\n "sourceServerID": ""\n}' \
--output-document \
- {{baseUrl}}/UpdateSourceServerReplicationType
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"replicationType": "",
"sourceServerID": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/UpdateSourceServerReplicationType")! 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
UpdateWave
{{baseUrl}}/UpdateWave
BODY json
{
"description": "",
"name": "",
"waveID": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/UpdateWave");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"description\": \"\",\n \"name\": \"\",\n \"waveID\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/UpdateWave" {:content-type :json
:form-params {:description ""
:name ""
:waveID ""}})
require "http/client"
url = "{{baseUrl}}/UpdateWave"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"description\": \"\",\n \"name\": \"\",\n \"waveID\": \"\"\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}}/UpdateWave"),
Content = new StringContent("{\n \"description\": \"\",\n \"name\": \"\",\n \"waveID\": \"\"\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}}/UpdateWave");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"description\": \"\",\n \"name\": \"\",\n \"waveID\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/UpdateWave"
payload := strings.NewReader("{\n \"description\": \"\",\n \"name\": \"\",\n \"waveID\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/UpdateWave HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 53
{
"description": "",
"name": "",
"waveID": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/UpdateWave")
.setHeader("content-type", "application/json")
.setBody("{\n \"description\": \"\",\n \"name\": \"\",\n \"waveID\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/UpdateWave"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"description\": \"\",\n \"name\": \"\",\n \"waveID\": \"\"\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 \"description\": \"\",\n \"name\": \"\",\n \"waveID\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/UpdateWave")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/UpdateWave")
.header("content-type", "application/json")
.body("{\n \"description\": \"\",\n \"name\": \"\",\n \"waveID\": \"\"\n}")
.asString();
const data = JSON.stringify({
description: '',
name: '',
waveID: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/UpdateWave');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/UpdateWave',
headers: {'content-type': 'application/json'},
data: {description: '', name: '', waveID: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/UpdateWave';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"description":"","name":"","waveID":""}'
};
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}}/UpdateWave',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "description": "",\n "name": "",\n "waveID": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"description\": \"\",\n \"name\": \"\",\n \"waveID\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/UpdateWave")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/UpdateWave',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({description: '', name: '', waveID: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/UpdateWave',
headers: {'content-type': 'application/json'},
body: {description: '', name: '', waveID: ''},
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}}/UpdateWave');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
description: '',
name: '',
waveID: ''
});
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}}/UpdateWave',
headers: {'content-type': 'application/json'},
data: {description: '', name: '', waveID: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/UpdateWave';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"description":"","name":"","waveID":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"description": @"",
@"name": @"",
@"waveID": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/UpdateWave"]
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}}/UpdateWave" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"description\": \"\",\n \"name\": \"\",\n \"waveID\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/UpdateWave",
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([
'description' => '',
'name' => '',
'waveID' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/UpdateWave', [
'body' => '{
"description": "",
"name": "",
"waveID": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/UpdateWave');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'description' => '',
'name' => '',
'waveID' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'description' => '',
'name' => '',
'waveID' => ''
]));
$request->setRequestUrl('{{baseUrl}}/UpdateWave');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/UpdateWave' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"description": "",
"name": "",
"waveID": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/UpdateWave' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"description": "",
"name": "",
"waveID": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"description\": \"\",\n \"name\": \"\",\n \"waveID\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/UpdateWave", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/UpdateWave"
payload = {
"description": "",
"name": "",
"waveID": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/UpdateWave"
payload <- "{\n \"description\": \"\",\n \"name\": \"\",\n \"waveID\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/UpdateWave")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"description\": \"\",\n \"name\": \"\",\n \"waveID\": \"\"\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/UpdateWave') do |req|
req.body = "{\n \"description\": \"\",\n \"name\": \"\",\n \"waveID\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/UpdateWave";
let payload = json!({
"description": "",
"name": "",
"waveID": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/UpdateWave \
--header 'content-type: application/json' \
--data '{
"description": "",
"name": "",
"waveID": ""
}'
echo '{
"description": "",
"name": "",
"waveID": ""
}' | \
http POST {{baseUrl}}/UpdateWave \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "description": "",\n "name": "",\n "waveID": ""\n}' \
--output-document \
- {{baseUrl}}/UpdateWave
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"description": "",
"name": "",
"waveID": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/UpdateWave")! 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()