AWS CodeDeploy
AWS CodeDeployv2014-10-06
CodeDeploy is a deployment service that automates application deployments to Amazon EC2 instances, on-premises instances running in your own facility, serverless Lambda functions, or applications in an Amazon ECS service. You can deploy a nearly unlimited variety of application content, such as an updated Lambda function, updated applications in an Amazon ECS service, code, web and configuration files, executables, packages, scripts, multimedia files, and so on. CodeDeploy can deploy application content stored in Amazon S3 buckets, GitHub repositories, or Bitbucket repositories. You do not…
- Endpoints
- 47 (47 POST)
- Base URL
http://codedeploy.{region}.amazonaws.com- Authentication
- API key
- Spec format
- OpenAPI 3.0.0
- API version
- 2014-10-06
- Provider
- amazonaws.com
- License
- Apache 2.0 License
- Categories
- Cloud & Infrastructure
- Last updated
Use this API in Bruno:
- Download the Bruno collection above and unzip it.
- In Bruno, choose Open Collection and select the unzipped folder.
- Set the
baseUrlvariable (for examplehttp://codedeploy.{region}.amazonaws.com) and your API key credentials, then send requests.
POST
AddTagsToOnPremisesInstances
{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.AddTagsToOnPremisesInstances
HEADERS
X-Amz-Target
BODY json
{
"tags": "",
"instanceNames": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.AddTagsToOnPremisesInstances");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-amz-target: ");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"tags\": \"\",\n \"instanceNames\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.AddTagsToOnPremisesInstances" {:headers {:x-amz-target ""}
:content-type :json
:form-params {:tags ""
:instanceNames ""}})
require "http/client"
url = "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.AddTagsToOnPremisesInstances"
headers = HTTP::Headers{
"x-amz-target" => ""
"content-type" => "application/json"
}
reqBody = "{\n \"tags\": \"\",\n \"instanceNames\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.AddTagsToOnPremisesInstances"),
Headers =
{
{ "x-amz-target", "" },
},
Content = new StringContent("{\n \"tags\": \"\",\n \"instanceNames\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.AddTagsToOnPremisesInstances");
var request = new RestRequest("", Method.Post);
request.AddHeader("x-amz-target", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"tags\": \"\",\n \"instanceNames\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.AddTagsToOnPremisesInstances"
payload := strings.NewReader("{\n \"tags\": \"\",\n \"instanceNames\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-amz-target", "")
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/ HTTP/1.1
X-Amz-Target:
Content-Type: application/json
Host: example.com
Content-Length: 39
{
"tags": "",
"instanceNames": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.AddTagsToOnPremisesInstances")
.setHeader("x-amz-target", "")
.setHeader("content-type", "application/json")
.setBody("{\n \"tags\": \"\",\n \"instanceNames\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.AddTagsToOnPremisesInstances"))
.header("x-amz-target", "")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"tags\": \"\",\n \"instanceNames\": \"\"\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 \"instanceNames\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.AddTagsToOnPremisesInstances")
.post(body)
.addHeader("x-amz-target", "")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.AddTagsToOnPremisesInstances")
.header("x-amz-target", "")
.header("content-type", "application/json")
.body("{\n \"tags\": \"\",\n \"instanceNames\": \"\"\n}")
.asString();
const data = JSON.stringify({
tags: '',
instanceNames: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.AddTagsToOnPremisesInstances');
xhr.setRequestHeader('x-amz-target', '');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.AddTagsToOnPremisesInstances',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {tags: '', instanceNames: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.AddTagsToOnPremisesInstances';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"tags":"","instanceNames":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.AddTagsToOnPremisesInstances',
method: 'POST',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
},
processData: false,
data: '{\n "tags": "",\n "instanceNames": ""\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 \"instanceNames\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.AddTagsToOnPremisesInstances")
.post(body)
.addHeader("x-amz-target", "")
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({tags: '', instanceNames: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.AddTagsToOnPremisesInstances',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: {tags: '', instanceNames: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.AddTagsToOnPremisesInstances');
req.headers({
'x-amz-target': '',
'content-type': 'application/json'
});
req.type('json');
req.send({
tags: '',
instanceNames: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.AddTagsToOnPremisesInstances',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {tags: '', instanceNames: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.AddTagsToOnPremisesInstances';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"tags":"","instanceNames":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"x-amz-target": @"",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"tags": @"",
@"instanceNames": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.AddTagsToOnPremisesInstances"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.AddTagsToOnPremisesInstances" in
let headers = Header.add_list (Header.init ()) [
("x-amz-target", "");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"tags\": \"\",\n \"instanceNames\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.AddTagsToOnPremisesInstances",
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' => '',
'instanceNames' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json",
"x-amz-target: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.AddTagsToOnPremisesInstances', [
'body' => '{
"tags": "",
"instanceNames": ""
}',
'headers' => [
'content-type' => 'application/json',
'x-amz-target' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.AddTagsToOnPremisesInstances');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'tags' => '',
'instanceNames' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'tags' => '',
'instanceNames' => ''
]));
$request->setRequestUrl('{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.AddTagsToOnPremisesInstances');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.AddTagsToOnPremisesInstances' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"tags": "",
"instanceNames": ""
}'
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.AddTagsToOnPremisesInstances' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"tags": "",
"instanceNames": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"tags\": \"\",\n \"instanceNames\": \"\"\n}"
headers = {
'x-amz-target': "",
'content-type': "application/json"
}
conn.request("POST", "/baseUrl/", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.AddTagsToOnPremisesInstances"
payload = {
"tags": "",
"instanceNames": ""
}
headers = {
"x-amz-target": "",
"content-type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.AddTagsToOnPremisesInstances"
payload <- "{\n \"tags\": \"\",\n \"instanceNames\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, add_headers('x-amz-target' = ''), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.AddTagsToOnPremisesInstances")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-amz-target"] = ''
request["content-type"] = 'application/json'
request.body = "{\n \"tags\": \"\",\n \"instanceNames\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/') do |req|
req.headers['x-amz-target'] = ''
req.body = "{\n \"tags\": \"\",\n \"instanceNames\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.AddTagsToOnPremisesInstances";
let payload = json!({
"tags": "",
"instanceNames": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("x-amz-target", "".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.AddTagsToOnPremisesInstances' \
--header 'content-type: application/json' \
--header 'x-amz-target: ' \
--data '{
"tags": "",
"instanceNames": ""
}'
echo '{
"tags": "",
"instanceNames": ""
}' | \
http POST '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.AddTagsToOnPremisesInstances' \
content-type:application/json \
x-amz-target:''
wget --quiet \
--method POST \
--header 'x-amz-target: ' \
--header 'content-type: application/json' \
--body-data '{\n "tags": "",\n "instanceNames": ""\n}' \
--output-document \
- '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.AddTagsToOnPremisesInstances'
import Foundation
let headers = [
"x-amz-target": "",
"content-type": "application/json"
]
let parameters = [
"tags": "",
"instanceNames": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.AddTagsToOnPremisesInstances")! 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
BatchGetApplicationRevisions
{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetApplicationRevisions
HEADERS
X-Amz-Target
BODY json
{
"applicationName": "",
"revisions": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetApplicationRevisions");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-amz-target: ");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"applicationName\": \"\",\n \"revisions\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetApplicationRevisions" {:headers {:x-amz-target ""}
:content-type :json
:form-params {:applicationName ""
:revisions ""}})
require "http/client"
url = "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetApplicationRevisions"
headers = HTTP::Headers{
"x-amz-target" => ""
"content-type" => "application/json"
}
reqBody = "{\n \"applicationName\": \"\",\n \"revisions\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetApplicationRevisions"),
Headers =
{
{ "x-amz-target", "" },
},
Content = new StringContent("{\n \"applicationName\": \"\",\n \"revisions\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetApplicationRevisions");
var request = new RestRequest("", Method.Post);
request.AddHeader("x-amz-target", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"applicationName\": \"\",\n \"revisions\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetApplicationRevisions"
payload := strings.NewReader("{\n \"applicationName\": \"\",\n \"revisions\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-amz-target", "")
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/ HTTP/1.1
X-Amz-Target:
Content-Type: application/json
Host: example.com
Content-Length: 46
{
"applicationName": "",
"revisions": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetApplicationRevisions")
.setHeader("x-amz-target", "")
.setHeader("content-type", "application/json")
.setBody("{\n \"applicationName\": \"\",\n \"revisions\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetApplicationRevisions"))
.header("x-amz-target", "")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"applicationName\": \"\",\n \"revisions\": \"\"\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 \"applicationName\": \"\",\n \"revisions\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetApplicationRevisions")
.post(body)
.addHeader("x-amz-target", "")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetApplicationRevisions")
.header("x-amz-target", "")
.header("content-type", "application/json")
.body("{\n \"applicationName\": \"\",\n \"revisions\": \"\"\n}")
.asString();
const data = JSON.stringify({
applicationName: '',
revisions: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetApplicationRevisions');
xhr.setRequestHeader('x-amz-target', '');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetApplicationRevisions',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {applicationName: '', revisions: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetApplicationRevisions';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"applicationName":"","revisions":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetApplicationRevisions',
method: 'POST',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
},
processData: false,
data: '{\n "applicationName": "",\n "revisions": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"applicationName\": \"\",\n \"revisions\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetApplicationRevisions")
.post(body)
.addHeader("x-amz-target", "")
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({applicationName: '', revisions: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetApplicationRevisions',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: {applicationName: '', revisions: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetApplicationRevisions');
req.headers({
'x-amz-target': '',
'content-type': 'application/json'
});
req.type('json');
req.send({
applicationName: '',
revisions: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetApplicationRevisions',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {applicationName: '', revisions: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetApplicationRevisions';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"applicationName":"","revisions":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"x-amz-target": @"",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"applicationName": @"",
@"revisions": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetApplicationRevisions"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetApplicationRevisions" in
let headers = Header.add_list (Header.init ()) [
("x-amz-target", "");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"applicationName\": \"\",\n \"revisions\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetApplicationRevisions",
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([
'applicationName' => '',
'revisions' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json",
"x-amz-target: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetApplicationRevisions', [
'body' => '{
"applicationName": "",
"revisions": ""
}',
'headers' => [
'content-type' => 'application/json',
'x-amz-target' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetApplicationRevisions');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'applicationName' => '',
'revisions' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'applicationName' => '',
'revisions' => ''
]));
$request->setRequestUrl('{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetApplicationRevisions');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetApplicationRevisions' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"applicationName": "",
"revisions": ""
}'
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetApplicationRevisions' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"applicationName": "",
"revisions": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"applicationName\": \"\",\n \"revisions\": \"\"\n}"
headers = {
'x-amz-target': "",
'content-type': "application/json"
}
conn.request("POST", "/baseUrl/", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetApplicationRevisions"
payload = {
"applicationName": "",
"revisions": ""
}
headers = {
"x-amz-target": "",
"content-type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetApplicationRevisions"
payload <- "{\n \"applicationName\": \"\",\n \"revisions\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, add_headers('x-amz-target' = ''), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetApplicationRevisions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-amz-target"] = ''
request["content-type"] = 'application/json'
request.body = "{\n \"applicationName\": \"\",\n \"revisions\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/') do |req|
req.headers['x-amz-target'] = ''
req.body = "{\n \"applicationName\": \"\",\n \"revisions\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetApplicationRevisions";
let payload = json!({
"applicationName": "",
"revisions": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("x-amz-target", "".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetApplicationRevisions' \
--header 'content-type: application/json' \
--header 'x-amz-target: ' \
--data '{
"applicationName": "",
"revisions": ""
}'
echo '{
"applicationName": "",
"revisions": ""
}' | \
http POST '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetApplicationRevisions' \
content-type:application/json \
x-amz-target:''
wget --quiet \
--method POST \
--header 'x-amz-target: ' \
--header 'content-type: application/json' \
--body-data '{\n "applicationName": "",\n "revisions": ""\n}' \
--output-document \
- '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetApplicationRevisions'
import Foundation
let headers = [
"x-amz-target": "",
"content-type": "application/json"
]
let parameters = [
"applicationName": "",
"revisions": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetApplicationRevisions")! 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
BatchGetApplications
{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetApplications
HEADERS
X-Amz-Target
BODY json
{
"applicationNames": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetApplications");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-amz-target: ");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"applicationNames\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetApplications" {:headers {:x-amz-target ""}
:content-type :json
:form-params {:applicationNames ""}})
require "http/client"
url = "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetApplications"
headers = HTTP::Headers{
"x-amz-target" => ""
"content-type" => "application/json"
}
reqBody = "{\n \"applicationNames\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetApplications"),
Headers =
{
{ "x-amz-target", "" },
},
Content = new StringContent("{\n \"applicationNames\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetApplications");
var request = new RestRequest("", Method.Post);
request.AddHeader("x-amz-target", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"applicationNames\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetApplications"
payload := strings.NewReader("{\n \"applicationNames\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-amz-target", "")
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/ HTTP/1.1
X-Amz-Target:
Content-Type: application/json
Host: example.com
Content-Length: 28
{
"applicationNames": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetApplications")
.setHeader("x-amz-target", "")
.setHeader("content-type", "application/json")
.setBody("{\n \"applicationNames\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetApplications"))
.header("x-amz-target", "")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"applicationNames\": \"\"\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 \"applicationNames\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetApplications")
.post(body)
.addHeader("x-amz-target", "")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetApplications")
.header("x-amz-target", "")
.header("content-type", "application/json")
.body("{\n \"applicationNames\": \"\"\n}")
.asString();
const data = JSON.stringify({
applicationNames: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetApplications');
xhr.setRequestHeader('x-amz-target', '');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetApplications',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {applicationNames: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetApplications';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"applicationNames":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetApplications',
method: 'POST',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
},
processData: false,
data: '{\n "applicationNames": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"applicationNames\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetApplications")
.post(body)
.addHeader("x-amz-target", "")
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({applicationNames: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetApplications',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: {applicationNames: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetApplications');
req.headers({
'x-amz-target': '',
'content-type': 'application/json'
});
req.type('json');
req.send({
applicationNames: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetApplications',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {applicationNames: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetApplications';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"applicationNames":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"x-amz-target": @"",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"applicationNames": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetApplications"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetApplications" in
let headers = Header.add_list (Header.init ()) [
("x-amz-target", "");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"applicationNames\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetApplications",
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([
'applicationNames' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json",
"x-amz-target: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetApplications', [
'body' => '{
"applicationNames": ""
}',
'headers' => [
'content-type' => 'application/json',
'x-amz-target' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetApplications');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'applicationNames' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'applicationNames' => ''
]));
$request->setRequestUrl('{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetApplications');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetApplications' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"applicationNames": ""
}'
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetApplications' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"applicationNames": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"applicationNames\": \"\"\n}"
headers = {
'x-amz-target': "",
'content-type': "application/json"
}
conn.request("POST", "/baseUrl/", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetApplications"
payload = { "applicationNames": "" }
headers = {
"x-amz-target": "",
"content-type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetApplications"
payload <- "{\n \"applicationNames\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, add_headers('x-amz-target' = ''), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetApplications")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-amz-target"] = ''
request["content-type"] = 'application/json'
request.body = "{\n \"applicationNames\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/') do |req|
req.headers['x-amz-target'] = ''
req.body = "{\n \"applicationNames\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetApplications";
let payload = json!({"applicationNames": ""});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("x-amz-target", "".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetApplications' \
--header 'content-type: application/json' \
--header 'x-amz-target: ' \
--data '{
"applicationNames": ""
}'
echo '{
"applicationNames": ""
}' | \
http POST '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetApplications' \
content-type:application/json \
x-amz-target:''
wget --quiet \
--method POST \
--header 'x-amz-target: ' \
--header 'content-type: application/json' \
--body-data '{\n "applicationNames": ""\n}' \
--output-document \
- '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetApplications'
import Foundation
let headers = [
"x-amz-target": "",
"content-type": "application/json"
]
let parameters = ["applicationNames": ""] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetApplications")! 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
BatchGetDeploymentGroups
{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetDeploymentGroups
HEADERS
X-Amz-Target
BODY json
{
"applicationName": "",
"deploymentGroupNames": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetDeploymentGroups");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-amz-target: ");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"applicationName\": \"\",\n \"deploymentGroupNames\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetDeploymentGroups" {:headers {:x-amz-target ""}
:content-type :json
:form-params {:applicationName ""
:deploymentGroupNames ""}})
require "http/client"
url = "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetDeploymentGroups"
headers = HTTP::Headers{
"x-amz-target" => ""
"content-type" => "application/json"
}
reqBody = "{\n \"applicationName\": \"\",\n \"deploymentGroupNames\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetDeploymentGroups"),
Headers =
{
{ "x-amz-target", "" },
},
Content = new StringContent("{\n \"applicationName\": \"\",\n \"deploymentGroupNames\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetDeploymentGroups");
var request = new RestRequest("", Method.Post);
request.AddHeader("x-amz-target", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"applicationName\": \"\",\n \"deploymentGroupNames\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetDeploymentGroups"
payload := strings.NewReader("{\n \"applicationName\": \"\",\n \"deploymentGroupNames\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-amz-target", "")
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/ HTTP/1.1
X-Amz-Target:
Content-Type: application/json
Host: example.com
Content-Length: 57
{
"applicationName": "",
"deploymentGroupNames": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetDeploymentGroups")
.setHeader("x-amz-target", "")
.setHeader("content-type", "application/json")
.setBody("{\n \"applicationName\": \"\",\n \"deploymentGroupNames\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetDeploymentGroups"))
.header("x-amz-target", "")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"applicationName\": \"\",\n \"deploymentGroupNames\": \"\"\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 \"applicationName\": \"\",\n \"deploymentGroupNames\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetDeploymentGroups")
.post(body)
.addHeader("x-amz-target", "")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetDeploymentGroups")
.header("x-amz-target", "")
.header("content-type", "application/json")
.body("{\n \"applicationName\": \"\",\n \"deploymentGroupNames\": \"\"\n}")
.asString();
const data = JSON.stringify({
applicationName: '',
deploymentGroupNames: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetDeploymentGroups');
xhr.setRequestHeader('x-amz-target', '');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetDeploymentGroups',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {applicationName: '', deploymentGroupNames: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetDeploymentGroups';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"applicationName":"","deploymentGroupNames":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetDeploymentGroups',
method: 'POST',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
},
processData: false,
data: '{\n "applicationName": "",\n "deploymentGroupNames": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"applicationName\": \"\",\n \"deploymentGroupNames\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetDeploymentGroups")
.post(body)
.addHeader("x-amz-target", "")
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({applicationName: '', deploymentGroupNames: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetDeploymentGroups',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: {applicationName: '', deploymentGroupNames: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetDeploymentGroups');
req.headers({
'x-amz-target': '',
'content-type': 'application/json'
});
req.type('json');
req.send({
applicationName: '',
deploymentGroupNames: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetDeploymentGroups',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {applicationName: '', deploymentGroupNames: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetDeploymentGroups';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"applicationName":"","deploymentGroupNames":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"x-amz-target": @"",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"applicationName": @"",
@"deploymentGroupNames": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetDeploymentGroups"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetDeploymentGroups" in
let headers = Header.add_list (Header.init ()) [
("x-amz-target", "");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"applicationName\": \"\",\n \"deploymentGroupNames\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetDeploymentGroups",
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([
'applicationName' => '',
'deploymentGroupNames' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json",
"x-amz-target: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetDeploymentGroups', [
'body' => '{
"applicationName": "",
"deploymentGroupNames": ""
}',
'headers' => [
'content-type' => 'application/json',
'x-amz-target' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetDeploymentGroups');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'applicationName' => '',
'deploymentGroupNames' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'applicationName' => '',
'deploymentGroupNames' => ''
]));
$request->setRequestUrl('{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetDeploymentGroups');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetDeploymentGroups' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"applicationName": "",
"deploymentGroupNames": ""
}'
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetDeploymentGroups' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"applicationName": "",
"deploymentGroupNames": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"applicationName\": \"\",\n \"deploymentGroupNames\": \"\"\n}"
headers = {
'x-amz-target': "",
'content-type': "application/json"
}
conn.request("POST", "/baseUrl/", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetDeploymentGroups"
payload = {
"applicationName": "",
"deploymentGroupNames": ""
}
headers = {
"x-amz-target": "",
"content-type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetDeploymentGroups"
payload <- "{\n \"applicationName\": \"\",\n \"deploymentGroupNames\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, add_headers('x-amz-target' = ''), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetDeploymentGroups")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-amz-target"] = ''
request["content-type"] = 'application/json'
request.body = "{\n \"applicationName\": \"\",\n \"deploymentGroupNames\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/') do |req|
req.headers['x-amz-target'] = ''
req.body = "{\n \"applicationName\": \"\",\n \"deploymentGroupNames\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetDeploymentGroups";
let payload = json!({
"applicationName": "",
"deploymentGroupNames": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("x-amz-target", "".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetDeploymentGroups' \
--header 'content-type: application/json' \
--header 'x-amz-target: ' \
--data '{
"applicationName": "",
"deploymentGroupNames": ""
}'
echo '{
"applicationName": "",
"deploymentGroupNames": ""
}' | \
http POST '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetDeploymentGroups' \
content-type:application/json \
x-amz-target:''
wget --quiet \
--method POST \
--header 'x-amz-target: ' \
--header 'content-type: application/json' \
--body-data '{\n "applicationName": "",\n "deploymentGroupNames": ""\n}' \
--output-document \
- '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetDeploymentGroups'
import Foundation
let headers = [
"x-amz-target": "",
"content-type": "application/json"
]
let parameters = [
"applicationName": "",
"deploymentGroupNames": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetDeploymentGroups")! 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
BatchGetDeploymentInstances
{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetDeploymentInstances
HEADERS
X-Amz-Target
BODY json
{
"deploymentId": "",
"instanceIds": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetDeploymentInstances");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-amz-target: ");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"deploymentId\": \"\",\n \"instanceIds\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetDeploymentInstances" {:headers {:x-amz-target ""}
:content-type :json
:form-params {:deploymentId ""
:instanceIds ""}})
require "http/client"
url = "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetDeploymentInstances"
headers = HTTP::Headers{
"x-amz-target" => ""
"content-type" => "application/json"
}
reqBody = "{\n \"deploymentId\": \"\",\n \"instanceIds\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetDeploymentInstances"),
Headers =
{
{ "x-amz-target", "" },
},
Content = new StringContent("{\n \"deploymentId\": \"\",\n \"instanceIds\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetDeploymentInstances");
var request = new RestRequest("", Method.Post);
request.AddHeader("x-amz-target", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"deploymentId\": \"\",\n \"instanceIds\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetDeploymentInstances"
payload := strings.NewReader("{\n \"deploymentId\": \"\",\n \"instanceIds\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-amz-target", "")
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/ HTTP/1.1
X-Amz-Target:
Content-Type: application/json
Host: example.com
Content-Length: 45
{
"deploymentId": "",
"instanceIds": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetDeploymentInstances")
.setHeader("x-amz-target", "")
.setHeader("content-type", "application/json")
.setBody("{\n \"deploymentId\": \"\",\n \"instanceIds\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetDeploymentInstances"))
.header("x-amz-target", "")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"deploymentId\": \"\",\n \"instanceIds\": \"\"\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 \"deploymentId\": \"\",\n \"instanceIds\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetDeploymentInstances")
.post(body)
.addHeader("x-amz-target", "")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetDeploymentInstances")
.header("x-amz-target", "")
.header("content-type", "application/json")
.body("{\n \"deploymentId\": \"\",\n \"instanceIds\": \"\"\n}")
.asString();
const data = JSON.stringify({
deploymentId: '',
instanceIds: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetDeploymentInstances');
xhr.setRequestHeader('x-amz-target', '');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetDeploymentInstances',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {deploymentId: '', instanceIds: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetDeploymentInstances';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"deploymentId":"","instanceIds":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetDeploymentInstances',
method: 'POST',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
},
processData: false,
data: '{\n "deploymentId": "",\n "instanceIds": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"deploymentId\": \"\",\n \"instanceIds\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetDeploymentInstances")
.post(body)
.addHeader("x-amz-target", "")
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({deploymentId: '', instanceIds: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetDeploymentInstances',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: {deploymentId: '', instanceIds: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetDeploymentInstances');
req.headers({
'x-amz-target': '',
'content-type': 'application/json'
});
req.type('json');
req.send({
deploymentId: '',
instanceIds: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetDeploymentInstances',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {deploymentId: '', instanceIds: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetDeploymentInstances';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"deploymentId":"","instanceIds":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"x-amz-target": @"",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"deploymentId": @"",
@"instanceIds": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetDeploymentInstances"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetDeploymentInstances" in
let headers = Header.add_list (Header.init ()) [
("x-amz-target", "");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"deploymentId\": \"\",\n \"instanceIds\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetDeploymentInstances",
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([
'deploymentId' => '',
'instanceIds' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json",
"x-amz-target: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetDeploymentInstances', [
'body' => '{
"deploymentId": "",
"instanceIds": ""
}',
'headers' => [
'content-type' => 'application/json',
'x-amz-target' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetDeploymentInstances');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'deploymentId' => '',
'instanceIds' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'deploymentId' => '',
'instanceIds' => ''
]));
$request->setRequestUrl('{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetDeploymentInstances');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetDeploymentInstances' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"deploymentId": "",
"instanceIds": ""
}'
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetDeploymentInstances' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"deploymentId": "",
"instanceIds": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"deploymentId\": \"\",\n \"instanceIds\": \"\"\n}"
headers = {
'x-amz-target': "",
'content-type': "application/json"
}
conn.request("POST", "/baseUrl/", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetDeploymentInstances"
payload = {
"deploymentId": "",
"instanceIds": ""
}
headers = {
"x-amz-target": "",
"content-type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetDeploymentInstances"
payload <- "{\n \"deploymentId\": \"\",\n \"instanceIds\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, add_headers('x-amz-target' = ''), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetDeploymentInstances")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-amz-target"] = ''
request["content-type"] = 'application/json'
request.body = "{\n \"deploymentId\": \"\",\n \"instanceIds\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/') do |req|
req.headers['x-amz-target'] = ''
req.body = "{\n \"deploymentId\": \"\",\n \"instanceIds\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetDeploymentInstances";
let payload = json!({
"deploymentId": "",
"instanceIds": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("x-amz-target", "".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetDeploymentInstances' \
--header 'content-type: application/json' \
--header 'x-amz-target: ' \
--data '{
"deploymentId": "",
"instanceIds": ""
}'
echo '{
"deploymentId": "",
"instanceIds": ""
}' | \
http POST '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetDeploymentInstances' \
content-type:application/json \
x-amz-target:''
wget --quiet \
--method POST \
--header 'x-amz-target: ' \
--header 'content-type: application/json' \
--body-data '{\n "deploymentId": "",\n "instanceIds": ""\n}' \
--output-document \
- '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetDeploymentInstances'
import Foundation
let headers = [
"x-amz-target": "",
"content-type": "application/json"
]
let parameters = [
"deploymentId": "",
"instanceIds": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetDeploymentInstances")! 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
BatchGetDeploymentTargets
{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetDeploymentTargets
HEADERS
X-Amz-Target
BODY json
{
"deploymentId": "",
"targetIds": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetDeploymentTargets");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-amz-target: ");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"deploymentId\": \"\",\n \"targetIds\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetDeploymentTargets" {:headers {:x-amz-target ""}
:content-type :json
:form-params {:deploymentId ""
:targetIds ""}})
require "http/client"
url = "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetDeploymentTargets"
headers = HTTP::Headers{
"x-amz-target" => ""
"content-type" => "application/json"
}
reqBody = "{\n \"deploymentId\": \"\",\n \"targetIds\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetDeploymentTargets"),
Headers =
{
{ "x-amz-target", "" },
},
Content = new StringContent("{\n \"deploymentId\": \"\",\n \"targetIds\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetDeploymentTargets");
var request = new RestRequest("", Method.Post);
request.AddHeader("x-amz-target", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"deploymentId\": \"\",\n \"targetIds\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetDeploymentTargets"
payload := strings.NewReader("{\n \"deploymentId\": \"\",\n \"targetIds\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-amz-target", "")
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/ HTTP/1.1
X-Amz-Target:
Content-Type: application/json
Host: example.com
Content-Length: 43
{
"deploymentId": "",
"targetIds": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetDeploymentTargets")
.setHeader("x-amz-target", "")
.setHeader("content-type", "application/json")
.setBody("{\n \"deploymentId\": \"\",\n \"targetIds\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetDeploymentTargets"))
.header("x-amz-target", "")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"deploymentId\": \"\",\n \"targetIds\": \"\"\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 \"deploymentId\": \"\",\n \"targetIds\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetDeploymentTargets")
.post(body)
.addHeader("x-amz-target", "")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetDeploymentTargets")
.header("x-amz-target", "")
.header("content-type", "application/json")
.body("{\n \"deploymentId\": \"\",\n \"targetIds\": \"\"\n}")
.asString();
const data = JSON.stringify({
deploymentId: '',
targetIds: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetDeploymentTargets');
xhr.setRequestHeader('x-amz-target', '');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetDeploymentTargets',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {deploymentId: '', targetIds: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetDeploymentTargets';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"deploymentId":"","targetIds":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetDeploymentTargets',
method: 'POST',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
},
processData: false,
data: '{\n "deploymentId": "",\n "targetIds": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"deploymentId\": \"\",\n \"targetIds\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetDeploymentTargets")
.post(body)
.addHeader("x-amz-target", "")
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({deploymentId: '', targetIds: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetDeploymentTargets',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: {deploymentId: '', targetIds: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetDeploymentTargets');
req.headers({
'x-amz-target': '',
'content-type': 'application/json'
});
req.type('json');
req.send({
deploymentId: '',
targetIds: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetDeploymentTargets',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {deploymentId: '', targetIds: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetDeploymentTargets';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"deploymentId":"","targetIds":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"x-amz-target": @"",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"deploymentId": @"",
@"targetIds": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetDeploymentTargets"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetDeploymentTargets" in
let headers = Header.add_list (Header.init ()) [
("x-amz-target", "");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"deploymentId\": \"\",\n \"targetIds\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetDeploymentTargets",
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([
'deploymentId' => '',
'targetIds' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json",
"x-amz-target: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetDeploymentTargets', [
'body' => '{
"deploymentId": "",
"targetIds": ""
}',
'headers' => [
'content-type' => 'application/json',
'x-amz-target' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetDeploymentTargets');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'deploymentId' => '',
'targetIds' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'deploymentId' => '',
'targetIds' => ''
]));
$request->setRequestUrl('{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetDeploymentTargets');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetDeploymentTargets' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"deploymentId": "",
"targetIds": ""
}'
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetDeploymentTargets' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"deploymentId": "",
"targetIds": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"deploymentId\": \"\",\n \"targetIds\": \"\"\n}"
headers = {
'x-amz-target': "",
'content-type': "application/json"
}
conn.request("POST", "/baseUrl/", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetDeploymentTargets"
payload = {
"deploymentId": "",
"targetIds": ""
}
headers = {
"x-amz-target": "",
"content-type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetDeploymentTargets"
payload <- "{\n \"deploymentId\": \"\",\n \"targetIds\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, add_headers('x-amz-target' = ''), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetDeploymentTargets")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-amz-target"] = ''
request["content-type"] = 'application/json'
request.body = "{\n \"deploymentId\": \"\",\n \"targetIds\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/') do |req|
req.headers['x-amz-target'] = ''
req.body = "{\n \"deploymentId\": \"\",\n \"targetIds\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetDeploymentTargets";
let payload = json!({
"deploymentId": "",
"targetIds": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("x-amz-target", "".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetDeploymentTargets' \
--header 'content-type: application/json' \
--header 'x-amz-target: ' \
--data '{
"deploymentId": "",
"targetIds": ""
}'
echo '{
"deploymentId": "",
"targetIds": ""
}' | \
http POST '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetDeploymentTargets' \
content-type:application/json \
x-amz-target:''
wget --quiet \
--method POST \
--header 'x-amz-target: ' \
--header 'content-type: application/json' \
--body-data '{\n "deploymentId": "",\n "targetIds": ""\n}' \
--output-document \
- '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetDeploymentTargets'
import Foundation
let headers = [
"x-amz-target": "",
"content-type": "application/json"
]
let parameters = [
"deploymentId": "",
"targetIds": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetDeploymentTargets")! 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
BatchGetDeployments
{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetDeployments
HEADERS
X-Amz-Target
BODY json
{
"deploymentIds": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetDeployments");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-amz-target: ");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"deploymentIds\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetDeployments" {:headers {:x-amz-target ""}
:content-type :json
:form-params {:deploymentIds ""}})
require "http/client"
url = "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetDeployments"
headers = HTTP::Headers{
"x-amz-target" => ""
"content-type" => "application/json"
}
reqBody = "{\n \"deploymentIds\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetDeployments"),
Headers =
{
{ "x-amz-target", "" },
},
Content = new StringContent("{\n \"deploymentIds\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetDeployments");
var request = new RestRequest("", Method.Post);
request.AddHeader("x-amz-target", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"deploymentIds\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetDeployments"
payload := strings.NewReader("{\n \"deploymentIds\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-amz-target", "")
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/ HTTP/1.1
X-Amz-Target:
Content-Type: application/json
Host: example.com
Content-Length: 25
{
"deploymentIds": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetDeployments")
.setHeader("x-amz-target", "")
.setHeader("content-type", "application/json")
.setBody("{\n \"deploymentIds\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetDeployments"))
.header("x-amz-target", "")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"deploymentIds\": \"\"\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 \"deploymentIds\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetDeployments")
.post(body)
.addHeader("x-amz-target", "")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetDeployments")
.header("x-amz-target", "")
.header("content-type", "application/json")
.body("{\n \"deploymentIds\": \"\"\n}")
.asString();
const data = JSON.stringify({
deploymentIds: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetDeployments');
xhr.setRequestHeader('x-amz-target', '');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetDeployments',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {deploymentIds: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetDeployments';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"deploymentIds":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetDeployments',
method: 'POST',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
},
processData: false,
data: '{\n "deploymentIds": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"deploymentIds\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetDeployments")
.post(body)
.addHeader("x-amz-target", "")
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({deploymentIds: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetDeployments',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: {deploymentIds: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetDeployments');
req.headers({
'x-amz-target': '',
'content-type': 'application/json'
});
req.type('json');
req.send({
deploymentIds: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetDeployments',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {deploymentIds: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetDeployments';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"deploymentIds":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"x-amz-target": @"",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"deploymentIds": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetDeployments"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetDeployments" in
let headers = Header.add_list (Header.init ()) [
("x-amz-target", "");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"deploymentIds\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetDeployments",
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([
'deploymentIds' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json",
"x-amz-target: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetDeployments', [
'body' => '{
"deploymentIds": ""
}',
'headers' => [
'content-type' => 'application/json',
'x-amz-target' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetDeployments');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'deploymentIds' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'deploymentIds' => ''
]));
$request->setRequestUrl('{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetDeployments');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetDeployments' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"deploymentIds": ""
}'
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetDeployments' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"deploymentIds": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"deploymentIds\": \"\"\n}"
headers = {
'x-amz-target': "",
'content-type': "application/json"
}
conn.request("POST", "/baseUrl/", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetDeployments"
payload = { "deploymentIds": "" }
headers = {
"x-amz-target": "",
"content-type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetDeployments"
payload <- "{\n \"deploymentIds\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, add_headers('x-amz-target' = ''), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetDeployments")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-amz-target"] = ''
request["content-type"] = 'application/json'
request.body = "{\n \"deploymentIds\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/') do |req|
req.headers['x-amz-target'] = ''
req.body = "{\n \"deploymentIds\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetDeployments";
let payload = json!({"deploymentIds": ""});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("x-amz-target", "".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetDeployments' \
--header 'content-type: application/json' \
--header 'x-amz-target: ' \
--data '{
"deploymentIds": ""
}'
echo '{
"deploymentIds": ""
}' | \
http POST '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetDeployments' \
content-type:application/json \
x-amz-target:''
wget --quiet \
--method POST \
--header 'x-amz-target: ' \
--header 'content-type: application/json' \
--body-data '{\n "deploymentIds": ""\n}' \
--output-document \
- '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetDeployments'
import Foundation
let headers = [
"x-amz-target": "",
"content-type": "application/json"
]
let parameters = ["deploymentIds": ""] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetDeployments")! 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
BatchGetOnPremisesInstances
{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetOnPremisesInstances
HEADERS
X-Amz-Target
BODY json
{
"instanceNames": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetOnPremisesInstances");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-amz-target: ");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"instanceNames\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetOnPremisesInstances" {:headers {:x-amz-target ""}
:content-type :json
:form-params {:instanceNames ""}})
require "http/client"
url = "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetOnPremisesInstances"
headers = HTTP::Headers{
"x-amz-target" => ""
"content-type" => "application/json"
}
reqBody = "{\n \"instanceNames\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetOnPremisesInstances"),
Headers =
{
{ "x-amz-target", "" },
},
Content = new StringContent("{\n \"instanceNames\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetOnPremisesInstances");
var request = new RestRequest("", Method.Post);
request.AddHeader("x-amz-target", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"instanceNames\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetOnPremisesInstances"
payload := strings.NewReader("{\n \"instanceNames\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-amz-target", "")
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/ HTTP/1.1
X-Amz-Target:
Content-Type: application/json
Host: example.com
Content-Length: 25
{
"instanceNames": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetOnPremisesInstances")
.setHeader("x-amz-target", "")
.setHeader("content-type", "application/json")
.setBody("{\n \"instanceNames\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetOnPremisesInstances"))
.header("x-amz-target", "")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"instanceNames\": \"\"\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 \"instanceNames\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetOnPremisesInstances")
.post(body)
.addHeader("x-amz-target", "")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetOnPremisesInstances")
.header("x-amz-target", "")
.header("content-type", "application/json")
.body("{\n \"instanceNames\": \"\"\n}")
.asString();
const data = JSON.stringify({
instanceNames: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetOnPremisesInstances');
xhr.setRequestHeader('x-amz-target', '');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetOnPremisesInstances',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {instanceNames: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetOnPremisesInstances';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"instanceNames":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetOnPremisesInstances',
method: 'POST',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
},
processData: false,
data: '{\n "instanceNames": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"instanceNames\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetOnPremisesInstances")
.post(body)
.addHeader("x-amz-target", "")
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({instanceNames: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetOnPremisesInstances',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: {instanceNames: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetOnPremisesInstances');
req.headers({
'x-amz-target': '',
'content-type': 'application/json'
});
req.type('json');
req.send({
instanceNames: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetOnPremisesInstances',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {instanceNames: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetOnPremisesInstances';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"instanceNames":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"x-amz-target": @"",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"instanceNames": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetOnPremisesInstances"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetOnPremisesInstances" in
let headers = Header.add_list (Header.init ()) [
("x-amz-target", "");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"instanceNames\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetOnPremisesInstances",
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([
'instanceNames' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json",
"x-amz-target: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetOnPremisesInstances', [
'body' => '{
"instanceNames": ""
}',
'headers' => [
'content-type' => 'application/json',
'x-amz-target' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetOnPremisesInstances');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'instanceNames' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'instanceNames' => ''
]));
$request->setRequestUrl('{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetOnPremisesInstances');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetOnPremisesInstances' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"instanceNames": ""
}'
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetOnPremisesInstances' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"instanceNames": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"instanceNames\": \"\"\n}"
headers = {
'x-amz-target': "",
'content-type': "application/json"
}
conn.request("POST", "/baseUrl/", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetOnPremisesInstances"
payload = { "instanceNames": "" }
headers = {
"x-amz-target": "",
"content-type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetOnPremisesInstances"
payload <- "{\n \"instanceNames\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, add_headers('x-amz-target' = ''), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetOnPremisesInstances")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-amz-target"] = ''
request["content-type"] = 'application/json'
request.body = "{\n \"instanceNames\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/') do |req|
req.headers['x-amz-target'] = ''
req.body = "{\n \"instanceNames\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetOnPremisesInstances";
let payload = json!({"instanceNames": ""});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("x-amz-target", "".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetOnPremisesInstances' \
--header 'content-type: application/json' \
--header 'x-amz-target: ' \
--data '{
"instanceNames": ""
}'
echo '{
"instanceNames": ""
}' | \
http POST '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetOnPremisesInstances' \
content-type:application/json \
x-amz-target:''
wget --quiet \
--method POST \
--header 'x-amz-target: ' \
--header 'content-type: application/json' \
--body-data '{\n "instanceNames": ""\n}' \
--output-document \
- '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetOnPremisesInstances'
import Foundation
let headers = [
"x-amz-target": "",
"content-type": "application/json"
]
let parameters = ["instanceNames": ""] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.BatchGetOnPremisesInstances")! 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
ContinueDeployment
{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ContinueDeployment
HEADERS
X-Amz-Target
BODY json
{
"deploymentId": "",
"deploymentWaitType": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ContinueDeployment");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-amz-target: ");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"deploymentId\": \"\",\n \"deploymentWaitType\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ContinueDeployment" {:headers {:x-amz-target ""}
:content-type :json
:form-params {:deploymentId ""
:deploymentWaitType ""}})
require "http/client"
url = "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ContinueDeployment"
headers = HTTP::Headers{
"x-amz-target" => ""
"content-type" => "application/json"
}
reqBody = "{\n \"deploymentId\": \"\",\n \"deploymentWaitType\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ContinueDeployment"),
Headers =
{
{ "x-amz-target", "" },
},
Content = new StringContent("{\n \"deploymentId\": \"\",\n \"deploymentWaitType\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ContinueDeployment");
var request = new RestRequest("", Method.Post);
request.AddHeader("x-amz-target", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"deploymentId\": \"\",\n \"deploymentWaitType\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ContinueDeployment"
payload := strings.NewReader("{\n \"deploymentId\": \"\",\n \"deploymentWaitType\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-amz-target", "")
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/ HTTP/1.1
X-Amz-Target:
Content-Type: application/json
Host: example.com
Content-Length: 52
{
"deploymentId": "",
"deploymentWaitType": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ContinueDeployment")
.setHeader("x-amz-target", "")
.setHeader("content-type", "application/json")
.setBody("{\n \"deploymentId\": \"\",\n \"deploymentWaitType\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ContinueDeployment"))
.header("x-amz-target", "")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"deploymentId\": \"\",\n \"deploymentWaitType\": \"\"\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 \"deploymentId\": \"\",\n \"deploymentWaitType\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ContinueDeployment")
.post(body)
.addHeader("x-amz-target", "")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ContinueDeployment")
.header("x-amz-target", "")
.header("content-type", "application/json")
.body("{\n \"deploymentId\": \"\",\n \"deploymentWaitType\": \"\"\n}")
.asString();
const data = JSON.stringify({
deploymentId: '',
deploymentWaitType: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ContinueDeployment');
xhr.setRequestHeader('x-amz-target', '');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ContinueDeployment',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {deploymentId: '', deploymentWaitType: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ContinueDeployment';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"deploymentId":"","deploymentWaitType":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ContinueDeployment',
method: 'POST',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
},
processData: false,
data: '{\n "deploymentId": "",\n "deploymentWaitType": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"deploymentId\": \"\",\n \"deploymentWaitType\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ContinueDeployment")
.post(body)
.addHeader("x-amz-target", "")
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({deploymentId: '', deploymentWaitType: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ContinueDeployment',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: {deploymentId: '', deploymentWaitType: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ContinueDeployment');
req.headers({
'x-amz-target': '',
'content-type': 'application/json'
});
req.type('json');
req.send({
deploymentId: '',
deploymentWaitType: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ContinueDeployment',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {deploymentId: '', deploymentWaitType: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ContinueDeployment';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"deploymentId":"","deploymentWaitType":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"x-amz-target": @"",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"deploymentId": @"",
@"deploymentWaitType": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ContinueDeployment"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ContinueDeployment" in
let headers = Header.add_list (Header.init ()) [
("x-amz-target", "");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"deploymentId\": \"\",\n \"deploymentWaitType\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ContinueDeployment",
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([
'deploymentId' => '',
'deploymentWaitType' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json",
"x-amz-target: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ContinueDeployment', [
'body' => '{
"deploymentId": "",
"deploymentWaitType": ""
}',
'headers' => [
'content-type' => 'application/json',
'x-amz-target' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ContinueDeployment');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'deploymentId' => '',
'deploymentWaitType' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'deploymentId' => '',
'deploymentWaitType' => ''
]));
$request->setRequestUrl('{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ContinueDeployment');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ContinueDeployment' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"deploymentId": "",
"deploymentWaitType": ""
}'
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ContinueDeployment' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"deploymentId": "",
"deploymentWaitType": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"deploymentId\": \"\",\n \"deploymentWaitType\": \"\"\n}"
headers = {
'x-amz-target': "",
'content-type': "application/json"
}
conn.request("POST", "/baseUrl/", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ContinueDeployment"
payload = {
"deploymentId": "",
"deploymentWaitType": ""
}
headers = {
"x-amz-target": "",
"content-type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ContinueDeployment"
payload <- "{\n \"deploymentId\": \"\",\n \"deploymentWaitType\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, add_headers('x-amz-target' = ''), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ContinueDeployment")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-amz-target"] = ''
request["content-type"] = 'application/json'
request.body = "{\n \"deploymentId\": \"\",\n \"deploymentWaitType\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/') do |req|
req.headers['x-amz-target'] = ''
req.body = "{\n \"deploymentId\": \"\",\n \"deploymentWaitType\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ContinueDeployment";
let payload = json!({
"deploymentId": "",
"deploymentWaitType": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("x-amz-target", "".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ContinueDeployment' \
--header 'content-type: application/json' \
--header 'x-amz-target: ' \
--data '{
"deploymentId": "",
"deploymentWaitType": ""
}'
echo '{
"deploymentId": "",
"deploymentWaitType": ""
}' | \
http POST '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ContinueDeployment' \
content-type:application/json \
x-amz-target:''
wget --quiet \
--method POST \
--header 'x-amz-target: ' \
--header 'content-type: application/json' \
--body-data '{\n "deploymentId": "",\n "deploymentWaitType": ""\n}' \
--output-document \
- '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ContinueDeployment'
import Foundation
let headers = [
"x-amz-target": "",
"content-type": "application/json"
]
let parameters = [
"deploymentId": "",
"deploymentWaitType": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ContinueDeployment")! 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}}/#X-Amz-Target=CodeDeploy_20141006.CreateApplication
HEADERS
X-Amz-Target
BODY json
{
"applicationName": "",
"computePlatform": "",
"tags": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.CreateApplication");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-amz-target: ");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"applicationName\": \"\",\n \"computePlatform\": \"\",\n \"tags\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.CreateApplication" {:headers {:x-amz-target ""}
:content-type :json
:form-params {:applicationName ""
:computePlatform ""
:tags ""}})
require "http/client"
url = "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.CreateApplication"
headers = HTTP::Headers{
"x-amz-target" => ""
"content-type" => "application/json"
}
reqBody = "{\n \"applicationName\": \"\",\n \"computePlatform\": \"\",\n \"tags\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.CreateApplication"),
Headers =
{
{ "x-amz-target", "" },
},
Content = new StringContent("{\n \"applicationName\": \"\",\n \"computePlatform\": \"\",\n \"tags\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.CreateApplication");
var request = new RestRequest("", Method.Post);
request.AddHeader("x-amz-target", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"applicationName\": \"\",\n \"computePlatform\": \"\",\n \"tags\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.CreateApplication"
payload := strings.NewReader("{\n \"applicationName\": \"\",\n \"computePlatform\": \"\",\n \"tags\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-amz-target", "")
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/ HTTP/1.1
X-Amz-Target:
Content-Type: application/json
Host: example.com
Content-Length: 66
{
"applicationName": "",
"computePlatform": "",
"tags": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.CreateApplication")
.setHeader("x-amz-target", "")
.setHeader("content-type", "application/json")
.setBody("{\n \"applicationName\": \"\",\n \"computePlatform\": \"\",\n \"tags\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.CreateApplication"))
.header("x-amz-target", "")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"applicationName\": \"\",\n \"computePlatform\": \"\",\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 \"applicationName\": \"\",\n \"computePlatform\": \"\",\n \"tags\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.CreateApplication")
.post(body)
.addHeader("x-amz-target", "")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.CreateApplication")
.header("x-amz-target", "")
.header("content-type", "application/json")
.body("{\n \"applicationName\": \"\",\n \"computePlatform\": \"\",\n \"tags\": \"\"\n}")
.asString();
const data = JSON.stringify({
applicationName: '',
computePlatform: '',
tags: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.CreateApplication');
xhr.setRequestHeader('x-amz-target', '');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.CreateApplication',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {applicationName: '', computePlatform: '', tags: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.CreateApplication';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"applicationName":"","computePlatform":"","tags":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.CreateApplication',
method: 'POST',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
},
processData: false,
data: '{\n "applicationName": "",\n "computePlatform": "",\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 \"applicationName\": \"\",\n \"computePlatform\": \"\",\n \"tags\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.CreateApplication")
.post(body)
.addHeader("x-amz-target", "")
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({applicationName: '', computePlatform: '', tags: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.CreateApplication',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: {applicationName: '', computePlatform: '', tags: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.CreateApplication');
req.headers({
'x-amz-target': '',
'content-type': 'application/json'
});
req.type('json');
req.send({
applicationName: '',
computePlatform: '',
tags: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.CreateApplication',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {applicationName: '', computePlatform: '', tags: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.CreateApplication';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"applicationName":"","computePlatform":"","tags":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"x-amz-target": @"",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"applicationName": @"",
@"computePlatform": @"",
@"tags": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.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}}/#X-Amz-Target=CodeDeploy_20141006.CreateApplication" in
let headers = Header.add_list (Header.init ()) [
("x-amz-target", "");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"applicationName\": \"\",\n \"computePlatform\": \"\",\n \"tags\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.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([
'applicationName' => '',
'computePlatform' => '',
'tags' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json",
"x-amz-target: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.CreateApplication', [
'body' => '{
"applicationName": "",
"computePlatform": "",
"tags": ""
}',
'headers' => [
'content-type' => 'application/json',
'x-amz-target' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.CreateApplication');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'applicationName' => '',
'computePlatform' => '',
'tags' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'applicationName' => '',
'computePlatform' => '',
'tags' => ''
]));
$request->setRequestUrl('{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.CreateApplication');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.CreateApplication' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"applicationName": "",
"computePlatform": "",
"tags": ""
}'
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.CreateApplication' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"applicationName": "",
"computePlatform": "",
"tags": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"applicationName\": \"\",\n \"computePlatform\": \"\",\n \"tags\": \"\"\n}"
headers = {
'x-amz-target': "",
'content-type': "application/json"
}
conn.request("POST", "/baseUrl/", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.CreateApplication"
payload = {
"applicationName": "",
"computePlatform": "",
"tags": ""
}
headers = {
"x-amz-target": "",
"content-type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.CreateApplication"
payload <- "{\n \"applicationName\": \"\",\n \"computePlatform\": \"\",\n \"tags\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, add_headers('x-amz-target' = ''), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.CreateApplication")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-amz-target"] = ''
request["content-type"] = 'application/json'
request.body = "{\n \"applicationName\": \"\",\n \"computePlatform\": \"\",\n \"tags\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/') do |req|
req.headers['x-amz-target'] = ''
req.body = "{\n \"applicationName\": \"\",\n \"computePlatform\": \"\",\n \"tags\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.CreateApplication";
let payload = json!({
"applicationName": "",
"computePlatform": "",
"tags": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("x-amz-target", "".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.CreateApplication' \
--header 'content-type: application/json' \
--header 'x-amz-target: ' \
--data '{
"applicationName": "",
"computePlatform": "",
"tags": ""
}'
echo '{
"applicationName": "",
"computePlatform": "",
"tags": ""
}' | \
http POST '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.CreateApplication' \
content-type:application/json \
x-amz-target:''
wget --quiet \
--method POST \
--header 'x-amz-target: ' \
--header 'content-type: application/json' \
--body-data '{\n "applicationName": "",\n "computePlatform": "",\n "tags": ""\n}' \
--output-document \
- '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.CreateApplication'
import Foundation
let headers = [
"x-amz-target": "",
"content-type": "application/json"
]
let parameters = [
"applicationName": "",
"computePlatform": "",
"tags": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.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
CreateDeployment
{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.CreateDeployment
HEADERS
X-Amz-Target
BODY json
{
"applicationName": "",
"deploymentGroupName": "",
"revision": "",
"deploymentConfigName": "",
"description": "",
"ignoreApplicationStopFailures": "",
"targetInstances": "",
"autoRollbackConfiguration": "",
"updateOutdatedInstancesOnly": "",
"fileExistsBehavior": "",
"overrideAlarmConfiguration": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.CreateDeployment");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-amz-target: ");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"applicationName\": \"\",\n \"deploymentGroupName\": \"\",\n \"revision\": \"\",\n \"deploymentConfigName\": \"\",\n \"description\": \"\",\n \"ignoreApplicationStopFailures\": \"\",\n \"targetInstances\": \"\",\n \"autoRollbackConfiguration\": \"\",\n \"updateOutdatedInstancesOnly\": \"\",\n \"fileExistsBehavior\": \"\",\n \"overrideAlarmConfiguration\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.CreateDeployment" {:headers {:x-amz-target ""}
:content-type :json
:form-params {:applicationName ""
:deploymentGroupName ""
:revision ""
:deploymentConfigName ""
:description ""
:ignoreApplicationStopFailures ""
:targetInstances ""
:autoRollbackConfiguration ""
:updateOutdatedInstancesOnly ""
:fileExistsBehavior ""
:overrideAlarmConfiguration ""}})
require "http/client"
url = "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.CreateDeployment"
headers = HTTP::Headers{
"x-amz-target" => ""
"content-type" => "application/json"
}
reqBody = "{\n \"applicationName\": \"\",\n \"deploymentGroupName\": \"\",\n \"revision\": \"\",\n \"deploymentConfigName\": \"\",\n \"description\": \"\",\n \"ignoreApplicationStopFailures\": \"\",\n \"targetInstances\": \"\",\n \"autoRollbackConfiguration\": \"\",\n \"updateOutdatedInstancesOnly\": \"\",\n \"fileExistsBehavior\": \"\",\n \"overrideAlarmConfiguration\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.CreateDeployment"),
Headers =
{
{ "x-amz-target", "" },
},
Content = new StringContent("{\n \"applicationName\": \"\",\n \"deploymentGroupName\": \"\",\n \"revision\": \"\",\n \"deploymentConfigName\": \"\",\n \"description\": \"\",\n \"ignoreApplicationStopFailures\": \"\",\n \"targetInstances\": \"\",\n \"autoRollbackConfiguration\": \"\",\n \"updateOutdatedInstancesOnly\": \"\",\n \"fileExistsBehavior\": \"\",\n \"overrideAlarmConfiguration\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.CreateDeployment");
var request = new RestRequest("", Method.Post);
request.AddHeader("x-amz-target", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"applicationName\": \"\",\n \"deploymentGroupName\": \"\",\n \"revision\": \"\",\n \"deploymentConfigName\": \"\",\n \"description\": \"\",\n \"ignoreApplicationStopFailures\": \"\",\n \"targetInstances\": \"\",\n \"autoRollbackConfiguration\": \"\",\n \"updateOutdatedInstancesOnly\": \"\",\n \"fileExistsBehavior\": \"\",\n \"overrideAlarmConfiguration\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.CreateDeployment"
payload := strings.NewReader("{\n \"applicationName\": \"\",\n \"deploymentGroupName\": \"\",\n \"revision\": \"\",\n \"deploymentConfigName\": \"\",\n \"description\": \"\",\n \"ignoreApplicationStopFailures\": \"\",\n \"targetInstances\": \"\",\n \"autoRollbackConfiguration\": \"\",\n \"updateOutdatedInstancesOnly\": \"\",\n \"fileExistsBehavior\": \"\",\n \"overrideAlarmConfiguration\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-amz-target", "")
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/ HTTP/1.1
X-Amz-Target:
Content-Type: application/json
Host: example.com
Content-Length: 325
{
"applicationName": "",
"deploymentGroupName": "",
"revision": "",
"deploymentConfigName": "",
"description": "",
"ignoreApplicationStopFailures": "",
"targetInstances": "",
"autoRollbackConfiguration": "",
"updateOutdatedInstancesOnly": "",
"fileExistsBehavior": "",
"overrideAlarmConfiguration": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.CreateDeployment")
.setHeader("x-amz-target", "")
.setHeader("content-type", "application/json")
.setBody("{\n \"applicationName\": \"\",\n \"deploymentGroupName\": \"\",\n \"revision\": \"\",\n \"deploymentConfigName\": \"\",\n \"description\": \"\",\n \"ignoreApplicationStopFailures\": \"\",\n \"targetInstances\": \"\",\n \"autoRollbackConfiguration\": \"\",\n \"updateOutdatedInstancesOnly\": \"\",\n \"fileExistsBehavior\": \"\",\n \"overrideAlarmConfiguration\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.CreateDeployment"))
.header("x-amz-target", "")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"applicationName\": \"\",\n \"deploymentGroupName\": \"\",\n \"revision\": \"\",\n \"deploymentConfigName\": \"\",\n \"description\": \"\",\n \"ignoreApplicationStopFailures\": \"\",\n \"targetInstances\": \"\",\n \"autoRollbackConfiguration\": \"\",\n \"updateOutdatedInstancesOnly\": \"\",\n \"fileExistsBehavior\": \"\",\n \"overrideAlarmConfiguration\": \"\"\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 \"applicationName\": \"\",\n \"deploymentGroupName\": \"\",\n \"revision\": \"\",\n \"deploymentConfigName\": \"\",\n \"description\": \"\",\n \"ignoreApplicationStopFailures\": \"\",\n \"targetInstances\": \"\",\n \"autoRollbackConfiguration\": \"\",\n \"updateOutdatedInstancesOnly\": \"\",\n \"fileExistsBehavior\": \"\",\n \"overrideAlarmConfiguration\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.CreateDeployment")
.post(body)
.addHeader("x-amz-target", "")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.CreateDeployment")
.header("x-amz-target", "")
.header("content-type", "application/json")
.body("{\n \"applicationName\": \"\",\n \"deploymentGroupName\": \"\",\n \"revision\": \"\",\n \"deploymentConfigName\": \"\",\n \"description\": \"\",\n \"ignoreApplicationStopFailures\": \"\",\n \"targetInstances\": \"\",\n \"autoRollbackConfiguration\": \"\",\n \"updateOutdatedInstancesOnly\": \"\",\n \"fileExistsBehavior\": \"\",\n \"overrideAlarmConfiguration\": \"\"\n}")
.asString();
const data = JSON.stringify({
applicationName: '',
deploymentGroupName: '',
revision: '',
deploymentConfigName: '',
description: '',
ignoreApplicationStopFailures: '',
targetInstances: '',
autoRollbackConfiguration: '',
updateOutdatedInstancesOnly: '',
fileExistsBehavior: '',
overrideAlarmConfiguration: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.CreateDeployment');
xhr.setRequestHeader('x-amz-target', '');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.CreateDeployment',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {
applicationName: '',
deploymentGroupName: '',
revision: '',
deploymentConfigName: '',
description: '',
ignoreApplicationStopFailures: '',
targetInstances: '',
autoRollbackConfiguration: '',
updateOutdatedInstancesOnly: '',
fileExistsBehavior: '',
overrideAlarmConfiguration: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.CreateDeployment';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"applicationName":"","deploymentGroupName":"","revision":"","deploymentConfigName":"","description":"","ignoreApplicationStopFailures":"","targetInstances":"","autoRollbackConfiguration":"","updateOutdatedInstancesOnly":"","fileExistsBehavior":"","overrideAlarmConfiguration":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.CreateDeployment',
method: 'POST',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
},
processData: false,
data: '{\n "applicationName": "",\n "deploymentGroupName": "",\n "revision": "",\n "deploymentConfigName": "",\n "description": "",\n "ignoreApplicationStopFailures": "",\n "targetInstances": "",\n "autoRollbackConfiguration": "",\n "updateOutdatedInstancesOnly": "",\n "fileExistsBehavior": "",\n "overrideAlarmConfiguration": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"applicationName\": \"\",\n \"deploymentGroupName\": \"\",\n \"revision\": \"\",\n \"deploymentConfigName\": \"\",\n \"description\": \"\",\n \"ignoreApplicationStopFailures\": \"\",\n \"targetInstances\": \"\",\n \"autoRollbackConfiguration\": \"\",\n \"updateOutdatedInstancesOnly\": \"\",\n \"fileExistsBehavior\": \"\",\n \"overrideAlarmConfiguration\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.CreateDeployment")
.post(body)
.addHeader("x-amz-target", "")
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
applicationName: '',
deploymentGroupName: '',
revision: '',
deploymentConfigName: '',
description: '',
ignoreApplicationStopFailures: '',
targetInstances: '',
autoRollbackConfiguration: '',
updateOutdatedInstancesOnly: '',
fileExistsBehavior: '',
overrideAlarmConfiguration: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.CreateDeployment',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: {
applicationName: '',
deploymentGroupName: '',
revision: '',
deploymentConfigName: '',
description: '',
ignoreApplicationStopFailures: '',
targetInstances: '',
autoRollbackConfiguration: '',
updateOutdatedInstancesOnly: '',
fileExistsBehavior: '',
overrideAlarmConfiguration: ''
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.CreateDeployment');
req.headers({
'x-amz-target': '',
'content-type': 'application/json'
});
req.type('json');
req.send({
applicationName: '',
deploymentGroupName: '',
revision: '',
deploymentConfigName: '',
description: '',
ignoreApplicationStopFailures: '',
targetInstances: '',
autoRollbackConfiguration: '',
updateOutdatedInstancesOnly: '',
fileExistsBehavior: '',
overrideAlarmConfiguration: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.CreateDeployment',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {
applicationName: '',
deploymentGroupName: '',
revision: '',
deploymentConfigName: '',
description: '',
ignoreApplicationStopFailures: '',
targetInstances: '',
autoRollbackConfiguration: '',
updateOutdatedInstancesOnly: '',
fileExistsBehavior: '',
overrideAlarmConfiguration: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.CreateDeployment';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"applicationName":"","deploymentGroupName":"","revision":"","deploymentConfigName":"","description":"","ignoreApplicationStopFailures":"","targetInstances":"","autoRollbackConfiguration":"","updateOutdatedInstancesOnly":"","fileExistsBehavior":"","overrideAlarmConfiguration":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"x-amz-target": @"",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"applicationName": @"",
@"deploymentGroupName": @"",
@"revision": @"",
@"deploymentConfigName": @"",
@"description": @"",
@"ignoreApplicationStopFailures": @"",
@"targetInstances": @"",
@"autoRollbackConfiguration": @"",
@"updateOutdatedInstancesOnly": @"",
@"fileExistsBehavior": @"",
@"overrideAlarmConfiguration": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.CreateDeployment"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.CreateDeployment" in
let headers = Header.add_list (Header.init ()) [
("x-amz-target", "");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"applicationName\": \"\",\n \"deploymentGroupName\": \"\",\n \"revision\": \"\",\n \"deploymentConfigName\": \"\",\n \"description\": \"\",\n \"ignoreApplicationStopFailures\": \"\",\n \"targetInstances\": \"\",\n \"autoRollbackConfiguration\": \"\",\n \"updateOutdatedInstancesOnly\": \"\",\n \"fileExistsBehavior\": \"\",\n \"overrideAlarmConfiguration\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.CreateDeployment",
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([
'applicationName' => '',
'deploymentGroupName' => '',
'revision' => '',
'deploymentConfigName' => '',
'description' => '',
'ignoreApplicationStopFailures' => '',
'targetInstances' => '',
'autoRollbackConfiguration' => '',
'updateOutdatedInstancesOnly' => '',
'fileExistsBehavior' => '',
'overrideAlarmConfiguration' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json",
"x-amz-target: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.CreateDeployment', [
'body' => '{
"applicationName": "",
"deploymentGroupName": "",
"revision": "",
"deploymentConfigName": "",
"description": "",
"ignoreApplicationStopFailures": "",
"targetInstances": "",
"autoRollbackConfiguration": "",
"updateOutdatedInstancesOnly": "",
"fileExistsBehavior": "",
"overrideAlarmConfiguration": ""
}',
'headers' => [
'content-type' => 'application/json',
'x-amz-target' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.CreateDeployment');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'applicationName' => '',
'deploymentGroupName' => '',
'revision' => '',
'deploymentConfigName' => '',
'description' => '',
'ignoreApplicationStopFailures' => '',
'targetInstances' => '',
'autoRollbackConfiguration' => '',
'updateOutdatedInstancesOnly' => '',
'fileExistsBehavior' => '',
'overrideAlarmConfiguration' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'applicationName' => '',
'deploymentGroupName' => '',
'revision' => '',
'deploymentConfigName' => '',
'description' => '',
'ignoreApplicationStopFailures' => '',
'targetInstances' => '',
'autoRollbackConfiguration' => '',
'updateOutdatedInstancesOnly' => '',
'fileExistsBehavior' => '',
'overrideAlarmConfiguration' => ''
]));
$request->setRequestUrl('{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.CreateDeployment');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.CreateDeployment' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"applicationName": "",
"deploymentGroupName": "",
"revision": "",
"deploymentConfigName": "",
"description": "",
"ignoreApplicationStopFailures": "",
"targetInstances": "",
"autoRollbackConfiguration": "",
"updateOutdatedInstancesOnly": "",
"fileExistsBehavior": "",
"overrideAlarmConfiguration": ""
}'
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.CreateDeployment' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"applicationName": "",
"deploymentGroupName": "",
"revision": "",
"deploymentConfigName": "",
"description": "",
"ignoreApplicationStopFailures": "",
"targetInstances": "",
"autoRollbackConfiguration": "",
"updateOutdatedInstancesOnly": "",
"fileExistsBehavior": "",
"overrideAlarmConfiguration": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"applicationName\": \"\",\n \"deploymentGroupName\": \"\",\n \"revision\": \"\",\n \"deploymentConfigName\": \"\",\n \"description\": \"\",\n \"ignoreApplicationStopFailures\": \"\",\n \"targetInstances\": \"\",\n \"autoRollbackConfiguration\": \"\",\n \"updateOutdatedInstancesOnly\": \"\",\n \"fileExistsBehavior\": \"\",\n \"overrideAlarmConfiguration\": \"\"\n}"
headers = {
'x-amz-target': "",
'content-type': "application/json"
}
conn.request("POST", "/baseUrl/", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.CreateDeployment"
payload = {
"applicationName": "",
"deploymentGroupName": "",
"revision": "",
"deploymentConfigName": "",
"description": "",
"ignoreApplicationStopFailures": "",
"targetInstances": "",
"autoRollbackConfiguration": "",
"updateOutdatedInstancesOnly": "",
"fileExistsBehavior": "",
"overrideAlarmConfiguration": ""
}
headers = {
"x-amz-target": "",
"content-type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.CreateDeployment"
payload <- "{\n \"applicationName\": \"\",\n \"deploymentGroupName\": \"\",\n \"revision\": \"\",\n \"deploymentConfigName\": \"\",\n \"description\": \"\",\n \"ignoreApplicationStopFailures\": \"\",\n \"targetInstances\": \"\",\n \"autoRollbackConfiguration\": \"\",\n \"updateOutdatedInstancesOnly\": \"\",\n \"fileExistsBehavior\": \"\",\n \"overrideAlarmConfiguration\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, add_headers('x-amz-target' = ''), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.CreateDeployment")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-amz-target"] = ''
request["content-type"] = 'application/json'
request.body = "{\n \"applicationName\": \"\",\n \"deploymentGroupName\": \"\",\n \"revision\": \"\",\n \"deploymentConfigName\": \"\",\n \"description\": \"\",\n \"ignoreApplicationStopFailures\": \"\",\n \"targetInstances\": \"\",\n \"autoRollbackConfiguration\": \"\",\n \"updateOutdatedInstancesOnly\": \"\",\n \"fileExistsBehavior\": \"\",\n \"overrideAlarmConfiguration\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/') do |req|
req.headers['x-amz-target'] = ''
req.body = "{\n \"applicationName\": \"\",\n \"deploymentGroupName\": \"\",\n \"revision\": \"\",\n \"deploymentConfigName\": \"\",\n \"description\": \"\",\n \"ignoreApplicationStopFailures\": \"\",\n \"targetInstances\": \"\",\n \"autoRollbackConfiguration\": \"\",\n \"updateOutdatedInstancesOnly\": \"\",\n \"fileExistsBehavior\": \"\",\n \"overrideAlarmConfiguration\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.CreateDeployment";
let payload = json!({
"applicationName": "",
"deploymentGroupName": "",
"revision": "",
"deploymentConfigName": "",
"description": "",
"ignoreApplicationStopFailures": "",
"targetInstances": "",
"autoRollbackConfiguration": "",
"updateOutdatedInstancesOnly": "",
"fileExistsBehavior": "",
"overrideAlarmConfiguration": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("x-amz-target", "".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.CreateDeployment' \
--header 'content-type: application/json' \
--header 'x-amz-target: ' \
--data '{
"applicationName": "",
"deploymentGroupName": "",
"revision": "",
"deploymentConfigName": "",
"description": "",
"ignoreApplicationStopFailures": "",
"targetInstances": "",
"autoRollbackConfiguration": "",
"updateOutdatedInstancesOnly": "",
"fileExistsBehavior": "",
"overrideAlarmConfiguration": ""
}'
echo '{
"applicationName": "",
"deploymentGroupName": "",
"revision": "",
"deploymentConfigName": "",
"description": "",
"ignoreApplicationStopFailures": "",
"targetInstances": "",
"autoRollbackConfiguration": "",
"updateOutdatedInstancesOnly": "",
"fileExistsBehavior": "",
"overrideAlarmConfiguration": ""
}' | \
http POST '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.CreateDeployment' \
content-type:application/json \
x-amz-target:''
wget --quiet \
--method POST \
--header 'x-amz-target: ' \
--header 'content-type: application/json' \
--body-data '{\n "applicationName": "",\n "deploymentGroupName": "",\n "revision": "",\n "deploymentConfigName": "",\n "description": "",\n "ignoreApplicationStopFailures": "",\n "targetInstances": "",\n "autoRollbackConfiguration": "",\n "updateOutdatedInstancesOnly": "",\n "fileExistsBehavior": "",\n "overrideAlarmConfiguration": ""\n}' \
--output-document \
- '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.CreateDeployment'
import Foundation
let headers = [
"x-amz-target": "",
"content-type": "application/json"
]
let parameters = [
"applicationName": "",
"deploymentGroupName": "",
"revision": "",
"deploymentConfigName": "",
"description": "",
"ignoreApplicationStopFailures": "",
"targetInstances": "",
"autoRollbackConfiguration": "",
"updateOutdatedInstancesOnly": "",
"fileExistsBehavior": "",
"overrideAlarmConfiguration": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.CreateDeployment")! 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
CreateDeploymentConfig
{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.CreateDeploymentConfig
HEADERS
X-Amz-Target
BODY json
{
"deploymentConfigName": "",
"minimumHealthyHosts": "",
"trafficRoutingConfig": "",
"computePlatform": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.CreateDeploymentConfig");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-amz-target: ");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"deploymentConfigName\": \"\",\n \"minimumHealthyHosts\": \"\",\n \"trafficRoutingConfig\": \"\",\n \"computePlatform\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.CreateDeploymentConfig" {:headers {:x-amz-target ""}
:content-type :json
:form-params {:deploymentConfigName ""
:minimumHealthyHosts ""
:trafficRoutingConfig ""
:computePlatform ""}})
require "http/client"
url = "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.CreateDeploymentConfig"
headers = HTTP::Headers{
"x-amz-target" => ""
"content-type" => "application/json"
}
reqBody = "{\n \"deploymentConfigName\": \"\",\n \"minimumHealthyHosts\": \"\",\n \"trafficRoutingConfig\": \"\",\n \"computePlatform\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.CreateDeploymentConfig"),
Headers =
{
{ "x-amz-target", "" },
},
Content = new StringContent("{\n \"deploymentConfigName\": \"\",\n \"minimumHealthyHosts\": \"\",\n \"trafficRoutingConfig\": \"\",\n \"computePlatform\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.CreateDeploymentConfig");
var request = new RestRequest("", Method.Post);
request.AddHeader("x-amz-target", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"deploymentConfigName\": \"\",\n \"minimumHealthyHosts\": \"\",\n \"trafficRoutingConfig\": \"\",\n \"computePlatform\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.CreateDeploymentConfig"
payload := strings.NewReader("{\n \"deploymentConfigName\": \"\",\n \"minimumHealthyHosts\": \"\",\n \"trafficRoutingConfig\": \"\",\n \"computePlatform\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-amz-target", "")
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/ HTTP/1.1
X-Amz-Target:
Content-Type: application/json
Host: example.com
Content-Length: 116
{
"deploymentConfigName": "",
"minimumHealthyHosts": "",
"trafficRoutingConfig": "",
"computePlatform": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.CreateDeploymentConfig")
.setHeader("x-amz-target", "")
.setHeader("content-type", "application/json")
.setBody("{\n \"deploymentConfigName\": \"\",\n \"minimumHealthyHosts\": \"\",\n \"trafficRoutingConfig\": \"\",\n \"computePlatform\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.CreateDeploymentConfig"))
.header("x-amz-target", "")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"deploymentConfigName\": \"\",\n \"minimumHealthyHosts\": \"\",\n \"trafficRoutingConfig\": \"\",\n \"computePlatform\": \"\"\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 \"deploymentConfigName\": \"\",\n \"minimumHealthyHosts\": \"\",\n \"trafficRoutingConfig\": \"\",\n \"computePlatform\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.CreateDeploymentConfig")
.post(body)
.addHeader("x-amz-target", "")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.CreateDeploymentConfig")
.header("x-amz-target", "")
.header("content-type", "application/json")
.body("{\n \"deploymentConfigName\": \"\",\n \"minimumHealthyHosts\": \"\",\n \"trafficRoutingConfig\": \"\",\n \"computePlatform\": \"\"\n}")
.asString();
const data = JSON.stringify({
deploymentConfigName: '',
minimumHealthyHosts: '',
trafficRoutingConfig: '',
computePlatform: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.CreateDeploymentConfig');
xhr.setRequestHeader('x-amz-target', '');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.CreateDeploymentConfig',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {
deploymentConfigName: '',
minimumHealthyHosts: '',
trafficRoutingConfig: '',
computePlatform: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.CreateDeploymentConfig';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"deploymentConfigName":"","minimumHealthyHosts":"","trafficRoutingConfig":"","computePlatform":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.CreateDeploymentConfig',
method: 'POST',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
},
processData: false,
data: '{\n "deploymentConfigName": "",\n "minimumHealthyHosts": "",\n "trafficRoutingConfig": "",\n "computePlatform": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"deploymentConfigName\": \"\",\n \"minimumHealthyHosts\": \"\",\n \"trafficRoutingConfig\": \"\",\n \"computePlatform\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.CreateDeploymentConfig")
.post(body)
.addHeader("x-amz-target", "")
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
deploymentConfigName: '',
minimumHealthyHosts: '',
trafficRoutingConfig: '',
computePlatform: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.CreateDeploymentConfig',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: {
deploymentConfigName: '',
minimumHealthyHosts: '',
trafficRoutingConfig: '',
computePlatform: ''
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.CreateDeploymentConfig');
req.headers({
'x-amz-target': '',
'content-type': 'application/json'
});
req.type('json');
req.send({
deploymentConfigName: '',
minimumHealthyHosts: '',
trafficRoutingConfig: '',
computePlatform: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.CreateDeploymentConfig',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {
deploymentConfigName: '',
minimumHealthyHosts: '',
trafficRoutingConfig: '',
computePlatform: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.CreateDeploymentConfig';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"deploymentConfigName":"","minimumHealthyHosts":"","trafficRoutingConfig":"","computePlatform":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"x-amz-target": @"",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"deploymentConfigName": @"",
@"minimumHealthyHosts": @"",
@"trafficRoutingConfig": @"",
@"computePlatform": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.CreateDeploymentConfig"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.CreateDeploymentConfig" in
let headers = Header.add_list (Header.init ()) [
("x-amz-target", "");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"deploymentConfigName\": \"\",\n \"minimumHealthyHosts\": \"\",\n \"trafficRoutingConfig\": \"\",\n \"computePlatform\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.CreateDeploymentConfig",
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([
'deploymentConfigName' => '',
'minimumHealthyHosts' => '',
'trafficRoutingConfig' => '',
'computePlatform' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json",
"x-amz-target: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.CreateDeploymentConfig', [
'body' => '{
"deploymentConfigName": "",
"minimumHealthyHosts": "",
"trafficRoutingConfig": "",
"computePlatform": ""
}',
'headers' => [
'content-type' => 'application/json',
'x-amz-target' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.CreateDeploymentConfig');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'deploymentConfigName' => '',
'minimumHealthyHosts' => '',
'trafficRoutingConfig' => '',
'computePlatform' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'deploymentConfigName' => '',
'minimumHealthyHosts' => '',
'trafficRoutingConfig' => '',
'computePlatform' => ''
]));
$request->setRequestUrl('{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.CreateDeploymentConfig');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.CreateDeploymentConfig' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"deploymentConfigName": "",
"minimumHealthyHosts": "",
"trafficRoutingConfig": "",
"computePlatform": ""
}'
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.CreateDeploymentConfig' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"deploymentConfigName": "",
"minimumHealthyHosts": "",
"trafficRoutingConfig": "",
"computePlatform": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"deploymentConfigName\": \"\",\n \"minimumHealthyHosts\": \"\",\n \"trafficRoutingConfig\": \"\",\n \"computePlatform\": \"\"\n}"
headers = {
'x-amz-target': "",
'content-type': "application/json"
}
conn.request("POST", "/baseUrl/", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.CreateDeploymentConfig"
payload = {
"deploymentConfigName": "",
"minimumHealthyHosts": "",
"trafficRoutingConfig": "",
"computePlatform": ""
}
headers = {
"x-amz-target": "",
"content-type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.CreateDeploymentConfig"
payload <- "{\n \"deploymentConfigName\": \"\",\n \"minimumHealthyHosts\": \"\",\n \"trafficRoutingConfig\": \"\",\n \"computePlatform\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, add_headers('x-amz-target' = ''), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.CreateDeploymentConfig")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-amz-target"] = ''
request["content-type"] = 'application/json'
request.body = "{\n \"deploymentConfigName\": \"\",\n \"minimumHealthyHosts\": \"\",\n \"trafficRoutingConfig\": \"\",\n \"computePlatform\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/') do |req|
req.headers['x-amz-target'] = ''
req.body = "{\n \"deploymentConfigName\": \"\",\n \"minimumHealthyHosts\": \"\",\n \"trafficRoutingConfig\": \"\",\n \"computePlatform\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.CreateDeploymentConfig";
let payload = json!({
"deploymentConfigName": "",
"minimumHealthyHosts": "",
"trafficRoutingConfig": "",
"computePlatform": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("x-amz-target", "".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.CreateDeploymentConfig' \
--header 'content-type: application/json' \
--header 'x-amz-target: ' \
--data '{
"deploymentConfigName": "",
"minimumHealthyHosts": "",
"trafficRoutingConfig": "",
"computePlatform": ""
}'
echo '{
"deploymentConfigName": "",
"minimumHealthyHosts": "",
"trafficRoutingConfig": "",
"computePlatform": ""
}' | \
http POST '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.CreateDeploymentConfig' \
content-type:application/json \
x-amz-target:''
wget --quiet \
--method POST \
--header 'x-amz-target: ' \
--header 'content-type: application/json' \
--body-data '{\n "deploymentConfigName": "",\n "minimumHealthyHosts": "",\n "trafficRoutingConfig": "",\n "computePlatform": ""\n}' \
--output-document \
- '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.CreateDeploymentConfig'
import Foundation
let headers = [
"x-amz-target": "",
"content-type": "application/json"
]
let parameters = [
"deploymentConfigName": "",
"minimumHealthyHosts": "",
"trafficRoutingConfig": "",
"computePlatform": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.CreateDeploymentConfig")! 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
CreateDeploymentGroup
{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.CreateDeploymentGroup
HEADERS
X-Amz-Target
BODY json
{
"applicationName": "",
"deploymentGroupName": "",
"deploymentConfigName": "",
"ec2TagFilters": "",
"onPremisesInstanceTagFilters": "",
"autoScalingGroups": "",
"serviceRoleArn": "",
"triggerConfigurations": "",
"alarmConfiguration": "",
"autoRollbackConfiguration": "",
"outdatedInstancesStrategy": "",
"deploymentStyle": "",
"blueGreenDeploymentConfiguration": "",
"loadBalancerInfo": "",
"ec2TagSet": "",
"ecsServices": "",
"onPremisesTagSet": "",
"tags": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.CreateDeploymentGroup");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-amz-target: ");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"applicationName\": \"\",\n \"deploymentGroupName\": \"\",\n \"deploymentConfigName\": \"\",\n \"ec2TagFilters\": \"\",\n \"onPremisesInstanceTagFilters\": \"\",\n \"autoScalingGroups\": \"\",\n \"serviceRoleArn\": \"\",\n \"triggerConfigurations\": \"\",\n \"alarmConfiguration\": \"\",\n \"autoRollbackConfiguration\": \"\",\n \"outdatedInstancesStrategy\": \"\",\n \"deploymentStyle\": \"\",\n \"blueGreenDeploymentConfiguration\": \"\",\n \"loadBalancerInfo\": \"\",\n \"ec2TagSet\": \"\",\n \"ecsServices\": \"\",\n \"onPremisesTagSet\": \"\",\n \"tags\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.CreateDeploymentGroup" {:headers {:x-amz-target ""}
:content-type :json
:form-params {:applicationName ""
:deploymentGroupName ""
:deploymentConfigName ""
:ec2TagFilters ""
:onPremisesInstanceTagFilters ""
:autoScalingGroups ""
:serviceRoleArn ""
:triggerConfigurations ""
:alarmConfiguration ""
:autoRollbackConfiguration ""
:outdatedInstancesStrategy ""
:deploymentStyle ""
:blueGreenDeploymentConfiguration ""
:loadBalancerInfo ""
:ec2TagSet ""
:ecsServices ""
:onPremisesTagSet ""
:tags ""}})
require "http/client"
url = "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.CreateDeploymentGroup"
headers = HTTP::Headers{
"x-amz-target" => ""
"content-type" => "application/json"
}
reqBody = "{\n \"applicationName\": \"\",\n \"deploymentGroupName\": \"\",\n \"deploymentConfigName\": \"\",\n \"ec2TagFilters\": \"\",\n \"onPremisesInstanceTagFilters\": \"\",\n \"autoScalingGroups\": \"\",\n \"serviceRoleArn\": \"\",\n \"triggerConfigurations\": \"\",\n \"alarmConfiguration\": \"\",\n \"autoRollbackConfiguration\": \"\",\n \"outdatedInstancesStrategy\": \"\",\n \"deploymentStyle\": \"\",\n \"blueGreenDeploymentConfiguration\": \"\",\n \"loadBalancerInfo\": \"\",\n \"ec2TagSet\": \"\",\n \"ecsServices\": \"\",\n \"onPremisesTagSet\": \"\",\n \"tags\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.CreateDeploymentGroup"),
Headers =
{
{ "x-amz-target", "" },
},
Content = new StringContent("{\n \"applicationName\": \"\",\n \"deploymentGroupName\": \"\",\n \"deploymentConfigName\": \"\",\n \"ec2TagFilters\": \"\",\n \"onPremisesInstanceTagFilters\": \"\",\n \"autoScalingGroups\": \"\",\n \"serviceRoleArn\": \"\",\n \"triggerConfigurations\": \"\",\n \"alarmConfiguration\": \"\",\n \"autoRollbackConfiguration\": \"\",\n \"outdatedInstancesStrategy\": \"\",\n \"deploymentStyle\": \"\",\n \"blueGreenDeploymentConfiguration\": \"\",\n \"loadBalancerInfo\": \"\",\n \"ec2TagSet\": \"\",\n \"ecsServices\": \"\",\n \"onPremisesTagSet\": \"\",\n \"tags\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.CreateDeploymentGroup");
var request = new RestRequest("", Method.Post);
request.AddHeader("x-amz-target", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"applicationName\": \"\",\n \"deploymentGroupName\": \"\",\n \"deploymentConfigName\": \"\",\n \"ec2TagFilters\": \"\",\n \"onPremisesInstanceTagFilters\": \"\",\n \"autoScalingGroups\": \"\",\n \"serviceRoleArn\": \"\",\n \"triggerConfigurations\": \"\",\n \"alarmConfiguration\": \"\",\n \"autoRollbackConfiguration\": \"\",\n \"outdatedInstancesStrategy\": \"\",\n \"deploymentStyle\": \"\",\n \"blueGreenDeploymentConfiguration\": \"\",\n \"loadBalancerInfo\": \"\",\n \"ec2TagSet\": \"\",\n \"ecsServices\": \"\",\n \"onPremisesTagSet\": \"\",\n \"tags\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.CreateDeploymentGroup"
payload := strings.NewReader("{\n \"applicationName\": \"\",\n \"deploymentGroupName\": \"\",\n \"deploymentConfigName\": \"\",\n \"ec2TagFilters\": \"\",\n \"onPremisesInstanceTagFilters\": \"\",\n \"autoScalingGroups\": \"\",\n \"serviceRoleArn\": \"\",\n \"triggerConfigurations\": \"\",\n \"alarmConfiguration\": \"\",\n \"autoRollbackConfiguration\": \"\",\n \"outdatedInstancesStrategy\": \"\",\n \"deploymentStyle\": \"\",\n \"blueGreenDeploymentConfiguration\": \"\",\n \"loadBalancerInfo\": \"\",\n \"ec2TagSet\": \"\",\n \"ecsServices\": \"\",\n \"onPremisesTagSet\": \"\",\n \"tags\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-amz-target", "")
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/ HTTP/1.1
X-Amz-Target:
Content-Type: application/json
Host: example.com
Content-Length: 500
{
"applicationName": "",
"deploymentGroupName": "",
"deploymentConfigName": "",
"ec2TagFilters": "",
"onPremisesInstanceTagFilters": "",
"autoScalingGroups": "",
"serviceRoleArn": "",
"triggerConfigurations": "",
"alarmConfiguration": "",
"autoRollbackConfiguration": "",
"outdatedInstancesStrategy": "",
"deploymentStyle": "",
"blueGreenDeploymentConfiguration": "",
"loadBalancerInfo": "",
"ec2TagSet": "",
"ecsServices": "",
"onPremisesTagSet": "",
"tags": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.CreateDeploymentGroup")
.setHeader("x-amz-target", "")
.setHeader("content-type", "application/json")
.setBody("{\n \"applicationName\": \"\",\n \"deploymentGroupName\": \"\",\n \"deploymentConfigName\": \"\",\n \"ec2TagFilters\": \"\",\n \"onPremisesInstanceTagFilters\": \"\",\n \"autoScalingGroups\": \"\",\n \"serviceRoleArn\": \"\",\n \"triggerConfigurations\": \"\",\n \"alarmConfiguration\": \"\",\n \"autoRollbackConfiguration\": \"\",\n \"outdatedInstancesStrategy\": \"\",\n \"deploymentStyle\": \"\",\n \"blueGreenDeploymentConfiguration\": \"\",\n \"loadBalancerInfo\": \"\",\n \"ec2TagSet\": \"\",\n \"ecsServices\": \"\",\n \"onPremisesTagSet\": \"\",\n \"tags\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.CreateDeploymentGroup"))
.header("x-amz-target", "")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"applicationName\": \"\",\n \"deploymentGroupName\": \"\",\n \"deploymentConfigName\": \"\",\n \"ec2TagFilters\": \"\",\n \"onPremisesInstanceTagFilters\": \"\",\n \"autoScalingGroups\": \"\",\n \"serviceRoleArn\": \"\",\n \"triggerConfigurations\": \"\",\n \"alarmConfiguration\": \"\",\n \"autoRollbackConfiguration\": \"\",\n \"outdatedInstancesStrategy\": \"\",\n \"deploymentStyle\": \"\",\n \"blueGreenDeploymentConfiguration\": \"\",\n \"loadBalancerInfo\": \"\",\n \"ec2TagSet\": \"\",\n \"ecsServices\": \"\",\n \"onPremisesTagSet\": \"\",\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 \"applicationName\": \"\",\n \"deploymentGroupName\": \"\",\n \"deploymentConfigName\": \"\",\n \"ec2TagFilters\": \"\",\n \"onPremisesInstanceTagFilters\": \"\",\n \"autoScalingGroups\": \"\",\n \"serviceRoleArn\": \"\",\n \"triggerConfigurations\": \"\",\n \"alarmConfiguration\": \"\",\n \"autoRollbackConfiguration\": \"\",\n \"outdatedInstancesStrategy\": \"\",\n \"deploymentStyle\": \"\",\n \"blueGreenDeploymentConfiguration\": \"\",\n \"loadBalancerInfo\": \"\",\n \"ec2TagSet\": \"\",\n \"ecsServices\": \"\",\n \"onPremisesTagSet\": \"\",\n \"tags\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.CreateDeploymentGroup")
.post(body)
.addHeader("x-amz-target", "")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.CreateDeploymentGroup")
.header("x-amz-target", "")
.header("content-type", "application/json")
.body("{\n \"applicationName\": \"\",\n \"deploymentGroupName\": \"\",\n \"deploymentConfigName\": \"\",\n \"ec2TagFilters\": \"\",\n \"onPremisesInstanceTagFilters\": \"\",\n \"autoScalingGroups\": \"\",\n \"serviceRoleArn\": \"\",\n \"triggerConfigurations\": \"\",\n \"alarmConfiguration\": \"\",\n \"autoRollbackConfiguration\": \"\",\n \"outdatedInstancesStrategy\": \"\",\n \"deploymentStyle\": \"\",\n \"blueGreenDeploymentConfiguration\": \"\",\n \"loadBalancerInfo\": \"\",\n \"ec2TagSet\": \"\",\n \"ecsServices\": \"\",\n \"onPremisesTagSet\": \"\",\n \"tags\": \"\"\n}")
.asString();
const data = JSON.stringify({
applicationName: '',
deploymentGroupName: '',
deploymentConfigName: '',
ec2TagFilters: '',
onPremisesInstanceTagFilters: '',
autoScalingGroups: '',
serviceRoleArn: '',
triggerConfigurations: '',
alarmConfiguration: '',
autoRollbackConfiguration: '',
outdatedInstancesStrategy: '',
deploymentStyle: '',
blueGreenDeploymentConfiguration: '',
loadBalancerInfo: '',
ec2TagSet: '',
ecsServices: '',
onPremisesTagSet: '',
tags: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.CreateDeploymentGroup');
xhr.setRequestHeader('x-amz-target', '');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.CreateDeploymentGroup',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {
applicationName: '',
deploymentGroupName: '',
deploymentConfigName: '',
ec2TagFilters: '',
onPremisesInstanceTagFilters: '',
autoScalingGroups: '',
serviceRoleArn: '',
triggerConfigurations: '',
alarmConfiguration: '',
autoRollbackConfiguration: '',
outdatedInstancesStrategy: '',
deploymentStyle: '',
blueGreenDeploymentConfiguration: '',
loadBalancerInfo: '',
ec2TagSet: '',
ecsServices: '',
onPremisesTagSet: '',
tags: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.CreateDeploymentGroup';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"applicationName":"","deploymentGroupName":"","deploymentConfigName":"","ec2TagFilters":"","onPremisesInstanceTagFilters":"","autoScalingGroups":"","serviceRoleArn":"","triggerConfigurations":"","alarmConfiguration":"","autoRollbackConfiguration":"","outdatedInstancesStrategy":"","deploymentStyle":"","blueGreenDeploymentConfiguration":"","loadBalancerInfo":"","ec2TagSet":"","ecsServices":"","onPremisesTagSet":"","tags":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.CreateDeploymentGroup',
method: 'POST',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
},
processData: false,
data: '{\n "applicationName": "",\n "deploymentGroupName": "",\n "deploymentConfigName": "",\n "ec2TagFilters": "",\n "onPremisesInstanceTagFilters": "",\n "autoScalingGroups": "",\n "serviceRoleArn": "",\n "triggerConfigurations": "",\n "alarmConfiguration": "",\n "autoRollbackConfiguration": "",\n "outdatedInstancesStrategy": "",\n "deploymentStyle": "",\n "blueGreenDeploymentConfiguration": "",\n "loadBalancerInfo": "",\n "ec2TagSet": "",\n "ecsServices": "",\n "onPremisesTagSet": "",\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 \"applicationName\": \"\",\n \"deploymentGroupName\": \"\",\n \"deploymentConfigName\": \"\",\n \"ec2TagFilters\": \"\",\n \"onPremisesInstanceTagFilters\": \"\",\n \"autoScalingGroups\": \"\",\n \"serviceRoleArn\": \"\",\n \"triggerConfigurations\": \"\",\n \"alarmConfiguration\": \"\",\n \"autoRollbackConfiguration\": \"\",\n \"outdatedInstancesStrategy\": \"\",\n \"deploymentStyle\": \"\",\n \"blueGreenDeploymentConfiguration\": \"\",\n \"loadBalancerInfo\": \"\",\n \"ec2TagSet\": \"\",\n \"ecsServices\": \"\",\n \"onPremisesTagSet\": \"\",\n \"tags\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.CreateDeploymentGroup")
.post(body)
.addHeader("x-amz-target", "")
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
applicationName: '',
deploymentGroupName: '',
deploymentConfigName: '',
ec2TagFilters: '',
onPremisesInstanceTagFilters: '',
autoScalingGroups: '',
serviceRoleArn: '',
triggerConfigurations: '',
alarmConfiguration: '',
autoRollbackConfiguration: '',
outdatedInstancesStrategy: '',
deploymentStyle: '',
blueGreenDeploymentConfiguration: '',
loadBalancerInfo: '',
ec2TagSet: '',
ecsServices: '',
onPremisesTagSet: '',
tags: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.CreateDeploymentGroup',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: {
applicationName: '',
deploymentGroupName: '',
deploymentConfigName: '',
ec2TagFilters: '',
onPremisesInstanceTagFilters: '',
autoScalingGroups: '',
serviceRoleArn: '',
triggerConfigurations: '',
alarmConfiguration: '',
autoRollbackConfiguration: '',
outdatedInstancesStrategy: '',
deploymentStyle: '',
blueGreenDeploymentConfiguration: '',
loadBalancerInfo: '',
ec2TagSet: '',
ecsServices: '',
onPremisesTagSet: '',
tags: ''
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.CreateDeploymentGroup');
req.headers({
'x-amz-target': '',
'content-type': 'application/json'
});
req.type('json');
req.send({
applicationName: '',
deploymentGroupName: '',
deploymentConfigName: '',
ec2TagFilters: '',
onPremisesInstanceTagFilters: '',
autoScalingGroups: '',
serviceRoleArn: '',
triggerConfigurations: '',
alarmConfiguration: '',
autoRollbackConfiguration: '',
outdatedInstancesStrategy: '',
deploymentStyle: '',
blueGreenDeploymentConfiguration: '',
loadBalancerInfo: '',
ec2TagSet: '',
ecsServices: '',
onPremisesTagSet: '',
tags: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.CreateDeploymentGroup',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {
applicationName: '',
deploymentGroupName: '',
deploymentConfigName: '',
ec2TagFilters: '',
onPremisesInstanceTagFilters: '',
autoScalingGroups: '',
serviceRoleArn: '',
triggerConfigurations: '',
alarmConfiguration: '',
autoRollbackConfiguration: '',
outdatedInstancesStrategy: '',
deploymentStyle: '',
blueGreenDeploymentConfiguration: '',
loadBalancerInfo: '',
ec2TagSet: '',
ecsServices: '',
onPremisesTagSet: '',
tags: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.CreateDeploymentGroup';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"applicationName":"","deploymentGroupName":"","deploymentConfigName":"","ec2TagFilters":"","onPremisesInstanceTagFilters":"","autoScalingGroups":"","serviceRoleArn":"","triggerConfigurations":"","alarmConfiguration":"","autoRollbackConfiguration":"","outdatedInstancesStrategy":"","deploymentStyle":"","blueGreenDeploymentConfiguration":"","loadBalancerInfo":"","ec2TagSet":"","ecsServices":"","onPremisesTagSet":"","tags":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"x-amz-target": @"",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"applicationName": @"",
@"deploymentGroupName": @"",
@"deploymentConfigName": @"",
@"ec2TagFilters": @"",
@"onPremisesInstanceTagFilters": @"",
@"autoScalingGroups": @"",
@"serviceRoleArn": @"",
@"triggerConfigurations": @"",
@"alarmConfiguration": @"",
@"autoRollbackConfiguration": @"",
@"outdatedInstancesStrategy": @"",
@"deploymentStyle": @"",
@"blueGreenDeploymentConfiguration": @"",
@"loadBalancerInfo": @"",
@"ec2TagSet": @"",
@"ecsServices": @"",
@"onPremisesTagSet": @"",
@"tags": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.CreateDeploymentGroup"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.CreateDeploymentGroup" in
let headers = Header.add_list (Header.init ()) [
("x-amz-target", "");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"applicationName\": \"\",\n \"deploymentGroupName\": \"\",\n \"deploymentConfigName\": \"\",\n \"ec2TagFilters\": \"\",\n \"onPremisesInstanceTagFilters\": \"\",\n \"autoScalingGroups\": \"\",\n \"serviceRoleArn\": \"\",\n \"triggerConfigurations\": \"\",\n \"alarmConfiguration\": \"\",\n \"autoRollbackConfiguration\": \"\",\n \"outdatedInstancesStrategy\": \"\",\n \"deploymentStyle\": \"\",\n \"blueGreenDeploymentConfiguration\": \"\",\n \"loadBalancerInfo\": \"\",\n \"ec2TagSet\": \"\",\n \"ecsServices\": \"\",\n \"onPremisesTagSet\": \"\",\n \"tags\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.CreateDeploymentGroup",
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([
'applicationName' => '',
'deploymentGroupName' => '',
'deploymentConfigName' => '',
'ec2TagFilters' => '',
'onPremisesInstanceTagFilters' => '',
'autoScalingGroups' => '',
'serviceRoleArn' => '',
'triggerConfigurations' => '',
'alarmConfiguration' => '',
'autoRollbackConfiguration' => '',
'outdatedInstancesStrategy' => '',
'deploymentStyle' => '',
'blueGreenDeploymentConfiguration' => '',
'loadBalancerInfo' => '',
'ec2TagSet' => '',
'ecsServices' => '',
'onPremisesTagSet' => '',
'tags' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json",
"x-amz-target: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.CreateDeploymentGroup', [
'body' => '{
"applicationName": "",
"deploymentGroupName": "",
"deploymentConfigName": "",
"ec2TagFilters": "",
"onPremisesInstanceTagFilters": "",
"autoScalingGroups": "",
"serviceRoleArn": "",
"triggerConfigurations": "",
"alarmConfiguration": "",
"autoRollbackConfiguration": "",
"outdatedInstancesStrategy": "",
"deploymentStyle": "",
"blueGreenDeploymentConfiguration": "",
"loadBalancerInfo": "",
"ec2TagSet": "",
"ecsServices": "",
"onPremisesTagSet": "",
"tags": ""
}',
'headers' => [
'content-type' => 'application/json',
'x-amz-target' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.CreateDeploymentGroup');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'applicationName' => '',
'deploymentGroupName' => '',
'deploymentConfigName' => '',
'ec2TagFilters' => '',
'onPremisesInstanceTagFilters' => '',
'autoScalingGroups' => '',
'serviceRoleArn' => '',
'triggerConfigurations' => '',
'alarmConfiguration' => '',
'autoRollbackConfiguration' => '',
'outdatedInstancesStrategy' => '',
'deploymentStyle' => '',
'blueGreenDeploymentConfiguration' => '',
'loadBalancerInfo' => '',
'ec2TagSet' => '',
'ecsServices' => '',
'onPremisesTagSet' => '',
'tags' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'applicationName' => '',
'deploymentGroupName' => '',
'deploymentConfigName' => '',
'ec2TagFilters' => '',
'onPremisesInstanceTagFilters' => '',
'autoScalingGroups' => '',
'serviceRoleArn' => '',
'triggerConfigurations' => '',
'alarmConfiguration' => '',
'autoRollbackConfiguration' => '',
'outdatedInstancesStrategy' => '',
'deploymentStyle' => '',
'blueGreenDeploymentConfiguration' => '',
'loadBalancerInfo' => '',
'ec2TagSet' => '',
'ecsServices' => '',
'onPremisesTagSet' => '',
'tags' => ''
]));
$request->setRequestUrl('{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.CreateDeploymentGroup');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.CreateDeploymentGroup' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"applicationName": "",
"deploymentGroupName": "",
"deploymentConfigName": "",
"ec2TagFilters": "",
"onPremisesInstanceTagFilters": "",
"autoScalingGroups": "",
"serviceRoleArn": "",
"triggerConfigurations": "",
"alarmConfiguration": "",
"autoRollbackConfiguration": "",
"outdatedInstancesStrategy": "",
"deploymentStyle": "",
"blueGreenDeploymentConfiguration": "",
"loadBalancerInfo": "",
"ec2TagSet": "",
"ecsServices": "",
"onPremisesTagSet": "",
"tags": ""
}'
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.CreateDeploymentGroup' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"applicationName": "",
"deploymentGroupName": "",
"deploymentConfigName": "",
"ec2TagFilters": "",
"onPremisesInstanceTagFilters": "",
"autoScalingGroups": "",
"serviceRoleArn": "",
"triggerConfigurations": "",
"alarmConfiguration": "",
"autoRollbackConfiguration": "",
"outdatedInstancesStrategy": "",
"deploymentStyle": "",
"blueGreenDeploymentConfiguration": "",
"loadBalancerInfo": "",
"ec2TagSet": "",
"ecsServices": "",
"onPremisesTagSet": "",
"tags": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"applicationName\": \"\",\n \"deploymentGroupName\": \"\",\n \"deploymentConfigName\": \"\",\n \"ec2TagFilters\": \"\",\n \"onPremisesInstanceTagFilters\": \"\",\n \"autoScalingGroups\": \"\",\n \"serviceRoleArn\": \"\",\n \"triggerConfigurations\": \"\",\n \"alarmConfiguration\": \"\",\n \"autoRollbackConfiguration\": \"\",\n \"outdatedInstancesStrategy\": \"\",\n \"deploymentStyle\": \"\",\n \"blueGreenDeploymentConfiguration\": \"\",\n \"loadBalancerInfo\": \"\",\n \"ec2TagSet\": \"\",\n \"ecsServices\": \"\",\n \"onPremisesTagSet\": \"\",\n \"tags\": \"\"\n}"
headers = {
'x-amz-target': "",
'content-type': "application/json"
}
conn.request("POST", "/baseUrl/", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.CreateDeploymentGroup"
payload = {
"applicationName": "",
"deploymentGroupName": "",
"deploymentConfigName": "",
"ec2TagFilters": "",
"onPremisesInstanceTagFilters": "",
"autoScalingGroups": "",
"serviceRoleArn": "",
"triggerConfigurations": "",
"alarmConfiguration": "",
"autoRollbackConfiguration": "",
"outdatedInstancesStrategy": "",
"deploymentStyle": "",
"blueGreenDeploymentConfiguration": "",
"loadBalancerInfo": "",
"ec2TagSet": "",
"ecsServices": "",
"onPremisesTagSet": "",
"tags": ""
}
headers = {
"x-amz-target": "",
"content-type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.CreateDeploymentGroup"
payload <- "{\n \"applicationName\": \"\",\n \"deploymentGroupName\": \"\",\n \"deploymentConfigName\": \"\",\n \"ec2TagFilters\": \"\",\n \"onPremisesInstanceTagFilters\": \"\",\n \"autoScalingGroups\": \"\",\n \"serviceRoleArn\": \"\",\n \"triggerConfigurations\": \"\",\n \"alarmConfiguration\": \"\",\n \"autoRollbackConfiguration\": \"\",\n \"outdatedInstancesStrategy\": \"\",\n \"deploymentStyle\": \"\",\n \"blueGreenDeploymentConfiguration\": \"\",\n \"loadBalancerInfo\": \"\",\n \"ec2TagSet\": \"\",\n \"ecsServices\": \"\",\n \"onPremisesTagSet\": \"\",\n \"tags\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, add_headers('x-amz-target' = ''), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.CreateDeploymentGroup")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-amz-target"] = ''
request["content-type"] = 'application/json'
request.body = "{\n \"applicationName\": \"\",\n \"deploymentGroupName\": \"\",\n \"deploymentConfigName\": \"\",\n \"ec2TagFilters\": \"\",\n \"onPremisesInstanceTagFilters\": \"\",\n \"autoScalingGroups\": \"\",\n \"serviceRoleArn\": \"\",\n \"triggerConfigurations\": \"\",\n \"alarmConfiguration\": \"\",\n \"autoRollbackConfiguration\": \"\",\n \"outdatedInstancesStrategy\": \"\",\n \"deploymentStyle\": \"\",\n \"blueGreenDeploymentConfiguration\": \"\",\n \"loadBalancerInfo\": \"\",\n \"ec2TagSet\": \"\",\n \"ecsServices\": \"\",\n \"onPremisesTagSet\": \"\",\n \"tags\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/') do |req|
req.headers['x-amz-target'] = ''
req.body = "{\n \"applicationName\": \"\",\n \"deploymentGroupName\": \"\",\n \"deploymentConfigName\": \"\",\n \"ec2TagFilters\": \"\",\n \"onPremisesInstanceTagFilters\": \"\",\n \"autoScalingGroups\": \"\",\n \"serviceRoleArn\": \"\",\n \"triggerConfigurations\": \"\",\n \"alarmConfiguration\": \"\",\n \"autoRollbackConfiguration\": \"\",\n \"outdatedInstancesStrategy\": \"\",\n \"deploymentStyle\": \"\",\n \"blueGreenDeploymentConfiguration\": \"\",\n \"loadBalancerInfo\": \"\",\n \"ec2TagSet\": \"\",\n \"ecsServices\": \"\",\n \"onPremisesTagSet\": \"\",\n \"tags\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.CreateDeploymentGroup";
let payload = json!({
"applicationName": "",
"deploymentGroupName": "",
"deploymentConfigName": "",
"ec2TagFilters": "",
"onPremisesInstanceTagFilters": "",
"autoScalingGroups": "",
"serviceRoleArn": "",
"triggerConfigurations": "",
"alarmConfiguration": "",
"autoRollbackConfiguration": "",
"outdatedInstancesStrategy": "",
"deploymentStyle": "",
"blueGreenDeploymentConfiguration": "",
"loadBalancerInfo": "",
"ec2TagSet": "",
"ecsServices": "",
"onPremisesTagSet": "",
"tags": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("x-amz-target", "".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.CreateDeploymentGroup' \
--header 'content-type: application/json' \
--header 'x-amz-target: ' \
--data '{
"applicationName": "",
"deploymentGroupName": "",
"deploymentConfigName": "",
"ec2TagFilters": "",
"onPremisesInstanceTagFilters": "",
"autoScalingGroups": "",
"serviceRoleArn": "",
"triggerConfigurations": "",
"alarmConfiguration": "",
"autoRollbackConfiguration": "",
"outdatedInstancesStrategy": "",
"deploymentStyle": "",
"blueGreenDeploymentConfiguration": "",
"loadBalancerInfo": "",
"ec2TagSet": "",
"ecsServices": "",
"onPremisesTagSet": "",
"tags": ""
}'
echo '{
"applicationName": "",
"deploymentGroupName": "",
"deploymentConfigName": "",
"ec2TagFilters": "",
"onPremisesInstanceTagFilters": "",
"autoScalingGroups": "",
"serviceRoleArn": "",
"triggerConfigurations": "",
"alarmConfiguration": "",
"autoRollbackConfiguration": "",
"outdatedInstancesStrategy": "",
"deploymentStyle": "",
"blueGreenDeploymentConfiguration": "",
"loadBalancerInfo": "",
"ec2TagSet": "",
"ecsServices": "",
"onPremisesTagSet": "",
"tags": ""
}' | \
http POST '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.CreateDeploymentGroup' \
content-type:application/json \
x-amz-target:''
wget --quiet \
--method POST \
--header 'x-amz-target: ' \
--header 'content-type: application/json' \
--body-data '{\n "applicationName": "",\n "deploymentGroupName": "",\n "deploymentConfigName": "",\n "ec2TagFilters": "",\n "onPremisesInstanceTagFilters": "",\n "autoScalingGroups": "",\n "serviceRoleArn": "",\n "triggerConfigurations": "",\n "alarmConfiguration": "",\n "autoRollbackConfiguration": "",\n "outdatedInstancesStrategy": "",\n "deploymentStyle": "",\n "blueGreenDeploymentConfiguration": "",\n "loadBalancerInfo": "",\n "ec2TagSet": "",\n "ecsServices": "",\n "onPremisesTagSet": "",\n "tags": ""\n}' \
--output-document \
- '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.CreateDeploymentGroup'
import Foundation
let headers = [
"x-amz-target": "",
"content-type": "application/json"
]
let parameters = [
"applicationName": "",
"deploymentGroupName": "",
"deploymentConfigName": "",
"ec2TagFilters": "",
"onPremisesInstanceTagFilters": "",
"autoScalingGroups": "",
"serviceRoleArn": "",
"triggerConfigurations": "",
"alarmConfiguration": "",
"autoRollbackConfiguration": "",
"outdatedInstancesStrategy": "",
"deploymentStyle": "",
"blueGreenDeploymentConfiguration": "",
"loadBalancerInfo": "",
"ec2TagSet": "",
"ecsServices": "",
"onPremisesTagSet": "",
"tags": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.CreateDeploymentGroup")! 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}}/#X-Amz-Target=CodeDeploy_20141006.DeleteApplication
HEADERS
X-Amz-Target
BODY json
{
"applicationName": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.DeleteApplication");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-amz-target: ");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"applicationName\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.DeleteApplication" {:headers {:x-amz-target ""}
:content-type :json
:form-params {:applicationName ""}})
require "http/client"
url = "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.DeleteApplication"
headers = HTTP::Headers{
"x-amz-target" => ""
"content-type" => "application/json"
}
reqBody = "{\n \"applicationName\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.DeleteApplication"),
Headers =
{
{ "x-amz-target", "" },
},
Content = new StringContent("{\n \"applicationName\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.DeleteApplication");
var request = new RestRequest("", Method.Post);
request.AddHeader("x-amz-target", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"applicationName\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.DeleteApplication"
payload := strings.NewReader("{\n \"applicationName\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-amz-target", "")
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/ HTTP/1.1
X-Amz-Target:
Content-Type: application/json
Host: example.com
Content-Length: 27
{
"applicationName": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.DeleteApplication")
.setHeader("x-amz-target", "")
.setHeader("content-type", "application/json")
.setBody("{\n \"applicationName\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.DeleteApplication"))
.header("x-amz-target", "")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"applicationName\": \"\"\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 \"applicationName\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.DeleteApplication")
.post(body)
.addHeader("x-amz-target", "")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.DeleteApplication")
.header("x-amz-target", "")
.header("content-type", "application/json")
.body("{\n \"applicationName\": \"\"\n}")
.asString();
const data = JSON.stringify({
applicationName: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.DeleteApplication');
xhr.setRequestHeader('x-amz-target', '');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.DeleteApplication',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {applicationName: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.DeleteApplication';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"applicationName":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.DeleteApplication',
method: 'POST',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
},
processData: false,
data: '{\n "applicationName": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"applicationName\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.DeleteApplication")
.post(body)
.addHeader("x-amz-target", "")
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({applicationName: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.DeleteApplication',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: {applicationName: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.DeleteApplication');
req.headers({
'x-amz-target': '',
'content-type': 'application/json'
});
req.type('json');
req.send({
applicationName: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.DeleteApplication',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {applicationName: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.DeleteApplication';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"applicationName":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"x-amz-target": @"",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"applicationName": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.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}}/#X-Amz-Target=CodeDeploy_20141006.DeleteApplication" in
let headers = Header.add_list (Header.init ()) [
("x-amz-target", "");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"applicationName\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.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([
'applicationName' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json",
"x-amz-target: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.DeleteApplication', [
'body' => '{
"applicationName": ""
}',
'headers' => [
'content-type' => 'application/json',
'x-amz-target' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.DeleteApplication');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'applicationName' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'applicationName' => ''
]));
$request->setRequestUrl('{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.DeleteApplication');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.DeleteApplication' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"applicationName": ""
}'
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.DeleteApplication' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"applicationName": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"applicationName\": \"\"\n}"
headers = {
'x-amz-target': "",
'content-type': "application/json"
}
conn.request("POST", "/baseUrl/", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.DeleteApplication"
payload = { "applicationName": "" }
headers = {
"x-amz-target": "",
"content-type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.DeleteApplication"
payload <- "{\n \"applicationName\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, add_headers('x-amz-target' = ''), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.DeleteApplication")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-amz-target"] = ''
request["content-type"] = 'application/json'
request.body = "{\n \"applicationName\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/') do |req|
req.headers['x-amz-target'] = ''
req.body = "{\n \"applicationName\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.DeleteApplication";
let payload = json!({"applicationName": ""});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("x-amz-target", "".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.DeleteApplication' \
--header 'content-type: application/json' \
--header 'x-amz-target: ' \
--data '{
"applicationName": ""
}'
echo '{
"applicationName": ""
}' | \
http POST '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.DeleteApplication' \
content-type:application/json \
x-amz-target:''
wget --quiet \
--method POST \
--header 'x-amz-target: ' \
--header 'content-type: application/json' \
--body-data '{\n "applicationName": ""\n}' \
--output-document \
- '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.DeleteApplication'
import Foundation
let headers = [
"x-amz-target": "",
"content-type": "application/json"
]
let parameters = ["applicationName": ""] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.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
DeleteDeploymentConfig
{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.DeleteDeploymentConfig
HEADERS
X-Amz-Target
BODY json
{
"deploymentConfigName": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.DeleteDeploymentConfig");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-amz-target: ");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"deploymentConfigName\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.DeleteDeploymentConfig" {:headers {:x-amz-target ""}
:content-type :json
:form-params {:deploymentConfigName ""}})
require "http/client"
url = "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.DeleteDeploymentConfig"
headers = HTTP::Headers{
"x-amz-target" => ""
"content-type" => "application/json"
}
reqBody = "{\n \"deploymentConfigName\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.DeleteDeploymentConfig"),
Headers =
{
{ "x-amz-target", "" },
},
Content = new StringContent("{\n \"deploymentConfigName\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.DeleteDeploymentConfig");
var request = new RestRequest("", Method.Post);
request.AddHeader("x-amz-target", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"deploymentConfigName\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.DeleteDeploymentConfig"
payload := strings.NewReader("{\n \"deploymentConfigName\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-amz-target", "")
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/ HTTP/1.1
X-Amz-Target:
Content-Type: application/json
Host: example.com
Content-Length: 32
{
"deploymentConfigName": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.DeleteDeploymentConfig")
.setHeader("x-amz-target", "")
.setHeader("content-type", "application/json")
.setBody("{\n \"deploymentConfigName\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.DeleteDeploymentConfig"))
.header("x-amz-target", "")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"deploymentConfigName\": \"\"\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 \"deploymentConfigName\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.DeleteDeploymentConfig")
.post(body)
.addHeader("x-amz-target", "")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.DeleteDeploymentConfig")
.header("x-amz-target", "")
.header("content-type", "application/json")
.body("{\n \"deploymentConfigName\": \"\"\n}")
.asString();
const data = JSON.stringify({
deploymentConfigName: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.DeleteDeploymentConfig');
xhr.setRequestHeader('x-amz-target', '');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.DeleteDeploymentConfig',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {deploymentConfigName: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.DeleteDeploymentConfig';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"deploymentConfigName":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.DeleteDeploymentConfig',
method: 'POST',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
},
processData: false,
data: '{\n "deploymentConfigName": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"deploymentConfigName\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.DeleteDeploymentConfig")
.post(body)
.addHeader("x-amz-target", "")
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({deploymentConfigName: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.DeleteDeploymentConfig',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: {deploymentConfigName: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.DeleteDeploymentConfig');
req.headers({
'x-amz-target': '',
'content-type': 'application/json'
});
req.type('json');
req.send({
deploymentConfigName: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.DeleteDeploymentConfig',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {deploymentConfigName: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.DeleteDeploymentConfig';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"deploymentConfigName":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"x-amz-target": @"",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"deploymentConfigName": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.DeleteDeploymentConfig"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.DeleteDeploymentConfig" in
let headers = Header.add_list (Header.init ()) [
("x-amz-target", "");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"deploymentConfigName\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.DeleteDeploymentConfig",
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([
'deploymentConfigName' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json",
"x-amz-target: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.DeleteDeploymentConfig', [
'body' => '{
"deploymentConfigName": ""
}',
'headers' => [
'content-type' => 'application/json',
'x-amz-target' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.DeleteDeploymentConfig');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'deploymentConfigName' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'deploymentConfigName' => ''
]));
$request->setRequestUrl('{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.DeleteDeploymentConfig');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.DeleteDeploymentConfig' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"deploymentConfigName": ""
}'
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.DeleteDeploymentConfig' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"deploymentConfigName": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"deploymentConfigName\": \"\"\n}"
headers = {
'x-amz-target': "",
'content-type': "application/json"
}
conn.request("POST", "/baseUrl/", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.DeleteDeploymentConfig"
payload = { "deploymentConfigName": "" }
headers = {
"x-amz-target": "",
"content-type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.DeleteDeploymentConfig"
payload <- "{\n \"deploymentConfigName\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, add_headers('x-amz-target' = ''), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.DeleteDeploymentConfig")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-amz-target"] = ''
request["content-type"] = 'application/json'
request.body = "{\n \"deploymentConfigName\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/') do |req|
req.headers['x-amz-target'] = ''
req.body = "{\n \"deploymentConfigName\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.DeleteDeploymentConfig";
let payload = json!({"deploymentConfigName": ""});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("x-amz-target", "".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.DeleteDeploymentConfig' \
--header 'content-type: application/json' \
--header 'x-amz-target: ' \
--data '{
"deploymentConfigName": ""
}'
echo '{
"deploymentConfigName": ""
}' | \
http POST '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.DeleteDeploymentConfig' \
content-type:application/json \
x-amz-target:''
wget --quiet \
--method POST \
--header 'x-amz-target: ' \
--header 'content-type: application/json' \
--body-data '{\n "deploymentConfigName": ""\n}' \
--output-document \
- '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.DeleteDeploymentConfig'
import Foundation
let headers = [
"x-amz-target": "",
"content-type": "application/json"
]
let parameters = ["deploymentConfigName": ""] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.DeleteDeploymentConfig")! 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
DeleteDeploymentGroup
{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.DeleteDeploymentGroup
HEADERS
X-Amz-Target
BODY json
{
"applicationName": "",
"deploymentGroupName": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.DeleteDeploymentGroup");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-amz-target: ");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"applicationName\": \"\",\n \"deploymentGroupName\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.DeleteDeploymentGroup" {:headers {:x-amz-target ""}
:content-type :json
:form-params {:applicationName ""
:deploymentGroupName ""}})
require "http/client"
url = "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.DeleteDeploymentGroup"
headers = HTTP::Headers{
"x-amz-target" => ""
"content-type" => "application/json"
}
reqBody = "{\n \"applicationName\": \"\",\n \"deploymentGroupName\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.DeleteDeploymentGroup"),
Headers =
{
{ "x-amz-target", "" },
},
Content = new StringContent("{\n \"applicationName\": \"\",\n \"deploymentGroupName\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.DeleteDeploymentGroup");
var request = new RestRequest("", Method.Post);
request.AddHeader("x-amz-target", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"applicationName\": \"\",\n \"deploymentGroupName\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.DeleteDeploymentGroup"
payload := strings.NewReader("{\n \"applicationName\": \"\",\n \"deploymentGroupName\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-amz-target", "")
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/ HTTP/1.1
X-Amz-Target:
Content-Type: application/json
Host: example.com
Content-Length: 56
{
"applicationName": "",
"deploymentGroupName": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.DeleteDeploymentGroup")
.setHeader("x-amz-target", "")
.setHeader("content-type", "application/json")
.setBody("{\n \"applicationName\": \"\",\n \"deploymentGroupName\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.DeleteDeploymentGroup"))
.header("x-amz-target", "")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"applicationName\": \"\",\n \"deploymentGroupName\": \"\"\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 \"applicationName\": \"\",\n \"deploymentGroupName\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.DeleteDeploymentGroup")
.post(body)
.addHeader("x-amz-target", "")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.DeleteDeploymentGroup")
.header("x-amz-target", "")
.header("content-type", "application/json")
.body("{\n \"applicationName\": \"\",\n \"deploymentGroupName\": \"\"\n}")
.asString();
const data = JSON.stringify({
applicationName: '',
deploymentGroupName: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.DeleteDeploymentGroup');
xhr.setRequestHeader('x-amz-target', '');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.DeleteDeploymentGroup',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {applicationName: '', deploymentGroupName: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.DeleteDeploymentGroup';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"applicationName":"","deploymentGroupName":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.DeleteDeploymentGroup',
method: 'POST',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
},
processData: false,
data: '{\n "applicationName": "",\n "deploymentGroupName": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"applicationName\": \"\",\n \"deploymentGroupName\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.DeleteDeploymentGroup")
.post(body)
.addHeader("x-amz-target", "")
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({applicationName: '', deploymentGroupName: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.DeleteDeploymentGroup',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: {applicationName: '', deploymentGroupName: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.DeleteDeploymentGroup');
req.headers({
'x-amz-target': '',
'content-type': 'application/json'
});
req.type('json');
req.send({
applicationName: '',
deploymentGroupName: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.DeleteDeploymentGroup',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {applicationName: '', deploymentGroupName: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.DeleteDeploymentGroup';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"applicationName":"","deploymentGroupName":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"x-amz-target": @"",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"applicationName": @"",
@"deploymentGroupName": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.DeleteDeploymentGroup"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.DeleteDeploymentGroup" in
let headers = Header.add_list (Header.init ()) [
("x-amz-target", "");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"applicationName\": \"\",\n \"deploymentGroupName\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.DeleteDeploymentGroup",
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([
'applicationName' => '',
'deploymentGroupName' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json",
"x-amz-target: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.DeleteDeploymentGroup', [
'body' => '{
"applicationName": "",
"deploymentGroupName": ""
}',
'headers' => [
'content-type' => 'application/json',
'x-amz-target' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.DeleteDeploymentGroup');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'applicationName' => '',
'deploymentGroupName' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'applicationName' => '',
'deploymentGroupName' => ''
]));
$request->setRequestUrl('{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.DeleteDeploymentGroup');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.DeleteDeploymentGroup' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"applicationName": "",
"deploymentGroupName": ""
}'
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.DeleteDeploymentGroup' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"applicationName": "",
"deploymentGroupName": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"applicationName\": \"\",\n \"deploymentGroupName\": \"\"\n}"
headers = {
'x-amz-target': "",
'content-type': "application/json"
}
conn.request("POST", "/baseUrl/", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.DeleteDeploymentGroup"
payload = {
"applicationName": "",
"deploymentGroupName": ""
}
headers = {
"x-amz-target": "",
"content-type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.DeleteDeploymentGroup"
payload <- "{\n \"applicationName\": \"\",\n \"deploymentGroupName\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, add_headers('x-amz-target' = ''), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.DeleteDeploymentGroup")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-amz-target"] = ''
request["content-type"] = 'application/json'
request.body = "{\n \"applicationName\": \"\",\n \"deploymentGroupName\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/') do |req|
req.headers['x-amz-target'] = ''
req.body = "{\n \"applicationName\": \"\",\n \"deploymentGroupName\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.DeleteDeploymentGroup";
let payload = json!({
"applicationName": "",
"deploymentGroupName": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("x-amz-target", "".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.DeleteDeploymentGroup' \
--header 'content-type: application/json' \
--header 'x-amz-target: ' \
--data '{
"applicationName": "",
"deploymentGroupName": ""
}'
echo '{
"applicationName": "",
"deploymentGroupName": ""
}' | \
http POST '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.DeleteDeploymentGroup' \
content-type:application/json \
x-amz-target:''
wget --quiet \
--method POST \
--header 'x-amz-target: ' \
--header 'content-type: application/json' \
--body-data '{\n "applicationName": "",\n "deploymentGroupName": ""\n}' \
--output-document \
- '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.DeleteDeploymentGroup'
import Foundation
let headers = [
"x-amz-target": "",
"content-type": "application/json"
]
let parameters = [
"applicationName": "",
"deploymentGroupName": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.DeleteDeploymentGroup")! 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
DeleteGitHubAccountToken
{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.DeleteGitHubAccountToken
HEADERS
X-Amz-Target
BODY json
{
"tokenName": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.DeleteGitHubAccountToken");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-amz-target: ");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"tokenName\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.DeleteGitHubAccountToken" {:headers {:x-amz-target ""}
:content-type :json
:form-params {:tokenName ""}})
require "http/client"
url = "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.DeleteGitHubAccountToken"
headers = HTTP::Headers{
"x-amz-target" => ""
"content-type" => "application/json"
}
reqBody = "{\n \"tokenName\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.DeleteGitHubAccountToken"),
Headers =
{
{ "x-amz-target", "" },
},
Content = new StringContent("{\n \"tokenName\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.DeleteGitHubAccountToken");
var request = new RestRequest("", Method.Post);
request.AddHeader("x-amz-target", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"tokenName\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.DeleteGitHubAccountToken"
payload := strings.NewReader("{\n \"tokenName\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-amz-target", "")
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/ HTTP/1.1
X-Amz-Target:
Content-Type: application/json
Host: example.com
Content-Length: 21
{
"tokenName": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.DeleteGitHubAccountToken")
.setHeader("x-amz-target", "")
.setHeader("content-type", "application/json")
.setBody("{\n \"tokenName\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.DeleteGitHubAccountToken"))
.header("x-amz-target", "")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"tokenName\": \"\"\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 \"tokenName\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.DeleteGitHubAccountToken")
.post(body)
.addHeader("x-amz-target", "")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.DeleteGitHubAccountToken")
.header("x-amz-target", "")
.header("content-type", "application/json")
.body("{\n \"tokenName\": \"\"\n}")
.asString();
const data = JSON.stringify({
tokenName: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.DeleteGitHubAccountToken');
xhr.setRequestHeader('x-amz-target', '');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.DeleteGitHubAccountToken',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {tokenName: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.DeleteGitHubAccountToken';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"tokenName":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.DeleteGitHubAccountToken',
method: 'POST',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
},
processData: false,
data: '{\n "tokenName": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"tokenName\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.DeleteGitHubAccountToken")
.post(body)
.addHeader("x-amz-target", "")
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({tokenName: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.DeleteGitHubAccountToken',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: {tokenName: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.DeleteGitHubAccountToken');
req.headers({
'x-amz-target': '',
'content-type': 'application/json'
});
req.type('json');
req.send({
tokenName: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.DeleteGitHubAccountToken',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {tokenName: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.DeleteGitHubAccountToken';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"tokenName":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"x-amz-target": @"",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"tokenName": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.DeleteGitHubAccountToken"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.DeleteGitHubAccountToken" in
let headers = Header.add_list (Header.init ()) [
("x-amz-target", "");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"tokenName\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.DeleteGitHubAccountToken",
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([
'tokenName' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json",
"x-amz-target: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.DeleteGitHubAccountToken', [
'body' => '{
"tokenName": ""
}',
'headers' => [
'content-type' => 'application/json',
'x-amz-target' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.DeleteGitHubAccountToken');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'tokenName' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'tokenName' => ''
]));
$request->setRequestUrl('{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.DeleteGitHubAccountToken');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.DeleteGitHubAccountToken' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"tokenName": ""
}'
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.DeleteGitHubAccountToken' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"tokenName": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"tokenName\": \"\"\n}"
headers = {
'x-amz-target': "",
'content-type': "application/json"
}
conn.request("POST", "/baseUrl/", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.DeleteGitHubAccountToken"
payload = { "tokenName": "" }
headers = {
"x-amz-target": "",
"content-type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.DeleteGitHubAccountToken"
payload <- "{\n \"tokenName\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, add_headers('x-amz-target' = ''), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.DeleteGitHubAccountToken")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-amz-target"] = ''
request["content-type"] = 'application/json'
request.body = "{\n \"tokenName\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/') do |req|
req.headers['x-amz-target'] = ''
req.body = "{\n \"tokenName\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.DeleteGitHubAccountToken";
let payload = json!({"tokenName": ""});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("x-amz-target", "".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.DeleteGitHubAccountToken' \
--header 'content-type: application/json' \
--header 'x-amz-target: ' \
--data '{
"tokenName": ""
}'
echo '{
"tokenName": ""
}' | \
http POST '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.DeleteGitHubAccountToken' \
content-type:application/json \
x-amz-target:''
wget --quiet \
--method POST \
--header 'x-amz-target: ' \
--header 'content-type: application/json' \
--body-data '{\n "tokenName": ""\n}' \
--output-document \
- '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.DeleteGitHubAccountToken'
import Foundation
let headers = [
"x-amz-target": "",
"content-type": "application/json"
]
let parameters = ["tokenName": ""] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.DeleteGitHubAccountToken")! 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
DeleteResourcesByExternalId
{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.DeleteResourcesByExternalId
HEADERS
X-Amz-Target
BODY json
{
"externalId": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.DeleteResourcesByExternalId");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-amz-target: ");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"externalId\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.DeleteResourcesByExternalId" {:headers {:x-amz-target ""}
:content-type :json
:form-params {:externalId ""}})
require "http/client"
url = "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.DeleteResourcesByExternalId"
headers = HTTP::Headers{
"x-amz-target" => ""
"content-type" => "application/json"
}
reqBody = "{\n \"externalId\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.DeleteResourcesByExternalId"),
Headers =
{
{ "x-amz-target", "" },
},
Content = new StringContent("{\n \"externalId\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.DeleteResourcesByExternalId");
var request = new RestRequest("", Method.Post);
request.AddHeader("x-amz-target", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"externalId\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.DeleteResourcesByExternalId"
payload := strings.NewReader("{\n \"externalId\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-amz-target", "")
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/ HTTP/1.1
X-Amz-Target:
Content-Type: application/json
Host: example.com
Content-Length: 22
{
"externalId": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.DeleteResourcesByExternalId")
.setHeader("x-amz-target", "")
.setHeader("content-type", "application/json")
.setBody("{\n \"externalId\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.DeleteResourcesByExternalId"))
.header("x-amz-target", "")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"externalId\": \"\"\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 \"externalId\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.DeleteResourcesByExternalId")
.post(body)
.addHeader("x-amz-target", "")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.DeleteResourcesByExternalId")
.header("x-amz-target", "")
.header("content-type", "application/json")
.body("{\n \"externalId\": \"\"\n}")
.asString();
const data = JSON.stringify({
externalId: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.DeleteResourcesByExternalId');
xhr.setRequestHeader('x-amz-target', '');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.DeleteResourcesByExternalId',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {externalId: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.DeleteResourcesByExternalId';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"externalId":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.DeleteResourcesByExternalId',
method: 'POST',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
},
processData: false,
data: '{\n "externalId": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"externalId\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.DeleteResourcesByExternalId")
.post(body)
.addHeader("x-amz-target", "")
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({externalId: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.DeleteResourcesByExternalId',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: {externalId: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.DeleteResourcesByExternalId');
req.headers({
'x-amz-target': '',
'content-type': 'application/json'
});
req.type('json');
req.send({
externalId: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.DeleteResourcesByExternalId',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {externalId: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.DeleteResourcesByExternalId';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"externalId":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"x-amz-target": @"",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"externalId": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.DeleteResourcesByExternalId"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.DeleteResourcesByExternalId" in
let headers = Header.add_list (Header.init ()) [
("x-amz-target", "");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"externalId\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.DeleteResourcesByExternalId",
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([
'externalId' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json",
"x-amz-target: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.DeleteResourcesByExternalId', [
'body' => '{
"externalId": ""
}',
'headers' => [
'content-type' => 'application/json',
'x-amz-target' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.DeleteResourcesByExternalId');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'externalId' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'externalId' => ''
]));
$request->setRequestUrl('{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.DeleteResourcesByExternalId');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.DeleteResourcesByExternalId' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"externalId": ""
}'
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.DeleteResourcesByExternalId' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"externalId": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"externalId\": \"\"\n}"
headers = {
'x-amz-target': "",
'content-type': "application/json"
}
conn.request("POST", "/baseUrl/", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.DeleteResourcesByExternalId"
payload = { "externalId": "" }
headers = {
"x-amz-target": "",
"content-type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.DeleteResourcesByExternalId"
payload <- "{\n \"externalId\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, add_headers('x-amz-target' = ''), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.DeleteResourcesByExternalId")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-amz-target"] = ''
request["content-type"] = 'application/json'
request.body = "{\n \"externalId\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/') do |req|
req.headers['x-amz-target'] = ''
req.body = "{\n \"externalId\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.DeleteResourcesByExternalId";
let payload = json!({"externalId": ""});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("x-amz-target", "".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.DeleteResourcesByExternalId' \
--header 'content-type: application/json' \
--header 'x-amz-target: ' \
--data '{
"externalId": ""
}'
echo '{
"externalId": ""
}' | \
http POST '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.DeleteResourcesByExternalId' \
content-type:application/json \
x-amz-target:''
wget --quiet \
--method POST \
--header 'x-amz-target: ' \
--header 'content-type: application/json' \
--body-data '{\n "externalId": ""\n}' \
--output-document \
- '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.DeleteResourcesByExternalId'
import Foundation
let headers = [
"x-amz-target": "",
"content-type": "application/json"
]
let parameters = ["externalId": ""] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.DeleteResourcesByExternalId")! 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
DeregisterOnPremisesInstance
{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.DeregisterOnPremisesInstance
HEADERS
X-Amz-Target
BODY json
{
"instanceName": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.DeregisterOnPremisesInstance");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-amz-target: ");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"instanceName\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.DeregisterOnPremisesInstance" {:headers {:x-amz-target ""}
:content-type :json
:form-params {:instanceName ""}})
require "http/client"
url = "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.DeregisterOnPremisesInstance"
headers = HTTP::Headers{
"x-amz-target" => ""
"content-type" => "application/json"
}
reqBody = "{\n \"instanceName\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.DeregisterOnPremisesInstance"),
Headers =
{
{ "x-amz-target", "" },
},
Content = new StringContent("{\n \"instanceName\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.DeregisterOnPremisesInstance");
var request = new RestRequest("", Method.Post);
request.AddHeader("x-amz-target", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"instanceName\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.DeregisterOnPremisesInstance"
payload := strings.NewReader("{\n \"instanceName\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-amz-target", "")
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/ HTTP/1.1
X-Amz-Target:
Content-Type: application/json
Host: example.com
Content-Length: 24
{
"instanceName": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.DeregisterOnPremisesInstance")
.setHeader("x-amz-target", "")
.setHeader("content-type", "application/json")
.setBody("{\n \"instanceName\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.DeregisterOnPremisesInstance"))
.header("x-amz-target", "")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"instanceName\": \"\"\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 \"instanceName\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.DeregisterOnPremisesInstance")
.post(body)
.addHeader("x-amz-target", "")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.DeregisterOnPremisesInstance")
.header("x-amz-target", "")
.header("content-type", "application/json")
.body("{\n \"instanceName\": \"\"\n}")
.asString();
const data = JSON.stringify({
instanceName: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.DeregisterOnPremisesInstance');
xhr.setRequestHeader('x-amz-target', '');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.DeregisterOnPremisesInstance',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {instanceName: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.DeregisterOnPremisesInstance';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"instanceName":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.DeregisterOnPremisesInstance',
method: 'POST',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
},
processData: false,
data: '{\n "instanceName": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"instanceName\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.DeregisterOnPremisesInstance")
.post(body)
.addHeader("x-amz-target", "")
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({instanceName: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.DeregisterOnPremisesInstance',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: {instanceName: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.DeregisterOnPremisesInstance');
req.headers({
'x-amz-target': '',
'content-type': 'application/json'
});
req.type('json');
req.send({
instanceName: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.DeregisterOnPremisesInstance',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {instanceName: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.DeregisterOnPremisesInstance';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"instanceName":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"x-amz-target": @"",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"instanceName": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.DeregisterOnPremisesInstance"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.DeregisterOnPremisesInstance" in
let headers = Header.add_list (Header.init ()) [
("x-amz-target", "");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"instanceName\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.DeregisterOnPremisesInstance",
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([
'instanceName' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json",
"x-amz-target: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.DeregisterOnPremisesInstance', [
'body' => '{
"instanceName": ""
}',
'headers' => [
'content-type' => 'application/json',
'x-amz-target' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.DeregisterOnPremisesInstance');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'instanceName' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'instanceName' => ''
]));
$request->setRequestUrl('{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.DeregisterOnPremisesInstance');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.DeregisterOnPremisesInstance' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"instanceName": ""
}'
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.DeregisterOnPremisesInstance' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"instanceName": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"instanceName\": \"\"\n}"
headers = {
'x-amz-target': "",
'content-type': "application/json"
}
conn.request("POST", "/baseUrl/", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.DeregisterOnPremisesInstance"
payload = { "instanceName": "" }
headers = {
"x-amz-target": "",
"content-type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.DeregisterOnPremisesInstance"
payload <- "{\n \"instanceName\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, add_headers('x-amz-target' = ''), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.DeregisterOnPremisesInstance")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-amz-target"] = ''
request["content-type"] = 'application/json'
request.body = "{\n \"instanceName\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/') do |req|
req.headers['x-amz-target'] = ''
req.body = "{\n \"instanceName\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.DeregisterOnPremisesInstance";
let payload = json!({"instanceName": ""});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("x-amz-target", "".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.DeregisterOnPremisesInstance' \
--header 'content-type: application/json' \
--header 'x-amz-target: ' \
--data '{
"instanceName": ""
}'
echo '{
"instanceName": ""
}' | \
http POST '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.DeregisterOnPremisesInstance' \
content-type:application/json \
x-amz-target:''
wget --quiet \
--method POST \
--header 'x-amz-target: ' \
--header 'content-type: application/json' \
--body-data '{\n "instanceName": ""\n}' \
--output-document \
- '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.DeregisterOnPremisesInstance'
import Foundation
let headers = [
"x-amz-target": "",
"content-type": "application/json"
]
let parameters = ["instanceName": ""] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.DeregisterOnPremisesInstance")! 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
GetApplication
{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetApplication
HEADERS
X-Amz-Target
BODY json
{
"applicationName": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetApplication");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-amz-target: ");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"applicationName\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetApplication" {:headers {:x-amz-target ""}
:content-type :json
:form-params {:applicationName ""}})
require "http/client"
url = "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetApplication"
headers = HTTP::Headers{
"x-amz-target" => ""
"content-type" => "application/json"
}
reqBody = "{\n \"applicationName\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetApplication"),
Headers =
{
{ "x-amz-target", "" },
},
Content = new StringContent("{\n \"applicationName\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetApplication");
var request = new RestRequest("", Method.Post);
request.AddHeader("x-amz-target", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"applicationName\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetApplication"
payload := strings.NewReader("{\n \"applicationName\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-amz-target", "")
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/ HTTP/1.1
X-Amz-Target:
Content-Type: application/json
Host: example.com
Content-Length: 27
{
"applicationName": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetApplication")
.setHeader("x-amz-target", "")
.setHeader("content-type", "application/json")
.setBody("{\n \"applicationName\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetApplication"))
.header("x-amz-target", "")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"applicationName\": \"\"\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 \"applicationName\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetApplication")
.post(body)
.addHeader("x-amz-target", "")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetApplication")
.header("x-amz-target", "")
.header("content-type", "application/json")
.body("{\n \"applicationName\": \"\"\n}")
.asString();
const data = JSON.stringify({
applicationName: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetApplication');
xhr.setRequestHeader('x-amz-target', '');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetApplication',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {applicationName: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetApplication';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"applicationName":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetApplication',
method: 'POST',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
},
processData: false,
data: '{\n "applicationName": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"applicationName\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetApplication")
.post(body)
.addHeader("x-amz-target", "")
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({applicationName: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetApplication',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: {applicationName: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetApplication');
req.headers({
'x-amz-target': '',
'content-type': 'application/json'
});
req.type('json');
req.send({
applicationName: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetApplication',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {applicationName: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetApplication';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"applicationName":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"x-amz-target": @"",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"applicationName": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetApplication"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetApplication" in
let headers = Header.add_list (Header.init ()) [
("x-amz-target", "");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"applicationName\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetApplication",
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([
'applicationName' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json",
"x-amz-target: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetApplication', [
'body' => '{
"applicationName": ""
}',
'headers' => [
'content-type' => 'application/json',
'x-amz-target' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetApplication');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'applicationName' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'applicationName' => ''
]));
$request->setRequestUrl('{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetApplication');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetApplication' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"applicationName": ""
}'
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetApplication' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"applicationName": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"applicationName\": \"\"\n}"
headers = {
'x-amz-target': "",
'content-type': "application/json"
}
conn.request("POST", "/baseUrl/", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetApplication"
payload = { "applicationName": "" }
headers = {
"x-amz-target": "",
"content-type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetApplication"
payload <- "{\n \"applicationName\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, add_headers('x-amz-target' = ''), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetApplication")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-amz-target"] = ''
request["content-type"] = 'application/json'
request.body = "{\n \"applicationName\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/') do |req|
req.headers['x-amz-target'] = ''
req.body = "{\n \"applicationName\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetApplication";
let payload = json!({"applicationName": ""});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("x-amz-target", "".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetApplication' \
--header 'content-type: application/json' \
--header 'x-amz-target: ' \
--data '{
"applicationName": ""
}'
echo '{
"applicationName": ""
}' | \
http POST '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetApplication' \
content-type:application/json \
x-amz-target:''
wget --quiet \
--method POST \
--header 'x-amz-target: ' \
--header 'content-type: application/json' \
--body-data '{\n "applicationName": ""\n}' \
--output-document \
- '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetApplication'
import Foundation
let headers = [
"x-amz-target": "",
"content-type": "application/json"
]
let parameters = ["applicationName": ""] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetApplication")! 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
GetApplicationRevision
{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetApplicationRevision
HEADERS
X-Amz-Target
BODY json
{
"applicationName": "",
"revision": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetApplicationRevision");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-amz-target: ");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"applicationName\": \"\",\n \"revision\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetApplicationRevision" {:headers {:x-amz-target ""}
:content-type :json
:form-params {:applicationName ""
:revision ""}})
require "http/client"
url = "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetApplicationRevision"
headers = HTTP::Headers{
"x-amz-target" => ""
"content-type" => "application/json"
}
reqBody = "{\n \"applicationName\": \"\",\n \"revision\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetApplicationRevision"),
Headers =
{
{ "x-amz-target", "" },
},
Content = new StringContent("{\n \"applicationName\": \"\",\n \"revision\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetApplicationRevision");
var request = new RestRequest("", Method.Post);
request.AddHeader("x-amz-target", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"applicationName\": \"\",\n \"revision\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetApplicationRevision"
payload := strings.NewReader("{\n \"applicationName\": \"\",\n \"revision\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-amz-target", "")
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/ HTTP/1.1
X-Amz-Target:
Content-Type: application/json
Host: example.com
Content-Length: 45
{
"applicationName": "",
"revision": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetApplicationRevision")
.setHeader("x-amz-target", "")
.setHeader("content-type", "application/json")
.setBody("{\n \"applicationName\": \"\",\n \"revision\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetApplicationRevision"))
.header("x-amz-target", "")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"applicationName\": \"\",\n \"revision\": \"\"\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 \"applicationName\": \"\",\n \"revision\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetApplicationRevision")
.post(body)
.addHeader("x-amz-target", "")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetApplicationRevision")
.header("x-amz-target", "")
.header("content-type", "application/json")
.body("{\n \"applicationName\": \"\",\n \"revision\": \"\"\n}")
.asString();
const data = JSON.stringify({
applicationName: '',
revision: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetApplicationRevision');
xhr.setRequestHeader('x-amz-target', '');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetApplicationRevision',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {applicationName: '', revision: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetApplicationRevision';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"applicationName":"","revision":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetApplicationRevision',
method: 'POST',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
},
processData: false,
data: '{\n "applicationName": "",\n "revision": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"applicationName\": \"\",\n \"revision\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetApplicationRevision")
.post(body)
.addHeader("x-amz-target", "")
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({applicationName: '', revision: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetApplicationRevision',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: {applicationName: '', revision: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetApplicationRevision');
req.headers({
'x-amz-target': '',
'content-type': 'application/json'
});
req.type('json');
req.send({
applicationName: '',
revision: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetApplicationRevision',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {applicationName: '', revision: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetApplicationRevision';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"applicationName":"","revision":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"x-amz-target": @"",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"applicationName": @"",
@"revision": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetApplicationRevision"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetApplicationRevision" in
let headers = Header.add_list (Header.init ()) [
("x-amz-target", "");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"applicationName\": \"\",\n \"revision\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetApplicationRevision",
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([
'applicationName' => '',
'revision' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json",
"x-amz-target: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetApplicationRevision', [
'body' => '{
"applicationName": "",
"revision": ""
}',
'headers' => [
'content-type' => 'application/json',
'x-amz-target' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetApplicationRevision');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'applicationName' => '',
'revision' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'applicationName' => '',
'revision' => ''
]));
$request->setRequestUrl('{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetApplicationRevision');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetApplicationRevision' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"applicationName": "",
"revision": ""
}'
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetApplicationRevision' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"applicationName": "",
"revision": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"applicationName\": \"\",\n \"revision\": \"\"\n}"
headers = {
'x-amz-target': "",
'content-type': "application/json"
}
conn.request("POST", "/baseUrl/", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetApplicationRevision"
payload = {
"applicationName": "",
"revision": ""
}
headers = {
"x-amz-target": "",
"content-type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetApplicationRevision"
payload <- "{\n \"applicationName\": \"\",\n \"revision\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, add_headers('x-amz-target' = ''), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetApplicationRevision")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-amz-target"] = ''
request["content-type"] = 'application/json'
request.body = "{\n \"applicationName\": \"\",\n \"revision\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/') do |req|
req.headers['x-amz-target'] = ''
req.body = "{\n \"applicationName\": \"\",\n \"revision\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetApplicationRevision";
let payload = json!({
"applicationName": "",
"revision": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("x-amz-target", "".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetApplicationRevision' \
--header 'content-type: application/json' \
--header 'x-amz-target: ' \
--data '{
"applicationName": "",
"revision": ""
}'
echo '{
"applicationName": "",
"revision": ""
}' | \
http POST '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetApplicationRevision' \
content-type:application/json \
x-amz-target:''
wget --quiet \
--method POST \
--header 'x-amz-target: ' \
--header 'content-type: application/json' \
--body-data '{\n "applicationName": "",\n "revision": ""\n}' \
--output-document \
- '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetApplicationRevision'
import Foundation
let headers = [
"x-amz-target": "",
"content-type": "application/json"
]
let parameters = [
"applicationName": "",
"revision": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetApplicationRevision")! 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
GetDeployment
{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetDeployment
HEADERS
X-Amz-Target
BODY json
{
"deploymentId": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetDeployment");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-amz-target: ");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"deploymentId\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetDeployment" {:headers {:x-amz-target ""}
:content-type :json
:form-params {:deploymentId ""}})
require "http/client"
url = "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetDeployment"
headers = HTTP::Headers{
"x-amz-target" => ""
"content-type" => "application/json"
}
reqBody = "{\n \"deploymentId\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetDeployment"),
Headers =
{
{ "x-amz-target", "" },
},
Content = new StringContent("{\n \"deploymentId\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetDeployment");
var request = new RestRequest("", Method.Post);
request.AddHeader("x-amz-target", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"deploymentId\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetDeployment"
payload := strings.NewReader("{\n \"deploymentId\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-amz-target", "")
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/ HTTP/1.1
X-Amz-Target:
Content-Type: application/json
Host: example.com
Content-Length: 24
{
"deploymentId": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetDeployment")
.setHeader("x-amz-target", "")
.setHeader("content-type", "application/json")
.setBody("{\n \"deploymentId\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetDeployment"))
.header("x-amz-target", "")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"deploymentId\": \"\"\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 \"deploymentId\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetDeployment")
.post(body)
.addHeader("x-amz-target", "")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetDeployment")
.header("x-amz-target", "")
.header("content-type", "application/json")
.body("{\n \"deploymentId\": \"\"\n}")
.asString();
const data = JSON.stringify({
deploymentId: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetDeployment');
xhr.setRequestHeader('x-amz-target', '');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetDeployment',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {deploymentId: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetDeployment';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"deploymentId":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetDeployment',
method: 'POST',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
},
processData: false,
data: '{\n "deploymentId": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"deploymentId\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetDeployment")
.post(body)
.addHeader("x-amz-target", "")
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({deploymentId: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetDeployment',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: {deploymentId: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetDeployment');
req.headers({
'x-amz-target': '',
'content-type': 'application/json'
});
req.type('json');
req.send({
deploymentId: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetDeployment',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {deploymentId: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetDeployment';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"deploymentId":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"x-amz-target": @"",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"deploymentId": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetDeployment"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetDeployment" in
let headers = Header.add_list (Header.init ()) [
("x-amz-target", "");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"deploymentId\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetDeployment",
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([
'deploymentId' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json",
"x-amz-target: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetDeployment', [
'body' => '{
"deploymentId": ""
}',
'headers' => [
'content-type' => 'application/json',
'x-amz-target' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetDeployment');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'deploymentId' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'deploymentId' => ''
]));
$request->setRequestUrl('{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetDeployment');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetDeployment' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"deploymentId": ""
}'
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetDeployment' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"deploymentId": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"deploymentId\": \"\"\n}"
headers = {
'x-amz-target': "",
'content-type': "application/json"
}
conn.request("POST", "/baseUrl/", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetDeployment"
payload = { "deploymentId": "" }
headers = {
"x-amz-target": "",
"content-type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetDeployment"
payload <- "{\n \"deploymentId\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, add_headers('x-amz-target' = ''), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetDeployment")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-amz-target"] = ''
request["content-type"] = 'application/json'
request.body = "{\n \"deploymentId\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/') do |req|
req.headers['x-amz-target'] = ''
req.body = "{\n \"deploymentId\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetDeployment";
let payload = json!({"deploymentId": ""});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("x-amz-target", "".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetDeployment' \
--header 'content-type: application/json' \
--header 'x-amz-target: ' \
--data '{
"deploymentId": ""
}'
echo '{
"deploymentId": ""
}' | \
http POST '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetDeployment' \
content-type:application/json \
x-amz-target:''
wget --quiet \
--method POST \
--header 'x-amz-target: ' \
--header 'content-type: application/json' \
--body-data '{\n "deploymentId": ""\n}' \
--output-document \
- '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetDeployment'
import Foundation
let headers = [
"x-amz-target": "",
"content-type": "application/json"
]
let parameters = ["deploymentId": ""] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetDeployment")! 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
GetDeploymentConfig
{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetDeploymentConfig
HEADERS
X-Amz-Target
BODY json
{
"deploymentConfigName": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetDeploymentConfig");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-amz-target: ");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"deploymentConfigName\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetDeploymentConfig" {:headers {:x-amz-target ""}
:content-type :json
:form-params {:deploymentConfigName ""}})
require "http/client"
url = "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetDeploymentConfig"
headers = HTTP::Headers{
"x-amz-target" => ""
"content-type" => "application/json"
}
reqBody = "{\n \"deploymentConfigName\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetDeploymentConfig"),
Headers =
{
{ "x-amz-target", "" },
},
Content = new StringContent("{\n \"deploymentConfigName\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetDeploymentConfig");
var request = new RestRequest("", Method.Post);
request.AddHeader("x-amz-target", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"deploymentConfigName\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetDeploymentConfig"
payload := strings.NewReader("{\n \"deploymentConfigName\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-amz-target", "")
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/ HTTP/1.1
X-Amz-Target:
Content-Type: application/json
Host: example.com
Content-Length: 32
{
"deploymentConfigName": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetDeploymentConfig")
.setHeader("x-amz-target", "")
.setHeader("content-type", "application/json")
.setBody("{\n \"deploymentConfigName\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetDeploymentConfig"))
.header("x-amz-target", "")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"deploymentConfigName\": \"\"\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 \"deploymentConfigName\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetDeploymentConfig")
.post(body)
.addHeader("x-amz-target", "")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetDeploymentConfig")
.header("x-amz-target", "")
.header("content-type", "application/json")
.body("{\n \"deploymentConfigName\": \"\"\n}")
.asString();
const data = JSON.stringify({
deploymentConfigName: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetDeploymentConfig');
xhr.setRequestHeader('x-amz-target', '');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetDeploymentConfig',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {deploymentConfigName: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetDeploymentConfig';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"deploymentConfigName":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetDeploymentConfig',
method: 'POST',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
},
processData: false,
data: '{\n "deploymentConfigName": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"deploymentConfigName\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetDeploymentConfig")
.post(body)
.addHeader("x-amz-target", "")
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({deploymentConfigName: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetDeploymentConfig',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: {deploymentConfigName: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetDeploymentConfig');
req.headers({
'x-amz-target': '',
'content-type': 'application/json'
});
req.type('json');
req.send({
deploymentConfigName: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetDeploymentConfig',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {deploymentConfigName: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetDeploymentConfig';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"deploymentConfigName":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"x-amz-target": @"",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"deploymentConfigName": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetDeploymentConfig"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetDeploymentConfig" in
let headers = Header.add_list (Header.init ()) [
("x-amz-target", "");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"deploymentConfigName\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetDeploymentConfig",
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([
'deploymentConfigName' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json",
"x-amz-target: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetDeploymentConfig', [
'body' => '{
"deploymentConfigName": ""
}',
'headers' => [
'content-type' => 'application/json',
'x-amz-target' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetDeploymentConfig');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'deploymentConfigName' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'deploymentConfigName' => ''
]));
$request->setRequestUrl('{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetDeploymentConfig');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetDeploymentConfig' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"deploymentConfigName": ""
}'
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetDeploymentConfig' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"deploymentConfigName": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"deploymentConfigName\": \"\"\n}"
headers = {
'x-amz-target': "",
'content-type': "application/json"
}
conn.request("POST", "/baseUrl/", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetDeploymentConfig"
payload = { "deploymentConfigName": "" }
headers = {
"x-amz-target": "",
"content-type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetDeploymentConfig"
payload <- "{\n \"deploymentConfigName\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, add_headers('x-amz-target' = ''), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetDeploymentConfig")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-amz-target"] = ''
request["content-type"] = 'application/json'
request.body = "{\n \"deploymentConfigName\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/') do |req|
req.headers['x-amz-target'] = ''
req.body = "{\n \"deploymentConfigName\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetDeploymentConfig";
let payload = json!({"deploymentConfigName": ""});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("x-amz-target", "".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetDeploymentConfig' \
--header 'content-type: application/json' \
--header 'x-amz-target: ' \
--data '{
"deploymentConfigName": ""
}'
echo '{
"deploymentConfigName": ""
}' | \
http POST '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetDeploymentConfig' \
content-type:application/json \
x-amz-target:''
wget --quiet \
--method POST \
--header 'x-amz-target: ' \
--header 'content-type: application/json' \
--body-data '{\n "deploymentConfigName": ""\n}' \
--output-document \
- '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetDeploymentConfig'
import Foundation
let headers = [
"x-amz-target": "",
"content-type": "application/json"
]
let parameters = ["deploymentConfigName": ""] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetDeploymentConfig")! 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
GetDeploymentGroup
{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetDeploymentGroup
HEADERS
X-Amz-Target
BODY json
{
"applicationName": "",
"deploymentGroupName": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetDeploymentGroup");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-amz-target: ");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"applicationName\": \"\",\n \"deploymentGroupName\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetDeploymentGroup" {:headers {:x-amz-target ""}
:content-type :json
:form-params {:applicationName ""
:deploymentGroupName ""}})
require "http/client"
url = "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetDeploymentGroup"
headers = HTTP::Headers{
"x-amz-target" => ""
"content-type" => "application/json"
}
reqBody = "{\n \"applicationName\": \"\",\n \"deploymentGroupName\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetDeploymentGroup"),
Headers =
{
{ "x-amz-target", "" },
},
Content = new StringContent("{\n \"applicationName\": \"\",\n \"deploymentGroupName\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetDeploymentGroup");
var request = new RestRequest("", Method.Post);
request.AddHeader("x-amz-target", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"applicationName\": \"\",\n \"deploymentGroupName\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetDeploymentGroup"
payload := strings.NewReader("{\n \"applicationName\": \"\",\n \"deploymentGroupName\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-amz-target", "")
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/ HTTP/1.1
X-Amz-Target:
Content-Type: application/json
Host: example.com
Content-Length: 56
{
"applicationName": "",
"deploymentGroupName": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetDeploymentGroup")
.setHeader("x-amz-target", "")
.setHeader("content-type", "application/json")
.setBody("{\n \"applicationName\": \"\",\n \"deploymentGroupName\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetDeploymentGroup"))
.header("x-amz-target", "")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"applicationName\": \"\",\n \"deploymentGroupName\": \"\"\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 \"applicationName\": \"\",\n \"deploymentGroupName\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetDeploymentGroup")
.post(body)
.addHeader("x-amz-target", "")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetDeploymentGroup")
.header("x-amz-target", "")
.header("content-type", "application/json")
.body("{\n \"applicationName\": \"\",\n \"deploymentGroupName\": \"\"\n}")
.asString();
const data = JSON.stringify({
applicationName: '',
deploymentGroupName: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetDeploymentGroup');
xhr.setRequestHeader('x-amz-target', '');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetDeploymentGroup',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {applicationName: '', deploymentGroupName: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetDeploymentGroup';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"applicationName":"","deploymentGroupName":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetDeploymentGroup',
method: 'POST',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
},
processData: false,
data: '{\n "applicationName": "",\n "deploymentGroupName": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"applicationName\": \"\",\n \"deploymentGroupName\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetDeploymentGroup")
.post(body)
.addHeader("x-amz-target", "")
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({applicationName: '', deploymentGroupName: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetDeploymentGroup',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: {applicationName: '', deploymentGroupName: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetDeploymentGroup');
req.headers({
'x-amz-target': '',
'content-type': 'application/json'
});
req.type('json');
req.send({
applicationName: '',
deploymentGroupName: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetDeploymentGroup',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {applicationName: '', deploymentGroupName: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetDeploymentGroup';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"applicationName":"","deploymentGroupName":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"x-amz-target": @"",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"applicationName": @"",
@"deploymentGroupName": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetDeploymentGroup"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetDeploymentGroup" in
let headers = Header.add_list (Header.init ()) [
("x-amz-target", "");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"applicationName\": \"\",\n \"deploymentGroupName\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetDeploymentGroup",
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([
'applicationName' => '',
'deploymentGroupName' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json",
"x-amz-target: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetDeploymentGroup', [
'body' => '{
"applicationName": "",
"deploymentGroupName": ""
}',
'headers' => [
'content-type' => 'application/json',
'x-amz-target' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetDeploymentGroup');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'applicationName' => '',
'deploymentGroupName' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'applicationName' => '',
'deploymentGroupName' => ''
]));
$request->setRequestUrl('{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetDeploymentGroup');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetDeploymentGroup' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"applicationName": "",
"deploymentGroupName": ""
}'
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetDeploymentGroup' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"applicationName": "",
"deploymentGroupName": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"applicationName\": \"\",\n \"deploymentGroupName\": \"\"\n}"
headers = {
'x-amz-target': "",
'content-type': "application/json"
}
conn.request("POST", "/baseUrl/", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetDeploymentGroup"
payload = {
"applicationName": "",
"deploymentGroupName": ""
}
headers = {
"x-amz-target": "",
"content-type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetDeploymentGroup"
payload <- "{\n \"applicationName\": \"\",\n \"deploymentGroupName\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, add_headers('x-amz-target' = ''), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetDeploymentGroup")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-amz-target"] = ''
request["content-type"] = 'application/json'
request.body = "{\n \"applicationName\": \"\",\n \"deploymentGroupName\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/') do |req|
req.headers['x-amz-target'] = ''
req.body = "{\n \"applicationName\": \"\",\n \"deploymentGroupName\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetDeploymentGroup";
let payload = json!({
"applicationName": "",
"deploymentGroupName": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("x-amz-target", "".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetDeploymentGroup' \
--header 'content-type: application/json' \
--header 'x-amz-target: ' \
--data '{
"applicationName": "",
"deploymentGroupName": ""
}'
echo '{
"applicationName": "",
"deploymentGroupName": ""
}' | \
http POST '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetDeploymentGroup' \
content-type:application/json \
x-amz-target:''
wget --quiet \
--method POST \
--header 'x-amz-target: ' \
--header 'content-type: application/json' \
--body-data '{\n "applicationName": "",\n "deploymentGroupName": ""\n}' \
--output-document \
- '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetDeploymentGroup'
import Foundation
let headers = [
"x-amz-target": "",
"content-type": "application/json"
]
let parameters = [
"applicationName": "",
"deploymentGroupName": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetDeploymentGroup")! 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
GetDeploymentInstance
{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetDeploymentInstance
HEADERS
X-Amz-Target
BODY json
{
"deploymentId": "",
"instanceId": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetDeploymentInstance");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-amz-target: ");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"deploymentId\": \"\",\n \"instanceId\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetDeploymentInstance" {:headers {:x-amz-target ""}
:content-type :json
:form-params {:deploymentId ""
:instanceId ""}})
require "http/client"
url = "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetDeploymentInstance"
headers = HTTP::Headers{
"x-amz-target" => ""
"content-type" => "application/json"
}
reqBody = "{\n \"deploymentId\": \"\",\n \"instanceId\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetDeploymentInstance"),
Headers =
{
{ "x-amz-target", "" },
},
Content = new StringContent("{\n \"deploymentId\": \"\",\n \"instanceId\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetDeploymentInstance");
var request = new RestRequest("", Method.Post);
request.AddHeader("x-amz-target", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"deploymentId\": \"\",\n \"instanceId\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetDeploymentInstance"
payload := strings.NewReader("{\n \"deploymentId\": \"\",\n \"instanceId\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-amz-target", "")
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/ HTTP/1.1
X-Amz-Target:
Content-Type: application/json
Host: example.com
Content-Length: 44
{
"deploymentId": "",
"instanceId": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetDeploymentInstance")
.setHeader("x-amz-target", "")
.setHeader("content-type", "application/json")
.setBody("{\n \"deploymentId\": \"\",\n \"instanceId\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetDeploymentInstance"))
.header("x-amz-target", "")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"deploymentId\": \"\",\n \"instanceId\": \"\"\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 \"deploymentId\": \"\",\n \"instanceId\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetDeploymentInstance")
.post(body)
.addHeader("x-amz-target", "")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetDeploymentInstance")
.header("x-amz-target", "")
.header("content-type", "application/json")
.body("{\n \"deploymentId\": \"\",\n \"instanceId\": \"\"\n}")
.asString();
const data = JSON.stringify({
deploymentId: '',
instanceId: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetDeploymentInstance');
xhr.setRequestHeader('x-amz-target', '');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetDeploymentInstance',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {deploymentId: '', instanceId: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetDeploymentInstance';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"deploymentId":"","instanceId":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetDeploymentInstance',
method: 'POST',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
},
processData: false,
data: '{\n "deploymentId": "",\n "instanceId": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"deploymentId\": \"\",\n \"instanceId\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetDeploymentInstance")
.post(body)
.addHeader("x-amz-target", "")
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({deploymentId: '', instanceId: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetDeploymentInstance',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: {deploymentId: '', instanceId: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetDeploymentInstance');
req.headers({
'x-amz-target': '',
'content-type': 'application/json'
});
req.type('json');
req.send({
deploymentId: '',
instanceId: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetDeploymentInstance',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {deploymentId: '', instanceId: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetDeploymentInstance';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"deploymentId":"","instanceId":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"x-amz-target": @"",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"deploymentId": @"",
@"instanceId": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetDeploymentInstance"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetDeploymentInstance" in
let headers = Header.add_list (Header.init ()) [
("x-amz-target", "");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"deploymentId\": \"\",\n \"instanceId\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetDeploymentInstance",
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([
'deploymentId' => '',
'instanceId' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json",
"x-amz-target: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetDeploymentInstance', [
'body' => '{
"deploymentId": "",
"instanceId": ""
}',
'headers' => [
'content-type' => 'application/json',
'x-amz-target' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetDeploymentInstance');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'deploymentId' => '',
'instanceId' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'deploymentId' => '',
'instanceId' => ''
]));
$request->setRequestUrl('{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetDeploymentInstance');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetDeploymentInstance' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"deploymentId": "",
"instanceId": ""
}'
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetDeploymentInstance' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"deploymentId": "",
"instanceId": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"deploymentId\": \"\",\n \"instanceId\": \"\"\n}"
headers = {
'x-amz-target': "",
'content-type': "application/json"
}
conn.request("POST", "/baseUrl/", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetDeploymentInstance"
payload = {
"deploymentId": "",
"instanceId": ""
}
headers = {
"x-amz-target": "",
"content-type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetDeploymentInstance"
payload <- "{\n \"deploymentId\": \"\",\n \"instanceId\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, add_headers('x-amz-target' = ''), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetDeploymentInstance")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-amz-target"] = ''
request["content-type"] = 'application/json'
request.body = "{\n \"deploymentId\": \"\",\n \"instanceId\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/') do |req|
req.headers['x-amz-target'] = ''
req.body = "{\n \"deploymentId\": \"\",\n \"instanceId\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetDeploymentInstance";
let payload = json!({
"deploymentId": "",
"instanceId": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("x-amz-target", "".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetDeploymentInstance' \
--header 'content-type: application/json' \
--header 'x-amz-target: ' \
--data '{
"deploymentId": "",
"instanceId": ""
}'
echo '{
"deploymentId": "",
"instanceId": ""
}' | \
http POST '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetDeploymentInstance' \
content-type:application/json \
x-amz-target:''
wget --quiet \
--method POST \
--header 'x-amz-target: ' \
--header 'content-type: application/json' \
--body-data '{\n "deploymentId": "",\n "instanceId": ""\n}' \
--output-document \
- '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetDeploymentInstance'
import Foundation
let headers = [
"x-amz-target": "",
"content-type": "application/json"
]
let parameters = [
"deploymentId": "",
"instanceId": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetDeploymentInstance")! 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
GetDeploymentTarget
{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetDeploymentTarget
HEADERS
X-Amz-Target
BODY json
{
"deploymentId": "",
"targetId": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetDeploymentTarget");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-amz-target: ");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"deploymentId\": \"\",\n \"targetId\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetDeploymentTarget" {:headers {:x-amz-target ""}
:content-type :json
:form-params {:deploymentId ""
:targetId ""}})
require "http/client"
url = "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetDeploymentTarget"
headers = HTTP::Headers{
"x-amz-target" => ""
"content-type" => "application/json"
}
reqBody = "{\n \"deploymentId\": \"\",\n \"targetId\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetDeploymentTarget"),
Headers =
{
{ "x-amz-target", "" },
},
Content = new StringContent("{\n \"deploymentId\": \"\",\n \"targetId\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetDeploymentTarget");
var request = new RestRequest("", Method.Post);
request.AddHeader("x-amz-target", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"deploymentId\": \"\",\n \"targetId\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetDeploymentTarget"
payload := strings.NewReader("{\n \"deploymentId\": \"\",\n \"targetId\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-amz-target", "")
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/ HTTP/1.1
X-Amz-Target:
Content-Type: application/json
Host: example.com
Content-Length: 42
{
"deploymentId": "",
"targetId": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetDeploymentTarget")
.setHeader("x-amz-target", "")
.setHeader("content-type", "application/json")
.setBody("{\n \"deploymentId\": \"\",\n \"targetId\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetDeploymentTarget"))
.header("x-amz-target", "")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"deploymentId\": \"\",\n \"targetId\": \"\"\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 \"deploymentId\": \"\",\n \"targetId\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetDeploymentTarget")
.post(body)
.addHeader("x-amz-target", "")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetDeploymentTarget")
.header("x-amz-target", "")
.header("content-type", "application/json")
.body("{\n \"deploymentId\": \"\",\n \"targetId\": \"\"\n}")
.asString();
const data = JSON.stringify({
deploymentId: '',
targetId: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetDeploymentTarget');
xhr.setRequestHeader('x-amz-target', '');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetDeploymentTarget',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {deploymentId: '', targetId: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetDeploymentTarget';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"deploymentId":"","targetId":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetDeploymentTarget',
method: 'POST',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
},
processData: false,
data: '{\n "deploymentId": "",\n "targetId": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"deploymentId\": \"\",\n \"targetId\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetDeploymentTarget")
.post(body)
.addHeader("x-amz-target", "")
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({deploymentId: '', targetId: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetDeploymentTarget',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: {deploymentId: '', targetId: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetDeploymentTarget');
req.headers({
'x-amz-target': '',
'content-type': 'application/json'
});
req.type('json');
req.send({
deploymentId: '',
targetId: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetDeploymentTarget',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {deploymentId: '', targetId: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetDeploymentTarget';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"deploymentId":"","targetId":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"x-amz-target": @"",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"deploymentId": @"",
@"targetId": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetDeploymentTarget"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetDeploymentTarget" in
let headers = Header.add_list (Header.init ()) [
("x-amz-target", "");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"deploymentId\": \"\",\n \"targetId\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetDeploymentTarget",
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([
'deploymentId' => '',
'targetId' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json",
"x-amz-target: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetDeploymentTarget', [
'body' => '{
"deploymentId": "",
"targetId": ""
}',
'headers' => [
'content-type' => 'application/json',
'x-amz-target' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetDeploymentTarget');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'deploymentId' => '',
'targetId' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'deploymentId' => '',
'targetId' => ''
]));
$request->setRequestUrl('{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetDeploymentTarget');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetDeploymentTarget' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"deploymentId": "",
"targetId": ""
}'
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetDeploymentTarget' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"deploymentId": "",
"targetId": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"deploymentId\": \"\",\n \"targetId\": \"\"\n}"
headers = {
'x-amz-target': "",
'content-type': "application/json"
}
conn.request("POST", "/baseUrl/", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetDeploymentTarget"
payload = {
"deploymentId": "",
"targetId": ""
}
headers = {
"x-amz-target": "",
"content-type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetDeploymentTarget"
payload <- "{\n \"deploymentId\": \"\",\n \"targetId\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, add_headers('x-amz-target' = ''), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetDeploymentTarget")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-amz-target"] = ''
request["content-type"] = 'application/json'
request.body = "{\n \"deploymentId\": \"\",\n \"targetId\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/') do |req|
req.headers['x-amz-target'] = ''
req.body = "{\n \"deploymentId\": \"\",\n \"targetId\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetDeploymentTarget";
let payload = json!({
"deploymentId": "",
"targetId": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("x-amz-target", "".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetDeploymentTarget' \
--header 'content-type: application/json' \
--header 'x-amz-target: ' \
--data '{
"deploymentId": "",
"targetId": ""
}'
echo '{
"deploymentId": "",
"targetId": ""
}' | \
http POST '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetDeploymentTarget' \
content-type:application/json \
x-amz-target:''
wget --quiet \
--method POST \
--header 'x-amz-target: ' \
--header 'content-type: application/json' \
--body-data '{\n "deploymentId": "",\n "targetId": ""\n}' \
--output-document \
- '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetDeploymentTarget'
import Foundation
let headers = [
"x-amz-target": "",
"content-type": "application/json"
]
let parameters = [
"deploymentId": "",
"targetId": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetDeploymentTarget")! 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
GetOnPremisesInstance
{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetOnPremisesInstance
HEADERS
X-Amz-Target
BODY json
{
"instanceName": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetOnPremisesInstance");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-amz-target: ");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"instanceName\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetOnPremisesInstance" {:headers {:x-amz-target ""}
:content-type :json
:form-params {:instanceName ""}})
require "http/client"
url = "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetOnPremisesInstance"
headers = HTTP::Headers{
"x-amz-target" => ""
"content-type" => "application/json"
}
reqBody = "{\n \"instanceName\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetOnPremisesInstance"),
Headers =
{
{ "x-amz-target", "" },
},
Content = new StringContent("{\n \"instanceName\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetOnPremisesInstance");
var request = new RestRequest("", Method.Post);
request.AddHeader("x-amz-target", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"instanceName\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetOnPremisesInstance"
payload := strings.NewReader("{\n \"instanceName\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-amz-target", "")
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/ HTTP/1.1
X-Amz-Target:
Content-Type: application/json
Host: example.com
Content-Length: 24
{
"instanceName": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetOnPremisesInstance")
.setHeader("x-amz-target", "")
.setHeader("content-type", "application/json")
.setBody("{\n \"instanceName\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetOnPremisesInstance"))
.header("x-amz-target", "")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"instanceName\": \"\"\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 \"instanceName\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetOnPremisesInstance")
.post(body)
.addHeader("x-amz-target", "")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetOnPremisesInstance")
.header("x-amz-target", "")
.header("content-type", "application/json")
.body("{\n \"instanceName\": \"\"\n}")
.asString();
const data = JSON.stringify({
instanceName: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetOnPremisesInstance');
xhr.setRequestHeader('x-amz-target', '');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetOnPremisesInstance',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {instanceName: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetOnPremisesInstance';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"instanceName":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetOnPremisesInstance',
method: 'POST',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
},
processData: false,
data: '{\n "instanceName": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"instanceName\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetOnPremisesInstance")
.post(body)
.addHeader("x-amz-target", "")
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({instanceName: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetOnPremisesInstance',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: {instanceName: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetOnPremisesInstance');
req.headers({
'x-amz-target': '',
'content-type': 'application/json'
});
req.type('json');
req.send({
instanceName: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetOnPremisesInstance',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {instanceName: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetOnPremisesInstance';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"instanceName":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"x-amz-target": @"",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"instanceName": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetOnPremisesInstance"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetOnPremisesInstance" in
let headers = Header.add_list (Header.init ()) [
("x-amz-target", "");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"instanceName\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetOnPremisesInstance",
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([
'instanceName' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json",
"x-amz-target: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetOnPremisesInstance', [
'body' => '{
"instanceName": ""
}',
'headers' => [
'content-type' => 'application/json',
'x-amz-target' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetOnPremisesInstance');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'instanceName' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'instanceName' => ''
]));
$request->setRequestUrl('{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetOnPremisesInstance');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetOnPremisesInstance' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"instanceName": ""
}'
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetOnPremisesInstance' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"instanceName": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"instanceName\": \"\"\n}"
headers = {
'x-amz-target': "",
'content-type': "application/json"
}
conn.request("POST", "/baseUrl/", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetOnPremisesInstance"
payload = { "instanceName": "" }
headers = {
"x-amz-target": "",
"content-type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetOnPremisesInstance"
payload <- "{\n \"instanceName\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, add_headers('x-amz-target' = ''), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetOnPremisesInstance")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-amz-target"] = ''
request["content-type"] = 'application/json'
request.body = "{\n \"instanceName\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/') do |req|
req.headers['x-amz-target'] = ''
req.body = "{\n \"instanceName\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetOnPremisesInstance";
let payload = json!({"instanceName": ""});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("x-amz-target", "".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetOnPremisesInstance' \
--header 'content-type: application/json' \
--header 'x-amz-target: ' \
--data '{
"instanceName": ""
}'
echo '{
"instanceName": ""
}' | \
http POST '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetOnPremisesInstance' \
content-type:application/json \
x-amz-target:''
wget --quiet \
--method POST \
--header 'x-amz-target: ' \
--header 'content-type: application/json' \
--body-data '{\n "instanceName": ""\n}' \
--output-document \
- '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetOnPremisesInstance'
import Foundation
let headers = [
"x-amz-target": "",
"content-type": "application/json"
]
let parameters = ["instanceName": ""] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.GetOnPremisesInstance")! 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
ListApplicationRevisions
{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListApplicationRevisions
HEADERS
X-Amz-Target
BODY json
{
"applicationName": "",
"sortBy": "",
"sortOrder": "",
"s3Bucket": "",
"s3KeyPrefix": "",
"deployed": "",
"nextToken": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListApplicationRevisions");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-amz-target: ");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"applicationName\": \"\",\n \"sortBy\": \"\",\n \"sortOrder\": \"\",\n \"s3Bucket\": \"\",\n \"s3KeyPrefix\": \"\",\n \"deployed\": \"\",\n \"nextToken\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListApplicationRevisions" {:headers {:x-amz-target ""}
:content-type :json
:form-params {:applicationName ""
:sortBy ""
:sortOrder ""
:s3Bucket ""
:s3KeyPrefix ""
:deployed ""
:nextToken ""}})
require "http/client"
url = "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListApplicationRevisions"
headers = HTTP::Headers{
"x-amz-target" => ""
"content-type" => "application/json"
}
reqBody = "{\n \"applicationName\": \"\",\n \"sortBy\": \"\",\n \"sortOrder\": \"\",\n \"s3Bucket\": \"\",\n \"s3KeyPrefix\": \"\",\n \"deployed\": \"\",\n \"nextToken\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListApplicationRevisions"),
Headers =
{
{ "x-amz-target", "" },
},
Content = new StringContent("{\n \"applicationName\": \"\",\n \"sortBy\": \"\",\n \"sortOrder\": \"\",\n \"s3Bucket\": \"\",\n \"s3KeyPrefix\": \"\",\n \"deployed\": \"\",\n \"nextToken\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListApplicationRevisions");
var request = new RestRequest("", Method.Post);
request.AddHeader("x-amz-target", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"applicationName\": \"\",\n \"sortBy\": \"\",\n \"sortOrder\": \"\",\n \"s3Bucket\": \"\",\n \"s3KeyPrefix\": \"\",\n \"deployed\": \"\",\n \"nextToken\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListApplicationRevisions"
payload := strings.NewReader("{\n \"applicationName\": \"\",\n \"sortBy\": \"\",\n \"sortOrder\": \"\",\n \"s3Bucket\": \"\",\n \"s3KeyPrefix\": \"\",\n \"deployed\": \"\",\n \"nextToken\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-amz-target", "")
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/ HTTP/1.1
X-Amz-Target:
Content-Type: application/json
Host: example.com
Content-Length: 138
{
"applicationName": "",
"sortBy": "",
"sortOrder": "",
"s3Bucket": "",
"s3KeyPrefix": "",
"deployed": "",
"nextToken": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListApplicationRevisions")
.setHeader("x-amz-target", "")
.setHeader("content-type", "application/json")
.setBody("{\n \"applicationName\": \"\",\n \"sortBy\": \"\",\n \"sortOrder\": \"\",\n \"s3Bucket\": \"\",\n \"s3KeyPrefix\": \"\",\n \"deployed\": \"\",\n \"nextToken\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListApplicationRevisions"))
.header("x-amz-target", "")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"applicationName\": \"\",\n \"sortBy\": \"\",\n \"sortOrder\": \"\",\n \"s3Bucket\": \"\",\n \"s3KeyPrefix\": \"\",\n \"deployed\": \"\",\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 \"applicationName\": \"\",\n \"sortBy\": \"\",\n \"sortOrder\": \"\",\n \"s3Bucket\": \"\",\n \"s3KeyPrefix\": \"\",\n \"deployed\": \"\",\n \"nextToken\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListApplicationRevisions")
.post(body)
.addHeader("x-amz-target", "")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListApplicationRevisions")
.header("x-amz-target", "")
.header("content-type", "application/json")
.body("{\n \"applicationName\": \"\",\n \"sortBy\": \"\",\n \"sortOrder\": \"\",\n \"s3Bucket\": \"\",\n \"s3KeyPrefix\": \"\",\n \"deployed\": \"\",\n \"nextToken\": \"\"\n}")
.asString();
const data = JSON.stringify({
applicationName: '',
sortBy: '',
sortOrder: '',
s3Bucket: '',
s3KeyPrefix: '',
deployed: '',
nextToken: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListApplicationRevisions');
xhr.setRequestHeader('x-amz-target', '');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListApplicationRevisions',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {
applicationName: '',
sortBy: '',
sortOrder: '',
s3Bucket: '',
s3KeyPrefix: '',
deployed: '',
nextToken: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListApplicationRevisions';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"applicationName":"","sortBy":"","sortOrder":"","s3Bucket":"","s3KeyPrefix":"","deployed":"","nextToken":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListApplicationRevisions',
method: 'POST',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
},
processData: false,
data: '{\n "applicationName": "",\n "sortBy": "",\n "sortOrder": "",\n "s3Bucket": "",\n "s3KeyPrefix": "",\n "deployed": "",\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 \"applicationName\": \"\",\n \"sortBy\": \"\",\n \"sortOrder\": \"\",\n \"s3Bucket\": \"\",\n \"s3KeyPrefix\": \"\",\n \"deployed\": \"\",\n \"nextToken\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListApplicationRevisions")
.post(body)
.addHeader("x-amz-target", "")
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
applicationName: '',
sortBy: '',
sortOrder: '',
s3Bucket: '',
s3KeyPrefix: '',
deployed: '',
nextToken: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListApplicationRevisions',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: {
applicationName: '',
sortBy: '',
sortOrder: '',
s3Bucket: '',
s3KeyPrefix: '',
deployed: '',
nextToken: ''
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListApplicationRevisions');
req.headers({
'x-amz-target': '',
'content-type': 'application/json'
});
req.type('json');
req.send({
applicationName: '',
sortBy: '',
sortOrder: '',
s3Bucket: '',
s3KeyPrefix: '',
deployed: '',
nextToken: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListApplicationRevisions',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {
applicationName: '',
sortBy: '',
sortOrder: '',
s3Bucket: '',
s3KeyPrefix: '',
deployed: '',
nextToken: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListApplicationRevisions';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"applicationName":"","sortBy":"","sortOrder":"","s3Bucket":"","s3KeyPrefix":"","deployed":"","nextToken":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"x-amz-target": @"",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"applicationName": @"",
@"sortBy": @"",
@"sortOrder": @"",
@"s3Bucket": @"",
@"s3KeyPrefix": @"",
@"deployed": @"",
@"nextToken": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListApplicationRevisions"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListApplicationRevisions" in
let headers = Header.add_list (Header.init ()) [
("x-amz-target", "");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"applicationName\": \"\",\n \"sortBy\": \"\",\n \"sortOrder\": \"\",\n \"s3Bucket\": \"\",\n \"s3KeyPrefix\": \"\",\n \"deployed\": \"\",\n \"nextToken\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListApplicationRevisions",
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([
'applicationName' => '',
'sortBy' => '',
'sortOrder' => '',
's3Bucket' => '',
's3KeyPrefix' => '',
'deployed' => '',
'nextToken' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json",
"x-amz-target: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListApplicationRevisions', [
'body' => '{
"applicationName": "",
"sortBy": "",
"sortOrder": "",
"s3Bucket": "",
"s3KeyPrefix": "",
"deployed": "",
"nextToken": ""
}',
'headers' => [
'content-type' => 'application/json',
'x-amz-target' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListApplicationRevisions');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'applicationName' => '',
'sortBy' => '',
'sortOrder' => '',
's3Bucket' => '',
's3KeyPrefix' => '',
'deployed' => '',
'nextToken' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'applicationName' => '',
'sortBy' => '',
'sortOrder' => '',
's3Bucket' => '',
's3KeyPrefix' => '',
'deployed' => '',
'nextToken' => ''
]));
$request->setRequestUrl('{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListApplicationRevisions');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListApplicationRevisions' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"applicationName": "",
"sortBy": "",
"sortOrder": "",
"s3Bucket": "",
"s3KeyPrefix": "",
"deployed": "",
"nextToken": ""
}'
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListApplicationRevisions' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"applicationName": "",
"sortBy": "",
"sortOrder": "",
"s3Bucket": "",
"s3KeyPrefix": "",
"deployed": "",
"nextToken": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"applicationName\": \"\",\n \"sortBy\": \"\",\n \"sortOrder\": \"\",\n \"s3Bucket\": \"\",\n \"s3KeyPrefix\": \"\",\n \"deployed\": \"\",\n \"nextToken\": \"\"\n}"
headers = {
'x-amz-target': "",
'content-type': "application/json"
}
conn.request("POST", "/baseUrl/", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListApplicationRevisions"
payload = {
"applicationName": "",
"sortBy": "",
"sortOrder": "",
"s3Bucket": "",
"s3KeyPrefix": "",
"deployed": "",
"nextToken": ""
}
headers = {
"x-amz-target": "",
"content-type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListApplicationRevisions"
payload <- "{\n \"applicationName\": \"\",\n \"sortBy\": \"\",\n \"sortOrder\": \"\",\n \"s3Bucket\": \"\",\n \"s3KeyPrefix\": \"\",\n \"deployed\": \"\",\n \"nextToken\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, add_headers('x-amz-target' = ''), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListApplicationRevisions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-amz-target"] = ''
request["content-type"] = 'application/json'
request.body = "{\n \"applicationName\": \"\",\n \"sortBy\": \"\",\n \"sortOrder\": \"\",\n \"s3Bucket\": \"\",\n \"s3KeyPrefix\": \"\",\n \"deployed\": \"\",\n \"nextToken\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/') do |req|
req.headers['x-amz-target'] = ''
req.body = "{\n \"applicationName\": \"\",\n \"sortBy\": \"\",\n \"sortOrder\": \"\",\n \"s3Bucket\": \"\",\n \"s3KeyPrefix\": \"\",\n \"deployed\": \"\",\n \"nextToken\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListApplicationRevisions";
let payload = json!({
"applicationName": "",
"sortBy": "",
"sortOrder": "",
"s3Bucket": "",
"s3KeyPrefix": "",
"deployed": "",
"nextToken": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("x-amz-target", "".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListApplicationRevisions' \
--header 'content-type: application/json' \
--header 'x-amz-target: ' \
--data '{
"applicationName": "",
"sortBy": "",
"sortOrder": "",
"s3Bucket": "",
"s3KeyPrefix": "",
"deployed": "",
"nextToken": ""
}'
echo '{
"applicationName": "",
"sortBy": "",
"sortOrder": "",
"s3Bucket": "",
"s3KeyPrefix": "",
"deployed": "",
"nextToken": ""
}' | \
http POST '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListApplicationRevisions' \
content-type:application/json \
x-amz-target:''
wget --quiet \
--method POST \
--header 'x-amz-target: ' \
--header 'content-type: application/json' \
--body-data '{\n "applicationName": "",\n "sortBy": "",\n "sortOrder": "",\n "s3Bucket": "",\n "s3KeyPrefix": "",\n "deployed": "",\n "nextToken": ""\n}' \
--output-document \
- '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListApplicationRevisions'
import Foundation
let headers = [
"x-amz-target": "",
"content-type": "application/json"
]
let parameters = [
"applicationName": "",
"sortBy": "",
"sortOrder": "",
"s3Bucket": "",
"s3KeyPrefix": "",
"deployed": "",
"nextToken": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListApplicationRevisions")! 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
ListApplications
{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListApplications
HEADERS
X-Amz-Target
BODY json
{
"nextToken": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListApplications");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-amz-target: ");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"nextToken\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListApplications" {:headers {:x-amz-target ""}
:content-type :json
:form-params {:nextToken ""}})
require "http/client"
url = "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListApplications"
headers = HTTP::Headers{
"x-amz-target" => ""
"content-type" => "application/json"
}
reqBody = "{\n \"nextToken\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListApplications"),
Headers =
{
{ "x-amz-target", "" },
},
Content = new StringContent("{\n \"nextToken\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListApplications");
var request = new RestRequest("", Method.Post);
request.AddHeader("x-amz-target", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"nextToken\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListApplications"
payload := strings.NewReader("{\n \"nextToken\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-amz-target", "")
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/ HTTP/1.1
X-Amz-Target:
Content-Type: application/json
Host: example.com
Content-Length: 21
{
"nextToken": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListApplications")
.setHeader("x-amz-target", "")
.setHeader("content-type", "application/json")
.setBody("{\n \"nextToken\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListApplications"))
.header("x-amz-target", "")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"nextToken\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"nextToken\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListApplications")
.post(body)
.addHeader("x-amz-target", "")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListApplications")
.header("x-amz-target", "")
.header("content-type", "application/json")
.body("{\n \"nextToken\": \"\"\n}")
.asString();
const data = JSON.stringify({
nextToken: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListApplications');
xhr.setRequestHeader('x-amz-target', '');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListApplications',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {nextToken: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListApplications';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"nextToken":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListApplications',
method: 'POST',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
},
processData: false,
data: '{\n "nextToken": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"nextToken\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListApplications")
.post(body)
.addHeader("x-amz-target", "")
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({nextToken: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListApplications',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: {nextToken: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListApplications');
req.headers({
'x-amz-target': '',
'content-type': 'application/json'
});
req.type('json');
req.send({
nextToken: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListApplications',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {nextToken: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListApplications';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"nextToken":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"x-amz-target": @"",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"nextToken": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.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}}/#X-Amz-Target=CodeDeploy_20141006.ListApplications" in
let headers = Header.add_list (Header.init ()) [
("x-amz-target", "");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"nextToken\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.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([
'nextToken' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json",
"x-amz-target: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListApplications', [
'body' => '{
"nextToken": ""
}',
'headers' => [
'content-type' => 'application/json',
'x-amz-target' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListApplications');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'nextToken' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'nextToken' => ''
]));
$request->setRequestUrl('{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListApplications');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListApplications' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"nextToken": ""
}'
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListApplications' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"nextToken": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"nextToken\": \"\"\n}"
headers = {
'x-amz-target': "",
'content-type': "application/json"
}
conn.request("POST", "/baseUrl/", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListApplications"
payload = { "nextToken": "" }
headers = {
"x-amz-target": "",
"content-type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListApplications"
payload <- "{\n \"nextToken\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, add_headers('x-amz-target' = ''), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListApplications")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-amz-target"] = ''
request["content-type"] = 'application/json'
request.body = "{\n \"nextToken\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/') do |req|
req.headers['x-amz-target'] = ''
req.body = "{\n \"nextToken\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListApplications";
let payload = json!({"nextToken": ""});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("x-amz-target", "".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListApplications' \
--header 'content-type: application/json' \
--header 'x-amz-target: ' \
--data '{
"nextToken": ""
}'
echo '{
"nextToken": ""
}' | \
http POST '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListApplications' \
content-type:application/json \
x-amz-target:''
wget --quiet \
--method POST \
--header 'x-amz-target: ' \
--header 'content-type: application/json' \
--body-data '{\n "nextToken": ""\n}' \
--output-document \
- '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListApplications'
import Foundation
let headers = [
"x-amz-target": "",
"content-type": "application/json"
]
let parameters = ["nextToken": ""] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.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
ListDeploymentConfigs
{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListDeploymentConfigs
HEADERS
X-Amz-Target
BODY json
{
"nextToken": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListDeploymentConfigs");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-amz-target: ");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"nextToken\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListDeploymentConfigs" {:headers {:x-amz-target ""}
:content-type :json
:form-params {:nextToken ""}})
require "http/client"
url = "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListDeploymentConfigs"
headers = HTTP::Headers{
"x-amz-target" => ""
"content-type" => "application/json"
}
reqBody = "{\n \"nextToken\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListDeploymentConfigs"),
Headers =
{
{ "x-amz-target", "" },
},
Content = new StringContent("{\n \"nextToken\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListDeploymentConfigs");
var request = new RestRequest("", Method.Post);
request.AddHeader("x-amz-target", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"nextToken\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListDeploymentConfigs"
payload := strings.NewReader("{\n \"nextToken\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-amz-target", "")
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/ HTTP/1.1
X-Amz-Target:
Content-Type: application/json
Host: example.com
Content-Length: 21
{
"nextToken": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListDeploymentConfigs")
.setHeader("x-amz-target", "")
.setHeader("content-type", "application/json")
.setBody("{\n \"nextToken\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListDeploymentConfigs"))
.header("x-amz-target", "")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"nextToken\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"nextToken\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListDeploymentConfigs")
.post(body)
.addHeader("x-amz-target", "")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListDeploymentConfigs")
.header("x-amz-target", "")
.header("content-type", "application/json")
.body("{\n \"nextToken\": \"\"\n}")
.asString();
const data = JSON.stringify({
nextToken: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListDeploymentConfigs');
xhr.setRequestHeader('x-amz-target', '');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListDeploymentConfigs',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {nextToken: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListDeploymentConfigs';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"nextToken":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListDeploymentConfigs',
method: 'POST',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
},
processData: false,
data: '{\n "nextToken": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"nextToken\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListDeploymentConfigs")
.post(body)
.addHeader("x-amz-target", "")
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({nextToken: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListDeploymentConfigs',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: {nextToken: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListDeploymentConfigs');
req.headers({
'x-amz-target': '',
'content-type': 'application/json'
});
req.type('json');
req.send({
nextToken: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListDeploymentConfigs',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {nextToken: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListDeploymentConfigs';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"nextToken":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"x-amz-target": @"",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"nextToken": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListDeploymentConfigs"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListDeploymentConfigs" in
let headers = Header.add_list (Header.init ()) [
("x-amz-target", "");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"nextToken\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListDeploymentConfigs",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'nextToken' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json",
"x-amz-target: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListDeploymentConfigs', [
'body' => '{
"nextToken": ""
}',
'headers' => [
'content-type' => 'application/json',
'x-amz-target' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListDeploymentConfigs');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'nextToken' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'nextToken' => ''
]));
$request->setRequestUrl('{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListDeploymentConfigs');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListDeploymentConfigs' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"nextToken": ""
}'
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListDeploymentConfigs' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"nextToken": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"nextToken\": \"\"\n}"
headers = {
'x-amz-target': "",
'content-type': "application/json"
}
conn.request("POST", "/baseUrl/", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListDeploymentConfigs"
payload = { "nextToken": "" }
headers = {
"x-amz-target": "",
"content-type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListDeploymentConfigs"
payload <- "{\n \"nextToken\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, add_headers('x-amz-target' = ''), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListDeploymentConfigs")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-amz-target"] = ''
request["content-type"] = 'application/json'
request.body = "{\n \"nextToken\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/') do |req|
req.headers['x-amz-target'] = ''
req.body = "{\n \"nextToken\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListDeploymentConfigs";
let payload = json!({"nextToken": ""});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("x-amz-target", "".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListDeploymentConfigs' \
--header 'content-type: application/json' \
--header 'x-amz-target: ' \
--data '{
"nextToken": ""
}'
echo '{
"nextToken": ""
}' | \
http POST '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListDeploymentConfigs' \
content-type:application/json \
x-amz-target:''
wget --quiet \
--method POST \
--header 'x-amz-target: ' \
--header 'content-type: application/json' \
--body-data '{\n "nextToken": ""\n}' \
--output-document \
- '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListDeploymentConfigs'
import Foundation
let headers = [
"x-amz-target": "",
"content-type": "application/json"
]
let parameters = ["nextToken": ""] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListDeploymentConfigs")! 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
ListDeploymentGroups
{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListDeploymentGroups
HEADERS
X-Amz-Target
BODY json
{
"applicationName": "",
"nextToken": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListDeploymentGroups");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-amz-target: ");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"applicationName\": \"\",\n \"nextToken\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListDeploymentGroups" {:headers {:x-amz-target ""}
:content-type :json
:form-params {:applicationName ""
:nextToken ""}})
require "http/client"
url = "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListDeploymentGroups"
headers = HTTP::Headers{
"x-amz-target" => ""
"content-type" => "application/json"
}
reqBody = "{\n \"applicationName\": \"\",\n \"nextToken\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListDeploymentGroups"),
Headers =
{
{ "x-amz-target", "" },
},
Content = new StringContent("{\n \"applicationName\": \"\",\n \"nextToken\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListDeploymentGroups");
var request = new RestRequest("", Method.Post);
request.AddHeader("x-amz-target", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"applicationName\": \"\",\n \"nextToken\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListDeploymentGroups"
payload := strings.NewReader("{\n \"applicationName\": \"\",\n \"nextToken\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-amz-target", "")
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/ HTTP/1.1
X-Amz-Target:
Content-Type: application/json
Host: example.com
Content-Length: 46
{
"applicationName": "",
"nextToken": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListDeploymentGroups")
.setHeader("x-amz-target", "")
.setHeader("content-type", "application/json")
.setBody("{\n \"applicationName\": \"\",\n \"nextToken\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListDeploymentGroups"))
.header("x-amz-target", "")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"applicationName\": \"\",\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 \"applicationName\": \"\",\n \"nextToken\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListDeploymentGroups")
.post(body)
.addHeader("x-amz-target", "")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListDeploymentGroups")
.header("x-amz-target", "")
.header("content-type", "application/json")
.body("{\n \"applicationName\": \"\",\n \"nextToken\": \"\"\n}")
.asString();
const data = JSON.stringify({
applicationName: '',
nextToken: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListDeploymentGroups');
xhr.setRequestHeader('x-amz-target', '');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListDeploymentGroups',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {applicationName: '', nextToken: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListDeploymentGroups';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"applicationName":"","nextToken":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListDeploymentGroups',
method: 'POST',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
},
processData: false,
data: '{\n "applicationName": "",\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 \"applicationName\": \"\",\n \"nextToken\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListDeploymentGroups")
.post(body)
.addHeader("x-amz-target", "")
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({applicationName: '', nextToken: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListDeploymentGroups',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: {applicationName: '', nextToken: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListDeploymentGroups');
req.headers({
'x-amz-target': '',
'content-type': 'application/json'
});
req.type('json');
req.send({
applicationName: '',
nextToken: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListDeploymentGroups',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {applicationName: '', nextToken: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListDeploymentGroups';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"applicationName":"","nextToken":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"x-amz-target": @"",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"applicationName": @"",
@"nextToken": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListDeploymentGroups"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListDeploymentGroups" in
let headers = Header.add_list (Header.init ()) [
("x-amz-target", "");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"applicationName\": \"\",\n \"nextToken\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListDeploymentGroups",
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([
'applicationName' => '',
'nextToken' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json",
"x-amz-target: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListDeploymentGroups', [
'body' => '{
"applicationName": "",
"nextToken": ""
}',
'headers' => [
'content-type' => 'application/json',
'x-amz-target' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListDeploymentGroups');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'applicationName' => '',
'nextToken' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'applicationName' => '',
'nextToken' => ''
]));
$request->setRequestUrl('{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListDeploymentGroups');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListDeploymentGroups' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"applicationName": "",
"nextToken": ""
}'
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListDeploymentGroups' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"applicationName": "",
"nextToken": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"applicationName\": \"\",\n \"nextToken\": \"\"\n}"
headers = {
'x-amz-target': "",
'content-type': "application/json"
}
conn.request("POST", "/baseUrl/", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListDeploymentGroups"
payload = {
"applicationName": "",
"nextToken": ""
}
headers = {
"x-amz-target": "",
"content-type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListDeploymentGroups"
payload <- "{\n \"applicationName\": \"\",\n \"nextToken\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, add_headers('x-amz-target' = ''), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListDeploymentGroups")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-amz-target"] = ''
request["content-type"] = 'application/json'
request.body = "{\n \"applicationName\": \"\",\n \"nextToken\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/') do |req|
req.headers['x-amz-target'] = ''
req.body = "{\n \"applicationName\": \"\",\n \"nextToken\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListDeploymentGroups";
let payload = json!({
"applicationName": "",
"nextToken": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("x-amz-target", "".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListDeploymentGroups' \
--header 'content-type: application/json' \
--header 'x-amz-target: ' \
--data '{
"applicationName": "",
"nextToken": ""
}'
echo '{
"applicationName": "",
"nextToken": ""
}' | \
http POST '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListDeploymentGroups' \
content-type:application/json \
x-amz-target:''
wget --quiet \
--method POST \
--header 'x-amz-target: ' \
--header 'content-type: application/json' \
--body-data '{\n "applicationName": "",\n "nextToken": ""\n}' \
--output-document \
- '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListDeploymentGroups'
import Foundation
let headers = [
"x-amz-target": "",
"content-type": "application/json"
]
let parameters = [
"applicationName": "",
"nextToken": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListDeploymentGroups")! 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
ListDeploymentInstances
{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListDeploymentInstances
HEADERS
X-Amz-Target
BODY json
{
"deploymentId": "",
"nextToken": "",
"instanceStatusFilter": "",
"instanceTypeFilter": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListDeploymentInstances");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-amz-target: ");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"deploymentId\": \"\",\n \"nextToken\": \"\",\n \"instanceStatusFilter\": \"\",\n \"instanceTypeFilter\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListDeploymentInstances" {:headers {:x-amz-target ""}
:content-type :json
:form-params {:deploymentId ""
:nextToken ""
:instanceStatusFilter ""
:instanceTypeFilter ""}})
require "http/client"
url = "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListDeploymentInstances"
headers = HTTP::Headers{
"x-amz-target" => ""
"content-type" => "application/json"
}
reqBody = "{\n \"deploymentId\": \"\",\n \"nextToken\": \"\",\n \"instanceStatusFilter\": \"\",\n \"instanceTypeFilter\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListDeploymentInstances"),
Headers =
{
{ "x-amz-target", "" },
},
Content = new StringContent("{\n \"deploymentId\": \"\",\n \"nextToken\": \"\",\n \"instanceStatusFilter\": \"\",\n \"instanceTypeFilter\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListDeploymentInstances");
var request = new RestRequest("", Method.Post);
request.AddHeader("x-amz-target", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"deploymentId\": \"\",\n \"nextToken\": \"\",\n \"instanceStatusFilter\": \"\",\n \"instanceTypeFilter\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListDeploymentInstances"
payload := strings.NewReader("{\n \"deploymentId\": \"\",\n \"nextToken\": \"\",\n \"instanceStatusFilter\": \"\",\n \"instanceTypeFilter\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-amz-target", "")
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/ HTTP/1.1
X-Amz-Target:
Content-Type: application/json
Host: example.com
Content-Length: 101
{
"deploymentId": "",
"nextToken": "",
"instanceStatusFilter": "",
"instanceTypeFilter": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListDeploymentInstances")
.setHeader("x-amz-target", "")
.setHeader("content-type", "application/json")
.setBody("{\n \"deploymentId\": \"\",\n \"nextToken\": \"\",\n \"instanceStatusFilter\": \"\",\n \"instanceTypeFilter\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListDeploymentInstances"))
.header("x-amz-target", "")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"deploymentId\": \"\",\n \"nextToken\": \"\",\n \"instanceStatusFilter\": \"\",\n \"instanceTypeFilter\": \"\"\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 \"deploymentId\": \"\",\n \"nextToken\": \"\",\n \"instanceStatusFilter\": \"\",\n \"instanceTypeFilter\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListDeploymentInstances")
.post(body)
.addHeader("x-amz-target", "")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListDeploymentInstances")
.header("x-amz-target", "")
.header("content-type", "application/json")
.body("{\n \"deploymentId\": \"\",\n \"nextToken\": \"\",\n \"instanceStatusFilter\": \"\",\n \"instanceTypeFilter\": \"\"\n}")
.asString();
const data = JSON.stringify({
deploymentId: '',
nextToken: '',
instanceStatusFilter: '',
instanceTypeFilter: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListDeploymentInstances');
xhr.setRequestHeader('x-amz-target', '');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListDeploymentInstances',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {
deploymentId: '',
nextToken: '',
instanceStatusFilter: '',
instanceTypeFilter: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListDeploymentInstances';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"deploymentId":"","nextToken":"","instanceStatusFilter":"","instanceTypeFilter":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListDeploymentInstances',
method: 'POST',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
},
processData: false,
data: '{\n "deploymentId": "",\n "nextToken": "",\n "instanceStatusFilter": "",\n "instanceTypeFilter": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"deploymentId\": \"\",\n \"nextToken\": \"\",\n \"instanceStatusFilter\": \"\",\n \"instanceTypeFilter\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListDeploymentInstances")
.post(body)
.addHeader("x-amz-target", "")
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
deploymentId: '',
nextToken: '',
instanceStatusFilter: '',
instanceTypeFilter: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListDeploymentInstances',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: {
deploymentId: '',
nextToken: '',
instanceStatusFilter: '',
instanceTypeFilter: ''
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListDeploymentInstances');
req.headers({
'x-amz-target': '',
'content-type': 'application/json'
});
req.type('json');
req.send({
deploymentId: '',
nextToken: '',
instanceStatusFilter: '',
instanceTypeFilter: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListDeploymentInstances',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {
deploymentId: '',
nextToken: '',
instanceStatusFilter: '',
instanceTypeFilter: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListDeploymentInstances';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"deploymentId":"","nextToken":"","instanceStatusFilter":"","instanceTypeFilter":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"x-amz-target": @"",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"deploymentId": @"",
@"nextToken": @"",
@"instanceStatusFilter": @"",
@"instanceTypeFilter": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListDeploymentInstances"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListDeploymentInstances" in
let headers = Header.add_list (Header.init ()) [
("x-amz-target", "");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"deploymentId\": \"\",\n \"nextToken\": \"\",\n \"instanceStatusFilter\": \"\",\n \"instanceTypeFilter\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListDeploymentInstances",
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([
'deploymentId' => '',
'nextToken' => '',
'instanceStatusFilter' => '',
'instanceTypeFilter' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json",
"x-amz-target: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListDeploymentInstances', [
'body' => '{
"deploymentId": "",
"nextToken": "",
"instanceStatusFilter": "",
"instanceTypeFilter": ""
}',
'headers' => [
'content-type' => 'application/json',
'x-amz-target' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListDeploymentInstances');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'deploymentId' => '',
'nextToken' => '',
'instanceStatusFilter' => '',
'instanceTypeFilter' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'deploymentId' => '',
'nextToken' => '',
'instanceStatusFilter' => '',
'instanceTypeFilter' => ''
]));
$request->setRequestUrl('{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListDeploymentInstances');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListDeploymentInstances' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"deploymentId": "",
"nextToken": "",
"instanceStatusFilter": "",
"instanceTypeFilter": ""
}'
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListDeploymentInstances' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"deploymentId": "",
"nextToken": "",
"instanceStatusFilter": "",
"instanceTypeFilter": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"deploymentId\": \"\",\n \"nextToken\": \"\",\n \"instanceStatusFilter\": \"\",\n \"instanceTypeFilter\": \"\"\n}"
headers = {
'x-amz-target': "",
'content-type': "application/json"
}
conn.request("POST", "/baseUrl/", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListDeploymentInstances"
payload = {
"deploymentId": "",
"nextToken": "",
"instanceStatusFilter": "",
"instanceTypeFilter": ""
}
headers = {
"x-amz-target": "",
"content-type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListDeploymentInstances"
payload <- "{\n \"deploymentId\": \"\",\n \"nextToken\": \"\",\n \"instanceStatusFilter\": \"\",\n \"instanceTypeFilter\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, add_headers('x-amz-target' = ''), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListDeploymentInstances")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-amz-target"] = ''
request["content-type"] = 'application/json'
request.body = "{\n \"deploymentId\": \"\",\n \"nextToken\": \"\",\n \"instanceStatusFilter\": \"\",\n \"instanceTypeFilter\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/') do |req|
req.headers['x-amz-target'] = ''
req.body = "{\n \"deploymentId\": \"\",\n \"nextToken\": \"\",\n \"instanceStatusFilter\": \"\",\n \"instanceTypeFilter\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListDeploymentInstances";
let payload = json!({
"deploymentId": "",
"nextToken": "",
"instanceStatusFilter": "",
"instanceTypeFilter": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("x-amz-target", "".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListDeploymentInstances' \
--header 'content-type: application/json' \
--header 'x-amz-target: ' \
--data '{
"deploymentId": "",
"nextToken": "",
"instanceStatusFilter": "",
"instanceTypeFilter": ""
}'
echo '{
"deploymentId": "",
"nextToken": "",
"instanceStatusFilter": "",
"instanceTypeFilter": ""
}' | \
http POST '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListDeploymentInstances' \
content-type:application/json \
x-amz-target:''
wget --quiet \
--method POST \
--header 'x-amz-target: ' \
--header 'content-type: application/json' \
--body-data '{\n "deploymentId": "",\n "nextToken": "",\n "instanceStatusFilter": "",\n "instanceTypeFilter": ""\n}' \
--output-document \
- '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListDeploymentInstances'
import Foundation
let headers = [
"x-amz-target": "",
"content-type": "application/json"
]
let parameters = [
"deploymentId": "",
"nextToken": "",
"instanceStatusFilter": "",
"instanceTypeFilter": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListDeploymentInstances")! 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
ListDeploymentTargets
{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListDeploymentTargets
HEADERS
X-Amz-Target
BODY json
{
"deploymentId": "",
"nextToken": "",
"targetFilters": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListDeploymentTargets");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-amz-target: ");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"deploymentId\": \"\",\n \"nextToken\": \"\",\n \"targetFilters\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListDeploymentTargets" {:headers {:x-amz-target ""}
:content-type :json
:form-params {:deploymentId ""
:nextToken ""
:targetFilters ""}})
require "http/client"
url = "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListDeploymentTargets"
headers = HTTP::Headers{
"x-amz-target" => ""
"content-type" => "application/json"
}
reqBody = "{\n \"deploymentId\": \"\",\n \"nextToken\": \"\",\n \"targetFilters\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListDeploymentTargets"),
Headers =
{
{ "x-amz-target", "" },
},
Content = new StringContent("{\n \"deploymentId\": \"\",\n \"nextToken\": \"\",\n \"targetFilters\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListDeploymentTargets");
var request = new RestRequest("", Method.Post);
request.AddHeader("x-amz-target", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"deploymentId\": \"\",\n \"nextToken\": \"\",\n \"targetFilters\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListDeploymentTargets"
payload := strings.NewReader("{\n \"deploymentId\": \"\",\n \"nextToken\": \"\",\n \"targetFilters\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-amz-target", "")
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/ HTTP/1.1
X-Amz-Target:
Content-Type: application/json
Host: example.com
Content-Length: 66
{
"deploymentId": "",
"nextToken": "",
"targetFilters": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListDeploymentTargets")
.setHeader("x-amz-target", "")
.setHeader("content-type", "application/json")
.setBody("{\n \"deploymentId\": \"\",\n \"nextToken\": \"\",\n \"targetFilters\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListDeploymentTargets"))
.header("x-amz-target", "")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"deploymentId\": \"\",\n \"nextToken\": \"\",\n \"targetFilters\": \"\"\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 \"deploymentId\": \"\",\n \"nextToken\": \"\",\n \"targetFilters\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListDeploymentTargets")
.post(body)
.addHeader("x-amz-target", "")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListDeploymentTargets")
.header("x-amz-target", "")
.header("content-type", "application/json")
.body("{\n \"deploymentId\": \"\",\n \"nextToken\": \"\",\n \"targetFilters\": \"\"\n}")
.asString();
const data = JSON.stringify({
deploymentId: '',
nextToken: '',
targetFilters: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListDeploymentTargets');
xhr.setRequestHeader('x-amz-target', '');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListDeploymentTargets',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {deploymentId: '', nextToken: '', targetFilters: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListDeploymentTargets';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"deploymentId":"","nextToken":"","targetFilters":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListDeploymentTargets',
method: 'POST',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
},
processData: false,
data: '{\n "deploymentId": "",\n "nextToken": "",\n "targetFilters": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"deploymentId\": \"\",\n \"nextToken\": \"\",\n \"targetFilters\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListDeploymentTargets")
.post(body)
.addHeader("x-amz-target", "")
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({deploymentId: '', nextToken: '', targetFilters: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListDeploymentTargets',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: {deploymentId: '', nextToken: '', targetFilters: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListDeploymentTargets');
req.headers({
'x-amz-target': '',
'content-type': 'application/json'
});
req.type('json');
req.send({
deploymentId: '',
nextToken: '',
targetFilters: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListDeploymentTargets',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {deploymentId: '', nextToken: '', targetFilters: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListDeploymentTargets';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"deploymentId":"","nextToken":"","targetFilters":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"x-amz-target": @"",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"deploymentId": @"",
@"nextToken": @"",
@"targetFilters": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListDeploymentTargets"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListDeploymentTargets" in
let headers = Header.add_list (Header.init ()) [
("x-amz-target", "");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"deploymentId\": \"\",\n \"nextToken\": \"\",\n \"targetFilters\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListDeploymentTargets",
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([
'deploymentId' => '',
'nextToken' => '',
'targetFilters' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json",
"x-amz-target: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListDeploymentTargets', [
'body' => '{
"deploymentId": "",
"nextToken": "",
"targetFilters": ""
}',
'headers' => [
'content-type' => 'application/json',
'x-amz-target' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListDeploymentTargets');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'deploymentId' => '',
'nextToken' => '',
'targetFilters' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'deploymentId' => '',
'nextToken' => '',
'targetFilters' => ''
]));
$request->setRequestUrl('{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListDeploymentTargets');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListDeploymentTargets' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"deploymentId": "",
"nextToken": "",
"targetFilters": ""
}'
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListDeploymentTargets' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"deploymentId": "",
"nextToken": "",
"targetFilters": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"deploymentId\": \"\",\n \"nextToken\": \"\",\n \"targetFilters\": \"\"\n}"
headers = {
'x-amz-target': "",
'content-type': "application/json"
}
conn.request("POST", "/baseUrl/", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListDeploymentTargets"
payload = {
"deploymentId": "",
"nextToken": "",
"targetFilters": ""
}
headers = {
"x-amz-target": "",
"content-type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListDeploymentTargets"
payload <- "{\n \"deploymentId\": \"\",\n \"nextToken\": \"\",\n \"targetFilters\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, add_headers('x-amz-target' = ''), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListDeploymentTargets")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-amz-target"] = ''
request["content-type"] = 'application/json'
request.body = "{\n \"deploymentId\": \"\",\n \"nextToken\": \"\",\n \"targetFilters\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/') do |req|
req.headers['x-amz-target'] = ''
req.body = "{\n \"deploymentId\": \"\",\n \"nextToken\": \"\",\n \"targetFilters\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListDeploymentTargets";
let payload = json!({
"deploymentId": "",
"nextToken": "",
"targetFilters": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("x-amz-target", "".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListDeploymentTargets' \
--header 'content-type: application/json' \
--header 'x-amz-target: ' \
--data '{
"deploymentId": "",
"nextToken": "",
"targetFilters": ""
}'
echo '{
"deploymentId": "",
"nextToken": "",
"targetFilters": ""
}' | \
http POST '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListDeploymentTargets' \
content-type:application/json \
x-amz-target:''
wget --quiet \
--method POST \
--header 'x-amz-target: ' \
--header 'content-type: application/json' \
--body-data '{\n "deploymentId": "",\n "nextToken": "",\n "targetFilters": ""\n}' \
--output-document \
- '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListDeploymentTargets'
import Foundation
let headers = [
"x-amz-target": "",
"content-type": "application/json"
]
let parameters = [
"deploymentId": "",
"nextToken": "",
"targetFilters": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListDeploymentTargets")! 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
ListDeployments
{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListDeployments
HEADERS
X-Amz-Target
BODY json
{
"applicationName": "",
"deploymentGroupName": "",
"externalId": "",
"includeOnlyStatuses": "",
"createTimeRange": "",
"nextToken": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListDeployments");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-amz-target: ");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"applicationName\": \"\",\n \"deploymentGroupName\": \"\",\n \"externalId\": \"\",\n \"includeOnlyStatuses\": \"\",\n \"createTimeRange\": \"\",\n \"nextToken\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListDeployments" {:headers {:x-amz-target ""}
:content-type :json
:form-params {:applicationName ""
:deploymentGroupName ""
:externalId ""
:includeOnlyStatuses ""
:createTimeRange ""
:nextToken ""}})
require "http/client"
url = "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListDeployments"
headers = HTTP::Headers{
"x-amz-target" => ""
"content-type" => "application/json"
}
reqBody = "{\n \"applicationName\": \"\",\n \"deploymentGroupName\": \"\",\n \"externalId\": \"\",\n \"includeOnlyStatuses\": \"\",\n \"createTimeRange\": \"\",\n \"nextToken\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListDeployments"),
Headers =
{
{ "x-amz-target", "" },
},
Content = new StringContent("{\n \"applicationName\": \"\",\n \"deploymentGroupName\": \"\",\n \"externalId\": \"\",\n \"includeOnlyStatuses\": \"\",\n \"createTimeRange\": \"\",\n \"nextToken\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListDeployments");
var request = new RestRequest("", Method.Post);
request.AddHeader("x-amz-target", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"applicationName\": \"\",\n \"deploymentGroupName\": \"\",\n \"externalId\": \"\",\n \"includeOnlyStatuses\": \"\",\n \"createTimeRange\": \"\",\n \"nextToken\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListDeployments"
payload := strings.NewReader("{\n \"applicationName\": \"\",\n \"deploymentGroupName\": \"\",\n \"externalId\": \"\",\n \"includeOnlyStatuses\": \"\",\n \"createTimeRange\": \"\",\n \"nextToken\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-amz-target", "")
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/ HTTP/1.1
X-Amz-Target:
Content-Type: application/json
Host: example.com
Content-Length: 149
{
"applicationName": "",
"deploymentGroupName": "",
"externalId": "",
"includeOnlyStatuses": "",
"createTimeRange": "",
"nextToken": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListDeployments")
.setHeader("x-amz-target", "")
.setHeader("content-type", "application/json")
.setBody("{\n \"applicationName\": \"\",\n \"deploymentGroupName\": \"\",\n \"externalId\": \"\",\n \"includeOnlyStatuses\": \"\",\n \"createTimeRange\": \"\",\n \"nextToken\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListDeployments"))
.header("x-amz-target", "")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"applicationName\": \"\",\n \"deploymentGroupName\": \"\",\n \"externalId\": \"\",\n \"includeOnlyStatuses\": \"\",\n \"createTimeRange\": \"\",\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 \"applicationName\": \"\",\n \"deploymentGroupName\": \"\",\n \"externalId\": \"\",\n \"includeOnlyStatuses\": \"\",\n \"createTimeRange\": \"\",\n \"nextToken\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListDeployments")
.post(body)
.addHeader("x-amz-target", "")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListDeployments")
.header("x-amz-target", "")
.header("content-type", "application/json")
.body("{\n \"applicationName\": \"\",\n \"deploymentGroupName\": \"\",\n \"externalId\": \"\",\n \"includeOnlyStatuses\": \"\",\n \"createTimeRange\": \"\",\n \"nextToken\": \"\"\n}")
.asString();
const data = JSON.stringify({
applicationName: '',
deploymentGroupName: '',
externalId: '',
includeOnlyStatuses: '',
createTimeRange: '',
nextToken: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListDeployments');
xhr.setRequestHeader('x-amz-target', '');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListDeployments',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {
applicationName: '',
deploymentGroupName: '',
externalId: '',
includeOnlyStatuses: '',
createTimeRange: '',
nextToken: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListDeployments';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"applicationName":"","deploymentGroupName":"","externalId":"","includeOnlyStatuses":"","createTimeRange":"","nextToken":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListDeployments',
method: 'POST',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
},
processData: false,
data: '{\n "applicationName": "",\n "deploymentGroupName": "",\n "externalId": "",\n "includeOnlyStatuses": "",\n "createTimeRange": "",\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 \"applicationName\": \"\",\n \"deploymentGroupName\": \"\",\n \"externalId\": \"\",\n \"includeOnlyStatuses\": \"\",\n \"createTimeRange\": \"\",\n \"nextToken\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListDeployments")
.post(body)
.addHeader("x-amz-target", "")
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
applicationName: '',
deploymentGroupName: '',
externalId: '',
includeOnlyStatuses: '',
createTimeRange: '',
nextToken: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListDeployments',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: {
applicationName: '',
deploymentGroupName: '',
externalId: '',
includeOnlyStatuses: '',
createTimeRange: '',
nextToken: ''
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListDeployments');
req.headers({
'x-amz-target': '',
'content-type': 'application/json'
});
req.type('json');
req.send({
applicationName: '',
deploymentGroupName: '',
externalId: '',
includeOnlyStatuses: '',
createTimeRange: '',
nextToken: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListDeployments',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {
applicationName: '',
deploymentGroupName: '',
externalId: '',
includeOnlyStatuses: '',
createTimeRange: '',
nextToken: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListDeployments';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"applicationName":"","deploymentGroupName":"","externalId":"","includeOnlyStatuses":"","createTimeRange":"","nextToken":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"x-amz-target": @"",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"applicationName": @"",
@"deploymentGroupName": @"",
@"externalId": @"",
@"includeOnlyStatuses": @"",
@"createTimeRange": @"",
@"nextToken": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListDeployments"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListDeployments" in
let headers = Header.add_list (Header.init ()) [
("x-amz-target", "");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"applicationName\": \"\",\n \"deploymentGroupName\": \"\",\n \"externalId\": \"\",\n \"includeOnlyStatuses\": \"\",\n \"createTimeRange\": \"\",\n \"nextToken\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListDeployments",
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([
'applicationName' => '',
'deploymentGroupName' => '',
'externalId' => '',
'includeOnlyStatuses' => '',
'createTimeRange' => '',
'nextToken' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json",
"x-amz-target: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListDeployments', [
'body' => '{
"applicationName": "",
"deploymentGroupName": "",
"externalId": "",
"includeOnlyStatuses": "",
"createTimeRange": "",
"nextToken": ""
}',
'headers' => [
'content-type' => 'application/json',
'x-amz-target' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListDeployments');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'applicationName' => '',
'deploymentGroupName' => '',
'externalId' => '',
'includeOnlyStatuses' => '',
'createTimeRange' => '',
'nextToken' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'applicationName' => '',
'deploymentGroupName' => '',
'externalId' => '',
'includeOnlyStatuses' => '',
'createTimeRange' => '',
'nextToken' => ''
]));
$request->setRequestUrl('{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListDeployments');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListDeployments' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"applicationName": "",
"deploymentGroupName": "",
"externalId": "",
"includeOnlyStatuses": "",
"createTimeRange": "",
"nextToken": ""
}'
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListDeployments' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"applicationName": "",
"deploymentGroupName": "",
"externalId": "",
"includeOnlyStatuses": "",
"createTimeRange": "",
"nextToken": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"applicationName\": \"\",\n \"deploymentGroupName\": \"\",\n \"externalId\": \"\",\n \"includeOnlyStatuses\": \"\",\n \"createTimeRange\": \"\",\n \"nextToken\": \"\"\n}"
headers = {
'x-amz-target': "",
'content-type': "application/json"
}
conn.request("POST", "/baseUrl/", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListDeployments"
payload = {
"applicationName": "",
"deploymentGroupName": "",
"externalId": "",
"includeOnlyStatuses": "",
"createTimeRange": "",
"nextToken": ""
}
headers = {
"x-amz-target": "",
"content-type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListDeployments"
payload <- "{\n \"applicationName\": \"\",\n \"deploymentGroupName\": \"\",\n \"externalId\": \"\",\n \"includeOnlyStatuses\": \"\",\n \"createTimeRange\": \"\",\n \"nextToken\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, add_headers('x-amz-target' = ''), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListDeployments")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-amz-target"] = ''
request["content-type"] = 'application/json'
request.body = "{\n \"applicationName\": \"\",\n \"deploymentGroupName\": \"\",\n \"externalId\": \"\",\n \"includeOnlyStatuses\": \"\",\n \"createTimeRange\": \"\",\n \"nextToken\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/') do |req|
req.headers['x-amz-target'] = ''
req.body = "{\n \"applicationName\": \"\",\n \"deploymentGroupName\": \"\",\n \"externalId\": \"\",\n \"includeOnlyStatuses\": \"\",\n \"createTimeRange\": \"\",\n \"nextToken\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListDeployments";
let payload = json!({
"applicationName": "",
"deploymentGroupName": "",
"externalId": "",
"includeOnlyStatuses": "",
"createTimeRange": "",
"nextToken": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("x-amz-target", "".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListDeployments' \
--header 'content-type: application/json' \
--header 'x-amz-target: ' \
--data '{
"applicationName": "",
"deploymentGroupName": "",
"externalId": "",
"includeOnlyStatuses": "",
"createTimeRange": "",
"nextToken": ""
}'
echo '{
"applicationName": "",
"deploymentGroupName": "",
"externalId": "",
"includeOnlyStatuses": "",
"createTimeRange": "",
"nextToken": ""
}' | \
http POST '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListDeployments' \
content-type:application/json \
x-amz-target:''
wget --quiet \
--method POST \
--header 'x-amz-target: ' \
--header 'content-type: application/json' \
--body-data '{\n "applicationName": "",\n "deploymentGroupName": "",\n "externalId": "",\n "includeOnlyStatuses": "",\n "createTimeRange": "",\n "nextToken": ""\n}' \
--output-document \
- '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListDeployments'
import Foundation
let headers = [
"x-amz-target": "",
"content-type": "application/json"
]
let parameters = [
"applicationName": "",
"deploymentGroupName": "",
"externalId": "",
"includeOnlyStatuses": "",
"createTimeRange": "",
"nextToken": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListDeployments")! 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
ListGitHubAccountTokenNames
{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListGitHubAccountTokenNames
HEADERS
X-Amz-Target
BODY json
{
"nextToken": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListGitHubAccountTokenNames");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-amz-target: ");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"nextToken\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListGitHubAccountTokenNames" {:headers {:x-amz-target ""}
:content-type :json
:form-params {:nextToken ""}})
require "http/client"
url = "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListGitHubAccountTokenNames"
headers = HTTP::Headers{
"x-amz-target" => ""
"content-type" => "application/json"
}
reqBody = "{\n \"nextToken\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListGitHubAccountTokenNames"),
Headers =
{
{ "x-amz-target", "" },
},
Content = new StringContent("{\n \"nextToken\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListGitHubAccountTokenNames");
var request = new RestRequest("", Method.Post);
request.AddHeader("x-amz-target", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"nextToken\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListGitHubAccountTokenNames"
payload := strings.NewReader("{\n \"nextToken\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-amz-target", "")
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/ HTTP/1.1
X-Amz-Target:
Content-Type: application/json
Host: example.com
Content-Length: 21
{
"nextToken": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListGitHubAccountTokenNames")
.setHeader("x-amz-target", "")
.setHeader("content-type", "application/json")
.setBody("{\n \"nextToken\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListGitHubAccountTokenNames"))
.header("x-amz-target", "")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"nextToken\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"nextToken\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListGitHubAccountTokenNames")
.post(body)
.addHeader("x-amz-target", "")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListGitHubAccountTokenNames")
.header("x-amz-target", "")
.header("content-type", "application/json")
.body("{\n \"nextToken\": \"\"\n}")
.asString();
const data = JSON.stringify({
nextToken: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListGitHubAccountTokenNames');
xhr.setRequestHeader('x-amz-target', '');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListGitHubAccountTokenNames',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {nextToken: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListGitHubAccountTokenNames';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"nextToken":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListGitHubAccountTokenNames',
method: 'POST',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
},
processData: false,
data: '{\n "nextToken": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"nextToken\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListGitHubAccountTokenNames")
.post(body)
.addHeader("x-amz-target", "")
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({nextToken: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListGitHubAccountTokenNames',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: {nextToken: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListGitHubAccountTokenNames');
req.headers({
'x-amz-target': '',
'content-type': 'application/json'
});
req.type('json');
req.send({
nextToken: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListGitHubAccountTokenNames',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {nextToken: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListGitHubAccountTokenNames';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"nextToken":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"x-amz-target": @"",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"nextToken": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListGitHubAccountTokenNames"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListGitHubAccountTokenNames" in
let headers = Header.add_list (Header.init ()) [
("x-amz-target", "");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"nextToken\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListGitHubAccountTokenNames",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'nextToken' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json",
"x-amz-target: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListGitHubAccountTokenNames', [
'body' => '{
"nextToken": ""
}',
'headers' => [
'content-type' => 'application/json',
'x-amz-target' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListGitHubAccountTokenNames');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'nextToken' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'nextToken' => ''
]));
$request->setRequestUrl('{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListGitHubAccountTokenNames');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListGitHubAccountTokenNames' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"nextToken": ""
}'
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListGitHubAccountTokenNames' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"nextToken": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"nextToken\": \"\"\n}"
headers = {
'x-amz-target': "",
'content-type': "application/json"
}
conn.request("POST", "/baseUrl/", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListGitHubAccountTokenNames"
payload = { "nextToken": "" }
headers = {
"x-amz-target": "",
"content-type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListGitHubAccountTokenNames"
payload <- "{\n \"nextToken\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, add_headers('x-amz-target' = ''), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListGitHubAccountTokenNames")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-amz-target"] = ''
request["content-type"] = 'application/json'
request.body = "{\n \"nextToken\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/') do |req|
req.headers['x-amz-target'] = ''
req.body = "{\n \"nextToken\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListGitHubAccountTokenNames";
let payload = json!({"nextToken": ""});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("x-amz-target", "".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListGitHubAccountTokenNames' \
--header 'content-type: application/json' \
--header 'x-amz-target: ' \
--data '{
"nextToken": ""
}'
echo '{
"nextToken": ""
}' | \
http POST '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListGitHubAccountTokenNames' \
content-type:application/json \
x-amz-target:''
wget --quiet \
--method POST \
--header 'x-amz-target: ' \
--header 'content-type: application/json' \
--body-data '{\n "nextToken": ""\n}' \
--output-document \
- '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListGitHubAccountTokenNames'
import Foundation
let headers = [
"x-amz-target": "",
"content-type": "application/json"
]
let parameters = ["nextToken": ""] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListGitHubAccountTokenNames")! 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
ListOnPremisesInstances
{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListOnPremisesInstances
HEADERS
X-Amz-Target
BODY json
{
"registrationStatus": "",
"tagFilters": "",
"nextToken": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListOnPremisesInstances");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-amz-target: ");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"registrationStatus\": \"\",\n \"tagFilters\": \"\",\n \"nextToken\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListOnPremisesInstances" {:headers {:x-amz-target ""}
:content-type :json
:form-params {:registrationStatus ""
:tagFilters ""
:nextToken ""}})
require "http/client"
url = "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListOnPremisesInstances"
headers = HTTP::Headers{
"x-amz-target" => ""
"content-type" => "application/json"
}
reqBody = "{\n \"registrationStatus\": \"\",\n \"tagFilters\": \"\",\n \"nextToken\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListOnPremisesInstances"),
Headers =
{
{ "x-amz-target", "" },
},
Content = new StringContent("{\n \"registrationStatus\": \"\",\n \"tagFilters\": \"\",\n \"nextToken\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListOnPremisesInstances");
var request = new RestRequest("", Method.Post);
request.AddHeader("x-amz-target", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"registrationStatus\": \"\",\n \"tagFilters\": \"\",\n \"nextToken\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListOnPremisesInstances"
payload := strings.NewReader("{\n \"registrationStatus\": \"\",\n \"tagFilters\": \"\",\n \"nextToken\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-amz-target", "")
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/ HTTP/1.1
X-Amz-Target:
Content-Type: application/json
Host: example.com
Content-Length: 69
{
"registrationStatus": "",
"tagFilters": "",
"nextToken": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListOnPremisesInstances")
.setHeader("x-amz-target", "")
.setHeader("content-type", "application/json")
.setBody("{\n \"registrationStatus\": \"\",\n \"tagFilters\": \"\",\n \"nextToken\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListOnPremisesInstances"))
.header("x-amz-target", "")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"registrationStatus\": \"\",\n \"tagFilters\": \"\",\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 \"registrationStatus\": \"\",\n \"tagFilters\": \"\",\n \"nextToken\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListOnPremisesInstances")
.post(body)
.addHeader("x-amz-target", "")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListOnPremisesInstances")
.header("x-amz-target", "")
.header("content-type", "application/json")
.body("{\n \"registrationStatus\": \"\",\n \"tagFilters\": \"\",\n \"nextToken\": \"\"\n}")
.asString();
const data = JSON.stringify({
registrationStatus: '',
tagFilters: '',
nextToken: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListOnPremisesInstances');
xhr.setRequestHeader('x-amz-target', '');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListOnPremisesInstances',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {registrationStatus: '', tagFilters: '', nextToken: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListOnPremisesInstances';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"registrationStatus":"","tagFilters":"","nextToken":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListOnPremisesInstances',
method: 'POST',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
},
processData: false,
data: '{\n "registrationStatus": "",\n "tagFilters": "",\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 \"registrationStatus\": \"\",\n \"tagFilters\": \"\",\n \"nextToken\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListOnPremisesInstances")
.post(body)
.addHeader("x-amz-target", "")
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({registrationStatus: '', tagFilters: '', nextToken: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListOnPremisesInstances',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: {registrationStatus: '', tagFilters: '', nextToken: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListOnPremisesInstances');
req.headers({
'x-amz-target': '',
'content-type': 'application/json'
});
req.type('json');
req.send({
registrationStatus: '',
tagFilters: '',
nextToken: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListOnPremisesInstances',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {registrationStatus: '', tagFilters: '', nextToken: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListOnPremisesInstances';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"registrationStatus":"","tagFilters":"","nextToken":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"x-amz-target": @"",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"registrationStatus": @"",
@"tagFilters": @"",
@"nextToken": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListOnPremisesInstances"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListOnPremisesInstances" in
let headers = Header.add_list (Header.init ()) [
("x-amz-target", "");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"registrationStatus\": \"\",\n \"tagFilters\": \"\",\n \"nextToken\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListOnPremisesInstances",
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([
'registrationStatus' => '',
'tagFilters' => '',
'nextToken' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json",
"x-amz-target: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListOnPremisesInstances', [
'body' => '{
"registrationStatus": "",
"tagFilters": "",
"nextToken": ""
}',
'headers' => [
'content-type' => 'application/json',
'x-amz-target' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListOnPremisesInstances');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'registrationStatus' => '',
'tagFilters' => '',
'nextToken' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'registrationStatus' => '',
'tagFilters' => '',
'nextToken' => ''
]));
$request->setRequestUrl('{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListOnPremisesInstances');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListOnPremisesInstances' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"registrationStatus": "",
"tagFilters": "",
"nextToken": ""
}'
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListOnPremisesInstances' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"registrationStatus": "",
"tagFilters": "",
"nextToken": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"registrationStatus\": \"\",\n \"tagFilters\": \"\",\n \"nextToken\": \"\"\n}"
headers = {
'x-amz-target': "",
'content-type': "application/json"
}
conn.request("POST", "/baseUrl/", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListOnPremisesInstances"
payload = {
"registrationStatus": "",
"tagFilters": "",
"nextToken": ""
}
headers = {
"x-amz-target": "",
"content-type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListOnPremisesInstances"
payload <- "{\n \"registrationStatus\": \"\",\n \"tagFilters\": \"\",\n \"nextToken\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, add_headers('x-amz-target' = ''), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListOnPremisesInstances")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-amz-target"] = ''
request["content-type"] = 'application/json'
request.body = "{\n \"registrationStatus\": \"\",\n \"tagFilters\": \"\",\n \"nextToken\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/') do |req|
req.headers['x-amz-target'] = ''
req.body = "{\n \"registrationStatus\": \"\",\n \"tagFilters\": \"\",\n \"nextToken\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListOnPremisesInstances";
let payload = json!({
"registrationStatus": "",
"tagFilters": "",
"nextToken": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("x-amz-target", "".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListOnPremisesInstances' \
--header 'content-type: application/json' \
--header 'x-amz-target: ' \
--data '{
"registrationStatus": "",
"tagFilters": "",
"nextToken": ""
}'
echo '{
"registrationStatus": "",
"tagFilters": "",
"nextToken": ""
}' | \
http POST '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListOnPremisesInstances' \
content-type:application/json \
x-amz-target:''
wget --quiet \
--method POST \
--header 'x-amz-target: ' \
--header 'content-type: application/json' \
--body-data '{\n "registrationStatus": "",\n "tagFilters": "",\n "nextToken": ""\n}' \
--output-document \
- '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListOnPremisesInstances'
import Foundation
let headers = [
"x-amz-target": "",
"content-type": "application/json"
]
let parameters = [
"registrationStatus": "",
"tagFilters": "",
"nextToken": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListOnPremisesInstances")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
ListTagsForResource
{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListTagsForResource
HEADERS
X-Amz-Target
BODY json
{
"ResourceArn": "",
"NextToken": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListTagsForResource");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-amz-target: ");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"ResourceArn\": \"\",\n \"NextToken\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListTagsForResource" {:headers {:x-amz-target ""}
:content-type :json
:form-params {:ResourceArn ""
:NextToken ""}})
require "http/client"
url = "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListTagsForResource"
headers = HTTP::Headers{
"x-amz-target" => ""
"content-type" => "application/json"
}
reqBody = "{\n \"ResourceArn\": \"\",\n \"NextToken\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListTagsForResource"),
Headers =
{
{ "x-amz-target", "" },
},
Content = new StringContent("{\n \"ResourceArn\": \"\",\n \"NextToken\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListTagsForResource");
var request = new RestRequest("", Method.Post);
request.AddHeader("x-amz-target", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"ResourceArn\": \"\",\n \"NextToken\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListTagsForResource"
payload := strings.NewReader("{\n \"ResourceArn\": \"\",\n \"NextToken\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-amz-target", "")
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/ HTTP/1.1
X-Amz-Target:
Content-Type: application/json
Host: example.com
Content-Length: 42
{
"ResourceArn": "",
"NextToken": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListTagsForResource")
.setHeader("x-amz-target", "")
.setHeader("content-type", "application/json")
.setBody("{\n \"ResourceArn\": \"\",\n \"NextToken\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListTagsForResource"))
.header("x-amz-target", "")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"ResourceArn\": \"\",\n \"NextToken\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"ResourceArn\": \"\",\n \"NextToken\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListTagsForResource")
.post(body)
.addHeader("x-amz-target", "")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListTagsForResource")
.header("x-amz-target", "")
.header("content-type", "application/json")
.body("{\n \"ResourceArn\": \"\",\n \"NextToken\": \"\"\n}")
.asString();
const data = JSON.stringify({
ResourceArn: '',
NextToken: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListTagsForResource');
xhr.setRequestHeader('x-amz-target', '');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListTagsForResource',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {ResourceArn: '', NextToken: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListTagsForResource';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"ResourceArn":"","NextToken":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListTagsForResource',
method: 'POST',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
},
processData: false,
data: '{\n "ResourceArn": "",\n "NextToken": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"ResourceArn\": \"\",\n \"NextToken\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListTagsForResource")
.post(body)
.addHeader("x-amz-target", "")
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({ResourceArn: '', NextToken: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListTagsForResource',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: {ResourceArn: '', NextToken: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListTagsForResource');
req.headers({
'x-amz-target': '',
'content-type': 'application/json'
});
req.type('json');
req.send({
ResourceArn: '',
NextToken: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListTagsForResource',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {ResourceArn: '', NextToken: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListTagsForResource';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"ResourceArn":"","NextToken":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"x-amz-target": @"",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"ResourceArn": @"",
@"NextToken": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListTagsForResource"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListTagsForResource" in
let headers = Header.add_list (Header.init ()) [
("x-amz-target", "");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"ResourceArn\": \"\",\n \"NextToken\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListTagsForResource",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'ResourceArn' => '',
'NextToken' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json",
"x-amz-target: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListTagsForResource', [
'body' => '{
"ResourceArn": "",
"NextToken": ""
}',
'headers' => [
'content-type' => 'application/json',
'x-amz-target' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListTagsForResource');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'ResourceArn' => '',
'NextToken' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'ResourceArn' => '',
'NextToken' => ''
]));
$request->setRequestUrl('{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListTagsForResource');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListTagsForResource' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"ResourceArn": "",
"NextToken": ""
}'
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListTagsForResource' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"ResourceArn": "",
"NextToken": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"ResourceArn\": \"\",\n \"NextToken\": \"\"\n}"
headers = {
'x-amz-target': "",
'content-type': "application/json"
}
conn.request("POST", "/baseUrl/", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListTagsForResource"
payload = {
"ResourceArn": "",
"NextToken": ""
}
headers = {
"x-amz-target": "",
"content-type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListTagsForResource"
payload <- "{\n \"ResourceArn\": \"\",\n \"NextToken\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, add_headers('x-amz-target' = ''), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListTagsForResource")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-amz-target"] = ''
request["content-type"] = 'application/json'
request.body = "{\n \"ResourceArn\": \"\",\n \"NextToken\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/') do |req|
req.headers['x-amz-target'] = ''
req.body = "{\n \"ResourceArn\": \"\",\n \"NextToken\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListTagsForResource";
let payload = json!({
"ResourceArn": "",
"NextToken": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("x-amz-target", "".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListTagsForResource' \
--header 'content-type: application/json' \
--header 'x-amz-target: ' \
--data '{
"ResourceArn": "",
"NextToken": ""
}'
echo '{
"ResourceArn": "",
"NextToken": ""
}' | \
http POST '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListTagsForResource' \
content-type:application/json \
x-amz-target:''
wget --quiet \
--method POST \
--header 'x-amz-target: ' \
--header 'content-type: application/json' \
--body-data '{\n "ResourceArn": "",\n "NextToken": ""\n}' \
--output-document \
- '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListTagsForResource'
import Foundation
let headers = [
"x-amz-target": "",
"content-type": "application/json"
]
let parameters = [
"ResourceArn": "",
"NextToken": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.ListTagsForResource")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
PutLifecycleEventHookExecutionStatus
{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.PutLifecycleEventHookExecutionStatus
HEADERS
X-Amz-Target
BODY json
{
"deploymentId": "",
"lifecycleEventHookExecutionId": "",
"status": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.PutLifecycleEventHookExecutionStatus");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-amz-target: ");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"deploymentId\": \"\",\n \"lifecycleEventHookExecutionId\": \"\",\n \"status\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.PutLifecycleEventHookExecutionStatus" {:headers {:x-amz-target ""}
:content-type :json
:form-params {:deploymentId ""
:lifecycleEventHookExecutionId ""
:status ""}})
require "http/client"
url = "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.PutLifecycleEventHookExecutionStatus"
headers = HTTP::Headers{
"x-amz-target" => ""
"content-type" => "application/json"
}
reqBody = "{\n \"deploymentId\": \"\",\n \"lifecycleEventHookExecutionId\": \"\",\n \"status\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.PutLifecycleEventHookExecutionStatus"),
Headers =
{
{ "x-amz-target", "" },
},
Content = new StringContent("{\n \"deploymentId\": \"\",\n \"lifecycleEventHookExecutionId\": \"\",\n \"status\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.PutLifecycleEventHookExecutionStatus");
var request = new RestRequest("", Method.Post);
request.AddHeader("x-amz-target", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"deploymentId\": \"\",\n \"lifecycleEventHookExecutionId\": \"\",\n \"status\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.PutLifecycleEventHookExecutionStatus"
payload := strings.NewReader("{\n \"deploymentId\": \"\",\n \"lifecycleEventHookExecutionId\": \"\",\n \"status\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-amz-target", "")
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/ HTTP/1.1
X-Amz-Target:
Content-Type: application/json
Host: example.com
Content-Length: 79
{
"deploymentId": "",
"lifecycleEventHookExecutionId": "",
"status": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.PutLifecycleEventHookExecutionStatus")
.setHeader("x-amz-target", "")
.setHeader("content-type", "application/json")
.setBody("{\n \"deploymentId\": \"\",\n \"lifecycleEventHookExecutionId\": \"\",\n \"status\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.PutLifecycleEventHookExecutionStatus"))
.header("x-amz-target", "")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"deploymentId\": \"\",\n \"lifecycleEventHookExecutionId\": \"\",\n \"status\": \"\"\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 \"deploymentId\": \"\",\n \"lifecycleEventHookExecutionId\": \"\",\n \"status\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.PutLifecycleEventHookExecutionStatus")
.post(body)
.addHeader("x-amz-target", "")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.PutLifecycleEventHookExecutionStatus")
.header("x-amz-target", "")
.header("content-type", "application/json")
.body("{\n \"deploymentId\": \"\",\n \"lifecycleEventHookExecutionId\": \"\",\n \"status\": \"\"\n}")
.asString();
const data = JSON.stringify({
deploymentId: '',
lifecycleEventHookExecutionId: '',
status: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.PutLifecycleEventHookExecutionStatus');
xhr.setRequestHeader('x-amz-target', '');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.PutLifecycleEventHookExecutionStatus',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {deploymentId: '', lifecycleEventHookExecutionId: '', status: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.PutLifecycleEventHookExecutionStatus';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"deploymentId":"","lifecycleEventHookExecutionId":"","status":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.PutLifecycleEventHookExecutionStatus',
method: 'POST',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
},
processData: false,
data: '{\n "deploymentId": "",\n "lifecycleEventHookExecutionId": "",\n "status": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"deploymentId\": \"\",\n \"lifecycleEventHookExecutionId\": \"\",\n \"status\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.PutLifecycleEventHookExecutionStatus")
.post(body)
.addHeader("x-amz-target", "")
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({deploymentId: '', lifecycleEventHookExecutionId: '', status: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.PutLifecycleEventHookExecutionStatus',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: {deploymentId: '', lifecycleEventHookExecutionId: '', status: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.PutLifecycleEventHookExecutionStatus');
req.headers({
'x-amz-target': '',
'content-type': 'application/json'
});
req.type('json');
req.send({
deploymentId: '',
lifecycleEventHookExecutionId: '',
status: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.PutLifecycleEventHookExecutionStatus',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {deploymentId: '', lifecycleEventHookExecutionId: '', status: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.PutLifecycleEventHookExecutionStatus';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"deploymentId":"","lifecycleEventHookExecutionId":"","status":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"x-amz-target": @"",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"deploymentId": @"",
@"lifecycleEventHookExecutionId": @"",
@"status": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.PutLifecycleEventHookExecutionStatus"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.PutLifecycleEventHookExecutionStatus" in
let headers = Header.add_list (Header.init ()) [
("x-amz-target", "");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"deploymentId\": \"\",\n \"lifecycleEventHookExecutionId\": \"\",\n \"status\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.PutLifecycleEventHookExecutionStatus",
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([
'deploymentId' => '',
'lifecycleEventHookExecutionId' => '',
'status' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json",
"x-amz-target: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.PutLifecycleEventHookExecutionStatus', [
'body' => '{
"deploymentId": "",
"lifecycleEventHookExecutionId": "",
"status": ""
}',
'headers' => [
'content-type' => 'application/json',
'x-amz-target' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.PutLifecycleEventHookExecutionStatus');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'deploymentId' => '',
'lifecycleEventHookExecutionId' => '',
'status' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'deploymentId' => '',
'lifecycleEventHookExecutionId' => '',
'status' => ''
]));
$request->setRequestUrl('{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.PutLifecycleEventHookExecutionStatus');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.PutLifecycleEventHookExecutionStatus' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"deploymentId": "",
"lifecycleEventHookExecutionId": "",
"status": ""
}'
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.PutLifecycleEventHookExecutionStatus' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"deploymentId": "",
"lifecycleEventHookExecutionId": "",
"status": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"deploymentId\": \"\",\n \"lifecycleEventHookExecutionId\": \"\",\n \"status\": \"\"\n}"
headers = {
'x-amz-target': "",
'content-type': "application/json"
}
conn.request("POST", "/baseUrl/", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.PutLifecycleEventHookExecutionStatus"
payload = {
"deploymentId": "",
"lifecycleEventHookExecutionId": "",
"status": ""
}
headers = {
"x-amz-target": "",
"content-type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.PutLifecycleEventHookExecutionStatus"
payload <- "{\n \"deploymentId\": \"\",\n \"lifecycleEventHookExecutionId\": \"\",\n \"status\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, add_headers('x-amz-target' = ''), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.PutLifecycleEventHookExecutionStatus")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-amz-target"] = ''
request["content-type"] = 'application/json'
request.body = "{\n \"deploymentId\": \"\",\n \"lifecycleEventHookExecutionId\": \"\",\n \"status\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/') do |req|
req.headers['x-amz-target'] = ''
req.body = "{\n \"deploymentId\": \"\",\n \"lifecycleEventHookExecutionId\": \"\",\n \"status\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.PutLifecycleEventHookExecutionStatus";
let payload = json!({
"deploymentId": "",
"lifecycleEventHookExecutionId": "",
"status": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("x-amz-target", "".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.PutLifecycleEventHookExecutionStatus' \
--header 'content-type: application/json' \
--header 'x-amz-target: ' \
--data '{
"deploymentId": "",
"lifecycleEventHookExecutionId": "",
"status": ""
}'
echo '{
"deploymentId": "",
"lifecycleEventHookExecutionId": "",
"status": ""
}' | \
http POST '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.PutLifecycleEventHookExecutionStatus' \
content-type:application/json \
x-amz-target:''
wget --quiet \
--method POST \
--header 'x-amz-target: ' \
--header 'content-type: application/json' \
--body-data '{\n "deploymentId": "",\n "lifecycleEventHookExecutionId": "",\n "status": ""\n}' \
--output-document \
- '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.PutLifecycleEventHookExecutionStatus'
import Foundation
let headers = [
"x-amz-target": "",
"content-type": "application/json"
]
let parameters = [
"deploymentId": "",
"lifecycleEventHookExecutionId": "",
"status": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.PutLifecycleEventHookExecutionStatus")! 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
RegisterApplicationRevision
{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.RegisterApplicationRevision
HEADERS
X-Amz-Target
BODY json
{
"applicationName": "",
"description": "",
"revision": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.RegisterApplicationRevision");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-amz-target: ");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"applicationName\": \"\",\n \"description\": \"\",\n \"revision\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.RegisterApplicationRevision" {:headers {:x-amz-target ""}
:content-type :json
:form-params {:applicationName ""
:description ""
:revision ""}})
require "http/client"
url = "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.RegisterApplicationRevision"
headers = HTTP::Headers{
"x-amz-target" => ""
"content-type" => "application/json"
}
reqBody = "{\n \"applicationName\": \"\",\n \"description\": \"\",\n \"revision\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.RegisterApplicationRevision"),
Headers =
{
{ "x-amz-target", "" },
},
Content = new StringContent("{\n \"applicationName\": \"\",\n \"description\": \"\",\n \"revision\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.RegisterApplicationRevision");
var request = new RestRequest("", Method.Post);
request.AddHeader("x-amz-target", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"applicationName\": \"\",\n \"description\": \"\",\n \"revision\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.RegisterApplicationRevision"
payload := strings.NewReader("{\n \"applicationName\": \"\",\n \"description\": \"\",\n \"revision\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-amz-target", "")
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/ HTTP/1.1
X-Amz-Target:
Content-Type: application/json
Host: example.com
Content-Length: 66
{
"applicationName": "",
"description": "",
"revision": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.RegisterApplicationRevision")
.setHeader("x-amz-target", "")
.setHeader("content-type", "application/json")
.setBody("{\n \"applicationName\": \"\",\n \"description\": \"\",\n \"revision\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.RegisterApplicationRevision"))
.header("x-amz-target", "")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"applicationName\": \"\",\n \"description\": \"\",\n \"revision\": \"\"\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 \"applicationName\": \"\",\n \"description\": \"\",\n \"revision\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.RegisterApplicationRevision")
.post(body)
.addHeader("x-amz-target", "")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.RegisterApplicationRevision")
.header("x-amz-target", "")
.header("content-type", "application/json")
.body("{\n \"applicationName\": \"\",\n \"description\": \"\",\n \"revision\": \"\"\n}")
.asString();
const data = JSON.stringify({
applicationName: '',
description: '',
revision: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.RegisterApplicationRevision');
xhr.setRequestHeader('x-amz-target', '');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.RegisterApplicationRevision',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {applicationName: '', description: '', revision: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.RegisterApplicationRevision';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"applicationName":"","description":"","revision":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.RegisterApplicationRevision',
method: 'POST',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
},
processData: false,
data: '{\n "applicationName": "",\n "description": "",\n "revision": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"applicationName\": \"\",\n \"description\": \"\",\n \"revision\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.RegisterApplicationRevision")
.post(body)
.addHeader("x-amz-target", "")
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({applicationName: '', description: '', revision: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.RegisterApplicationRevision',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: {applicationName: '', description: '', revision: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.RegisterApplicationRevision');
req.headers({
'x-amz-target': '',
'content-type': 'application/json'
});
req.type('json');
req.send({
applicationName: '',
description: '',
revision: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.RegisterApplicationRevision',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {applicationName: '', description: '', revision: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.RegisterApplicationRevision';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"applicationName":"","description":"","revision":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"x-amz-target": @"",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"applicationName": @"",
@"description": @"",
@"revision": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.RegisterApplicationRevision"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.RegisterApplicationRevision" in
let headers = Header.add_list (Header.init ()) [
("x-amz-target", "");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"applicationName\": \"\",\n \"description\": \"\",\n \"revision\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.RegisterApplicationRevision",
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([
'applicationName' => '',
'description' => '',
'revision' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json",
"x-amz-target: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.RegisterApplicationRevision', [
'body' => '{
"applicationName": "",
"description": "",
"revision": ""
}',
'headers' => [
'content-type' => 'application/json',
'x-amz-target' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.RegisterApplicationRevision');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'applicationName' => '',
'description' => '',
'revision' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'applicationName' => '',
'description' => '',
'revision' => ''
]));
$request->setRequestUrl('{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.RegisterApplicationRevision');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.RegisterApplicationRevision' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"applicationName": "",
"description": "",
"revision": ""
}'
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.RegisterApplicationRevision' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"applicationName": "",
"description": "",
"revision": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"applicationName\": \"\",\n \"description\": \"\",\n \"revision\": \"\"\n}"
headers = {
'x-amz-target': "",
'content-type': "application/json"
}
conn.request("POST", "/baseUrl/", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.RegisterApplicationRevision"
payload = {
"applicationName": "",
"description": "",
"revision": ""
}
headers = {
"x-amz-target": "",
"content-type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.RegisterApplicationRevision"
payload <- "{\n \"applicationName\": \"\",\n \"description\": \"\",\n \"revision\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, add_headers('x-amz-target' = ''), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.RegisterApplicationRevision")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-amz-target"] = ''
request["content-type"] = 'application/json'
request.body = "{\n \"applicationName\": \"\",\n \"description\": \"\",\n \"revision\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/') do |req|
req.headers['x-amz-target'] = ''
req.body = "{\n \"applicationName\": \"\",\n \"description\": \"\",\n \"revision\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.RegisterApplicationRevision";
let payload = json!({
"applicationName": "",
"description": "",
"revision": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("x-amz-target", "".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.RegisterApplicationRevision' \
--header 'content-type: application/json' \
--header 'x-amz-target: ' \
--data '{
"applicationName": "",
"description": "",
"revision": ""
}'
echo '{
"applicationName": "",
"description": "",
"revision": ""
}' | \
http POST '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.RegisterApplicationRevision' \
content-type:application/json \
x-amz-target:''
wget --quiet \
--method POST \
--header 'x-amz-target: ' \
--header 'content-type: application/json' \
--body-data '{\n "applicationName": "",\n "description": "",\n "revision": ""\n}' \
--output-document \
- '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.RegisterApplicationRevision'
import Foundation
let headers = [
"x-amz-target": "",
"content-type": "application/json"
]
let parameters = [
"applicationName": "",
"description": "",
"revision": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.RegisterApplicationRevision")! 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
RegisterOnPremisesInstance
{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.RegisterOnPremisesInstance
HEADERS
X-Amz-Target
BODY json
{
"instanceName": "",
"iamSessionArn": "",
"iamUserArn": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.RegisterOnPremisesInstance");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-amz-target: ");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"instanceName\": \"\",\n \"iamSessionArn\": \"\",\n \"iamUserArn\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.RegisterOnPremisesInstance" {:headers {:x-amz-target ""}
:content-type :json
:form-params {:instanceName ""
:iamSessionArn ""
:iamUserArn ""}})
require "http/client"
url = "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.RegisterOnPremisesInstance"
headers = HTTP::Headers{
"x-amz-target" => ""
"content-type" => "application/json"
}
reqBody = "{\n \"instanceName\": \"\",\n \"iamSessionArn\": \"\",\n \"iamUserArn\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.RegisterOnPremisesInstance"),
Headers =
{
{ "x-amz-target", "" },
},
Content = new StringContent("{\n \"instanceName\": \"\",\n \"iamSessionArn\": \"\",\n \"iamUserArn\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.RegisterOnPremisesInstance");
var request = new RestRequest("", Method.Post);
request.AddHeader("x-amz-target", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"instanceName\": \"\",\n \"iamSessionArn\": \"\",\n \"iamUserArn\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.RegisterOnPremisesInstance"
payload := strings.NewReader("{\n \"instanceName\": \"\",\n \"iamSessionArn\": \"\",\n \"iamUserArn\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-amz-target", "")
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/ HTTP/1.1
X-Amz-Target:
Content-Type: application/json
Host: example.com
Content-Length: 67
{
"instanceName": "",
"iamSessionArn": "",
"iamUserArn": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.RegisterOnPremisesInstance")
.setHeader("x-amz-target", "")
.setHeader("content-type", "application/json")
.setBody("{\n \"instanceName\": \"\",\n \"iamSessionArn\": \"\",\n \"iamUserArn\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.RegisterOnPremisesInstance"))
.header("x-amz-target", "")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"instanceName\": \"\",\n \"iamSessionArn\": \"\",\n \"iamUserArn\": \"\"\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 \"instanceName\": \"\",\n \"iamSessionArn\": \"\",\n \"iamUserArn\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.RegisterOnPremisesInstance")
.post(body)
.addHeader("x-amz-target", "")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.RegisterOnPremisesInstance")
.header("x-amz-target", "")
.header("content-type", "application/json")
.body("{\n \"instanceName\": \"\",\n \"iamSessionArn\": \"\",\n \"iamUserArn\": \"\"\n}")
.asString();
const data = JSON.stringify({
instanceName: '',
iamSessionArn: '',
iamUserArn: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.RegisterOnPremisesInstance');
xhr.setRequestHeader('x-amz-target', '');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.RegisterOnPremisesInstance',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {instanceName: '', iamSessionArn: '', iamUserArn: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.RegisterOnPremisesInstance';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"instanceName":"","iamSessionArn":"","iamUserArn":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.RegisterOnPremisesInstance',
method: 'POST',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
},
processData: false,
data: '{\n "instanceName": "",\n "iamSessionArn": "",\n "iamUserArn": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"instanceName\": \"\",\n \"iamSessionArn\": \"\",\n \"iamUserArn\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.RegisterOnPremisesInstance")
.post(body)
.addHeader("x-amz-target", "")
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({instanceName: '', iamSessionArn: '', iamUserArn: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.RegisterOnPremisesInstance',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: {instanceName: '', iamSessionArn: '', iamUserArn: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.RegisterOnPremisesInstance');
req.headers({
'x-amz-target': '',
'content-type': 'application/json'
});
req.type('json');
req.send({
instanceName: '',
iamSessionArn: '',
iamUserArn: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.RegisterOnPremisesInstance',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {instanceName: '', iamSessionArn: '', iamUserArn: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.RegisterOnPremisesInstance';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"instanceName":"","iamSessionArn":"","iamUserArn":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"x-amz-target": @"",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"instanceName": @"",
@"iamSessionArn": @"",
@"iamUserArn": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.RegisterOnPremisesInstance"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.RegisterOnPremisesInstance" in
let headers = Header.add_list (Header.init ()) [
("x-amz-target", "");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"instanceName\": \"\",\n \"iamSessionArn\": \"\",\n \"iamUserArn\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.RegisterOnPremisesInstance",
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([
'instanceName' => '',
'iamSessionArn' => '',
'iamUserArn' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json",
"x-amz-target: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.RegisterOnPremisesInstance', [
'body' => '{
"instanceName": "",
"iamSessionArn": "",
"iamUserArn": ""
}',
'headers' => [
'content-type' => 'application/json',
'x-amz-target' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.RegisterOnPremisesInstance');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'instanceName' => '',
'iamSessionArn' => '',
'iamUserArn' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'instanceName' => '',
'iamSessionArn' => '',
'iamUserArn' => ''
]));
$request->setRequestUrl('{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.RegisterOnPremisesInstance');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.RegisterOnPremisesInstance' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"instanceName": "",
"iamSessionArn": "",
"iamUserArn": ""
}'
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.RegisterOnPremisesInstance' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"instanceName": "",
"iamSessionArn": "",
"iamUserArn": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"instanceName\": \"\",\n \"iamSessionArn\": \"\",\n \"iamUserArn\": \"\"\n}"
headers = {
'x-amz-target': "",
'content-type': "application/json"
}
conn.request("POST", "/baseUrl/", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.RegisterOnPremisesInstance"
payload = {
"instanceName": "",
"iamSessionArn": "",
"iamUserArn": ""
}
headers = {
"x-amz-target": "",
"content-type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.RegisterOnPremisesInstance"
payload <- "{\n \"instanceName\": \"\",\n \"iamSessionArn\": \"\",\n \"iamUserArn\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, add_headers('x-amz-target' = ''), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.RegisterOnPremisesInstance")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-amz-target"] = ''
request["content-type"] = 'application/json'
request.body = "{\n \"instanceName\": \"\",\n \"iamSessionArn\": \"\",\n \"iamUserArn\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/') do |req|
req.headers['x-amz-target'] = ''
req.body = "{\n \"instanceName\": \"\",\n \"iamSessionArn\": \"\",\n \"iamUserArn\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.RegisterOnPremisesInstance";
let payload = json!({
"instanceName": "",
"iamSessionArn": "",
"iamUserArn": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("x-amz-target", "".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.RegisterOnPremisesInstance' \
--header 'content-type: application/json' \
--header 'x-amz-target: ' \
--data '{
"instanceName": "",
"iamSessionArn": "",
"iamUserArn": ""
}'
echo '{
"instanceName": "",
"iamSessionArn": "",
"iamUserArn": ""
}' | \
http POST '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.RegisterOnPremisesInstance' \
content-type:application/json \
x-amz-target:''
wget --quiet \
--method POST \
--header 'x-amz-target: ' \
--header 'content-type: application/json' \
--body-data '{\n "instanceName": "",\n "iamSessionArn": "",\n "iamUserArn": ""\n}' \
--output-document \
- '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.RegisterOnPremisesInstance'
import Foundation
let headers = [
"x-amz-target": "",
"content-type": "application/json"
]
let parameters = [
"instanceName": "",
"iamSessionArn": "",
"iamUserArn": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.RegisterOnPremisesInstance")! 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
RemoveTagsFromOnPremisesInstances
{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.RemoveTagsFromOnPremisesInstances
HEADERS
X-Amz-Target
BODY json
{
"tags": "",
"instanceNames": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.RemoveTagsFromOnPremisesInstances");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-amz-target: ");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"tags\": \"\",\n \"instanceNames\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.RemoveTagsFromOnPremisesInstances" {:headers {:x-amz-target ""}
:content-type :json
:form-params {:tags ""
:instanceNames ""}})
require "http/client"
url = "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.RemoveTagsFromOnPremisesInstances"
headers = HTTP::Headers{
"x-amz-target" => ""
"content-type" => "application/json"
}
reqBody = "{\n \"tags\": \"\",\n \"instanceNames\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.RemoveTagsFromOnPremisesInstances"),
Headers =
{
{ "x-amz-target", "" },
},
Content = new StringContent("{\n \"tags\": \"\",\n \"instanceNames\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.RemoveTagsFromOnPremisesInstances");
var request = new RestRequest("", Method.Post);
request.AddHeader("x-amz-target", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"tags\": \"\",\n \"instanceNames\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.RemoveTagsFromOnPremisesInstances"
payload := strings.NewReader("{\n \"tags\": \"\",\n \"instanceNames\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-amz-target", "")
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/ HTTP/1.1
X-Amz-Target:
Content-Type: application/json
Host: example.com
Content-Length: 39
{
"tags": "",
"instanceNames": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.RemoveTagsFromOnPremisesInstances")
.setHeader("x-amz-target", "")
.setHeader("content-type", "application/json")
.setBody("{\n \"tags\": \"\",\n \"instanceNames\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.RemoveTagsFromOnPremisesInstances"))
.header("x-amz-target", "")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"tags\": \"\",\n \"instanceNames\": \"\"\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 \"instanceNames\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.RemoveTagsFromOnPremisesInstances")
.post(body)
.addHeader("x-amz-target", "")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.RemoveTagsFromOnPremisesInstances")
.header("x-amz-target", "")
.header("content-type", "application/json")
.body("{\n \"tags\": \"\",\n \"instanceNames\": \"\"\n}")
.asString();
const data = JSON.stringify({
tags: '',
instanceNames: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.RemoveTagsFromOnPremisesInstances');
xhr.setRequestHeader('x-amz-target', '');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.RemoveTagsFromOnPremisesInstances',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {tags: '', instanceNames: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.RemoveTagsFromOnPremisesInstances';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"tags":"","instanceNames":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.RemoveTagsFromOnPremisesInstances',
method: 'POST',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
},
processData: false,
data: '{\n "tags": "",\n "instanceNames": ""\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 \"instanceNames\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.RemoveTagsFromOnPremisesInstances")
.post(body)
.addHeader("x-amz-target", "")
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({tags: '', instanceNames: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.RemoveTagsFromOnPremisesInstances',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: {tags: '', instanceNames: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.RemoveTagsFromOnPremisesInstances');
req.headers({
'x-amz-target': '',
'content-type': 'application/json'
});
req.type('json');
req.send({
tags: '',
instanceNames: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.RemoveTagsFromOnPremisesInstances',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {tags: '', instanceNames: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.RemoveTagsFromOnPremisesInstances';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"tags":"","instanceNames":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"x-amz-target": @"",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"tags": @"",
@"instanceNames": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.RemoveTagsFromOnPremisesInstances"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.RemoveTagsFromOnPremisesInstances" in
let headers = Header.add_list (Header.init ()) [
("x-amz-target", "");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"tags\": \"\",\n \"instanceNames\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.RemoveTagsFromOnPremisesInstances",
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' => '',
'instanceNames' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json",
"x-amz-target: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.RemoveTagsFromOnPremisesInstances', [
'body' => '{
"tags": "",
"instanceNames": ""
}',
'headers' => [
'content-type' => 'application/json',
'x-amz-target' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.RemoveTagsFromOnPremisesInstances');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'tags' => '',
'instanceNames' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'tags' => '',
'instanceNames' => ''
]));
$request->setRequestUrl('{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.RemoveTagsFromOnPremisesInstances');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.RemoveTagsFromOnPremisesInstances' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"tags": "",
"instanceNames": ""
}'
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.RemoveTagsFromOnPremisesInstances' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"tags": "",
"instanceNames": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"tags\": \"\",\n \"instanceNames\": \"\"\n}"
headers = {
'x-amz-target': "",
'content-type': "application/json"
}
conn.request("POST", "/baseUrl/", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.RemoveTagsFromOnPremisesInstances"
payload = {
"tags": "",
"instanceNames": ""
}
headers = {
"x-amz-target": "",
"content-type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.RemoveTagsFromOnPremisesInstances"
payload <- "{\n \"tags\": \"\",\n \"instanceNames\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, add_headers('x-amz-target' = ''), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.RemoveTagsFromOnPremisesInstances")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-amz-target"] = ''
request["content-type"] = 'application/json'
request.body = "{\n \"tags\": \"\",\n \"instanceNames\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/') do |req|
req.headers['x-amz-target'] = ''
req.body = "{\n \"tags\": \"\",\n \"instanceNames\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.RemoveTagsFromOnPremisesInstances";
let payload = json!({
"tags": "",
"instanceNames": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("x-amz-target", "".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.RemoveTagsFromOnPremisesInstances' \
--header 'content-type: application/json' \
--header 'x-amz-target: ' \
--data '{
"tags": "",
"instanceNames": ""
}'
echo '{
"tags": "",
"instanceNames": ""
}' | \
http POST '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.RemoveTagsFromOnPremisesInstances' \
content-type:application/json \
x-amz-target:''
wget --quiet \
--method POST \
--header 'x-amz-target: ' \
--header 'content-type: application/json' \
--body-data '{\n "tags": "",\n "instanceNames": ""\n}' \
--output-document \
- '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.RemoveTagsFromOnPremisesInstances'
import Foundation
let headers = [
"x-amz-target": "",
"content-type": "application/json"
]
let parameters = [
"tags": "",
"instanceNames": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.RemoveTagsFromOnPremisesInstances")! 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
SkipWaitTimeForInstanceTermination
{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.SkipWaitTimeForInstanceTermination
HEADERS
X-Amz-Target
BODY json
{
"deploymentId": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.SkipWaitTimeForInstanceTermination");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-amz-target: ");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"deploymentId\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.SkipWaitTimeForInstanceTermination" {:headers {:x-amz-target ""}
:content-type :json
:form-params {:deploymentId ""}})
require "http/client"
url = "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.SkipWaitTimeForInstanceTermination"
headers = HTTP::Headers{
"x-amz-target" => ""
"content-type" => "application/json"
}
reqBody = "{\n \"deploymentId\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.SkipWaitTimeForInstanceTermination"),
Headers =
{
{ "x-amz-target", "" },
},
Content = new StringContent("{\n \"deploymentId\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.SkipWaitTimeForInstanceTermination");
var request = new RestRequest("", Method.Post);
request.AddHeader("x-amz-target", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"deploymentId\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.SkipWaitTimeForInstanceTermination"
payload := strings.NewReader("{\n \"deploymentId\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-amz-target", "")
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/ HTTP/1.1
X-Amz-Target:
Content-Type: application/json
Host: example.com
Content-Length: 24
{
"deploymentId": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.SkipWaitTimeForInstanceTermination")
.setHeader("x-amz-target", "")
.setHeader("content-type", "application/json")
.setBody("{\n \"deploymentId\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.SkipWaitTimeForInstanceTermination"))
.header("x-amz-target", "")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"deploymentId\": \"\"\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 \"deploymentId\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.SkipWaitTimeForInstanceTermination")
.post(body)
.addHeader("x-amz-target", "")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.SkipWaitTimeForInstanceTermination")
.header("x-amz-target", "")
.header("content-type", "application/json")
.body("{\n \"deploymentId\": \"\"\n}")
.asString();
const data = JSON.stringify({
deploymentId: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.SkipWaitTimeForInstanceTermination');
xhr.setRequestHeader('x-amz-target', '');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.SkipWaitTimeForInstanceTermination',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {deploymentId: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.SkipWaitTimeForInstanceTermination';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"deploymentId":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.SkipWaitTimeForInstanceTermination',
method: 'POST',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
},
processData: false,
data: '{\n "deploymentId": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"deploymentId\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.SkipWaitTimeForInstanceTermination")
.post(body)
.addHeader("x-amz-target", "")
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({deploymentId: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.SkipWaitTimeForInstanceTermination',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: {deploymentId: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.SkipWaitTimeForInstanceTermination');
req.headers({
'x-amz-target': '',
'content-type': 'application/json'
});
req.type('json');
req.send({
deploymentId: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.SkipWaitTimeForInstanceTermination',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {deploymentId: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.SkipWaitTimeForInstanceTermination';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"deploymentId":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"x-amz-target": @"",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"deploymentId": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.SkipWaitTimeForInstanceTermination"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.SkipWaitTimeForInstanceTermination" in
let headers = Header.add_list (Header.init ()) [
("x-amz-target", "");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"deploymentId\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.SkipWaitTimeForInstanceTermination",
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([
'deploymentId' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json",
"x-amz-target: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.SkipWaitTimeForInstanceTermination', [
'body' => '{
"deploymentId": ""
}',
'headers' => [
'content-type' => 'application/json',
'x-amz-target' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.SkipWaitTimeForInstanceTermination');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'deploymentId' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'deploymentId' => ''
]));
$request->setRequestUrl('{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.SkipWaitTimeForInstanceTermination');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.SkipWaitTimeForInstanceTermination' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"deploymentId": ""
}'
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.SkipWaitTimeForInstanceTermination' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"deploymentId": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"deploymentId\": \"\"\n}"
headers = {
'x-amz-target': "",
'content-type': "application/json"
}
conn.request("POST", "/baseUrl/", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.SkipWaitTimeForInstanceTermination"
payload = { "deploymentId": "" }
headers = {
"x-amz-target": "",
"content-type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.SkipWaitTimeForInstanceTermination"
payload <- "{\n \"deploymentId\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, add_headers('x-amz-target' = ''), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.SkipWaitTimeForInstanceTermination")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-amz-target"] = ''
request["content-type"] = 'application/json'
request.body = "{\n \"deploymentId\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/') do |req|
req.headers['x-amz-target'] = ''
req.body = "{\n \"deploymentId\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.SkipWaitTimeForInstanceTermination";
let payload = json!({"deploymentId": ""});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("x-amz-target", "".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.SkipWaitTimeForInstanceTermination' \
--header 'content-type: application/json' \
--header 'x-amz-target: ' \
--data '{
"deploymentId": ""
}'
echo '{
"deploymentId": ""
}' | \
http POST '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.SkipWaitTimeForInstanceTermination' \
content-type:application/json \
x-amz-target:''
wget --quiet \
--method POST \
--header 'x-amz-target: ' \
--header 'content-type: application/json' \
--body-data '{\n "deploymentId": ""\n}' \
--output-document \
- '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.SkipWaitTimeForInstanceTermination'
import Foundation
let headers = [
"x-amz-target": "",
"content-type": "application/json"
]
let parameters = ["deploymentId": ""] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.SkipWaitTimeForInstanceTermination")! 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
StopDeployment
{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.StopDeployment
HEADERS
X-Amz-Target
BODY json
{
"deploymentId": "",
"autoRollbackEnabled": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.StopDeployment");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-amz-target: ");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"deploymentId\": \"\",\n \"autoRollbackEnabled\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.StopDeployment" {:headers {:x-amz-target ""}
:content-type :json
:form-params {:deploymentId ""
:autoRollbackEnabled ""}})
require "http/client"
url = "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.StopDeployment"
headers = HTTP::Headers{
"x-amz-target" => ""
"content-type" => "application/json"
}
reqBody = "{\n \"deploymentId\": \"\",\n \"autoRollbackEnabled\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.StopDeployment"),
Headers =
{
{ "x-amz-target", "" },
},
Content = new StringContent("{\n \"deploymentId\": \"\",\n \"autoRollbackEnabled\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.StopDeployment");
var request = new RestRequest("", Method.Post);
request.AddHeader("x-amz-target", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"deploymentId\": \"\",\n \"autoRollbackEnabled\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.StopDeployment"
payload := strings.NewReader("{\n \"deploymentId\": \"\",\n \"autoRollbackEnabled\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-amz-target", "")
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/ HTTP/1.1
X-Amz-Target:
Content-Type: application/json
Host: example.com
Content-Length: 53
{
"deploymentId": "",
"autoRollbackEnabled": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.StopDeployment")
.setHeader("x-amz-target", "")
.setHeader("content-type", "application/json")
.setBody("{\n \"deploymentId\": \"\",\n \"autoRollbackEnabled\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.StopDeployment"))
.header("x-amz-target", "")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"deploymentId\": \"\",\n \"autoRollbackEnabled\": \"\"\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 \"deploymentId\": \"\",\n \"autoRollbackEnabled\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.StopDeployment")
.post(body)
.addHeader("x-amz-target", "")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.StopDeployment")
.header("x-amz-target", "")
.header("content-type", "application/json")
.body("{\n \"deploymentId\": \"\",\n \"autoRollbackEnabled\": \"\"\n}")
.asString();
const data = JSON.stringify({
deploymentId: '',
autoRollbackEnabled: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.StopDeployment');
xhr.setRequestHeader('x-amz-target', '');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.StopDeployment',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {deploymentId: '', autoRollbackEnabled: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.StopDeployment';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"deploymentId":"","autoRollbackEnabled":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.StopDeployment',
method: 'POST',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
},
processData: false,
data: '{\n "deploymentId": "",\n "autoRollbackEnabled": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"deploymentId\": \"\",\n \"autoRollbackEnabled\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.StopDeployment")
.post(body)
.addHeader("x-amz-target", "")
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({deploymentId: '', autoRollbackEnabled: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.StopDeployment',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: {deploymentId: '', autoRollbackEnabled: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.StopDeployment');
req.headers({
'x-amz-target': '',
'content-type': 'application/json'
});
req.type('json');
req.send({
deploymentId: '',
autoRollbackEnabled: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.StopDeployment',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {deploymentId: '', autoRollbackEnabled: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.StopDeployment';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"deploymentId":"","autoRollbackEnabled":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"x-amz-target": @"",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"deploymentId": @"",
@"autoRollbackEnabled": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.StopDeployment"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.StopDeployment" in
let headers = Header.add_list (Header.init ()) [
("x-amz-target", "");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"deploymentId\": \"\",\n \"autoRollbackEnabled\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.StopDeployment",
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([
'deploymentId' => '',
'autoRollbackEnabled' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json",
"x-amz-target: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.StopDeployment', [
'body' => '{
"deploymentId": "",
"autoRollbackEnabled": ""
}',
'headers' => [
'content-type' => 'application/json',
'x-amz-target' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.StopDeployment');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'deploymentId' => '',
'autoRollbackEnabled' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'deploymentId' => '',
'autoRollbackEnabled' => ''
]));
$request->setRequestUrl('{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.StopDeployment');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.StopDeployment' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"deploymentId": "",
"autoRollbackEnabled": ""
}'
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.StopDeployment' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"deploymentId": "",
"autoRollbackEnabled": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"deploymentId\": \"\",\n \"autoRollbackEnabled\": \"\"\n}"
headers = {
'x-amz-target': "",
'content-type': "application/json"
}
conn.request("POST", "/baseUrl/", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.StopDeployment"
payload = {
"deploymentId": "",
"autoRollbackEnabled": ""
}
headers = {
"x-amz-target": "",
"content-type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.StopDeployment"
payload <- "{\n \"deploymentId\": \"\",\n \"autoRollbackEnabled\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, add_headers('x-amz-target' = ''), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.StopDeployment")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-amz-target"] = ''
request["content-type"] = 'application/json'
request.body = "{\n \"deploymentId\": \"\",\n \"autoRollbackEnabled\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/') do |req|
req.headers['x-amz-target'] = ''
req.body = "{\n \"deploymentId\": \"\",\n \"autoRollbackEnabled\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.StopDeployment";
let payload = json!({
"deploymentId": "",
"autoRollbackEnabled": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("x-amz-target", "".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.StopDeployment' \
--header 'content-type: application/json' \
--header 'x-amz-target: ' \
--data '{
"deploymentId": "",
"autoRollbackEnabled": ""
}'
echo '{
"deploymentId": "",
"autoRollbackEnabled": ""
}' | \
http POST '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.StopDeployment' \
content-type:application/json \
x-amz-target:''
wget --quiet \
--method POST \
--header 'x-amz-target: ' \
--header 'content-type: application/json' \
--body-data '{\n "deploymentId": "",\n "autoRollbackEnabled": ""\n}' \
--output-document \
- '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.StopDeployment'
import Foundation
let headers = [
"x-amz-target": "",
"content-type": "application/json"
]
let parameters = [
"deploymentId": "",
"autoRollbackEnabled": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.StopDeployment")! 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}}/#X-Amz-Target=CodeDeploy_20141006.TagResource
HEADERS
X-Amz-Target
BODY json
{
"ResourceArn": "",
"Tags": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.TagResource");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-amz-target: ");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"ResourceArn\": \"\",\n \"Tags\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.TagResource" {:headers {:x-amz-target ""}
:content-type :json
:form-params {:ResourceArn ""
:Tags ""}})
require "http/client"
url = "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.TagResource"
headers = HTTP::Headers{
"x-amz-target" => ""
"content-type" => "application/json"
}
reqBody = "{\n \"ResourceArn\": \"\",\n \"Tags\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.TagResource"),
Headers =
{
{ "x-amz-target", "" },
},
Content = new StringContent("{\n \"ResourceArn\": \"\",\n \"Tags\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.TagResource");
var request = new RestRequest("", Method.Post);
request.AddHeader("x-amz-target", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"ResourceArn\": \"\",\n \"Tags\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.TagResource"
payload := strings.NewReader("{\n \"ResourceArn\": \"\",\n \"Tags\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-amz-target", "")
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/ HTTP/1.1
X-Amz-Target:
Content-Type: application/json
Host: example.com
Content-Length: 37
{
"ResourceArn": "",
"Tags": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.TagResource")
.setHeader("x-amz-target", "")
.setHeader("content-type", "application/json")
.setBody("{\n \"ResourceArn\": \"\",\n \"Tags\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.TagResource"))
.header("x-amz-target", "")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"ResourceArn\": \"\",\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 \"ResourceArn\": \"\",\n \"Tags\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.TagResource")
.post(body)
.addHeader("x-amz-target", "")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.TagResource")
.header("x-amz-target", "")
.header("content-type", "application/json")
.body("{\n \"ResourceArn\": \"\",\n \"Tags\": \"\"\n}")
.asString();
const data = JSON.stringify({
ResourceArn: '',
Tags: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.TagResource');
xhr.setRequestHeader('x-amz-target', '');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.TagResource',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {ResourceArn: '', Tags: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.TagResource';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"ResourceArn":"","Tags":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.TagResource',
method: 'POST',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
},
processData: false,
data: '{\n "ResourceArn": "",\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 \"ResourceArn\": \"\",\n \"Tags\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.TagResource")
.post(body)
.addHeader("x-amz-target", "")
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({ResourceArn: '', Tags: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.TagResource',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: {ResourceArn: '', Tags: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.TagResource');
req.headers({
'x-amz-target': '',
'content-type': 'application/json'
});
req.type('json');
req.send({
ResourceArn: '',
Tags: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.TagResource',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {ResourceArn: '', Tags: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.TagResource';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"ResourceArn":"","Tags":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"x-amz-target": @"",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"ResourceArn": @"",
@"Tags": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.TagResource"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.TagResource" in
let headers = Header.add_list (Header.init ()) [
("x-amz-target", "");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"ResourceArn\": \"\",\n \"Tags\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.TagResource",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'ResourceArn' => '',
'Tags' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json",
"x-amz-target: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.TagResource', [
'body' => '{
"ResourceArn": "",
"Tags": ""
}',
'headers' => [
'content-type' => 'application/json',
'x-amz-target' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.TagResource');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'ResourceArn' => '',
'Tags' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'ResourceArn' => '',
'Tags' => ''
]));
$request->setRequestUrl('{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.TagResource');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.TagResource' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"ResourceArn": "",
"Tags": ""
}'
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.TagResource' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"ResourceArn": "",
"Tags": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"ResourceArn\": \"\",\n \"Tags\": \"\"\n}"
headers = {
'x-amz-target': "",
'content-type': "application/json"
}
conn.request("POST", "/baseUrl/", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.TagResource"
payload = {
"ResourceArn": "",
"Tags": ""
}
headers = {
"x-amz-target": "",
"content-type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.TagResource"
payload <- "{\n \"ResourceArn\": \"\",\n \"Tags\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, add_headers('x-amz-target' = ''), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.TagResource")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-amz-target"] = ''
request["content-type"] = 'application/json'
request.body = "{\n \"ResourceArn\": \"\",\n \"Tags\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/') do |req|
req.headers['x-amz-target'] = ''
req.body = "{\n \"ResourceArn\": \"\",\n \"Tags\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.TagResource";
let payload = json!({
"ResourceArn": "",
"Tags": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("x-amz-target", "".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.TagResource' \
--header 'content-type: application/json' \
--header 'x-amz-target: ' \
--data '{
"ResourceArn": "",
"Tags": ""
}'
echo '{
"ResourceArn": "",
"Tags": ""
}' | \
http POST '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.TagResource' \
content-type:application/json \
x-amz-target:''
wget --quiet \
--method POST \
--header 'x-amz-target: ' \
--header 'content-type: application/json' \
--body-data '{\n "ResourceArn": "",\n "Tags": ""\n}' \
--output-document \
- '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.TagResource'
import Foundation
let headers = [
"x-amz-target": "",
"content-type": "application/json"
]
let parameters = [
"ResourceArn": "",
"Tags": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.TagResource")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
UntagResource
{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.UntagResource
HEADERS
X-Amz-Target
BODY json
{
"ResourceArn": "",
"TagKeys": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.UntagResource");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-amz-target: ");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"ResourceArn\": \"\",\n \"TagKeys\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.UntagResource" {:headers {:x-amz-target ""}
:content-type :json
:form-params {:ResourceArn ""
:TagKeys ""}})
require "http/client"
url = "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.UntagResource"
headers = HTTP::Headers{
"x-amz-target" => ""
"content-type" => "application/json"
}
reqBody = "{\n \"ResourceArn\": \"\",\n \"TagKeys\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.UntagResource"),
Headers =
{
{ "x-amz-target", "" },
},
Content = new StringContent("{\n \"ResourceArn\": \"\",\n \"TagKeys\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.UntagResource");
var request = new RestRequest("", Method.Post);
request.AddHeader("x-amz-target", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"ResourceArn\": \"\",\n \"TagKeys\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.UntagResource"
payload := strings.NewReader("{\n \"ResourceArn\": \"\",\n \"TagKeys\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-amz-target", "")
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/ HTTP/1.1
X-Amz-Target:
Content-Type: application/json
Host: example.com
Content-Length: 40
{
"ResourceArn": "",
"TagKeys": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.UntagResource")
.setHeader("x-amz-target", "")
.setHeader("content-type", "application/json")
.setBody("{\n \"ResourceArn\": \"\",\n \"TagKeys\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.UntagResource"))
.header("x-amz-target", "")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"ResourceArn\": \"\",\n \"TagKeys\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"ResourceArn\": \"\",\n \"TagKeys\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.UntagResource")
.post(body)
.addHeader("x-amz-target", "")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.UntagResource")
.header("x-amz-target", "")
.header("content-type", "application/json")
.body("{\n \"ResourceArn\": \"\",\n \"TagKeys\": \"\"\n}")
.asString();
const data = JSON.stringify({
ResourceArn: '',
TagKeys: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.UntagResource');
xhr.setRequestHeader('x-amz-target', '');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.UntagResource',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {ResourceArn: '', TagKeys: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.UntagResource';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"ResourceArn":"","TagKeys":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.UntagResource',
method: 'POST',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
},
processData: false,
data: '{\n "ResourceArn": "",\n "TagKeys": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"ResourceArn\": \"\",\n \"TagKeys\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.UntagResource")
.post(body)
.addHeader("x-amz-target", "")
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({ResourceArn: '', TagKeys: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.UntagResource',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: {ResourceArn: '', TagKeys: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.UntagResource');
req.headers({
'x-amz-target': '',
'content-type': 'application/json'
});
req.type('json');
req.send({
ResourceArn: '',
TagKeys: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.UntagResource',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {ResourceArn: '', TagKeys: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.UntagResource';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"ResourceArn":"","TagKeys":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"x-amz-target": @"",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"ResourceArn": @"",
@"TagKeys": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.UntagResource"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.UntagResource" in
let headers = Header.add_list (Header.init ()) [
("x-amz-target", "");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"ResourceArn\": \"\",\n \"TagKeys\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.UntagResource",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'ResourceArn' => '',
'TagKeys' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json",
"x-amz-target: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.UntagResource', [
'body' => '{
"ResourceArn": "",
"TagKeys": ""
}',
'headers' => [
'content-type' => 'application/json',
'x-amz-target' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.UntagResource');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'ResourceArn' => '',
'TagKeys' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'ResourceArn' => '',
'TagKeys' => ''
]));
$request->setRequestUrl('{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.UntagResource');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.UntagResource' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"ResourceArn": "",
"TagKeys": ""
}'
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.UntagResource' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"ResourceArn": "",
"TagKeys": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"ResourceArn\": \"\",\n \"TagKeys\": \"\"\n}"
headers = {
'x-amz-target': "",
'content-type': "application/json"
}
conn.request("POST", "/baseUrl/", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.UntagResource"
payload = {
"ResourceArn": "",
"TagKeys": ""
}
headers = {
"x-amz-target": "",
"content-type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.UntagResource"
payload <- "{\n \"ResourceArn\": \"\",\n \"TagKeys\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, add_headers('x-amz-target' = ''), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.UntagResource")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-amz-target"] = ''
request["content-type"] = 'application/json'
request.body = "{\n \"ResourceArn\": \"\",\n \"TagKeys\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/') do |req|
req.headers['x-amz-target'] = ''
req.body = "{\n \"ResourceArn\": \"\",\n \"TagKeys\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.UntagResource";
let payload = json!({
"ResourceArn": "",
"TagKeys": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("x-amz-target", "".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.UntagResource' \
--header 'content-type: application/json' \
--header 'x-amz-target: ' \
--data '{
"ResourceArn": "",
"TagKeys": ""
}'
echo '{
"ResourceArn": "",
"TagKeys": ""
}' | \
http POST '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.UntagResource' \
content-type:application/json \
x-amz-target:''
wget --quiet \
--method POST \
--header 'x-amz-target: ' \
--header 'content-type: application/json' \
--body-data '{\n "ResourceArn": "",\n "TagKeys": ""\n}' \
--output-document \
- '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.UntagResource'
import Foundation
let headers = [
"x-amz-target": "",
"content-type": "application/json"
]
let parameters = [
"ResourceArn": "",
"TagKeys": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.UntagResource")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
UpdateApplication
{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.UpdateApplication
HEADERS
X-Amz-Target
BODY json
{
"applicationName": "",
"newApplicationName": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.UpdateApplication");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-amz-target: ");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"applicationName\": \"\",\n \"newApplicationName\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.UpdateApplication" {:headers {:x-amz-target ""}
:content-type :json
:form-params {:applicationName ""
:newApplicationName ""}})
require "http/client"
url = "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.UpdateApplication"
headers = HTTP::Headers{
"x-amz-target" => ""
"content-type" => "application/json"
}
reqBody = "{\n \"applicationName\": \"\",\n \"newApplicationName\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.UpdateApplication"),
Headers =
{
{ "x-amz-target", "" },
},
Content = new StringContent("{\n \"applicationName\": \"\",\n \"newApplicationName\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.UpdateApplication");
var request = new RestRequest("", Method.Post);
request.AddHeader("x-amz-target", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"applicationName\": \"\",\n \"newApplicationName\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.UpdateApplication"
payload := strings.NewReader("{\n \"applicationName\": \"\",\n \"newApplicationName\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-amz-target", "")
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/ HTTP/1.1
X-Amz-Target:
Content-Type: application/json
Host: example.com
Content-Length: 55
{
"applicationName": "",
"newApplicationName": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.UpdateApplication")
.setHeader("x-amz-target", "")
.setHeader("content-type", "application/json")
.setBody("{\n \"applicationName\": \"\",\n \"newApplicationName\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.UpdateApplication"))
.header("x-amz-target", "")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"applicationName\": \"\",\n \"newApplicationName\": \"\"\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 \"applicationName\": \"\",\n \"newApplicationName\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.UpdateApplication")
.post(body)
.addHeader("x-amz-target", "")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.UpdateApplication")
.header("x-amz-target", "")
.header("content-type", "application/json")
.body("{\n \"applicationName\": \"\",\n \"newApplicationName\": \"\"\n}")
.asString();
const data = JSON.stringify({
applicationName: '',
newApplicationName: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.UpdateApplication');
xhr.setRequestHeader('x-amz-target', '');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.UpdateApplication',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {applicationName: '', newApplicationName: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.UpdateApplication';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"applicationName":"","newApplicationName":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.UpdateApplication',
method: 'POST',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
},
processData: false,
data: '{\n "applicationName": "",\n "newApplicationName": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"applicationName\": \"\",\n \"newApplicationName\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.UpdateApplication")
.post(body)
.addHeader("x-amz-target", "")
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({applicationName: '', newApplicationName: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.UpdateApplication',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: {applicationName: '', newApplicationName: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.UpdateApplication');
req.headers({
'x-amz-target': '',
'content-type': 'application/json'
});
req.type('json');
req.send({
applicationName: '',
newApplicationName: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.UpdateApplication',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {applicationName: '', newApplicationName: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.UpdateApplication';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"applicationName":"","newApplicationName":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"x-amz-target": @"",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"applicationName": @"",
@"newApplicationName": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.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}}/#X-Amz-Target=CodeDeploy_20141006.UpdateApplication" in
let headers = Header.add_list (Header.init ()) [
("x-amz-target", "");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"applicationName\": \"\",\n \"newApplicationName\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.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([
'applicationName' => '',
'newApplicationName' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json",
"x-amz-target: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.UpdateApplication', [
'body' => '{
"applicationName": "",
"newApplicationName": ""
}',
'headers' => [
'content-type' => 'application/json',
'x-amz-target' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.UpdateApplication');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'applicationName' => '',
'newApplicationName' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'applicationName' => '',
'newApplicationName' => ''
]));
$request->setRequestUrl('{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.UpdateApplication');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.UpdateApplication' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"applicationName": "",
"newApplicationName": ""
}'
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.UpdateApplication' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"applicationName": "",
"newApplicationName": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"applicationName\": \"\",\n \"newApplicationName\": \"\"\n}"
headers = {
'x-amz-target': "",
'content-type': "application/json"
}
conn.request("POST", "/baseUrl/", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.UpdateApplication"
payload = {
"applicationName": "",
"newApplicationName": ""
}
headers = {
"x-amz-target": "",
"content-type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.UpdateApplication"
payload <- "{\n \"applicationName\": \"\",\n \"newApplicationName\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, add_headers('x-amz-target' = ''), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.UpdateApplication")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-amz-target"] = ''
request["content-type"] = 'application/json'
request.body = "{\n \"applicationName\": \"\",\n \"newApplicationName\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/') do |req|
req.headers['x-amz-target'] = ''
req.body = "{\n \"applicationName\": \"\",\n \"newApplicationName\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.UpdateApplication";
let payload = json!({
"applicationName": "",
"newApplicationName": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("x-amz-target", "".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.UpdateApplication' \
--header 'content-type: application/json' \
--header 'x-amz-target: ' \
--data '{
"applicationName": "",
"newApplicationName": ""
}'
echo '{
"applicationName": "",
"newApplicationName": ""
}' | \
http POST '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.UpdateApplication' \
content-type:application/json \
x-amz-target:''
wget --quiet \
--method POST \
--header 'x-amz-target: ' \
--header 'content-type: application/json' \
--body-data '{\n "applicationName": "",\n "newApplicationName": ""\n}' \
--output-document \
- '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.UpdateApplication'
import Foundation
let headers = [
"x-amz-target": "",
"content-type": "application/json"
]
let parameters = [
"applicationName": "",
"newApplicationName": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.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
UpdateDeploymentGroup
{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.UpdateDeploymentGroup
HEADERS
X-Amz-Target
BODY json
{
"applicationName": "",
"currentDeploymentGroupName": "",
"newDeploymentGroupName": "",
"deploymentConfigName": "",
"ec2TagFilters": "",
"onPremisesInstanceTagFilters": "",
"autoScalingGroups": "",
"serviceRoleArn": "",
"triggerConfigurations": "",
"alarmConfiguration": "",
"autoRollbackConfiguration": "",
"outdatedInstancesStrategy": "",
"deploymentStyle": "",
"blueGreenDeploymentConfiguration": "",
"loadBalancerInfo": "",
"ec2TagSet": "",
"ecsServices": "",
"onPremisesTagSet": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.UpdateDeploymentGroup");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-amz-target: ");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"applicationName\": \"\",\n \"currentDeploymentGroupName\": \"\",\n \"newDeploymentGroupName\": \"\",\n \"deploymentConfigName\": \"\",\n \"ec2TagFilters\": \"\",\n \"onPremisesInstanceTagFilters\": \"\",\n \"autoScalingGroups\": \"\",\n \"serviceRoleArn\": \"\",\n \"triggerConfigurations\": \"\",\n \"alarmConfiguration\": \"\",\n \"autoRollbackConfiguration\": \"\",\n \"outdatedInstancesStrategy\": \"\",\n \"deploymentStyle\": \"\",\n \"blueGreenDeploymentConfiguration\": \"\",\n \"loadBalancerInfo\": \"\",\n \"ec2TagSet\": \"\",\n \"ecsServices\": \"\",\n \"onPremisesTagSet\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.UpdateDeploymentGroup" {:headers {:x-amz-target ""}
:content-type :json
:form-params {:applicationName ""
:currentDeploymentGroupName ""
:newDeploymentGroupName ""
:deploymentConfigName ""
:ec2TagFilters ""
:onPremisesInstanceTagFilters ""
:autoScalingGroups ""
:serviceRoleArn ""
:triggerConfigurations ""
:alarmConfiguration ""
:autoRollbackConfiguration ""
:outdatedInstancesStrategy ""
:deploymentStyle ""
:blueGreenDeploymentConfiguration ""
:loadBalancerInfo ""
:ec2TagSet ""
:ecsServices ""
:onPremisesTagSet ""}})
require "http/client"
url = "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.UpdateDeploymentGroup"
headers = HTTP::Headers{
"x-amz-target" => ""
"content-type" => "application/json"
}
reqBody = "{\n \"applicationName\": \"\",\n \"currentDeploymentGroupName\": \"\",\n \"newDeploymentGroupName\": \"\",\n \"deploymentConfigName\": \"\",\n \"ec2TagFilters\": \"\",\n \"onPremisesInstanceTagFilters\": \"\",\n \"autoScalingGroups\": \"\",\n \"serviceRoleArn\": \"\",\n \"triggerConfigurations\": \"\",\n \"alarmConfiguration\": \"\",\n \"autoRollbackConfiguration\": \"\",\n \"outdatedInstancesStrategy\": \"\",\n \"deploymentStyle\": \"\",\n \"blueGreenDeploymentConfiguration\": \"\",\n \"loadBalancerInfo\": \"\",\n \"ec2TagSet\": \"\",\n \"ecsServices\": \"\",\n \"onPremisesTagSet\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.UpdateDeploymentGroup"),
Headers =
{
{ "x-amz-target", "" },
},
Content = new StringContent("{\n \"applicationName\": \"\",\n \"currentDeploymentGroupName\": \"\",\n \"newDeploymentGroupName\": \"\",\n \"deploymentConfigName\": \"\",\n \"ec2TagFilters\": \"\",\n \"onPremisesInstanceTagFilters\": \"\",\n \"autoScalingGroups\": \"\",\n \"serviceRoleArn\": \"\",\n \"triggerConfigurations\": \"\",\n \"alarmConfiguration\": \"\",\n \"autoRollbackConfiguration\": \"\",\n \"outdatedInstancesStrategy\": \"\",\n \"deploymentStyle\": \"\",\n \"blueGreenDeploymentConfiguration\": \"\",\n \"loadBalancerInfo\": \"\",\n \"ec2TagSet\": \"\",\n \"ecsServices\": \"\",\n \"onPremisesTagSet\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.UpdateDeploymentGroup");
var request = new RestRequest("", Method.Post);
request.AddHeader("x-amz-target", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"applicationName\": \"\",\n \"currentDeploymentGroupName\": \"\",\n \"newDeploymentGroupName\": \"\",\n \"deploymentConfigName\": \"\",\n \"ec2TagFilters\": \"\",\n \"onPremisesInstanceTagFilters\": \"\",\n \"autoScalingGroups\": \"\",\n \"serviceRoleArn\": \"\",\n \"triggerConfigurations\": \"\",\n \"alarmConfiguration\": \"\",\n \"autoRollbackConfiguration\": \"\",\n \"outdatedInstancesStrategy\": \"\",\n \"deploymentStyle\": \"\",\n \"blueGreenDeploymentConfiguration\": \"\",\n \"loadBalancerInfo\": \"\",\n \"ec2TagSet\": \"\",\n \"ecsServices\": \"\",\n \"onPremisesTagSet\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.UpdateDeploymentGroup"
payload := strings.NewReader("{\n \"applicationName\": \"\",\n \"currentDeploymentGroupName\": \"\",\n \"newDeploymentGroupName\": \"\",\n \"deploymentConfigName\": \"\",\n \"ec2TagFilters\": \"\",\n \"onPremisesInstanceTagFilters\": \"\",\n \"autoScalingGroups\": \"\",\n \"serviceRoleArn\": \"\",\n \"triggerConfigurations\": \"\",\n \"alarmConfiguration\": \"\",\n \"autoRollbackConfiguration\": \"\",\n \"outdatedInstancesStrategy\": \"\",\n \"deploymentStyle\": \"\",\n \"blueGreenDeploymentConfiguration\": \"\",\n \"loadBalancerInfo\": \"\",\n \"ec2TagSet\": \"\",\n \"ecsServices\": \"\",\n \"onPremisesTagSet\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-amz-target", "")
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/ HTTP/1.1
X-Amz-Target:
Content-Type: application/json
Host: example.com
Content-Length: 525
{
"applicationName": "",
"currentDeploymentGroupName": "",
"newDeploymentGroupName": "",
"deploymentConfigName": "",
"ec2TagFilters": "",
"onPremisesInstanceTagFilters": "",
"autoScalingGroups": "",
"serviceRoleArn": "",
"triggerConfigurations": "",
"alarmConfiguration": "",
"autoRollbackConfiguration": "",
"outdatedInstancesStrategy": "",
"deploymentStyle": "",
"blueGreenDeploymentConfiguration": "",
"loadBalancerInfo": "",
"ec2TagSet": "",
"ecsServices": "",
"onPremisesTagSet": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.UpdateDeploymentGroup")
.setHeader("x-amz-target", "")
.setHeader("content-type", "application/json")
.setBody("{\n \"applicationName\": \"\",\n \"currentDeploymentGroupName\": \"\",\n \"newDeploymentGroupName\": \"\",\n \"deploymentConfigName\": \"\",\n \"ec2TagFilters\": \"\",\n \"onPremisesInstanceTagFilters\": \"\",\n \"autoScalingGroups\": \"\",\n \"serviceRoleArn\": \"\",\n \"triggerConfigurations\": \"\",\n \"alarmConfiguration\": \"\",\n \"autoRollbackConfiguration\": \"\",\n \"outdatedInstancesStrategy\": \"\",\n \"deploymentStyle\": \"\",\n \"blueGreenDeploymentConfiguration\": \"\",\n \"loadBalancerInfo\": \"\",\n \"ec2TagSet\": \"\",\n \"ecsServices\": \"\",\n \"onPremisesTagSet\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.UpdateDeploymentGroup"))
.header("x-amz-target", "")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"applicationName\": \"\",\n \"currentDeploymentGroupName\": \"\",\n \"newDeploymentGroupName\": \"\",\n \"deploymentConfigName\": \"\",\n \"ec2TagFilters\": \"\",\n \"onPremisesInstanceTagFilters\": \"\",\n \"autoScalingGroups\": \"\",\n \"serviceRoleArn\": \"\",\n \"triggerConfigurations\": \"\",\n \"alarmConfiguration\": \"\",\n \"autoRollbackConfiguration\": \"\",\n \"outdatedInstancesStrategy\": \"\",\n \"deploymentStyle\": \"\",\n \"blueGreenDeploymentConfiguration\": \"\",\n \"loadBalancerInfo\": \"\",\n \"ec2TagSet\": \"\",\n \"ecsServices\": \"\",\n \"onPremisesTagSet\": \"\"\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 \"applicationName\": \"\",\n \"currentDeploymentGroupName\": \"\",\n \"newDeploymentGroupName\": \"\",\n \"deploymentConfigName\": \"\",\n \"ec2TagFilters\": \"\",\n \"onPremisesInstanceTagFilters\": \"\",\n \"autoScalingGroups\": \"\",\n \"serviceRoleArn\": \"\",\n \"triggerConfigurations\": \"\",\n \"alarmConfiguration\": \"\",\n \"autoRollbackConfiguration\": \"\",\n \"outdatedInstancesStrategy\": \"\",\n \"deploymentStyle\": \"\",\n \"blueGreenDeploymentConfiguration\": \"\",\n \"loadBalancerInfo\": \"\",\n \"ec2TagSet\": \"\",\n \"ecsServices\": \"\",\n \"onPremisesTagSet\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.UpdateDeploymentGroup")
.post(body)
.addHeader("x-amz-target", "")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.UpdateDeploymentGroup")
.header("x-amz-target", "")
.header("content-type", "application/json")
.body("{\n \"applicationName\": \"\",\n \"currentDeploymentGroupName\": \"\",\n \"newDeploymentGroupName\": \"\",\n \"deploymentConfigName\": \"\",\n \"ec2TagFilters\": \"\",\n \"onPremisesInstanceTagFilters\": \"\",\n \"autoScalingGroups\": \"\",\n \"serviceRoleArn\": \"\",\n \"triggerConfigurations\": \"\",\n \"alarmConfiguration\": \"\",\n \"autoRollbackConfiguration\": \"\",\n \"outdatedInstancesStrategy\": \"\",\n \"deploymentStyle\": \"\",\n \"blueGreenDeploymentConfiguration\": \"\",\n \"loadBalancerInfo\": \"\",\n \"ec2TagSet\": \"\",\n \"ecsServices\": \"\",\n \"onPremisesTagSet\": \"\"\n}")
.asString();
const data = JSON.stringify({
applicationName: '',
currentDeploymentGroupName: '',
newDeploymentGroupName: '',
deploymentConfigName: '',
ec2TagFilters: '',
onPremisesInstanceTagFilters: '',
autoScalingGroups: '',
serviceRoleArn: '',
triggerConfigurations: '',
alarmConfiguration: '',
autoRollbackConfiguration: '',
outdatedInstancesStrategy: '',
deploymentStyle: '',
blueGreenDeploymentConfiguration: '',
loadBalancerInfo: '',
ec2TagSet: '',
ecsServices: '',
onPremisesTagSet: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.UpdateDeploymentGroup');
xhr.setRequestHeader('x-amz-target', '');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.UpdateDeploymentGroup',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {
applicationName: '',
currentDeploymentGroupName: '',
newDeploymentGroupName: '',
deploymentConfigName: '',
ec2TagFilters: '',
onPremisesInstanceTagFilters: '',
autoScalingGroups: '',
serviceRoleArn: '',
triggerConfigurations: '',
alarmConfiguration: '',
autoRollbackConfiguration: '',
outdatedInstancesStrategy: '',
deploymentStyle: '',
blueGreenDeploymentConfiguration: '',
loadBalancerInfo: '',
ec2TagSet: '',
ecsServices: '',
onPremisesTagSet: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.UpdateDeploymentGroup';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"applicationName":"","currentDeploymentGroupName":"","newDeploymentGroupName":"","deploymentConfigName":"","ec2TagFilters":"","onPremisesInstanceTagFilters":"","autoScalingGroups":"","serviceRoleArn":"","triggerConfigurations":"","alarmConfiguration":"","autoRollbackConfiguration":"","outdatedInstancesStrategy":"","deploymentStyle":"","blueGreenDeploymentConfiguration":"","loadBalancerInfo":"","ec2TagSet":"","ecsServices":"","onPremisesTagSet":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.UpdateDeploymentGroup',
method: 'POST',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
},
processData: false,
data: '{\n "applicationName": "",\n "currentDeploymentGroupName": "",\n "newDeploymentGroupName": "",\n "deploymentConfigName": "",\n "ec2TagFilters": "",\n "onPremisesInstanceTagFilters": "",\n "autoScalingGroups": "",\n "serviceRoleArn": "",\n "triggerConfigurations": "",\n "alarmConfiguration": "",\n "autoRollbackConfiguration": "",\n "outdatedInstancesStrategy": "",\n "deploymentStyle": "",\n "blueGreenDeploymentConfiguration": "",\n "loadBalancerInfo": "",\n "ec2TagSet": "",\n "ecsServices": "",\n "onPremisesTagSet": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"applicationName\": \"\",\n \"currentDeploymentGroupName\": \"\",\n \"newDeploymentGroupName\": \"\",\n \"deploymentConfigName\": \"\",\n \"ec2TagFilters\": \"\",\n \"onPremisesInstanceTagFilters\": \"\",\n \"autoScalingGroups\": \"\",\n \"serviceRoleArn\": \"\",\n \"triggerConfigurations\": \"\",\n \"alarmConfiguration\": \"\",\n \"autoRollbackConfiguration\": \"\",\n \"outdatedInstancesStrategy\": \"\",\n \"deploymentStyle\": \"\",\n \"blueGreenDeploymentConfiguration\": \"\",\n \"loadBalancerInfo\": \"\",\n \"ec2TagSet\": \"\",\n \"ecsServices\": \"\",\n \"onPremisesTagSet\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.UpdateDeploymentGroup")
.post(body)
.addHeader("x-amz-target", "")
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
applicationName: '',
currentDeploymentGroupName: '',
newDeploymentGroupName: '',
deploymentConfigName: '',
ec2TagFilters: '',
onPremisesInstanceTagFilters: '',
autoScalingGroups: '',
serviceRoleArn: '',
triggerConfigurations: '',
alarmConfiguration: '',
autoRollbackConfiguration: '',
outdatedInstancesStrategy: '',
deploymentStyle: '',
blueGreenDeploymentConfiguration: '',
loadBalancerInfo: '',
ec2TagSet: '',
ecsServices: '',
onPremisesTagSet: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.UpdateDeploymentGroup',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: {
applicationName: '',
currentDeploymentGroupName: '',
newDeploymentGroupName: '',
deploymentConfigName: '',
ec2TagFilters: '',
onPremisesInstanceTagFilters: '',
autoScalingGroups: '',
serviceRoleArn: '',
triggerConfigurations: '',
alarmConfiguration: '',
autoRollbackConfiguration: '',
outdatedInstancesStrategy: '',
deploymentStyle: '',
blueGreenDeploymentConfiguration: '',
loadBalancerInfo: '',
ec2TagSet: '',
ecsServices: '',
onPremisesTagSet: ''
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.UpdateDeploymentGroup');
req.headers({
'x-amz-target': '',
'content-type': 'application/json'
});
req.type('json');
req.send({
applicationName: '',
currentDeploymentGroupName: '',
newDeploymentGroupName: '',
deploymentConfigName: '',
ec2TagFilters: '',
onPremisesInstanceTagFilters: '',
autoScalingGroups: '',
serviceRoleArn: '',
triggerConfigurations: '',
alarmConfiguration: '',
autoRollbackConfiguration: '',
outdatedInstancesStrategy: '',
deploymentStyle: '',
blueGreenDeploymentConfiguration: '',
loadBalancerInfo: '',
ec2TagSet: '',
ecsServices: '',
onPremisesTagSet: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.UpdateDeploymentGroup',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {
applicationName: '',
currentDeploymentGroupName: '',
newDeploymentGroupName: '',
deploymentConfigName: '',
ec2TagFilters: '',
onPremisesInstanceTagFilters: '',
autoScalingGroups: '',
serviceRoleArn: '',
triggerConfigurations: '',
alarmConfiguration: '',
autoRollbackConfiguration: '',
outdatedInstancesStrategy: '',
deploymentStyle: '',
blueGreenDeploymentConfiguration: '',
loadBalancerInfo: '',
ec2TagSet: '',
ecsServices: '',
onPremisesTagSet: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.UpdateDeploymentGroup';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"applicationName":"","currentDeploymentGroupName":"","newDeploymentGroupName":"","deploymentConfigName":"","ec2TagFilters":"","onPremisesInstanceTagFilters":"","autoScalingGroups":"","serviceRoleArn":"","triggerConfigurations":"","alarmConfiguration":"","autoRollbackConfiguration":"","outdatedInstancesStrategy":"","deploymentStyle":"","blueGreenDeploymentConfiguration":"","loadBalancerInfo":"","ec2TagSet":"","ecsServices":"","onPremisesTagSet":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"x-amz-target": @"",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"applicationName": @"",
@"currentDeploymentGroupName": @"",
@"newDeploymentGroupName": @"",
@"deploymentConfigName": @"",
@"ec2TagFilters": @"",
@"onPremisesInstanceTagFilters": @"",
@"autoScalingGroups": @"",
@"serviceRoleArn": @"",
@"triggerConfigurations": @"",
@"alarmConfiguration": @"",
@"autoRollbackConfiguration": @"",
@"outdatedInstancesStrategy": @"",
@"deploymentStyle": @"",
@"blueGreenDeploymentConfiguration": @"",
@"loadBalancerInfo": @"",
@"ec2TagSet": @"",
@"ecsServices": @"",
@"onPremisesTagSet": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.UpdateDeploymentGroup"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.UpdateDeploymentGroup" in
let headers = Header.add_list (Header.init ()) [
("x-amz-target", "");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"applicationName\": \"\",\n \"currentDeploymentGroupName\": \"\",\n \"newDeploymentGroupName\": \"\",\n \"deploymentConfigName\": \"\",\n \"ec2TagFilters\": \"\",\n \"onPremisesInstanceTagFilters\": \"\",\n \"autoScalingGroups\": \"\",\n \"serviceRoleArn\": \"\",\n \"triggerConfigurations\": \"\",\n \"alarmConfiguration\": \"\",\n \"autoRollbackConfiguration\": \"\",\n \"outdatedInstancesStrategy\": \"\",\n \"deploymentStyle\": \"\",\n \"blueGreenDeploymentConfiguration\": \"\",\n \"loadBalancerInfo\": \"\",\n \"ec2TagSet\": \"\",\n \"ecsServices\": \"\",\n \"onPremisesTagSet\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.UpdateDeploymentGroup",
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([
'applicationName' => '',
'currentDeploymentGroupName' => '',
'newDeploymentGroupName' => '',
'deploymentConfigName' => '',
'ec2TagFilters' => '',
'onPremisesInstanceTagFilters' => '',
'autoScalingGroups' => '',
'serviceRoleArn' => '',
'triggerConfigurations' => '',
'alarmConfiguration' => '',
'autoRollbackConfiguration' => '',
'outdatedInstancesStrategy' => '',
'deploymentStyle' => '',
'blueGreenDeploymentConfiguration' => '',
'loadBalancerInfo' => '',
'ec2TagSet' => '',
'ecsServices' => '',
'onPremisesTagSet' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json",
"x-amz-target: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.UpdateDeploymentGroup', [
'body' => '{
"applicationName": "",
"currentDeploymentGroupName": "",
"newDeploymentGroupName": "",
"deploymentConfigName": "",
"ec2TagFilters": "",
"onPremisesInstanceTagFilters": "",
"autoScalingGroups": "",
"serviceRoleArn": "",
"triggerConfigurations": "",
"alarmConfiguration": "",
"autoRollbackConfiguration": "",
"outdatedInstancesStrategy": "",
"deploymentStyle": "",
"blueGreenDeploymentConfiguration": "",
"loadBalancerInfo": "",
"ec2TagSet": "",
"ecsServices": "",
"onPremisesTagSet": ""
}',
'headers' => [
'content-type' => 'application/json',
'x-amz-target' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.UpdateDeploymentGroup');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'applicationName' => '',
'currentDeploymentGroupName' => '',
'newDeploymentGroupName' => '',
'deploymentConfigName' => '',
'ec2TagFilters' => '',
'onPremisesInstanceTagFilters' => '',
'autoScalingGroups' => '',
'serviceRoleArn' => '',
'triggerConfigurations' => '',
'alarmConfiguration' => '',
'autoRollbackConfiguration' => '',
'outdatedInstancesStrategy' => '',
'deploymentStyle' => '',
'blueGreenDeploymentConfiguration' => '',
'loadBalancerInfo' => '',
'ec2TagSet' => '',
'ecsServices' => '',
'onPremisesTagSet' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'applicationName' => '',
'currentDeploymentGroupName' => '',
'newDeploymentGroupName' => '',
'deploymentConfigName' => '',
'ec2TagFilters' => '',
'onPremisesInstanceTagFilters' => '',
'autoScalingGroups' => '',
'serviceRoleArn' => '',
'triggerConfigurations' => '',
'alarmConfiguration' => '',
'autoRollbackConfiguration' => '',
'outdatedInstancesStrategy' => '',
'deploymentStyle' => '',
'blueGreenDeploymentConfiguration' => '',
'loadBalancerInfo' => '',
'ec2TagSet' => '',
'ecsServices' => '',
'onPremisesTagSet' => ''
]));
$request->setRequestUrl('{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.UpdateDeploymentGroup');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.UpdateDeploymentGroup' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"applicationName": "",
"currentDeploymentGroupName": "",
"newDeploymentGroupName": "",
"deploymentConfigName": "",
"ec2TagFilters": "",
"onPremisesInstanceTagFilters": "",
"autoScalingGroups": "",
"serviceRoleArn": "",
"triggerConfigurations": "",
"alarmConfiguration": "",
"autoRollbackConfiguration": "",
"outdatedInstancesStrategy": "",
"deploymentStyle": "",
"blueGreenDeploymentConfiguration": "",
"loadBalancerInfo": "",
"ec2TagSet": "",
"ecsServices": "",
"onPremisesTagSet": ""
}'
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.UpdateDeploymentGroup' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"applicationName": "",
"currentDeploymentGroupName": "",
"newDeploymentGroupName": "",
"deploymentConfigName": "",
"ec2TagFilters": "",
"onPremisesInstanceTagFilters": "",
"autoScalingGroups": "",
"serviceRoleArn": "",
"triggerConfigurations": "",
"alarmConfiguration": "",
"autoRollbackConfiguration": "",
"outdatedInstancesStrategy": "",
"deploymentStyle": "",
"blueGreenDeploymentConfiguration": "",
"loadBalancerInfo": "",
"ec2TagSet": "",
"ecsServices": "",
"onPremisesTagSet": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"applicationName\": \"\",\n \"currentDeploymentGroupName\": \"\",\n \"newDeploymentGroupName\": \"\",\n \"deploymentConfigName\": \"\",\n \"ec2TagFilters\": \"\",\n \"onPremisesInstanceTagFilters\": \"\",\n \"autoScalingGroups\": \"\",\n \"serviceRoleArn\": \"\",\n \"triggerConfigurations\": \"\",\n \"alarmConfiguration\": \"\",\n \"autoRollbackConfiguration\": \"\",\n \"outdatedInstancesStrategy\": \"\",\n \"deploymentStyle\": \"\",\n \"blueGreenDeploymentConfiguration\": \"\",\n \"loadBalancerInfo\": \"\",\n \"ec2TagSet\": \"\",\n \"ecsServices\": \"\",\n \"onPremisesTagSet\": \"\"\n}"
headers = {
'x-amz-target': "",
'content-type': "application/json"
}
conn.request("POST", "/baseUrl/", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.UpdateDeploymentGroup"
payload = {
"applicationName": "",
"currentDeploymentGroupName": "",
"newDeploymentGroupName": "",
"deploymentConfigName": "",
"ec2TagFilters": "",
"onPremisesInstanceTagFilters": "",
"autoScalingGroups": "",
"serviceRoleArn": "",
"triggerConfigurations": "",
"alarmConfiguration": "",
"autoRollbackConfiguration": "",
"outdatedInstancesStrategy": "",
"deploymentStyle": "",
"blueGreenDeploymentConfiguration": "",
"loadBalancerInfo": "",
"ec2TagSet": "",
"ecsServices": "",
"onPremisesTagSet": ""
}
headers = {
"x-amz-target": "",
"content-type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.UpdateDeploymentGroup"
payload <- "{\n \"applicationName\": \"\",\n \"currentDeploymentGroupName\": \"\",\n \"newDeploymentGroupName\": \"\",\n \"deploymentConfigName\": \"\",\n \"ec2TagFilters\": \"\",\n \"onPremisesInstanceTagFilters\": \"\",\n \"autoScalingGroups\": \"\",\n \"serviceRoleArn\": \"\",\n \"triggerConfigurations\": \"\",\n \"alarmConfiguration\": \"\",\n \"autoRollbackConfiguration\": \"\",\n \"outdatedInstancesStrategy\": \"\",\n \"deploymentStyle\": \"\",\n \"blueGreenDeploymentConfiguration\": \"\",\n \"loadBalancerInfo\": \"\",\n \"ec2TagSet\": \"\",\n \"ecsServices\": \"\",\n \"onPremisesTagSet\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, add_headers('x-amz-target' = ''), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.UpdateDeploymentGroup")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-amz-target"] = ''
request["content-type"] = 'application/json'
request.body = "{\n \"applicationName\": \"\",\n \"currentDeploymentGroupName\": \"\",\n \"newDeploymentGroupName\": \"\",\n \"deploymentConfigName\": \"\",\n \"ec2TagFilters\": \"\",\n \"onPremisesInstanceTagFilters\": \"\",\n \"autoScalingGroups\": \"\",\n \"serviceRoleArn\": \"\",\n \"triggerConfigurations\": \"\",\n \"alarmConfiguration\": \"\",\n \"autoRollbackConfiguration\": \"\",\n \"outdatedInstancesStrategy\": \"\",\n \"deploymentStyle\": \"\",\n \"blueGreenDeploymentConfiguration\": \"\",\n \"loadBalancerInfo\": \"\",\n \"ec2TagSet\": \"\",\n \"ecsServices\": \"\",\n \"onPremisesTagSet\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/') do |req|
req.headers['x-amz-target'] = ''
req.body = "{\n \"applicationName\": \"\",\n \"currentDeploymentGroupName\": \"\",\n \"newDeploymentGroupName\": \"\",\n \"deploymentConfigName\": \"\",\n \"ec2TagFilters\": \"\",\n \"onPremisesInstanceTagFilters\": \"\",\n \"autoScalingGroups\": \"\",\n \"serviceRoleArn\": \"\",\n \"triggerConfigurations\": \"\",\n \"alarmConfiguration\": \"\",\n \"autoRollbackConfiguration\": \"\",\n \"outdatedInstancesStrategy\": \"\",\n \"deploymentStyle\": \"\",\n \"blueGreenDeploymentConfiguration\": \"\",\n \"loadBalancerInfo\": \"\",\n \"ec2TagSet\": \"\",\n \"ecsServices\": \"\",\n \"onPremisesTagSet\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.UpdateDeploymentGroup";
let payload = json!({
"applicationName": "",
"currentDeploymentGroupName": "",
"newDeploymentGroupName": "",
"deploymentConfigName": "",
"ec2TagFilters": "",
"onPremisesInstanceTagFilters": "",
"autoScalingGroups": "",
"serviceRoleArn": "",
"triggerConfigurations": "",
"alarmConfiguration": "",
"autoRollbackConfiguration": "",
"outdatedInstancesStrategy": "",
"deploymentStyle": "",
"blueGreenDeploymentConfiguration": "",
"loadBalancerInfo": "",
"ec2TagSet": "",
"ecsServices": "",
"onPremisesTagSet": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("x-amz-target", "".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.UpdateDeploymentGroup' \
--header 'content-type: application/json' \
--header 'x-amz-target: ' \
--data '{
"applicationName": "",
"currentDeploymentGroupName": "",
"newDeploymentGroupName": "",
"deploymentConfigName": "",
"ec2TagFilters": "",
"onPremisesInstanceTagFilters": "",
"autoScalingGroups": "",
"serviceRoleArn": "",
"triggerConfigurations": "",
"alarmConfiguration": "",
"autoRollbackConfiguration": "",
"outdatedInstancesStrategy": "",
"deploymentStyle": "",
"blueGreenDeploymentConfiguration": "",
"loadBalancerInfo": "",
"ec2TagSet": "",
"ecsServices": "",
"onPremisesTagSet": ""
}'
echo '{
"applicationName": "",
"currentDeploymentGroupName": "",
"newDeploymentGroupName": "",
"deploymentConfigName": "",
"ec2TagFilters": "",
"onPremisesInstanceTagFilters": "",
"autoScalingGroups": "",
"serviceRoleArn": "",
"triggerConfigurations": "",
"alarmConfiguration": "",
"autoRollbackConfiguration": "",
"outdatedInstancesStrategy": "",
"deploymentStyle": "",
"blueGreenDeploymentConfiguration": "",
"loadBalancerInfo": "",
"ec2TagSet": "",
"ecsServices": "",
"onPremisesTagSet": ""
}' | \
http POST '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.UpdateDeploymentGroup' \
content-type:application/json \
x-amz-target:''
wget --quiet \
--method POST \
--header 'x-amz-target: ' \
--header 'content-type: application/json' \
--body-data '{\n "applicationName": "",\n "currentDeploymentGroupName": "",\n "newDeploymentGroupName": "",\n "deploymentConfigName": "",\n "ec2TagFilters": "",\n "onPremisesInstanceTagFilters": "",\n "autoScalingGroups": "",\n "serviceRoleArn": "",\n "triggerConfigurations": "",\n "alarmConfiguration": "",\n "autoRollbackConfiguration": "",\n "outdatedInstancesStrategy": "",\n "deploymentStyle": "",\n "blueGreenDeploymentConfiguration": "",\n "loadBalancerInfo": "",\n "ec2TagSet": "",\n "ecsServices": "",\n "onPremisesTagSet": ""\n}' \
--output-document \
- '{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.UpdateDeploymentGroup'
import Foundation
let headers = [
"x-amz-target": "",
"content-type": "application/json"
]
let parameters = [
"applicationName": "",
"currentDeploymentGroupName": "",
"newDeploymentGroupName": "",
"deploymentConfigName": "",
"ec2TagFilters": "",
"onPremisesInstanceTagFilters": "",
"autoScalingGroups": "",
"serviceRoleArn": "",
"triggerConfigurations": "",
"alarmConfiguration": "",
"autoRollbackConfiguration": "",
"outdatedInstancesStrategy": "",
"deploymentStyle": "",
"blueGreenDeploymentConfiguration": "",
"loadBalancerInfo": "",
"ec2TagSet": "",
"ecsServices": "",
"onPremisesTagSet": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/#X-Amz-Target=CodeDeploy_20141006.UpdateDeploymentGroup")! 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()