AWS DataSync
AWS DataSyncv2018-11-09
DataSync DataSync is a managed data transfer service that makes it simpler for you to automate moving data between on-premises storage and Amazon Web Services storage services. You also can use DataSync to transfer data between other cloud providers and Amazon Web Services storage services. This API interface reference includes documentation for using DataSync programmatically. For complete information, see the DataSync User Guide .
- Endpoints
- 44 (44 POST)
- Base URL
http://datasync.{region}.amazonaws.com- Authentication
- API key
- Spec format
- OpenAPI 3.0.0
- API version
- 2018-11-09
- 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://datasync.{region}.amazonaws.com) and your API key credentials, then send requests.
POST
CancelTaskExecution
{{baseUrl}}/#X-Amz-Target=FmrsService.CancelTaskExecution
HEADERS
X-Amz-Target
BODY json
{
"TaskExecutionArn": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/#X-Amz-Target=FmrsService.CancelTaskExecution");
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 \"TaskExecutionArn\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/#X-Amz-Target=FmrsService.CancelTaskExecution" {:headers {:x-amz-target ""}
:content-type :json
:form-params {:TaskExecutionArn ""}})
require "http/client"
url = "{{baseUrl}}/#X-Amz-Target=FmrsService.CancelTaskExecution"
headers = HTTP::Headers{
"x-amz-target" => ""
"content-type" => "application/json"
}
reqBody = "{\n \"TaskExecutionArn\": \"\"\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=FmrsService.CancelTaskExecution"),
Headers =
{
{ "x-amz-target", "" },
},
Content = new StringContent("{\n \"TaskExecutionArn\": \"\"\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=FmrsService.CancelTaskExecution");
var request = new RestRequest("", Method.Post);
request.AddHeader("x-amz-target", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"TaskExecutionArn\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/#X-Amz-Target=FmrsService.CancelTaskExecution"
payload := strings.NewReader("{\n \"TaskExecutionArn\": \"\"\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
{
"TaskExecutionArn": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/#X-Amz-Target=FmrsService.CancelTaskExecution")
.setHeader("x-amz-target", "")
.setHeader("content-type", "application/json")
.setBody("{\n \"TaskExecutionArn\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/#X-Amz-Target=FmrsService.CancelTaskExecution"))
.header("x-amz-target", "")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"TaskExecutionArn\": \"\"\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 \"TaskExecutionArn\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=FmrsService.CancelTaskExecution")
.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=FmrsService.CancelTaskExecution")
.header("x-amz-target", "")
.header("content-type", "application/json")
.body("{\n \"TaskExecutionArn\": \"\"\n}")
.asString();
const data = JSON.stringify({
TaskExecutionArn: ''
});
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=FmrsService.CancelTaskExecution');
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=FmrsService.CancelTaskExecution',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {TaskExecutionArn: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/#X-Amz-Target=FmrsService.CancelTaskExecution';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"TaskExecutionArn":""}'
};
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=FmrsService.CancelTaskExecution',
method: 'POST',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
},
processData: false,
data: '{\n "TaskExecutionArn": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"TaskExecutionArn\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=FmrsService.CancelTaskExecution")
.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({TaskExecutionArn: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=FmrsService.CancelTaskExecution',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: {TaskExecutionArn: ''},
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=FmrsService.CancelTaskExecution');
req.headers({
'x-amz-target': '',
'content-type': 'application/json'
});
req.type('json');
req.send({
TaskExecutionArn: ''
});
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=FmrsService.CancelTaskExecution',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {TaskExecutionArn: ''}
};
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=FmrsService.CancelTaskExecution';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"TaskExecutionArn":""}'
};
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 = @{ @"TaskExecutionArn": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/#X-Amz-Target=FmrsService.CancelTaskExecution"]
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=FmrsService.CancelTaskExecution" in
let headers = Header.add_list (Header.init ()) [
("x-amz-target", "");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"TaskExecutionArn\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/#X-Amz-Target=FmrsService.CancelTaskExecution",
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([
'TaskExecutionArn' => ''
]),
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=FmrsService.CancelTaskExecution', [
'body' => '{
"TaskExecutionArn": ""
}',
'headers' => [
'content-type' => 'application/json',
'x-amz-target' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/#X-Amz-Target=FmrsService.CancelTaskExecution');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'TaskExecutionArn' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'TaskExecutionArn' => ''
]));
$request->setRequestUrl('{{baseUrl}}/#X-Amz-Target=FmrsService.CancelTaskExecution');
$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=FmrsService.CancelTaskExecution' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"TaskExecutionArn": ""
}'
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/#X-Amz-Target=FmrsService.CancelTaskExecution' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"TaskExecutionArn": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"TaskExecutionArn\": \"\"\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=FmrsService.CancelTaskExecution"
payload = { "TaskExecutionArn": "" }
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=FmrsService.CancelTaskExecution"
payload <- "{\n \"TaskExecutionArn\": \"\"\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=FmrsService.CancelTaskExecution")
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 \"TaskExecutionArn\": \"\"\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 \"TaskExecutionArn\": \"\"\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=FmrsService.CancelTaskExecution";
let payload = json!({"TaskExecutionArn": ""});
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=FmrsService.CancelTaskExecution' \
--header 'content-type: application/json' \
--header 'x-amz-target: ' \
--data '{
"TaskExecutionArn": ""
}'
echo '{
"TaskExecutionArn": ""
}' | \
http POST '{{baseUrl}}/#X-Amz-Target=FmrsService.CancelTaskExecution' \
content-type:application/json \
x-amz-target:''
wget --quiet \
--method POST \
--header 'x-amz-target: ' \
--header 'content-type: application/json' \
--body-data '{\n "TaskExecutionArn": ""\n}' \
--output-document \
- '{{baseUrl}}/#X-Amz-Target=FmrsService.CancelTaskExecution'
import Foundation
let headers = [
"x-amz-target": "",
"content-type": "application/json"
]
let parameters = ["TaskExecutionArn": ""] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/#X-Amz-Target=FmrsService.CancelTaskExecution")! 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
CreateAgent
{{baseUrl}}/#X-Amz-Target=FmrsService.CreateAgent
HEADERS
X-Amz-Target
BODY json
{
"ActivationKey": "",
"AgentName": "",
"Tags": "",
"VpcEndpointId": "",
"SubnetArns": "",
"SecurityGroupArns": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/#X-Amz-Target=FmrsService.CreateAgent");
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 \"ActivationKey\": \"\",\n \"AgentName\": \"\",\n \"Tags\": \"\",\n \"VpcEndpointId\": \"\",\n \"SubnetArns\": \"\",\n \"SecurityGroupArns\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/#X-Amz-Target=FmrsService.CreateAgent" {:headers {:x-amz-target ""}
:content-type :json
:form-params {:ActivationKey ""
:AgentName ""
:Tags ""
:VpcEndpointId ""
:SubnetArns ""
:SecurityGroupArns ""}})
require "http/client"
url = "{{baseUrl}}/#X-Amz-Target=FmrsService.CreateAgent"
headers = HTTP::Headers{
"x-amz-target" => ""
"content-type" => "application/json"
}
reqBody = "{\n \"ActivationKey\": \"\",\n \"AgentName\": \"\",\n \"Tags\": \"\",\n \"VpcEndpointId\": \"\",\n \"SubnetArns\": \"\",\n \"SecurityGroupArns\": \"\"\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=FmrsService.CreateAgent"),
Headers =
{
{ "x-amz-target", "" },
},
Content = new StringContent("{\n \"ActivationKey\": \"\",\n \"AgentName\": \"\",\n \"Tags\": \"\",\n \"VpcEndpointId\": \"\",\n \"SubnetArns\": \"\",\n \"SecurityGroupArns\": \"\"\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=FmrsService.CreateAgent");
var request = new RestRequest("", Method.Post);
request.AddHeader("x-amz-target", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"ActivationKey\": \"\",\n \"AgentName\": \"\",\n \"Tags\": \"\",\n \"VpcEndpointId\": \"\",\n \"SubnetArns\": \"\",\n \"SecurityGroupArns\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/#X-Amz-Target=FmrsService.CreateAgent"
payload := strings.NewReader("{\n \"ActivationKey\": \"\",\n \"AgentName\": \"\",\n \"Tags\": \"\",\n \"VpcEndpointId\": \"\",\n \"SubnetArns\": \"\",\n \"SecurityGroupArns\": \"\"\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: 128
{
"ActivationKey": "",
"AgentName": "",
"Tags": "",
"VpcEndpointId": "",
"SubnetArns": "",
"SecurityGroupArns": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/#X-Amz-Target=FmrsService.CreateAgent")
.setHeader("x-amz-target", "")
.setHeader("content-type", "application/json")
.setBody("{\n \"ActivationKey\": \"\",\n \"AgentName\": \"\",\n \"Tags\": \"\",\n \"VpcEndpointId\": \"\",\n \"SubnetArns\": \"\",\n \"SecurityGroupArns\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/#X-Amz-Target=FmrsService.CreateAgent"))
.header("x-amz-target", "")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"ActivationKey\": \"\",\n \"AgentName\": \"\",\n \"Tags\": \"\",\n \"VpcEndpointId\": \"\",\n \"SubnetArns\": \"\",\n \"SecurityGroupArns\": \"\"\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 \"ActivationKey\": \"\",\n \"AgentName\": \"\",\n \"Tags\": \"\",\n \"VpcEndpointId\": \"\",\n \"SubnetArns\": \"\",\n \"SecurityGroupArns\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=FmrsService.CreateAgent")
.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=FmrsService.CreateAgent")
.header("x-amz-target", "")
.header("content-type", "application/json")
.body("{\n \"ActivationKey\": \"\",\n \"AgentName\": \"\",\n \"Tags\": \"\",\n \"VpcEndpointId\": \"\",\n \"SubnetArns\": \"\",\n \"SecurityGroupArns\": \"\"\n}")
.asString();
const data = JSON.stringify({
ActivationKey: '',
AgentName: '',
Tags: '',
VpcEndpointId: '',
SubnetArns: '',
SecurityGroupArns: ''
});
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=FmrsService.CreateAgent');
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=FmrsService.CreateAgent',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {
ActivationKey: '',
AgentName: '',
Tags: '',
VpcEndpointId: '',
SubnetArns: '',
SecurityGroupArns: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/#X-Amz-Target=FmrsService.CreateAgent';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"ActivationKey":"","AgentName":"","Tags":"","VpcEndpointId":"","SubnetArns":"","SecurityGroupArns":""}'
};
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=FmrsService.CreateAgent',
method: 'POST',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
},
processData: false,
data: '{\n "ActivationKey": "",\n "AgentName": "",\n "Tags": "",\n "VpcEndpointId": "",\n "SubnetArns": "",\n "SecurityGroupArns": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"ActivationKey\": \"\",\n \"AgentName\": \"\",\n \"Tags\": \"\",\n \"VpcEndpointId\": \"\",\n \"SubnetArns\": \"\",\n \"SecurityGroupArns\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=FmrsService.CreateAgent")
.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({
ActivationKey: '',
AgentName: '',
Tags: '',
VpcEndpointId: '',
SubnetArns: '',
SecurityGroupArns: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=FmrsService.CreateAgent',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: {
ActivationKey: '',
AgentName: '',
Tags: '',
VpcEndpointId: '',
SubnetArns: '',
SecurityGroupArns: ''
},
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=FmrsService.CreateAgent');
req.headers({
'x-amz-target': '',
'content-type': 'application/json'
});
req.type('json');
req.send({
ActivationKey: '',
AgentName: '',
Tags: '',
VpcEndpointId: '',
SubnetArns: '',
SecurityGroupArns: ''
});
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=FmrsService.CreateAgent',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {
ActivationKey: '',
AgentName: '',
Tags: '',
VpcEndpointId: '',
SubnetArns: '',
SecurityGroupArns: ''
}
};
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=FmrsService.CreateAgent';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"ActivationKey":"","AgentName":"","Tags":"","VpcEndpointId":"","SubnetArns":"","SecurityGroupArns":""}'
};
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 = @{ @"ActivationKey": @"",
@"AgentName": @"",
@"Tags": @"",
@"VpcEndpointId": @"",
@"SubnetArns": @"",
@"SecurityGroupArns": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/#X-Amz-Target=FmrsService.CreateAgent"]
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=FmrsService.CreateAgent" in
let headers = Header.add_list (Header.init ()) [
("x-amz-target", "");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"ActivationKey\": \"\",\n \"AgentName\": \"\",\n \"Tags\": \"\",\n \"VpcEndpointId\": \"\",\n \"SubnetArns\": \"\",\n \"SecurityGroupArns\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/#X-Amz-Target=FmrsService.CreateAgent",
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([
'ActivationKey' => '',
'AgentName' => '',
'Tags' => '',
'VpcEndpointId' => '',
'SubnetArns' => '',
'SecurityGroupArns' => ''
]),
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=FmrsService.CreateAgent', [
'body' => '{
"ActivationKey": "",
"AgentName": "",
"Tags": "",
"VpcEndpointId": "",
"SubnetArns": "",
"SecurityGroupArns": ""
}',
'headers' => [
'content-type' => 'application/json',
'x-amz-target' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/#X-Amz-Target=FmrsService.CreateAgent');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'ActivationKey' => '',
'AgentName' => '',
'Tags' => '',
'VpcEndpointId' => '',
'SubnetArns' => '',
'SecurityGroupArns' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'ActivationKey' => '',
'AgentName' => '',
'Tags' => '',
'VpcEndpointId' => '',
'SubnetArns' => '',
'SecurityGroupArns' => ''
]));
$request->setRequestUrl('{{baseUrl}}/#X-Amz-Target=FmrsService.CreateAgent');
$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=FmrsService.CreateAgent' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"ActivationKey": "",
"AgentName": "",
"Tags": "",
"VpcEndpointId": "",
"SubnetArns": "",
"SecurityGroupArns": ""
}'
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/#X-Amz-Target=FmrsService.CreateAgent' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"ActivationKey": "",
"AgentName": "",
"Tags": "",
"VpcEndpointId": "",
"SubnetArns": "",
"SecurityGroupArns": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"ActivationKey\": \"\",\n \"AgentName\": \"\",\n \"Tags\": \"\",\n \"VpcEndpointId\": \"\",\n \"SubnetArns\": \"\",\n \"SecurityGroupArns\": \"\"\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=FmrsService.CreateAgent"
payload = {
"ActivationKey": "",
"AgentName": "",
"Tags": "",
"VpcEndpointId": "",
"SubnetArns": "",
"SecurityGroupArns": ""
}
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=FmrsService.CreateAgent"
payload <- "{\n \"ActivationKey\": \"\",\n \"AgentName\": \"\",\n \"Tags\": \"\",\n \"VpcEndpointId\": \"\",\n \"SubnetArns\": \"\",\n \"SecurityGroupArns\": \"\"\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=FmrsService.CreateAgent")
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 \"ActivationKey\": \"\",\n \"AgentName\": \"\",\n \"Tags\": \"\",\n \"VpcEndpointId\": \"\",\n \"SubnetArns\": \"\",\n \"SecurityGroupArns\": \"\"\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 \"ActivationKey\": \"\",\n \"AgentName\": \"\",\n \"Tags\": \"\",\n \"VpcEndpointId\": \"\",\n \"SubnetArns\": \"\",\n \"SecurityGroupArns\": \"\"\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=FmrsService.CreateAgent";
let payload = json!({
"ActivationKey": "",
"AgentName": "",
"Tags": "",
"VpcEndpointId": "",
"SubnetArns": "",
"SecurityGroupArns": ""
});
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=FmrsService.CreateAgent' \
--header 'content-type: application/json' \
--header 'x-amz-target: ' \
--data '{
"ActivationKey": "",
"AgentName": "",
"Tags": "",
"VpcEndpointId": "",
"SubnetArns": "",
"SecurityGroupArns": ""
}'
echo '{
"ActivationKey": "",
"AgentName": "",
"Tags": "",
"VpcEndpointId": "",
"SubnetArns": "",
"SecurityGroupArns": ""
}' | \
http POST '{{baseUrl}}/#X-Amz-Target=FmrsService.CreateAgent' \
content-type:application/json \
x-amz-target:''
wget --quiet \
--method POST \
--header 'x-amz-target: ' \
--header 'content-type: application/json' \
--body-data '{\n "ActivationKey": "",\n "AgentName": "",\n "Tags": "",\n "VpcEndpointId": "",\n "SubnetArns": "",\n "SecurityGroupArns": ""\n}' \
--output-document \
- '{{baseUrl}}/#X-Amz-Target=FmrsService.CreateAgent'
import Foundation
let headers = [
"x-amz-target": "",
"content-type": "application/json"
]
let parameters = [
"ActivationKey": "",
"AgentName": "",
"Tags": "",
"VpcEndpointId": "",
"SubnetArns": "",
"SecurityGroupArns": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/#X-Amz-Target=FmrsService.CreateAgent")! 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
CreateLocationEfs
{{baseUrl}}/#X-Amz-Target=FmrsService.CreateLocationEfs
HEADERS
X-Amz-Target
BODY json
{
"Subdirectory": "",
"EfsFilesystemArn": "",
"Ec2Config": "",
"Tags": "",
"AccessPointArn": "",
"FileSystemAccessRoleArn": "",
"InTransitEncryption": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/#X-Amz-Target=FmrsService.CreateLocationEfs");
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 \"Subdirectory\": \"\",\n \"EfsFilesystemArn\": \"\",\n \"Ec2Config\": \"\",\n \"Tags\": \"\",\n \"AccessPointArn\": \"\",\n \"FileSystemAccessRoleArn\": \"\",\n \"InTransitEncryption\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/#X-Amz-Target=FmrsService.CreateLocationEfs" {:headers {:x-amz-target ""}
:content-type :json
:form-params {:Subdirectory ""
:EfsFilesystemArn ""
:Ec2Config ""
:Tags ""
:AccessPointArn ""
:FileSystemAccessRoleArn ""
:InTransitEncryption ""}})
require "http/client"
url = "{{baseUrl}}/#X-Amz-Target=FmrsService.CreateLocationEfs"
headers = HTTP::Headers{
"x-amz-target" => ""
"content-type" => "application/json"
}
reqBody = "{\n \"Subdirectory\": \"\",\n \"EfsFilesystemArn\": \"\",\n \"Ec2Config\": \"\",\n \"Tags\": \"\",\n \"AccessPointArn\": \"\",\n \"FileSystemAccessRoleArn\": \"\",\n \"InTransitEncryption\": \"\"\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=FmrsService.CreateLocationEfs"),
Headers =
{
{ "x-amz-target", "" },
},
Content = new StringContent("{\n \"Subdirectory\": \"\",\n \"EfsFilesystemArn\": \"\",\n \"Ec2Config\": \"\",\n \"Tags\": \"\",\n \"AccessPointArn\": \"\",\n \"FileSystemAccessRoleArn\": \"\",\n \"InTransitEncryption\": \"\"\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=FmrsService.CreateLocationEfs");
var request = new RestRequest("", Method.Post);
request.AddHeader("x-amz-target", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"Subdirectory\": \"\",\n \"EfsFilesystemArn\": \"\",\n \"Ec2Config\": \"\",\n \"Tags\": \"\",\n \"AccessPointArn\": \"\",\n \"FileSystemAccessRoleArn\": \"\",\n \"InTransitEncryption\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/#X-Amz-Target=FmrsService.CreateLocationEfs"
payload := strings.NewReader("{\n \"Subdirectory\": \"\",\n \"EfsFilesystemArn\": \"\",\n \"Ec2Config\": \"\",\n \"Tags\": \"\",\n \"AccessPointArn\": \"\",\n \"FileSystemAccessRoleArn\": \"\",\n \"InTransitEncryption\": \"\"\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: 169
{
"Subdirectory": "",
"EfsFilesystemArn": "",
"Ec2Config": "",
"Tags": "",
"AccessPointArn": "",
"FileSystemAccessRoleArn": "",
"InTransitEncryption": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/#X-Amz-Target=FmrsService.CreateLocationEfs")
.setHeader("x-amz-target", "")
.setHeader("content-type", "application/json")
.setBody("{\n \"Subdirectory\": \"\",\n \"EfsFilesystemArn\": \"\",\n \"Ec2Config\": \"\",\n \"Tags\": \"\",\n \"AccessPointArn\": \"\",\n \"FileSystemAccessRoleArn\": \"\",\n \"InTransitEncryption\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/#X-Amz-Target=FmrsService.CreateLocationEfs"))
.header("x-amz-target", "")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"Subdirectory\": \"\",\n \"EfsFilesystemArn\": \"\",\n \"Ec2Config\": \"\",\n \"Tags\": \"\",\n \"AccessPointArn\": \"\",\n \"FileSystemAccessRoleArn\": \"\",\n \"InTransitEncryption\": \"\"\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 \"Subdirectory\": \"\",\n \"EfsFilesystemArn\": \"\",\n \"Ec2Config\": \"\",\n \"Tags\": \"\",\n \"AccessPointArn\": \"\",\n \"FileSystemAccessRoleArn\": \"\",\n \"InTransitEncryption\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=FmrsService.CreateLocationEfs")
.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=FmrsService.CreateLocationEfs")
.header("x-amz-target", "")
.header("content-type", "application/json")
.body("{\n \"Subdirectory\": \"\",\n \"EfsFilesystemArn\": \"\",\n \"Ec2Config\": \"\",\n \"Tags\": \"\",\n \"AccessPointArn\": \"\",\n \"FileSystemAccessRoleArn\": \"\",\n \"InTransitEncryption\": \"\"\n}")
.asString();
const data = JSON.stringify({
Subdirectory: '',
EfsFilesystemArn: '',
Ec2Config: '',
Tags: '',
AccessPointArn: '',
FileSystemAccessRoleArn: '',
InTransitEncryption: ''
});
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=FmrsService.CreateLocationEfs');
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=FmrsService.CreateLocationEfs',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {
Subdirectory: '',
EfsFilesystemArn: '',
Ec2Config: '',
Tags: '',
AccessPointArn: '',
FileSystemAccessRoleArn: '',
InTransitEncryption: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/#X-Amz-Target=FmrsService.CreateLocationEfs';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"Subdirectory":"","EfsFilesystemArn":"","Ec2Config":"","Tags":"","AccessPointArn":"","FileSystemAccessRoleArn":"","InTransitEncryption":""}'
};
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=FmrsService.CreateLocationEfs',
method: 'POST',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
},
processData: false,
data: '{\n "Subdirectory": "",\n "EfsFilesystemArn": "",\n "Ec2Config": "",\n "Tags": "",\n "AccessPointArn": "",\n "FileSystemAccessRoleArn": "",\n "InTransitEncryption": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"Subdirectory\": \"\",\n \"EfsFilesystemArn\": \"\",\n \"Ec2Config\": \"\",\n \"Tags\": \"\",\n \"AccessPointArn\": \"\",\n \"FileSystemAccessRoleArn\": \"\",\n \"InTransitEncryption\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=FmrsService.CreateLocationEfs")
.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({
Subdirectory: '',
EfsFilesystemArn: '',
Ec2Config: '',
Tags: '',
AccessPointArn: '',
FileSystemAccessRoleArn: '',
InTransitEncryption: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=FmrsService.CreateLocationEfs',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: {
Subdirectory: '',
EfsFilesystemArn: '',
Ec2Config: '',
Tags: '',
AccessPointArn: '',
FileSystemAccessRoleArn: '',
InTransitEncryption: ''
},
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=FmrsService.CreateLocationEfs');
req.headers({
'x-amz-target': '',
'content-type': 'application/json'
});
req.type('json');
req.send({
Subdirectory: '',
EfsFilesystemArn: '',
Ec2Config: '',
Tags: '',
AccessPointArn: '',
FileSystemAccessRoleArn: '',
InTransitEncryption: ''
});
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=FmrsService.CreateLocationEfs',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {
Subdirectory: '',
EfsFilesystemArn: '',
Ec2Config: '',
Tags: '',
AccessPointArn: '',
FileSystemAccessRoleArn: '',
InTransitEncryption: ''
}
};
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=FmrsService.CreateLocationEfs';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"Subdirectory":"","EfsFilesystemArn":"","Ec2Config":"","Tags":"","AccessPointArn":"","FileSystemAccessRoleArn":"","InTransitEncryption":""}'
};
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 = @{ @"Subdirectory": @"",
@"EfsFilesystemArn": @"",
@"Ec2Config": @"",
@"Tags": @"",
@"AccessPointArn": @"",
@"FileSystemAccessRoleArn": @"",
@"InTransitEncryption": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/#X-Amz-Target=FmrsService.CreateLocationEfs"]
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=FmrsService.CreateLocationEfs" in
let headers = Header.add_list (Header.init ()) [
("x-amz-target", "");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"Subdirectory\": \"\",\n \"EfsFilesystemArn\": \"\",\n \"Ec2Config\": \"\",\n \"Tags\": \"\",\n \"AccessPointArn\": \"\",\n \"FileSystemAccessRoleArn\": \"\",\n \"InTransitEncryption\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/#X-Amz-Target=FmrsService.CreateLocationEfs",
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([
'Subdirectory' => '',
'EfsFilesystemArn' => '',
'Ec2Config' => '',
'Tags' => '',
'AccessPointArn' => '',
'FileSystemAccessRoleArn' => '',
'InTransitEncryption' => ''
]),
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=FmrsService.CreateLocationEfs', [
'body' => '{
"Subdirectory": "",
"EfsFilesystemArn": "",
"Ec2Config": "",
"Tags": "",
"AccessPointArn": "",
"FileSystemAccessRoleArn": "",
"InTransitEncryption": ""
}',
'headers' => [
'content-type' => 'application/json',
'x-amz-target' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/#X-Amz-Target=FmrsService.CreateLocationEfs');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'Subdirectory' => '',
'EfsFilesystemArn' => '',
'Ec2Config' => '',
'Tags' => '',
'AccessPointArn' => '',
'FileSystemAccessRoleArn' => '',
'InTransitEncryption' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'Subdirectory' => '',
'EfsFilesystemArn' => '',
'Ec2Config' => '',
'Tags' => '',
'AccessPointArn' => '',
'FileSystemAccessRoleArn' => '',
'InTransitEncryption' => ''
]));
$request->setRequestUrl('{{baseUrl}}/#X-Amz-Target=FmrsService.CreateLocationEfs');
$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=FmrsService.CreateLocationEfs' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"Subdirectory": "",
"EfsFilesystemArn": "",
"Ec2Config": "",
"Tags": "",
"AccessPointArn": "",
"FileSystemAccessRoleArn": "",
"InTransitEncryption": ""
}'
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/#X-Amz-Target=FmrsService.CreateLocationEfs' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"Subdirectory": "",
"EfsFilesystemArn": "",
"Ec2Config": "",
"Tags": "",
"AccessPointArn": "",
"FileSystemAccessRoleArn": "",
"InTransitEncryption": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"Subdirectory\": \"\",\n \"EfsFilesystemArn\": \"\",\n \"Ec2Config\": \"\",\n \"Tags\": \"\",\n \"AccessPointArn\": \"\",\n \"FileSystemAccessRoleArn\": \"\",\n \"InTransitEncryption\": \"\"\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=FmrsService.CreateLocationEfs"
payload = {
"Subdirectory": "",
"EfsFilesystemArn": "",
"Ec2Config": "",
"Tags": "",
"AccessPointArn": "",
"FileSystemAccessRoleArn": "",
"InTransitEncryption": ""
}
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=FmrsService.CreateLocationEfs"
payload <- "{\n \"Subdirectory\": \"\",\n \"EfsFilesystemArn\": \"\",\n \"Ec2Config\": \"\",\n \"Tags\": \"\",\n \"AccessPointArn\": \"\",\n \"FileSystemAccessRoleArn\": \"\",\n \"InTransitEncryption\": \"\"\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=FmrsService.CreateLocationEfs")
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 \"Subdirectory\": \"\",\n \"EfsFilesystemArn\": \"\",\n \"Ec2Config\": \"\",\n \"Tags\": \"\",\n \"AccessPointArn\": \"\",\n \"FileSystemAccessRoleArn\": \"\",\n \"InTransitEncryption\": \"\"\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 \"Subdirectory\": \"\",\n \"EfsFilesystemArn\": \"\",\n \"Ec2Config\": \"\",\n \"Tags\": \"\",\n \"AccessPointArn\": \"\",\n \"FileSystemAccessRoleArn\": \"\",\n \"InTransitEncryption\": \"\"\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=FmrsService.CreateLocationEfs";
let payload = json!({
"Subdirectory": "",
"EfsFilesystemArn": "",
"Ec2Config": "",
"Tags": "",
"AccessPointArn": "",
"FileSystemAccessRoleArn": "",
"InTransitEncryption": ""
});
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=FmrsService.CreateLocationEfs' \
--header 'content-type: application/json' \
--header 'x-amz-target: ' \
--data '{
"Subdirectory": "",
"EfsFilesystemArn": "",
"Ec2Config": "",
"Tags": "",
"AccessPointArn": "",
"FileSystemAccessRoleArn": "",
"InTransitEncryption": ""
}'
echo '{
"Subdirectory": "",
"EfsFilesystemArn": "",
"Ec2Config": "",
"Tags": "",
"AccessPointArn": "",
"FileSystemAccessRoleArn": "",
"InTransitEncryption": ""
}' | \
http POST '{{baseUrl}}/#X-Amz-Target=FmrsService.CreateLocationEfs' \
content-type:application/json \
x-amz-target:''
wget --quiet \
--method POST \
--header 'x-amz-target: ' \
--header 'content-type: application/json' \
--body-data '{\n "Subdirectory": "",\n "EfsFilesystemArn": "",\n "Ec2Config": "",\n "Tags": "",\n "AccessPointArn": "",\n "FileSystemAccessRoleArn": "",\n "InTransitEncryption": ""\n}' \
--output-document \
- '{{baseUrl}}/#X-Amz-Target=FmrsService.CreateLocationEfs'
import Foundation
let headers = [
"x-amz-target": "",
"content-type": "application/json"
]
let parameters = [
"Subdirectory": "",
"EfsFilesystemArn": "",
"Ec2Config": "",
"Tags": "",
"AccessPointArn": "",
"FileSystemAccessRoleArn": "",
"InTransitEncryption": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/#X-Amz-Target=FmrsService.CreateLocationEfs")! 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
CreateLocationFsxLustre
{{baseUrl}}/#X-Amz-Target=FmrsService.CreateLocationFsxLustre
HEADERS
X-Amz-Target
BODY json
{
"FsxFilesystemArn": "",
"SecurityGroupArns": "",
"Subdirectory": "",
"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=FmrsService.CreateLocationFsxLustre");
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 \"FsxFilesystemArn\": \"\",\n \"SecurityGroupArns\": \"\",\n \"Subdirectory\": \"\",\n \"Tags\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/#X-Amz-Target=FmrsService.CreateLocationFsxLustre" {:headers {:x-amz-target ""}
:content-type :json
:form-params {:FsxFilesystemArn ""
:SecurityGroupArns ""
:Subdirectory ""
:Tags ""}})
require "http/client"
url = "{{baseUrl}}/#X-Amz-Target=FmrsService.CreateLocationFsxLustre"
headers = HTTP::Headers{
"x-amz-target" => ""
"content-type" => "application/json"
}
reqBody = "{\n \"FsxFilesystemArn\": \"\",\n \"SecurityGroupArns\": \"\",\n \"Subdirectory\": \"\",\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=FmrsService.CreateLocationFsxLustre"),
Headers =
{
{ "x-amz-target", "" },
},
Content = new StringContent("{\n \"FsxFilesystemArn\": \"\",\n \"SecurityGroupArns\": \"\",\n \"Subdirectory\": \"\",\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=FmrsService.CreateLocationFsxLustre");
var request = new RestRequest("", Method.Post);
request.AddHeader("x-amz-target", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"FsxFilesystemArn\": \"\",\n \"SecurityGroupArns\": \"\",\n \"Subdirectory\": \"\",\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=FmrsService.CreateLocationFsxLustre"
payload := strings.NewReader("{\n \"FsxFilesystemArn\": \"\",\n \"SecurityGroupArns\": \"\",\n \"Subdirectory\": \"\",\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: 91
{
"FsxFilesystemArn": "",
"SecurityGroupArns": "",
"Subdirectory": "",
"Tags": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/#X-Amz-Target=FmrsService.CreateLocationFsxLustre")
.setHeader("x-amz-target", "")
.setHeader("content-type", "application/json")
.setBody("{\n \"FsxFilesystemArn\": \"\",\n \"SecurityGroupArns\": \"\",\n \"Subdirectory\": \"\",\n \"Tags\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/#X-Amz-Target=FmrsService.CreateLocationFsxLustre"))
.header("x-amz-target", "")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"FsxFilesystemArn\": \"\",\n \"SecurityGroupArns\": \"\",\n \"Subdirectory\": \"\",\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 \"FsxFilesystemArn\": \"\",\n \"SecurityGroupArns\": \"\",\n \"Subdirectory\": \"\",\n \"Tags\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=FmrsService.CreateLocationFsxLustre")
.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=FmrsService.CreateLocationFsxLustre")
.header("x-amz-target", "")
.header("content-type", "application/json")
.body("{\n \"FsxFilesystemArn\": \"\",\n \"SecurityGroupArns\": \"\",\n \"Subdirectory\": \"\",\n \"Tags\": \"\"\n}")
.asString();
const data = JSON.stringify({
FsxFilesystemArn: '',
SecurityGroupArns: '',
Subdirectory: '',
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=FmrsService.CreateLocationFsxLustre');
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=FmrsService.CreateLocationFsxLustre',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {FsxFilesystemArn: '', SecurityGroupArns: '', Subdirectory: '', Tags: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/#X-Amz-Target=FmrsService.CreateLocationFsxLustre';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"FsxFilesystemArn":"","SecurityGroupArns":"","Subdirectory":"","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=FmrsService.CreateLocationFsxLustre',
method: 'POST',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
},
processData: false,
data: '{\n "FsxFilesystemArn": "",\n "SecurityGroupArns": "",\n "Subdirectory": "",\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 \"FsxFilesystemArn\": \"\",\n \"SecurityGroupArns\": \"\",\n \"Subdirectory\": \"\",\n \"Tags\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=FmrsService.CreateLocationFsxLustre")
.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({FsxFilesystemArn: '', SecurityGroupArns: '', Subdirectory: '', Tags: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=FmrsService.CreateLocationFsxLustre',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: {FsxFilesystemArn: '', SecurityGroupArns: '', Subdirectory: '', 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=FmrsService.CreateLocationFsxLustre');
req.headers({
'x-amz-target': '',
'content-type': 'application/json'
});
req.type('json');
req.send({
FsxFilesystemArn: '',
SecurityGroupArns: '',
Subdirectory: '',
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=FmrsService.CreateLocationFsxLustre',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {FsxFilesystemArn: '', SecurityGroupArns: '', Subdirectory: '', 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=FmrsService.CreateLocationFsxLustre';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"FsxFilesystemArn":"","SecurityGroupArns":"","Subdirectory":"","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 = @{ @"FsxFilesystemArn": @"",
@"SecurityGroupArns": @"",
@"Subdirectory": @"",
@"Tags": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/#X-Amz-Target=FmrsService.CreateLocationFsxLustre"]
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=FmrsService.CreateLocationFsxLustre" in
let headers = Header.add_list (Header.init ()) [
("x-amz-target", "");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"FsxFilesystemArn\": \"\",\n \"SecurityGroupArns\": \"\",\n \"Subdirectory\": \"\",\n \"Tags\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/#X-Amz-Target=FmrsService.CreateLocationFsxLustre",
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([
'FsxFilesystemArn' => '',
'SecurityGroupArns' => '',
'Subdirectory' => '',
'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=FmrsService.CreateLocationFsxLustre', [
'body' => '{
"FsxFilesystemArn": "",
"SecurityGroupArns": "",
"Subdirectory": "",
"Tags": ""
}',
'headers' => [
'content-type' => 'application/json',
'x-amz-target' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/#X-Amz-Target=FmrsService.CreateLocationFsxLustre');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'FsxFilesystemArn' => '',
'SecurityGroupArns' => '',
'Subdirectory' => '',
'Tags' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'FsxFilesystemArn' => '',
'SecurityGroupArns' => '',
'Subdirectory' => '',
'Tags' => ''
]));
$request->setRequestUrl('{{baseUrl}}/#X-Amz-Target=FmrsService.CreateLocationFsxLustre');
$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=FmrsService.CreateLocationFsxLustre' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"FsxFilesystemArn": "",
"SecurityGroupArns": "",
"Subdirectory": "",
"Tags": ""
}'
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/#X-Amz-Target=FmrsService.CreateLocationFsxLustre' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"FsxFilesystemArn": "",
"SecurityGroupArns": "",
"Subdirectory": "",
"Tags": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"FsxFilesystemArn\": \"\",\n \"SecurityGroupArns\": \"\",\n \"Subdirectory\": \"\",\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=FmrsService.CreateLocationFsxLustre"
payload = {
"FsxFilesystemArn": "",
"SecurityGroupArns": "",
"Subdirectory": "",
"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=FmrsService.CreateLocationFsxLustre"
payload <- "{\n \"FsxFilesystemArn\": \"\",\n \"SecurityGroupArns\": \"\",\n \"Subdirectory\": \"\",\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=FmrsService.CreateLocationFsxLustre")
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 \"FsxFilesystemArn\": \"\",\n \"SecurityGroupArns\": \"\",\n \"Subdirectory\": \"\",\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 \"FsxFilesystemArn\": \"\",\n \"SecurityGroupArns\": \"\",\n \"Subdirectory\": \"\",\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=FmrsService.CreateLocationFsxLustre";
let payload = json!({
"FsxFilesystemArn": "",
"SecurityGroupArns": "",
"Subdirectory": "",
"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=FmrsService.CreateLocationFsxLustre' \
--header 'content-type: application/json' \
--header 'x-amz-target: ' \
--data '{
"FsxFilesystemArn": "",
"SecurityGroupArns": "",
"Subdirectory": "",
"Tags": ""
}'
echo '{
"FsxFilesystemArn": "",
"SecurityGroupArns": "",
"Subdirectory": "",
"Tags": ""
}' | \
http POST '{{baseUrl}}/#X-Amz-Target=FmrsService.CreateLocationFsxLustre' \
content-type:application/json \
x-amz-target:''
wget --quiet \
--method POST \
--header 'x-amz-target: ' \
--header 'content-type: application/json' \
--body-data '{\n "FsxFilesystemArn": "",\n "SecurityGroupArns": "",\n "Subdirectory": "",\n "Tags": ""\n}' \
--output-document \
- '{{baseUrl}}/#X-Amz-Target=FmrsService.CreateLocationFsxLustre'
import Foundation
let headers = [
"x-amz-target": "",
"content-type": "application/json"
]
let parameters = [
"FsxFilesystemArn": "",
"SecurityGroupArns": "",
"Subdirectory": "",
"Tags": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/#X-Amz-Target=FmrsService.CreateLocationFsxLustre")! 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
CreateLocationFsxOntap
{{baseUrl}}/#X-Amz-Target=FmrsService.CreateLocationFsxOntap
HEADERS
X-Amz-Target
BODY json
{
"Protocol": {
"NFS": "",
"SMB": ""
},
"SecurityGroupArns": "",
"StorageVirtualMachineArn": "",
"Subdirectory": "",
"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=FmrsService.CreateLocationFsxOntap");
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 \"Protocol\": {\n \"NFS\": \"\",\n \"SMB\": \"\"\n },\n \"SecurityGroupArns\": \"\",\n \"StorageVirtualMachineArn\": \"\",\n \"Subdirectory\": \"\",\n \"Tags\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/#X-Amz-Target=FmrsService.CreateLocationFsxOntap" {:headers {:x-amz-target ""}
:content-type :json
:form-params {:Protocol {:NFS ""
:SMB ""}
:SecurityGroupArns ""
:StorageVirtualMachineArn ""
:Subdirectory ""
:Tags ""}})
require "http/client"
url = "{{baseUrl}}/#X-Amz-Target=FmrsService.CreateLocationFsxOntap"
headers = HTTP::Headers{
"x-amz-target" => ""
"content-type" => "application/json"
}
reqBody = "{\n \"Protocol\": {\n \"NFS\": \"\",\n \"SMB\": \"\"\n },\n \"SecurityGroupArns\": \"\",\n \"StorageVirtualMachineArn\": \"\",\n \"Subdirectory\": \"\",\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=FmrsService.CreateLocationFsxOntap"),
Headers =
{
{ "x-amz-target", "" },
},
Content = new StringContent("{\n \"Protocol\": {\n \"NFS\": \"\",\n \"SMB\": \"\"\n },\n \"SecurityGroupArns\": \"\",\n \"StorageVirtualMachineArn\": \"\",\n \"Subdirectory\": \"\",\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=FmrsService.CreateLocationFsxOntap");
var request = new RestRequest("", Method.Post);
request.AddHeader("x-amz-target", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"Protocol\": {\n \"NFS\": \"\",\n \"SMB\": \"\"\n },\n \"SecurityGroupArns\": \"\",\n \"StorageVirtualMachineArn\": \"\",\n \"Subdirectory\": \"\",\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=FmrsService.CreateLocationFsxOntap"
payload := strings.NewReader("{\n \"Protocol\": {\n \"NFS\": \"\",\n \"SMB\": \"\"\n },\n \"SecurityGroupArns\": \"\",\n \"StorageVirtualMachineArn\": \"\",\n \"Subdirectory\": \"\",\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: 149
{
"Protocol": {
"NFS": "",
"SMB": ""
},
"SecurityGroupArns": "",
"StorageVirtualMachineArn": "",
"Subdirectory": "",
"Tags": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/#X-Amz-Target=FmrsService.CreateLocationFsxOntap")
.setHeader("x-amz-target", "")
.setHeader("content-type", "application/json")
.setBody("{\n \"Protocol\": {\n \"NFS\": \"\",\n \"SMB\": \"\"\n },\n \"SecurityGroupArns\": \"\",\n \"StorageVirtualMachineArn\": \"\",\n \"Subdirectory\": \"\",\n \"Tags\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/#X-Amz-Target=FmrsService.CreateLocationFsxOntap"))
.header("x-amz-target", "")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"Protocol\": {\n \"NFS\": \"\",\n \"SMB\": \"\"\n },\n \"SecurityGroupArns\": \"\",\n \"StorageVirtualMachineArn\": \"\",\n \"Subdirectory\": \"\",\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 \"Protocol\": {\n \"NFS\": \"\",\n \"SMB\": \"\"\n },\n \"SecurityGroupArns\": \"\",\n \"StorageVirtualMachineArn\": \"\",\n \"Subdirectory\": \"\",\n \"Tags\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=FmrsService.CreateLocationFsxOntap")
.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=FmrsService.CreateLocationFsxOntap")
.header("x-amz-target", "")
.header("content-type", "application/json")
.body("{\n \"Protocol\": {\n \"NFS\": \"\",\n \"SMB\": \"\"\n },\n \"SecurityGroupArns\": \"\",\n \"StorageVirtualMachineArn\": \"\",\n \"Subdirectory\": \"\",\n \"Tags\": \"\"\n}")
.asString();
const data = JSON.stringify({
Protocol: {
NFS: '',
SMB: ''
},
SecurityGroupArns: '',
StorageVirtualMachineArn: '',
Subdirectory: '',
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=FmrsService.CreateLocationFsxOntap');
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=FmrsService.CreateLocationFsxOntap',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {
Protocol: {NFS: '', SMB: ''},
SecurityGroupArns: '',
StorageVirtualMachineArn: '',
Subdirectory: '',
Tags: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/#X-Amz-Target=FmrsService.CreateLocationFsxOntap';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"Protocol":{"NFS":"","SMB":""},"SecurityGroupArns":"","StorageVirtualMachineArn":"","Subdirectory":"","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=FmrsService.CreateLocationFsxOntap',
method: 'POST',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
},
processData: false,
data: '{\n "Protocol": {\n "NFS": "",\n "SMB": ""\n },\n "SecurityGroupArns": "",\n "StorageVirtualMachineArn": "",\n "Subdirectory": "",\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 \"Protocol\": {\n \"NFS\": \"\",\n \"SMB\": \"\"\n },\n \"SecurityGroupArns\": \"\",\n \"StorageVirtualMachineArn\": \"\",\n \"Subdirectory\": \"\",\n \"Tags\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=FmrsService.CreateLocationFsxOntap")
.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({
Protocol: {NFS: '', SMB: ''},
SecurityGroupArns: '',
StorageVirtualMachineArn: '',
Subdirectory: '',
Tags: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=FmrsService.CreateLocationFsxOntap',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: {
Protocol: {NFS: '', SMB: ''},
SecurityGroupArns: '',
StorageVirtualMachineArn: '',
Subdirectory: '',
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=FmrsService.CreateLocationFsxOntap');
req.headers({
'x-amz-target': '',
'content-type': 'application/json'
});
req.type('json');
req.send({
Protocol: {
NFS: '',
SMB: ''
},
SecurityGroupArns: '',
StorageVirtualMachineArn: '',
Subdirectory: '',
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=FmrsService.CreateLocationFsxOntap',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {
Protocol: {NFS: '', SMB: ''},
SecurityGroupArns: '',
StorageVirtualMachineArn: '',
Subdirectory: '',
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=FmrsService.CreateLocationFsxOntap';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"Protocol":{"NFS":"","SMB":""},"SecurityGroupArns":"","StorageVirtualMachineArn":"","Subdirectory":"","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 = @{ @"Protocol": @{ @"NFS": @"", @"SMB": @"" },
@"SecurityGroupArns": @"",
@"StorageVirtualMachineArn": @"",
@"Subdirectory": @"",
@"Tags": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/#X-Amz-Target=FmrsService.CreateLocationFsxOntap"]
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=FmrsService.CreateLocationFsxOntap" in
let headers = Header.add_list (Header.init ()) [
("x-amz-target", "");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"Protocol\": {\n \"NFS\": \"\",\n \"SMB\": \"\"\n },\n \"SecurityGroupArns\": \"\",\n \"StorageVirtualMachineArn\": \"\",\n \"Subdirectory\": \"\",\n \"Tags\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/#X-Amz-Target=FmrsService.CreateLocationFsxOntap",
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([
'Protocol' => [
'NFS' => '',
'SMB' => ''
],
'SecurityGroupArns' => '',
'StorageVirtualMachineArn' => '',
'Subdirectory' => '',
'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=FmrsService.CreateLocationFsxOntap', [
'body' => '{
"Protocol": {
"NFS": "",
"SMB": ""
},
"SecurityGroupArns": "",
"StorageVirtualMachineArn": "",
"Subdirectory": "",
"Tags": ""
}',
'headers' => [
'content-type' => 'application/json',
'x-amz-target' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/#X-Amz-Target=FmrsService.CreateLocationFsxOntap');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'Protocol' => [
'NFS' => '',
'SMB' => ''
],
'SecurityGroupArns' => '',
'StorageVirtualMachineArn' => '',
'Subdirectory' => '',
'Tags' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'Protocol' => [
'NFS' => '',
'SMB' => ''
],
'SecurityGroupArns' => '',
'StorageVirtualMachineArn' => '',
'Subdirectory' => '',
'Tags' => ''
]));
$request->setRequestUrl('{{baseUrl}}/#X-Amz-Target=FmrsService.CreateLocationFsxOntap');
$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=FmrsService.CreateLocationFsxOntap' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"Protocol": {
"NFS": "",
"SMB": ""
},
"SecurityGroupArns": "",
"StorageVirtualMachineArn": "",
"Subdirectory": "",
"Tags": ""
}'
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/#X-Amz-Target=FmrsService.CreateLocationFsxOntap' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"Protocol": {
"NFS": "",
"SMB": ""
},
"SecurityGroupArns": "",
"StorageVirtualMachineArn": "",
"Subdirectory": "",
"Tags": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"Protocol\": {\n \"NFS\": \"\",\n \"SMB\": \"\"\n },\n \"SecurityGroupArns\": \"\",\n \"StorageVirtualMachineArn\": \"\",\n \"Subdirectory\": \"\",\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=FmrsService.CreateLocationFsxOntap"
payload = {
"Protocol": {
"NFS": "",
"SMB": ""
},
"SecurityGroupArns": "",
"StorageVirtualMachineArn": "",
"Subdirectory": "",
"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=FmrsService.CreateLocationFsxOntap"
payload <- "{\n \"Protocol\": {\n \"NFS\": \"\",\n \"SMB\": \"\"\n },\n \"SecurityGroupArns\": \"\",\n \"StorageVirtualMachineArn\": \"\",\n \"Subdirectory\": \"\",\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=FmrsService.CreateLocationFsxOntap")
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 \"Protocol\": {\n \"NFS\": \"\",\n \"SMB\": \"\"\n },\n \"SecurityGroupArns\": \"\",\n \"StorageVirtualMachineArn\": \"\",\n \"Subdirectory\": \"\",\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 \"Protocol\": {\n \"NFS\": \"\",\n \"SMB\": \"\"\n },\n \"SecurityGroupArns\": \"\",\n \"StorageVirtualMachineArn\": \"\",\n \"Subdirectory\": \"\",\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=FmrsService.CreateLocationFsxOntap";
let payload = json!({
"Protocol": json!({
"NFS": "",
"SMB": ""
}),
"SecurityGroupArns": "",
"StorageVirtualMachineArn": "",
"Subdirectory": "",
"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=FmrsService.CreateLocationFsxOntap' \
--header 'content-type: application/json' \
--header 'x-amz-target: ' \
--data '{
"Protocol": {
"NFS": "",
"SMB": ""
},
"SecurityGroupArns": "",
"StorageVirtualMachineArn": "",
"Subdirectory": "",
"Tags": ""
}'
echo '{
"Protocol": {
"NFS": "",
"SMB": ""
},
"SecurityGroupArns": "",
"StorageVirtualMachineArn": "",
"Subdirectory": "",
"Tags": ""
}' | \
http POST '{{baseUrl}}/#X-Amz-Target=FmrsService.CreateLocationFsxOntap' \
content-type:application/json \
x-amz-target:''
wget --quiet \
--method POST \
--header 'x-amz-target: ' \
--header 'content-type: application/json' \
--body-data '{\n "Protocol": {\n "NFS": "",\n "SMB": ""\n },\n "SecurityGroupArns": "",\n "StorageVirtualMachineArn": "",\n "Subdirectory": "",\n "Tags": ""\n}' \
--output-document \
- '{{baseUrl}}/#X-Amz-Target=FmrsService.CreateLocationFsxOntap'
import Foundation
let headers = [
"x-amz-target": "",
"content-type": "application/json"
]
let parameters = [
"Protocol": [
"NFS": "",
"SMB": ""
],
"SecurityGroupArns": "",
"StorageVirtualMachineArn": "",
"Subdirectory": "",
"Tags": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/#X-Amz-Target=FmrsService.CreateLocationFsxOntap")! 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
CreateLocationFsxOpenZfs
{{baseUrl}}/#X-Amz-Target=FmrsService.CreateLocationFsxOpenZfs
HEADERS
X-Amz-Target
BODY json
{
"FsxFilesystemArn": "",
"Protocol": "",
"SecurityGroupArns": "",
"Subdirectory": "",
"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=FmrsService.CreateLocationFsxOpenZfs");
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 \"FsxFilesystemArn\": \"\",\n \"Protocol\": \"\",\n \"SecurityGroupArns\": \"\",\n \"Subdirectory\": \"\",\n \"Tags\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/#X-Amz-Target=FmrsService.CreateLocationFsxOpenZfs" {:headers {:x-amz-target ""}
:content-type :json
:form-params {:FsxFilesystemArn ""
:Protocol ""
:SecurityGroupArns ""
:Subdirectory ""
:Tags ""}})
require "http/client"
url = "{{baseUrl}}/#X-Amz-Target=FmrsService.CreateLocationFsxOpenZfs"
headers = HTTP::Headers{
"x-amz-target" => ""
"content-type" => "application/json"
}
reqBody = "{\n \"FsxFilesystemArn\": \"\",\n \"Protocol\": \"\",\n \"SecurityGroupArns\": \"\",\n \"Subdirectory\": \"\",\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=FmrsService.CreateLocationFsxOpenZfs"),
Headers =
{
{ "x-amz-target", "" },
},
Content = new StringContent("{\n \"FsxFilesystemArn\": \"\",\n \"Protocol\": \"\",\n \"SecurityGroupArns\": \"\",\n \"Subdirectory\": \"\",\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=FmrsService.CreateLocationFsxOpenZfs");
var request = new RestRequest("", Method.Post);
request.AddHeader("x-amz-target", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"FsxFilesystemArn\": \"\",\n \"Protocol\": \"\",\n \"SecurityGroupArns\": \"\",\n \"Subdirectory\": \"\",\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=FmrsService.CreateLocationFsxOpenZfs"
payload := strings.NewReader("{\n \"FsxFilesystemArn\": \"\",\n \"Protocol\": \"\",\n \"SecurityGroupArns\": \"\",\n \"Subdirectory\": \"\",\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: 109
{
"FsxFilesystemArn": "",
"Protocol": "",
"SecurityGroupArns": "",
"Subdirectory": "",
"Tags": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/#X-Amz-Target=FmrsService.CreateLocationFsxOpenZfs")
.setHeader("x-amz-target", "")
.setHeader("content-type", "application/json")
.setBody("{\n \"FsxFilesystemArn\": \"\",\n \"Protocol\": \"\",\n \"SecurityGroupArns\": \"\",\n \"Subdirectory\": \"\",\n \"Tags\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/#X-Amz-Target=FmrsService.CreateLocationFsxOpenZfs"))
.header("x-amz-target", "")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"FsxFilesystemArn\": \"\",\n \"Protocol\": \"\",\n \"SecurityGroupArns\": \"\",\n \"Subdirectory\": \"\",\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 \"FsxFilesystemArn\": \"\",\n \"Protocol\": \"\",\n \"SecurityGroupArns\": \"\",\n \"Subdirectory\": \"\",\n \"Tags\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=FmrsService.CreateLocationFsxOpenZfs")
.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=FmrsService.CreateLocationFsxOpenZfs")
.header("x-amz-target", "")
.header("content-type", "application/json")
.body("{\n \"FsxFilesystemArn\": \"\",\n \"Protocol\": \"\",\n \"SecurityGroupArns\": \"\",\n \"Subdirectory\": \"\",\n \"Tags\": \"\"\n}")
.asString();
const data = JSON.stringify({
FsxFilesystemArn: '',
Protocol: '',
SecurityGroupArns: '',
Subdirectory: '',
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=FmrsService.CreateLocationFsxOpenZfs');
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=FmrsService.CreateLocationFsxOpenZfs',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {
FsxFilesystemArn: '',
Protocol: '',
SecurityGroupArns: '',
Subdirectory: '',
Tags: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/#X-Amz-Target=FmrsService.CreateLocationFsxOpenZfs';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"FsxFilesystemArn":"","Protocol":"","SecurityGroupArns":"","Subdirectory":"","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=FmrsService.CreateLocationFsxOpenZfs',
method: 'POST',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
},
processData: false,
data: '{\n "FsxFilesystemArn": "",\n "Protocol": "",\n "SecurityGroupArns": "",\n "Subdirectory": "",\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 \"FsxFilesystemArn\": \"\",\n \"Protocol\": \"\",\n \"SecurityGroupArns\": \"\",\n \"Subdirectory\": \"\",\n \"Tags\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=FmrsService.CreateLocationFsxOpenZfs")
.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({
FsxFilesystemArn: '',
Protocol: '',
SecurityGroupArns: '',
Subdirectory: '',
Tags: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=FmrsService.CreateLocationFsxOpenZfs',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: {
FsxFilesystemArn: '',
Protocol: '',
SecurityGroupArns: '',
Subdirectory: '',
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=FmrsService.CreateLocationFsxOpenZfs');
req.headers({
'x-amz-target': '',
'content-type': 'application/json'
});
req.type('json');
req.send({
FsxFilesystemArn: '',
Protocol: '',
SecurityGroupArns: '',
Subdirectory: '',
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=FmrsService.CreateLocationFsxOpenZfs',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {
FsxFilesystemArn: '',
Protocol: '',
SecurityGroupArns: '',
Subdirectory: '',
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=FmrsService.CreateLocationFsxOpenZfs';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"FsxFilesystemArn":"","Protocol":"","SecurityGroupArns":"","Subdirectory":"","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 = @{ @"FsxFilesystemArn": @"",
@"Protocol": @"",
@"SecurityGroupArns": @"",
@"Subdirectory": @"",
@"Tags": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/#X-Amz-Target=FmrsService.CreateLocationFsxOpenZfs"]
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=FmrsService.CreateLocationFsxOpenZfs" in
let headers = Header.add_list (Header.init ()) [
("x-amz-target", "");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"FsxFilesystemArn\": \"\",\n \"Protocol\": \"\",\n \"SecurityGroupArns\": \"\",\n \"Subdirectory\": \"\",\n \"Tags\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/#X-Amz-Target=FmrsService.CreateLocationFsxOpenZfs",
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([
'FsxFilesystemArn' => '',
'Protocol' => '',
'SecurityGroupArns' => '',
'Subdirectory' => '',
'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=FmrsService.CreateLocationFsxOpenZfs', [
'body' => '{
"FsxFilesystemArn": "",
"Protocol": "",
"SecurityGroupArns": "",
"Subdirectory": "",
"Tags": ""
}',
'headers' => [
'content-type' => 'application/json',
'x-amz-target' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/#X-Amz-Target=FmrsService.CreateLocationFsxOpenZfs');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'FsxFilesystemArn' => '',
'Protocol' => '',
'SecurityGroupArns' => '',
'Subdirectory' => '',
'Tags' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'FsxFilesystemArn' => '',
'Protocol' => '',
'SecurityGroupArns' => '',
'Subdirectory' => '',
'Tags' => ''
]));
$request->setRequestUrl('{{baseUrl}}/#X-Amz-Target=FmrsService.CreateLocationFsxOpenZfs');
$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=FmrsService.CreateLocationFsxOpenZfs' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"FsxFilesystemArn": "",
"Protocol": "",
"SecurityGroupArns": "",
"Subdirectory": "",
"Tags": ""
}'
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/#X-Amz-Target=FmrsService.CreateLocationFsxOpenZfs' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"FsxFilesystemArn": "",
"Protocol": "",
"SecurityGroupArns": "",
"Subdirectory": "",
"Tags": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"FsxFilesystemArn\": \"\",\n \"Protocol\": \"\",\n \"SecurityGroupArns\": \"\",\n \"Subdirectory\": \"\",\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=FmrsService.CreateLocationFsxOpenZfs"
payload = {
"FsxFilesystemArn": "",
"Protocol": "",
"SecurityGroupArns": "",
"Subdirectory": "",
"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=FmrsService.CreateLocationFsxOpenZfs"
payload <- "{\n \"FsxFilesystemArn\": \"\",\n \"Protocol\": \"\",\n \"SecurityGroupArns\": \"\",\n \"Subdirectory\": \"\",\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=FmrsService.CreateLocationFsxOpenZfs")
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 \"FsxFilesystemArn\": \"\",\n \"Protocol\": \"\",\n \"SecurityGroupArns\": \"\",\n \"Subdirectory\": \"\",\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 \"FsxFilesystemArn\": \"\",\n \"Protocol\": \"\",\n \"SecurityGroupArns\": \"\",\n \"Subdirectory\": \"\",\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=FmrsService.CreateLocationFsxOpenZfs";
let payload = json!({
"FsxFilesystemArn": "",
"Protocol": "",
"SecurityGroupArns": "",
"Subdirectory": "",
"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=FmrsService.CreateLocationFsxOpenZfs' \
--header 'content-type: application/json' \
--header 'x-amz-target: ' \
--data '{
"FsxFilesystemArn": "",
"Protocol": "",
"SecurityGroupArns": "",
"Subdirectory": "",
"Tags": ""
}'
echo '{
"FsxFilesystemArn": "",
"Protocol": "",
"SecurityGroupArns": "",
"Subdirectory": "",
"Tags": ""
}' | \
http POST '{{baseUrl}}/#X-Amz-Target=FmrsService.CreateLocationFsxOpenZfs' \
content-type:application/json \
x-amz-target:''
wget --quiet \
--method POST \
--header 'x-amz-target: ' \
--header 'content-type: application/json' \
--body-data '{\n "FsxFilesystemArn": "",\n "Protocol": "",\n "SecurityGroupArns": "",\n "Subdirectory": "",\n "Tags": ""\n}' \
--output-document \
- '{{baseUrl}}/#X-Amz-Target=FmrsService.CreateLocationFsxOpenZfs'
import Foundation
let headers = [
"x-amz-target": "",
"content-type": "application/json"
]
let parameters = [
"FsxFilesystemArn": "",
"Protocol": "",
"SecurityGroupArns": "",
"Subdirectory": "",
"Tags": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/#X-Amz-Target=FmrsService.CreateLocationFsxOpenZfs")! 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
CreateLocationFsxWindows
{{baseUrl}}/#X-Amz-Target=FmrsService.CreateLocationFsxWindows
HEADERS
X-Amz-Target
BODY json
{
"Subdirectory": "",
"FsxFilesystemArn": "",
"SecurityGroupArns": "",
"Tags": "",
"User": "",
"Domain": "",
"Password": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/#X-Amz-Target=FmrsService.CreateLocationFsxWindows");
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 \"Subdirectory\": \"\",\n \"FsxFilesystemArn\": \"\",\n \"SecurityGroupArns\": \"\",\n \"Tags\": \"\",\n \"User\": \"\",\n \"Domain\": \"\",\n \"Password\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/#X-Amz-Target=FmrsService.CreateLocationFsxWindows" {:headers {:x-amz-target ""}
:content-type :json
:form-params {:Subdirectory ""
:FsxFilesystemArn ""
:SecurityGroupArns ""
:Tags ""
:User ""
:Domain ""
:Password ""}})
require "http/client"
url = "{{baseUrl}}/#X-Amz-Target=FmrsService.CreateLocationFsxWindows"
headers = HTTP::Headers{
"x-amz-target" => ""
"content-type" => "application/json"
}
reqBody = "{\n \"Subdirectory\": \"\",\n \"FsxFilesystemArn\": \"\",\n \"SecurityGroupArns\": \"\",\n \"Tags\": \"\",\n \"User\": \"\",\n \"Domain\": \"\",\n \"Password\": \"\"\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=FmrsService.CreateLocationFsxWindows"),
Headers =
{
{ "x-amz-target", "" },
},
Content = new StringContent("{\n \"Subdirectory\": \"\",\n \"FsxFilesystemArn\": \"\",\n \"SecurityGroupArns\": \"\",\n \"Tags\": \"\",\n \"User\": \"\",\n \"Domain\": \"\",\n \"Password\": \"\"\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=FmrsService.CreateLocationFsxWindows");
var request = new RestRequest("", Method.Post);
request.AddHeader("x-amz-target", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"Subdirectory\": \"\",\n \"FsxFilesystemArn\": \"\",\n \"SecurityGroupArns\": \"\",\n \"Tags\": \"\",\n \"User\": \"\",\n \"Domain\": \"\",\n \"Password\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/#X-Amz-Target=FmrsService.CreateLocationFsxWindows"
payload := strings.NewReader("{\n \"Subdirectory\": \"\",\n \"FsxFilesystemArn\": \"\",\n \"SecurityGroupArns\": \"\",\n \"Tags\": \"\",\n \"User\": \"\",\n \"Domain\": \"\",\n \"Password\": \"\"\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: 139
{
"Subdirectory": "",
"FsxFilesystemArn": "",
"SecurityGroupArns": "",
"Tags": "",
"User": "",
"Domain": "",
"Password": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/#X-Amz-Target=FmrsService.CreateLocationFsxWindows")
.setHeader("x-amz-target", "")
.setHeader("content-type", "application/json")
.setBody("{\n \"Subdirectory\": \"\",\n \"FsxFilesystemArn\": \"\",\n \"SecurityGroupArns\": \"\",\n \"Tags\": \"\",\n \"User\": \"\",\n \"Domain\": \"\",\n \"Password\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/#X-Amz-Target=FmrsService.CreateLocationFsxWindows"))
.header("x-amz-target", "")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"Subdirectory\": \"\",\n \"FsxFilesystemArn\": \"\",\n \"SecurityGroupArns\": \"\",\n \"Tags\": \"\",\n \"User\": \"\",\n \"Domain\": \"\",\n \"Password\": \"\"\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 \"Subdirectory\": \"\",\n \"FsxFilesystemArn\": \"\",\n \"SecurityGroupArns\": \"\",\n \"Tags\": \"\",\n \"User\": \"\",\n \"Domain\": \"\",\n \"Password\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=FmrsService.CreateLocationFsxWindows")
.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=FmrsService.CreateLocationFsxWindows")
.header("x-amz-target", "")
.header("content-type", "application/json")
.body("{\n \"Subdirectory\": \"\",\n \"FsxFilesystemArn\": \"\",\n \"SecurityGroupArns\": \"\",\n \"Tags\": \"\",\n \"User\": \"\",\n \"Domain\": \"\",\n \"Password\": \"\"\n}")
.asString();
const data = JSON.stringify({
Subdirectory: '',
FsxFilesystemArn: '',
SecurityGroupArns: '',
Tags: '',
User: '',
Domain: '',
Password: ''
});
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=FmrsService.CreateLocationFsxWindows');
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=FmrsService.CreateLocationFsxWindows',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {
Subdirectory: '',
FsxFilesystemArn: '',
SecurityGroupArns: '',
Tags: '',
User: '',
Domain: '',
Password: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/#X-Amz-Target=FmrsService.CreateLocationFsxWindows';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"Subdirectory":"","FsxFilesystemArn":"","SecurityGroupArns":"","Tags":"","User":"","Domain":"","Password":""}'
};
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=FmrsService.CreateLocationFsxWindows',
method: 'POST',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
},
processData: false,
data: '{\n "Subdirectory": "",\n "FsxFilesystemArn": "",\n "SecurityGroupArns": "",\n "Tags": "",\n "User": "",\n "Domain": "",\n "Password": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"Subdirectory\": \"\",\n \"FsxFilesystemArn\": \"\",\n \"SecurityGroupArns\": \"\",\n \"Tags\": \"\",\n \"User\": \"\",\n \"Domain\": \"\",\n \"Password\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=FmrsService.CreateLocationFsxWindows")
.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({
Subdirectory: '',
FsxFilesystemArn: '',
SecurityGroupArns: '',
Tags: '',
User: '',
Domain: '',
Password: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=FmrsService.CreateLocationFsxWindows',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: {
Subdirectory: '',
FsxFilesystemArn: '',
SecurityGroupArns: '',
Tags: '',
User: '',
Domain: '',
Password: ''
},
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=FmrsService.CreateLocationFsxWindows');
req.headers({
'x-amz-target': '',
'content-type': 'application/json'
});
req.type('json');
req.send({
Subdirectory: '',
FsxFilesystemArn: '',
SecurityGroupArns: '',
Tags: '',
User: '',
Domain: '',
Password: ''
});
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=FmrsService.CreateLocationFsxWindows',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {
Subdirectory: '',
FsxFilesystemArn: '',
SecurityGroupArns: '',
Tags: '',
User: '',
Domain: '',
Password: ''
}
};
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=FmrsService.CreateLocationFsxWindows';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"Subdirectory":"","FsxFilesystemArn":"","SecurityGroupArns":"","Tags":"","User":"","Domain":"","Password":""}'
};
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 = @{ @"Subdirectory": @"",
@"FsxFilesystemArn": @"",
@"SecurityGroupArns": @"",
@"Tags": @"",
@"User": @"",
@"Domain": @"",
@"Password": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/#X-Amz-Target=FmrsService.CreateLocationFsxWindows"]
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=FmrsService.CreateLocationFsxWindows" in
let headers = Header.add_list (Header.init ()) [
("x-amz-target", "");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"Subdirectory\": \"\",\n \"FsxFilesystemArn\": \"\",\n \"SecurityGroupArns\": \"\",\n \"Tags\": \"\",\n \"User\": \"\",\n \"Domain\": \"\",\n \"Password\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/#X-Amz-Target=FmrsService.CreateLocationFsxWindows",
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([
'Subdirectory' => '',
'FsxFilesystemArn' => '',
'SecurityGroupArns' => '',
'Tags' => '',
'User' => '',
'Domain' => '',
'Password' => ''
]),
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=FmrsService.CreateLocationFsxWindows', [
'body' => '{
"Subdirectory": "",
"FsxFilesystemArn": "",
"SecurityGroupArns": "",
"Tags": "",
"User": "",
"Domain": "",
"Password": ""
}',
'headers' => [
'content-type' => 'application/json',
'x-amz-target' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/#X-Amz-Target=FmrsService.CreateLocationFsxWindows');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'Subdirectory' => '',
'FsxFilesystemArn' => '',
'SecurityGroupArns' => '',
'Tags' => '',
'User' => '',
'Domain' => '',
'Password' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'Subdirectory' => '',
'FsxFilesystemArn' => '',
'SecurityGroupArns' => '',
'Tags' => '',
'User' => '',
'Domain' => '',
'Password' => ''
]));
$request->setRequestUrl('{{baseUrl}}/#X-Amz-Target=FmrsService.CreateLocationFsxWindows');
$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=FmrsService.CreateLocationFsxWindows' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"Subdirectory": "",
"FsxFilesystemArn": "",
"SecurityGroupArns": "",
"Tags": "",
"User": "",
"Domain": "",
"Password": ""
}'
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/#X-Amz-Target=FmrsService.CreateLocationFsxWindows' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"Subdirectory": "",
"FsxFilesystemArn": "",
"SecurityGroupArns": "",
"Tags": "",
"User": "",
"Domain": "",
"Password": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"Subdirectory\": \"\",\n \"FsxFilesystemArn\": \"\",\n \"SecurityGroupArns\": \"\",\n \"Tags\": \"\",\n \"User\": \"\",\n \"Domain\": \"\",\n \"Password\": \"\"\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=FmrsService.CreateLocationFsxWindows"
payload = {
"Subdirectory": "",
"FsxFilesystemArn": "",
"SecurityGroupArns": "",
"Tags": "",
"User": "",
"Domain": "",
"Password": ""
}
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=FmrsService.CreateLocationFsxWindows"
payload <- "{\n \"Subdirectory\": \"\",\n \"FsxFilesystemArn\": \"\",\n \"SecurityGroupArns\": \"\",\n \"Tags\": \"\",\n \"User\": \"\",\n \"Domain\": \"\",\n \"Password\": \"\"\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=FmrsService.CreateLocationFsxWindows")
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 \"Subdirectory\": \"\",\n \"FsxFilesystemArn\": \"\",\n \"SecurityGroupArns\": \"\",\n \"Tags\": \"\",\n \"User\": \"\",\n \"Domain\": \"\",\n \"Password\": \"\"\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 \"Subdirectory\": \"\",\n \"FsxFilesystemArn\": \"\",\n \"SecurityGroupArns\": \"\",\n \"Tags\": \"\",\n \"User\": \"\",\n \"Domain\": \"\",\n \"Password\": \"\"\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=FmrsService.CreateLocationFsxWindows";
let payload = json!({
"Subdirectory": "",
"FsxFilesystemArn": "",
"SecurityGroupArns": "",
"Tags": "",
"User": "",
"Domain": "",
"Password": ""
});
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=FmrsService.CreateLocationFsxWindows' \
--header 'content-type: application/json' \
--header 'x-amz-target: ' \
--data '{
"Subdirectory": "",
"FsxFilesystemArn": "",
"SecurityGroupArns": "",
"Tags": "",
"User": "",
"Domain": "",
"Password": ""
}'
echo '{
"Subdirectory": "",
"FsxFilesystemArn": "",
"SecurityGroupArns": "",
"Tags": "",
"User": "",
"Domain": "",
"Password": ""
}' | \
http POST '{{baseUrl}}/#X-Amz-Target=FmrsService.CreateLocationFsxWindows' \
content-type:application/json \
x-amz-target:''
wget --quiet \
--method POST \
--header 'x-amz-target: ' \
--header 'content-type: application/json' \
--body-data '{\n "Subdirectory": "",\n "FsxFilesystemArn": "",\n "SecurityGroupArns": "",\n "Tags": "",\n "User": "",\n "Domain": "",\n "Password": ""\n}' \
--output-document \
- '{{baseUrl}}/#X-Amz-Target=FmrsService.CreateLocationFsxWindows'
import Foundation
let headers = [
"x-amz-target": "",
"content-type": "application/json"
]
let parameters = [
"Subdirectory": "",
"FsxFilesystemArn": "",
"SecurityGroupArns": "",
"Tags": "",
"User": "",
"Domain": "",
"Password": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/#X-Amz-Target=FmrsService.CreateLocationFsxWindows")! 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
CreateLocationHdfs
{{baseUrl}}/#X-Amz-Target=FmrsService.CreateLocationHdfs
HEADERS
X-Amz-Target
BODY json
{
"Subdirectory": "",
"NameNodes": "",
"BlockSize": "",
"ReplicationFactor": "",
"KmsKeyProviderUri": "",
"QopConfiguration": "",
"AuthenticationType": "",
"SimpleUser": "",
"KerberosPrincipal": "",
"KerberosKeytab": "",
"KerberosKrb5Conf": "",
"AgentArns": "",
"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=FmrsService.CreateLocationHdfs");
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 \"Subdirectory\": \"\",\n \"NameNodes\": \"\",\n \"BlockSize\": \"\",\n \"ReplicationFactor\": \"\",\n \"KmsKeyProviderUri\": \"\",\n \"QopConfiguration\": \"\",\n \"AuthenticationType\": \"\",\n \"SimpleUser\": \"\",\n \"KerberosPrincipal\": \"\",\n \"KerberosKeytab\": \"\",\n \"KerberosKrb5Conf\": \"\",\n \"AgentArns\": \"\",\n \"Tags\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/#X-Amz-Target=FmrsService.CreateLocationHdfs" {:headers {:x-amz-target ""}
:content-type :json
:form-params {:Subdirectory ""
:NameNodes ""
:BlockSize ""
:ReplicationFactor ""
:KmsKeyProviderUri ""
:QopConfiguration ""
:AuthenticationType ""
:SimpleUser ""
:KerberosPrincipal ""
:KerberosKeytab ""
:KerberosKrb5Conf ""
:AgentArns ""
:Tags ""}})
require "http/client"
url = "{{baseUrl}}/#X-Amz-Target=FmrsService.CreateLocationHdfs"
headers = HTTP::Headers{
"x-amz-target" => ""
"content-type" => "application/json"
}
reqBody = "{\n \"Subdirectory\": \"\",\n \"NameNodes\": \"\",\n \"BlockSize\": \"\",\n \"ReplicationFactor\": \"\",\n \"KmsKeyProviderUri\": \"\",\n \"QopConfiguration\": \"\",\n \"AuthenticationType\": \"\",\n \"SimpleUser\": \"\",\n \"KerberosPrincipal\": \"\",\n \"KerberosKeytab\": \"\",\n \"KerberosKrb5Conf\": \"\",\n \"AgentArns\": \"\",\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=FmrsService.CreateLocationHdfs"),
Headers =
{
{ "x-amz-target", "" },
},
Content = new StringContent("{\n \"Subdirectory\": \"\",\n \"NameNodes\": \"\",\n \"BlockSize\": \"\",\n \"ReplicationFactor\": \"\",\n \"KmsKeyProviderUri\": \"\",\n \"QopConfiguration\": \"\",\n \"AuthenticationType\": \"\",\n \"SimpleUser\": \"\",\n \"KerberosPrincipal\": \"\",\n \"KerberosKeytab\": \"\",\n \"KerberosKrb5Conf\": \"\",\n \"AgentArns\": \"\",\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=FmrsService.CreateLocationHdfs");
var request = new RestRequest("", Method.Post);
request.AddHeader("x-amz-target", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"Subdirectory\": \"\",\n \"NameNodes\": \"\",\n \"BlockSize\": \"\",\n \"ReplicationFactor\": \"\",\n \"KmsKeyProviderUri\": \"\",\n \"QopConfiguration\": \"\",\n \"AuthenticationType\": \"\",\n \"SimpleUser\": \"\",\n \"KerberosPrincipal\": \"\",\n \"KerberosKeytab\": \"\",\n \"KerberosKrb5Conf\": \"\",\n \"AgentArns\": \"\",\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=FmrsService.CreateLocationHdfs"
payload := strings.NewReader("{\n \"Subdirectory\": \"\",\n \"NameNodes\": \"\",\n \"BlockSize\": \"\",\n \"ReplicationFactor\": \"\",\n \"KmsKeyProviderUri\": \"\",\n \"QopConfiguration\": \"\",\n \"AuthenticationType\": \"\",\n \"SimpleUser\": \"\",\n \"KerberosPrincipal\": \"\",\n \"KerberosKeytab\": \"\",\n \"KerberosKrb5Conf\": \"\",\n \"AgentArns\": \"\",\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: 300
{
"Subdirectory": "",
"NameNodes": "",
"BlockSize": "",
"ReplicationFactor": "",
"KmsKeyProviderUri": "",
"QopConfiguration": "",
"AuthenticationType": "",
"SimpleUser": "",
"KerberosPrincipal": "",
"KerberosKeytab": "",
"KerberosKrb5Conf": "",
"AgentArns": "",
"Tags": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/#X-Amz-Target=FmrsService.CreateLocationHdfs")
.setHeader("x-amz-target", "")
.setHeader("content-type", "application/json")
.setBody("{\n \"Subdirectory\": \"\",\n \"NameNodes\": \"\",\n \"BlockSize\": \"\",\n \"ReplicationFactor\": \"\",\n \"KmsKeyProviderUri\": \"\",\n \"QopConfiguration\": \"\",\n \"AuthenticationType\": \"\",\n \"SimpleUser\": \"\",\n \"KerberosPrincipal\": \"\",\n \"KerberosKeytab\": \"\",\n \"KerberosKrb5Conf\": \"\",\n \"AgentArns\": \"\",\n \"Tags\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/#X-Amz-Target=FmrsService.CreateLocationHdfs"))
.header("x-amz-target", "")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"Subdirectory\": \"\",\n \"NameNodes\": \"\",\n \"BlockSize\": \"\",\n \"ReplicationFactor\": \"\",\n \"KmsKeyProviderUri\": \"\",\n \"QopConfiguration\": \"\",\n \"AuthenticationType\": \"\",\n \"SimpleUser\": \"\",\n \"KerberosPrincipal\": \"\",\n \"KerberosKeytab\": \"\",\n \"KerberosKrb5Conf\": \"\",\n \"AgentArns\": \"\",\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 \"Subdirectory\": \"\",\n \"NameNodes\": \"\",\n \"BlockSize\": \"\",\n \"ReplicationFactor\": \"\",\n \"KmsKeyProviderUri\": \"\",\n \"QopConfiguration\": \"\",\n \"AuthenticationType\": \"\",\n \"SimpleUser\": \"\",\n \"KerberosPrincipal\": \"\",\n \"KerberosKeytab\": \"\",\n \"KerberosKrb5Conf\": \"\",\n \"AgentArns\": \"\",\n \"Tags\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=FmrsService.CreateLocationHdfs")
.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=FmrsService.CreateLocationHdfs")
.header("x-amz-target", "")
.header("content-type", "application/json")
.body("{\n \"Subdirectory\": \"\",\n \"NameNodes\": \"\",\n \"BlockSize\": \"\",\n \"ReplicationFactor\": \"\",\n \"KmsKeyProviderUri\": \"\",\n \"QopConfiguration\": \"\",\n \"AuthenticationType\": \"\",\n \"SimpleUser\": \"\",\n \"KerberosPrincipal\": \"\",\n \"KerberosKeytab\": \"\",\n \"KerberosKrb5Conf\": \"\",\n \"AgentArns\": \"\",\n \"Tags\": \"\"\n}")
.asString();
const data = JSON.stringify({
Subdirectory: '',
NameNodes: '',
BlockSize: '',
ReplicationFactor: '',
KmsKeyProviderUri: '',
QopConfiguration: '',
AuthenticationType: '',
SimpleUser: '',
KerberosPrincipal: '',
KerberosKeytab: '',
KerberosKrb5Conf: '',
AgentArns: '',
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=FmrsService.CreateLocationHdfs');
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=FmrsService.CreateLocationHdfs',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {
Subdirectory: '',
NameNodes: '',
BlockSize: '',
ReplicationFactor: '',
KmsKeyProviderUri: '',
QopConfiguration: '',
AuthenticationType: '',
SimpleUser: '',
KerberosPrincipal: '',
KerberosKeytab: '',
KerberosKrb5Conf: '',
AgentArns: '',
Tags: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/#X-Amz-Target=FmrsService.CreateLocationHdfs';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"Subdirectory":"","NameNodes":"","BlockSize":"","ReplicationFactor":"","KmsKeyProviderUri":"","QopConfiguration":"","AuthenticationType":"","SimpleUser":"","KerberosPrincipal":"","KerberosKeytab":"","KerberosKrb5Conf":"","AgentArns":"","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=FmrsService.CreateLocationHdfs',
method: 'POST',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
},
processData: false,
data: '{\n "Subdirectory": "",\n "NameNodes": "",\n "BlockSize": "",\n "ReplicationFactor": "",\n "KmsKeyProviderUri": "",\n "QopConfiguration": "",\n "AuthenticationType": "",\n "SimpleUser": "",\n "KerberosPrincipal": "",\n "KerberosKeytab": "",\n "KerberosKrb5Conf": "",\n "AgentArns": "",\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 \"Subdirectory\": \"\",\n \"NameNodes\": \"\",\n \"BlockSize\": \"\",\n \"ReplicationFactor\": \"\",\n \"KmsKeyProviderUri\": \"\",\n \"QopConfiguration\": \"\",\n \"AuthenticationType\": \"\",\n \"SimpleUser\": \"\",\n \"KerberosPrincipal\": \"\",\n \"KerberosKeytab\": \"\",\n \"KerberosKrb5Conf\": \"\",\n \"AgentArns\": \"\",\n \"Tags\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=FmrsService.CreateLocationHdfs")
.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({
Subdirectory: '',
NameNodes: '',
BlockSize: '',
ReplicationFactor: '',
KmsKeyProviderUri: '',
QopConfiguration: '',
AuthenticationType: '',
SimpleUser: '',
KerberosPrincipal: '',
KerberosKeytab: '',
KerberosKrb5Conf: '',
AgentArns: '',
Tags: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=FmrsService.CreateLocationHdfs',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: {
Subdirectory: '',
NameNodes: '',
BlockSize: '',
ReplicationFactor: '',
KmsKeyProviderUri: '',
QopConfiguration: '',
AuthenticationType: '',
SimpleUser: '',
KerberosPrincipal: '',
KerberosKeytab: '',
KerberosKrb5Conf: '',
AgentArns: '',
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=FmrsService.CreateLocationHdfs');
req.headers({
'x-amz-target': '',
'content-type': 'application/json'
});
req.type('json');
req.send({
Subdirectory: '',
NameNodes: '',
BlockSize: '',
ReplicationFactor: '',
KmsKeyProviderUri: '',
QopConfiguration: '',
AuthenticationType: '',
SimpleUser: '',
KerberosPrincipal: '',
KerberosKeytab: '',
KerberosKrb5Conf: '',
AgentArns: '',
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=FmrsService.CreateLocationHdfs',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {
Subdirectory: '',
NameNodes: '',
BlockSize: '',
ReplicationFactor: '',
KmsKeyProviderUri: '',
QopConfiguration: '',
AuthenticationType: '',
SimpleUser: '',
KerberosPrincipal: '',
KerberosKeytab: '',
KerberosKrb5Conf: '',
AgentArns: '',
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=FmrsService.CreateLocationHdfs';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"Subdirectory":"","NameNodes":"","BlockSize":"","ReplicationFactor":"","KmsKeyProviderUri":"","QopConfiguration":"","AuthenticationType":"","SimpleUser":"","KerberosPrincipal":"","KerberosKeytab":"","KerberosKrb5Conf":"","AgentArns":"","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 = @{ @"Subdirectory": @"",
@"NameNodes": @"",
@"BlockSize": @"",
@"ReplicationFactor": @"",
@"KmsKeyProviderUri": @"",
@"QopConfiguration": @"",
@"AuthenticationType": @"",
@"SimpleUser": @"",
@"KerberosPrincipal": @"",
@"KerberosKeytab": @"",
@"KerberosKrb5Conf": @"",
@"AgentArns": @"",
@"Tags": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/#X-Amz-Target=FmrsService.CreateLocationHdfs"]
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=FmrsService.CreateLocationHdfs" in
let headers = Header.add_list (Header.init ()) [
("x-amz-target", "");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"Subdirectory\": \"\",\n \"NameNodes\": \"\",\n \"BlockSize\": \"\",\n \"ReplicationFactor\": \"\",\n \"KmsKeyProviderUri\": \"\",\n \"QopConfiguration\": \"\",\n \"AuthenticationType\": \"\",\n \"SimpleUser\": \"\",\n \"KerberosPrincipal\": \"\",\n \"KerberosKeytab\": \"\",\n \"KerberosKrb5Conf\": \"\",\n \"AgentArns\": \"\",\n \"Tags\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/#X-Amz-Target=FmrsService.CreateLocationHdfs",
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([
'Subdirectory' => '',
'NameNodes' => '',
'BlockSize' => '',
'ReplicationFactor' => '',
'KmsKeyProviderUri' => '',
'QopConfiguration' => '',
'AuthenticationType' => '',
'SimpleUser' => '',
'KerberosPrincipal' => '',
'KerberosKeytab' => '',
'KerberosKrb5Conf' => '',
'AgentArns' => '',
'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=FmrsService.CreateLocationHdfs', [
'body' => '{
"Subdirectory": "",
"NameNodes": "",
"BlockSize": "",
"ReplicationFactor": "",
"KmsKeyProviderUri": "",
"QopConfiguration": "",
"AuthenticationType": "",
"SimpleUser": "",
"KerberosPrincipal": "",
"KerberosKeytab": "",
"KerberosKrb5Conf": "",
"AgentArns": "",
"Tags": ""
}',
'headers' => [
'content-type' => 'application/json',
'x-amz-target' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/#X-Amz-Target=FmrsService.CreateLocationHdfs');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'Subdirectory' => '',
'NameNodes' => '',
'BlockSize' => '',
'ReplicationFactor' => '',
'KmsKeyProviderUri' => '',
'QopConfiguration' => '',
'AuthenticationType' => '',
'SimpleUser' => '',
'KerberosPrincipal' => '',
'KerberosKeytab' => '',
'KerberosKrb5Conf' => '',
'AgentArns' => '',
'Tags' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'Subdirectory' => '',
'NameNodes' => '',
'BlockSize' => '',
'ReplicationFactor' => '',
'KmsKeyProviderUri' => '',
'QopConfiguration' => '',
'AuthenticationType' => '',
'SimpleUser' => '',
'KerberosPrincipal' => '',
'KerberosKeytab' => '',
'KerberosKrb5Conf' => '',
'AgentArns' => '',
'Tags' => ''
]));
$request->setRequestUrl('{{baseUrl}}/#X-Amz-Target=FmrsService.CreateLocationHdfs');
$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=FmrsService.CreateLocationHdfs' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"Subdirectory": "",
"NameNodes": "",
"BlockSize": "",
"ReplicationFactor": "",
"KmsKeyProviderUri": "",
"QopConfiguration": "",
"AuthenticationType": "",
"SimpleUser": "",
"KerberosPrincipal": "",
"KerberosKeytab": "",
"KerberosKrb5Conf": "",
"AgentArns": "",
"Tags": ""
}'
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/#X-Amz-Target=FmrsService.CreateLocationHdfs' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"Subdirectory": "",
"NameNodes": "",
"BlockSize": "",
"ReplicationFactor": "",
"KmsKeyProviderUri": "",
"QopConfiguration": "",
"AuthenticationType": "",
"SimpleUser": "",
"KerberosPrincipal": "",
"KerberosKeytab": "",
"KerberosKrb5Conf": "",
"AgentArns": "",
"Tags": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"Subdirectory\": \"\",\n \"NameNodes\": \"\",\n \"BlockSize\": \"\",\n \"ReplicationFactor\": \"\",\n \"KmsKeyProviderUri\": \"\",\n \"QopConfiguration\": \"\",\n \"AuthenticationType\": \"\",\n \"SimpleUser\": \"\",\n \"KerberosPrincipal\": \"\",\n \"KerberosKeytab\": \"\",\n \"KerberosKrb5Conf\": \"\",\n \"AgentArns\": \"\",\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=FmrsService.CreateLocationHdfs"
payload = {
"Subdirectory": "",
"NameNodes": "",
"BlockSize": "",
"ReplicationFactor": "",
"KmsKeyProviderUri": "",
"QopConfiguration": "",
"AuthenticationType": "",
"SimpleUser": "",
"KerberosPrincipal": "",
"KerberosKeytab": "",
"KerberosKrb5Conf": "",
"AgentArns": "",
"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=FmrsService.CreateLocationHdfs"
payload <- "{\n \"Subdirectory\": \"\",\n \"NameNodes\": \"\",\n \"BlockSize\": \"\",\n \"ReplicationFactor\": \"\",\n \"KmsKeyProviderUri\": \"\",\n \"QopConfiguration\": \"\",\n \"AuthenticationType\": \"\",\n \"SimpleUser\": \"\",\n \"KerberosPrincipal\": \"\",\n \"KerberosKeytab\": \"\",\n \"KerberosKrb5Conf\": \"\",\n \"AgentArns\": \"\",\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=FmrsService.CreateLocationHdfs")
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 \"Subdirectory\": \"\",\n \"NameNodes\": \"\",\n \"BlockSize\": \"\",\n \"ReplicationFactor\": \"\",\n \"KmsKeyProviderUri\": \"\",\n \"QopConfiguration\": \"\",\n \"AuthenticationType\": \"\",\n \"SimpleUser\": \"\",\n \"KerberosPrincipal\": \"\",\n \"KerberosKeytab\": \"\",\n \"KerberosKrb5Conf\": \"\",\n \"AgentArns\": \"\",\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 \"Subdirectory\": \"\",\n \"NameNodes\": \"\",\n \"BlockSize\": \"\",\n \"ReplicationFactor\": \"\",\n \"KmsKeyProviderUri\": \"\",\n \"QopConfiguration\": \"\",\n \"AuthenticationType\": \"\",\n \"SimpleUser\": \"\",\n \"KerberosPrincipal\": \"\",\n \"KerberosKeytab\": \"\",\n \"KerberosKrb5Conf\": \"\",\n \"AgentArns\": \"\",\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=FmrsService.CreateLocationHdfs";
let payload = json!({
"Subdirectory": "",
"NameNodes": "",
"BlockSize": "",
"ReplicationFactor": "",
"KmsKeyProviderUri": "",
"QopConfiguration": "",
"AuthenticationType": "",
"SimpleUser": "",
"KerberosPrincipal": "",
"KerberosKeytab": "",
"KerberosKrb5Conf": "",
"AgentArns": "",
"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=FmrsService.CreateLocationHdfs' \
--header 'content-type: application/json' \
--header 'x-amz-target: ' \
--data '{
"Subdirectory": "",
"NameNodes": "",
"BlockSize": "",
"ReplicationFactor": "",
"KmsKeyProviderUri": "",
"QopConfiguration": "",
"AuthenticationType": "",
"SimpleUser": "",
"KerberosPrincipal": "",
"KerberosKeytab": "",
"KerberosKrb5Conf": "",
"AgentArns": "",
"Tags": ""
}'
echo '{
"Subdirectory": "",
"NameNodes": "",
"BlockSize": "",
"ReplicationFactor": "",
"KmsKeyProviderUri": "",
"QopConfiguration": "",
"AuthenticationType": "",
"SimpleUser": "",
"KerberosPrincipal": "",
"KerberosKeytab": "",
"KerberosKrb5Conf": "",
"AgentArns": "",
"Tags": ""
}' | \
http POST '{{baseUrl}}/#X-Amz-Target=FmrsService.CreateLocationHdfs' \
content-type:application/json \
x-amz-target:''
wget --quiet \
--method POST \
--header 'x-amz-target: ' \
--header 'content-type: application/json' \
--body-data '{\n "Subdirectory": "",\n "NameNodes": "",\n "BlockSize": "",\n "ReplicationFactor": "",\n "KmsKeyProviderUri": "",\n "QopConfiguration": "",\n "AuthenticationType": "",\n "SimpleUser": "",\n "KerberosPrincipal": "",\n "KerberosKeytab": "",\n "KerberosKrb5Conf": "",\n "AgentArns": "",\n "Tags": ""\n}' \
--output-document \
- '{{baseUrl}}/#X-Amz-Target=FmrsService.CreateLocationHdfs'
import Foundation
let headers = [
"x-amz-target": "",
"content-type": "application/json"
]
let parameters = [
"Subdirectory": "",
"NameNodes": "",
"BlockSize": "",
"ReplicationFactor": "",
"KmsKeyProviderUri": "",
"QopConfiguration": "",
"AuthenticationType": "",
"SimpleUser": "",
"KerberosPrincipal": "",
"KerberosKeytab": "",
"KerberosKrb5Conf": "",
"AgentArns": "",
"Tags": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/#X-Amz-Target=FmrsService.CreateLocationHdfs")! 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
CreateLocationNfs
{{baseUrl}}/#X-Amz-Target=FmrsService.CreateLocationNfs
HEADERS
X-Amz-Target
BODY json
{
"Subdirectory": "",
"ServerHostname": "",
"OnPremConfig": "",
"MountOptions": "",
"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=FmrsService.CreateLocationNfs");
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 \"Subdirectory\": \"\",\n \"ServerHostname\": \"\",\n \"OnPremConfig\": \"\",\n \"MountOptions\": \"\",\n \"Tags\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/#X-Amz-Target=FmrsService.CreateLocationNfs" {:headers {:x-amz-target ""}
:content-type :json
:form-params {:Subdirectory ""
:ServerHostname ""
:OnPremConfig ""
:MountOptions ""
:Tags ""}})
require "http/client"
url = "{{baseUrl}}/#X-Amz-Target=FmrsService.CreateLocationNfs"
headers = HTTP::Headers{
"x-amz-target" => ""
"content-type" => "application/json"
}
reqBody = "{\n \"Subdirectory\": \"\",\n \"ServerHostname\": \"\",\n \"OnPremConfig\": \"\",\n \"MountOptions\": \"\",\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=FmrsService.CreateLocationNfs"),
Headers =
{
{ "x-amz-target", "" },
},
Content = new StringContent("{\n \"Subdirectory\": \"\",\n \"ServerHostname\": \"\",\n \"OnPremConfig\": \"\",\n \"MountOptions\": \"\",\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=FmrsService.CreateLocationNfs");
var request = new RestRequest("", Method.Post);
request.AddHeader("x-amz-target", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"Subdirectory\": \"\",\n \"ServerHostname\": \"\",\n \"OnPremConfig\": \"\",\n \"MountOptions\": \"\",\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=FmrsService.CreateLocationNfs"
payload := strings.NewReader("{\n \"Subdirectory\": \"\",\n \"ServerHostname\": \"\",\n \"OnPremConfig\": \"\",\n \"MountOptions\": \"\",\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: 106
{
"Subdirectory": "",
"ServerHostname": "",
"OnPremConfig": "",
"MountOptions": "",
"Tags": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/#X-Amz-Target=FmrsService.CreateLocationNfs")
.setHeader("x-amz-target", "")
.setHeader("content-type", "application/json")
.setBody("{\n \"Subdirectory\": \"\",\n \"ServerHostname\": \"\",\n \"OnPremConfig\": \"\",\n \"MountOptions\": \"\",\n \"Tags\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/#X-Amz-Target=FmrsService.CreateLocationNfs"))
.header("x-amz-target", "")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"Subdirectory\": \"\",\n \"ServerHostname\": \"\",\n \"OnPremConfig\": \"\",\n \"MountOptions\": \"\",\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 \"Subdirectory\": \"\",\n \"ServerHostname\": \"\",\n \"OnPremConfig\": \"\",\n \"MountOptions\": \"\",\n \"Tags\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=FmrsService.CreateLocationNfs")
.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=FmrsService.CreateLocationNfs")
.header("x-amz-target", "")
.header("content-type", "application/json")
.body("{\n \"Subdirectory\": \"\",\n \"ServerHostname\": \"\",\n \"OnPremConfig\": \"\",\n \"MountOptions\": \"\",\n \"Tags\": \"\"\n}")
.asString();
const data = JSON.stringify({
Subdirectory: '',
ServerHostname: '',
OnPremConfig: '',
MountOptions: '',
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=FmrsService.CreateLocationNfs');
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=FmrsService.CreateLocationNfs',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {
Subdirectory: '',
ServerHostname: '',
OnPremConfig: '',
MountOptions: '',
Tags: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/#X-Amz-Target=FmrsService.CreateLocationNfs';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"Subdirectory":"","ServerHostname":"","OnPremConfig":"","MountOptions":"","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=FmrsService.CreateLocationNfs',
method: 'POST',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
},
processData: false,
data: '{\n "Subdirectory": "",\n "ServerHostname": "",\n "OnPremConfig": "",\n "MountOptions": "",\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 \"Subdirectory\": \"\",\n \"ServerHostname\": \"\",\n \"OnPremConfig\": \"\",\n \"MountOptions\": \"\",\n \"Tags\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=FmrsService.CreateLocationNfs")
.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({
Subdirectory: '',
ServerHostname: '',
OnPremConfig: '',
MountOptions: '',
Tags: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=FmrsService.CreateLocationNfs',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: {
Subdirectory: '',
ServerHostname: '',
OnPremConfig: '',
MountOptions: '',
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=FmrsService.CreateLocationNfs');
req.headers({
'x-amz-target': '',
'content-type': 'application/json'
});
req.type('json');
req.send({
Subdirectory: '',
ServerHostname: '',
OnPremConfig: '',
MountOptions: '',
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=FmrsService.CreateLocationNfs',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {
Subdirectory: '',
ServerHostname: '',
OnPremConfig: '',
MountOptions: '',
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=FmrsService.CreateLocationNfs';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"Subdirectory":"","ServerHostname":"","OnPremConfig":"","MountOptions":"","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 = @{ @"Subdirectory": @"",
@"ServerHostname": @"",
@"OnPremConfig": @"",
@"MountOptions": @"",
@"Tags": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/#X-Amz-Target=FmrsService.CreateLocationNfs"]
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=FmrsService.CreateLocationNfs" in
let headers = Header.add_list (Header.init ()) [
("x-amz-target", "");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"Subdirectory\": \"\",\n \"ServerHostname\": \"\",\n \"OnPremConfig\": \"\",\n \"MountOptions\": \"\",\n \"Tags\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/#X-Amz-Target=FmrsService.CreateLocationNfs",
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([
'Subdirectory' => '',
'ServerHostname' => '',
'OnPremConfig' => '',
'MountOptions' => '',
'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=FmrsService.CreateLocationNfs', [
'body' => '{
"Subdirectory": "",
"ServerHostname": "",
"OnPremConfig": "",
"MountOptions": "",
"Tags": ""
}',
'headers' => [
'content-type' => 'application/json',
'x-amz-target' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/#X-Amz-Target=FmrsService.CreateLocationNfs');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'Subdirectory' => '',
'ServerHostname' => '',
'OnPremConfig' => '',
'MountOptions' => '',
'Tags' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'Subdirectory' => '',
'ServerHostname' => '',
'OnPremConfig' => '',
'MountOptions' => '',
'Tags' => ''
]));
$request->setRequestUrl('{{baseUrl}}/#X-Amz-Target=FmrsService.CreateLocationNfs');
$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=FmrsService.CreateLocationNfs' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"Subdirectory": "",
"ServerHostname": "",
"OnPremConfig": "",
"MountOptions": "",
"Tags": ""
}'
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/#X-Amz-Target=FmrsService.CreateLocationNfs' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"Subdirectory": "",
"ServerHostname": "",
"OnPremConfig": "",
"MountOptions": "",
"Tags": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"Subdirectory\": \"\",\n \"ServerHostname\": \"\",\n \"OnPremConfig\": \"\",\n \"MountOptions\": \"\",\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=FmrsService.CreateLocationNfs"
payload = {
"Subdirectory": "",
"ServerHostname": "",
"OnPremConfig": "",
"MountOptions": "",
"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=FmrsService.CreateLocationNfs"
payload <- "{\n \"Subdirectory\": \"\",\n \"ServerHostname\": \"\",\n \"OnPremConfig\": \"\",\n \"MountOptions\": \"\",\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=FmrsService.CreateLocationNfs")
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 \"Subdirectory\": \"\",\n \"ServerHostname\": \"\",\n \"OnPremConfig\": \"\",\n \"MountOptions\": \"\",\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 \"Subdirectory\": \"\",\n \"ServerHostname\": \"\",\n \"OnPremConfig\": \"\",\n \"MountOptions\": \"\",\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=FmrsService.CreateLocationNfs";
let payload = json!({
"Subdirectory": "",
"ServerHostname": "",
"OnPremConfig": "",
"MountOptions": "",
"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=FmrsService.CreateLocationNfs' \
--header 'content-type: application/json' \
--header 'x-amz-target: ' \
--data '{
"Subdirectory": "",
"ServerHostname": "",
"OnPremConfig": "",
"MountOptions": "",
"Tags": ""
}'
echo '{
"Subdirectory": "",
"ServerHostname": "",
"OnPremConfig": "",
"MountOptions": "",
"Tags": ""
}' | \
http POST '{{baseUrl}}/#X-Amz-Target=FmrsService.CreateLocationNfs' \
content-type:application/json \
x-amz-target:''
wget --quiet \
--method POST \
--header 'x-amz-target: ' \
--header 'content-type: application/json' \
--body-data '{\n "Subdirectory": "",\n "ServerHostname": "",\n "OnPremConfig": "",\n "MountOptions": "",\n "Tags": ""\n}' \
--output-document \
- '{{baseUrl}}/#X-Amz-Target=FmrsService.CreateLocationNfs'
import Foundation
let headers = [
"x-amz-target": "",
"content-type": "application/json"
]
let parameters = [
"Subdirectory": "",
"ServerHostname": "",
"OnPremConfig": "",
"MountOptions": "",
"Tags": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/#X-Amz-Target=FmrsService.CreateLocationNfs")! 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
CreateLocationObjectStorage
{{baseUrl}}/#X-Amz-Target=FmrsService.CreateLocationObjectStorage
HEADERS
X-Amz-Target
BODY json
{
"ServerHostname": "",
"ServerPort": "",
"ServerProtocol": "",
"Subdirectory": "",
"BucketName": "",
"AccessKey": "",
"SecretKey": "",
"AgentArns": "",
"Tags": "",
"ServerCertificate": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/#X-Amz-Target=FmrsService.CreateLocationObjectStorage");
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 \"ServerHostname\": \"\",\n \"ServerPort\": \"\",\n \"ServerProtocol\": \"\",\n \"Subdirectory\": \"\",\n \"BucketName\": \"\",\n \"AccessKey\": \"\",\n \"SecretKey\": \"\",\n \"AgentArns\": \"\",\n \"Tags\": \"\",\n \"ServerCertificate\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/#X-Amz-Target=FmrsService.CreateLocationObjectStorage" {:headers {:x-amz-target ""}
:content-type :json
:form-params {:ServerHostname ""
:ServerPort ""
:ServerProtocol ""
:Subdirectory ""
:BucketName ""
:AccessKey ""
:SecretKey ""
:AgentArns ""
:Tags ""
:ServerCertificate ""}})
require "http/client"
url = "{{baseUrl}}/#X-Amz-Target=FmrsService.CreateLocationObjectStorage"
headers = HTTP::Headers{
"x-amz-target" => ""
"content-type" => "application/json"
}
reqBody = "{\n \"ServerHostname\": \"\",\n \"ServerPort\": \"\",\n \"ServerProtocol\": \"\",\n \"Subdirectory\": \"\",\n \"BucketName\": \"\",\n \"AccessKey\": \"\",\n \"SecretKey\": \"\",\n \"AgentArns\": \"\",\n \"Tags\": \"\",\n \"ServerCertificate\": \"\"\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=FmrsService.CreateLocationObjectStorage"),
Headers =
{
{ "x-amz-target", "" },
},
Content = new StringContent("{\n \"ServerHostname\": \"\",\n \"ServerPort\": \"\",\n \"ServerProtocol\": \"\",\n \"Subdirectory\": \"\",\n \"BucketName\": \"\",\n \"AccessKey\": \"\",\n \"SecretKey\": \"\",\n \"AgentArns\": \"\",\n \"Tags\": \"\",\n \"ServerCertificate\": \"\"\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=FmrsService.CreateLocationObjectStorage");
var request = new RestRequest("", Method.Post);
request.AddHeader("x-amz-target", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"ServerHostname\": \"\",\n \"ServerPort\": \"\",\n \"ServerProtocol\": \"\",\n \"Subdirectory\": \"\",\n \"BucketName\": \"\",\n \"AccessKey\": \"\",\n \"SecretKey\": \"\",\n \"AgentArns\": \"\",\n \"Tags\": \"\",\n \"ServerCertificate\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/#X-Amz-Target=FmrsService.CreateLocationObjectStorage"
payload := strings.NewReader("{\n \"ServerHostname\": \"\",\n \"ServerPort\": \"\",\n \"ServerProtocol\": \"\",\n \"Subdirectory\": \"\",\n \"BucketName\": \"\",\n \"AccessKey\": \"\",\n \"SecretKey\": \"\",\n \"AgentArns\": \"\",\n \"Tags\": \"\",\n \"ServerCertificate\": \"\"\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: 210
{
"ServerHostname": "",
"ServerPort": "",
"ServerProtocol": "",
"Subdirectory": "",
"BucketName": "",
"AccessKey": "",
"SecretKey": "",
"AgentArns": "",
"Tags": "",
"ServerCertificate": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/#X-Amz-Target=FmrsService.CreateLocationObjectStorage")
.setHeader("x-amz-target", "")
.setHeader("content-type", "application/json")
.setBody("{\n \"ServerHostname\": \"\",\n \"ServerPort\": \"\",\n \"ServerProtocol\": \"\",\n \"Subdirectory\": \"\",\n \"BucketName\": \"\",\n \"AccessKey\": \"\",\n \"SecretKey\": \"\",\n \"AgentArns\": \"\",\n \"Tags\": \"\",\n \"ServerCertificate\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/#X-Amz-Target=FmrsService.CreateLocationObjectStorage"))
.header("x-amz-target", "")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"ServerHostname\": \"\",\n \"ServerPort\": \"\",\n \"ServerProtocol\": \"\",\n \"Subdirectory\": \"\",\n \"BucketName\": \"\",\n \"AccessKey\": \"\",\n \"SecretKey\": \"\",\n \"AgentArns\": \"\",\n \"Tags\": \"\",\n \"ServerCertificate\": \"\"\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 \"ServerHostname\": \"\",\n \"ServerPort\": \"\",\n \"ServerProtocol\": \"\",\n \"Subdirectory\": \"\",\n \"BucketName\": \"\",\n \"AccessKey\": \"\",\n \"SecretKey\": \"\",\n \"AgentArns\": \"\",\n \"Tags\": \"\",\n \"ServerCertificate\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=FmrsService.CreateLocationObjectStorage")
.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=FmrsService.CreateLocationObjectStorage")
.header("x-amz-target", "")
.header("content-type", "application/json")
.body("{\n \"ServerHostname\": \"\",\n \"ServerPort\": \"\",\n \"ServerProtocol\": \"\",\n \"Subdirectory\": \"\",\n \"BucketName\": \"\",\n \"AccessKey\": \"\",\n \"SecretKey\": \"\",\n \"AgentArns\": \"\",\n \"Tags\": \"\",\n \"ServerCertificate\": \"\"\n}")
.asString();
const data = JSON.stringify({
ServerHostname: '',
ServerPort: '',
ServerProtocol: '',
Subdirectory: '',
BucketName: '',
AccessKey: '',
SecretKey: '',
AgentArns: '',
Tags: '',
ServerCertificate: ''
});
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=FmrsService.CreateLocationObjectStorage');
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=FmrsService.CreateLocationObjectStorage',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {
ServerHostname: '',
ServerPort: '',
ServerProtocol: '',
Subdirectory: '',
BucketName: '',
AccessKey: '',
SecretKey: '',
AgentArns: '',
Tags: '',
ServerCertificate: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/#X-Amz-Target=FmrsService.CreateLocationObjectStorage';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"ServerHostname":"","ServerPort":"","ServerProtocol":"","Subdirectory":"","BucketName":"","AccessKey":"","SecretKey":"","AgentArns":"","Tags":"","ServerCertificate":""}'
};
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=FmrsService.CreateLocationObjectStorage',
method: 'POST',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
},
processData: false,
data: '{\n "ServerHostname": "",\n "ServerPort": "",\n "ServerProtocol": "",\n "Subdirectory": "",\n "BucketName": "",\n "AccessKey": "",\n "SecretKey": "",\n "AgentArns": "",\n "Tags": "",\n "ServerCertificate": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"ServerHostname\": \"\",\n \"ServerPort\": \"\",\n \"ServerProtocol\": \"\",\n \"Subdirectory\": \"\",\n \"BucketName\": \"\",\n \"AccessKey\": \"\",\n \"SecretKey\": \"\",\n \"AgentArns\": \"\",\n \"Tags\": \"\",\n \"ServerCertificate\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=FmrsService.CreateLocationObjectStorage")
.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({
ServerHostname: '',
ServerPort: '',
ServerProtocol: '',
Subdirectory: '',
BucketName: '',
AccessKey: '',
SecretKey: '',
AgentArns: '',
Tags: '',
ServerCertificate: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=FmrsService.CreateLocationObjectStorage',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: {
ServerHostname: '',
ServerPort: '',
ServerProtocol: '',
Subdirectory: '',
BucketName: '',
AccessKey: '',
SecretKey: '',
AgentArns: '',
Tags: '',
ServerCertificate: ''
},
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=FmrsService.CreateLocationObjectStorage');
req.headers({
'x-amz-target': '',
'content-type': 'application/json'
});
req.type('json');
req.send({
ServerHostname: '',
ServerPort: '',
ServerProtocol: '',
Subdirectory: '',
BucketName: '',
AccessKey: '',
SecretKey: '',
AgentArns: '',
Tags: '',
ServerCertificate: ''
});
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=FmrsService.CreateLocationObjectStorage',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {
ServerHostname: '',
ServerPort: '',
ServerProtocol: '',
Subdirectory: '',
BucketName: '',
AccessKey: '',
SecretKey: '',
AgentArns: '',
Tags: '',
ServerCertificate: ''
}
};
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=FmrsService.CreateLocationObjectStorage';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"ServerHostname":"","ServerPort":"","ServerProtocol":"","Subdirectory":"","BucketName":"","AccessKey":"","SecretKey":"","AgentArns":"","Tags":"","ServerCertificate":""}'
};
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 = @{ @"ServerHostname": @"",
@"ServerPort": @"",
@"ServerProtocol": @"",
@"Subdirectory": @"",
@"BucketName": @"",
@"AccessKey": @"",
@"SecretKey": @"",
@"AgentArns": @"",
@"Tags": @"",
@"ServerCertificate": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/#X-Amz-Target=FmrsService.CreateLocationObjectStorage"]
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=FmrsService.CreateLocationObjectStorage" in
let headers = Header.add_list (Header.init ()) [
("x-amz-target", "");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"ServerHostname\": \"\",\n \"ServerPort\": \"\",\n \"ServerProtocol\": \"\",\n \"Subdirectory\": \"\",\n \"BucketName\": \"\",\n \"AccessKey\": \"\",\n \"SecretKey\": \"\",\n \"AgentArns\": \"\",\n \"Tags\": \"\",\n \"ServerCertificate\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/#X-Amz-Target=FmrsService.CreateLocationObjectStorage",
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([
'ServerHostname' => '',
'ServerPort' => '',
'ServerProtocol' => '',
'Subdirectory' => '',
'BucketName' => '',
'AccessKey' => '',
'SecretKey' => '',
'AgentArns' => '',
'Tags' => '',
'ServerCertificate' => ''
]),
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=FmrsService.CreateLocationObjectStorage', [
'body' => '{
"ServerHostname": "",
"ServerPort": "",
"ServerProtocol": "",
"Subdirectory": "",
"BucketName": "",
"AccessKey": "",
"SecretKey": "",
"AgentArns": "",
"Tags": "",
"ServerCertificate": ""
}',
'headers' => [
'content-type' => 'application/json',
'x-amz-target' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/#X-Amz-Target=FmrsService.CreateLocationObjectStorage');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'ServerHostname' => '',
'ServerPort' => '',
'ServerProtocol' => '',
'Subdirectory' => '',
'BucketName' => '',
'AccessKey' => '',
'SecretKey' => '',
'AgentArns' => '',
'Tags' => '',
'ServerCertificate' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'ServerHostname' => '',
'ServerPort' => '',
'ServerProtocol' => '',
'Subdirectory' => '',
'BucketName' => '',
'AccessKey' => '',
'SecretKey' => '',
'AgentArns' => '',
'Tags' => '',
'ServerCertificate' => ''
]));
$request->setRequestUrl('{{baseUrl}}/#X-Amz-Target=FmrsService.CreateLocationObjectStorage');
$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=FmrsService.CreateLocationObjectStorage' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"ServerHostname": "",
"ServerPort": "",
"ServerProtocol": "",
"Subdirectory": "",
"BucketName": "",
"AccessKey": "",
"SecretKey": "",
"AgentArns": "",
"Tags": "",
"ServerCertificate": ""
}'
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/#X-Amz-Target=FmrsService.CreateLocationObjectStorage' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"ServerHostname": "",
"ServerPort": "",
"ServerProtocol": "",
"Subdirectory": "",
"BucketName": "",
"AccessKey": "",
"SecretKey": "",
"AgentArns": "",
"Tags": "",
"ServerCertificate": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"ServerHostname\": \"\",\n \"ServerPort\": \"\",\n \"ServerProtocol\": \"\",\n \"Subdirectory\": \"\",\n \"BucketName\": \"\",\n \"AccessKey\": \"\",\n \"SecretKey\": \"\",\n \"AgentArns\": \"\",\n \"Tags\": \"\",\n \"ServerCertificate\": \"\"\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=FmrsService.CreateLocationObjectStorage"
payload = {
"ServerHostname": "",
"ServerPort": "",
"ServerProtocol": "",
"Subdirectory": "",
"BucketName": "",
"AccessKey": "",
"SecretKey": "",
"AgentArns": "",
"Tags": "",
"ServerCertificate": ""
}
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=FmrsService.CreateLocationObjectStorage"
payload <- "{\n \"ServerHostname\": \"\",\n \"ServerPort\": \"\",\n \"ServerProtocol\": \"\",\n \"Subdirectory\": \"\",\n \"BucketName\": \"\",\n \"AccessKey\": \"\",\n \"SecretKey\": \"\",\n \"AgentArns\": \"\",\n \"Tags\": \"\",\n \"ServerCertificate\": \"\"\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=FmrsService.CreateLocationObjectStorage")
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 \"ServerHostname\": \"\",\n \"ServerPort\": \"\",\n \"ServerProtocol\": \"\",\n \"Subdirectory\": \"\",\n \"BucketName\": \"\",\n \"AccessKey\": \"\",\n \"SecretKey\": \"\",\n \"AgentArns\": \"\",\n \"Tags\": \"\",\n \"ServerCertificate\": \"\"\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 \"ServerHostname\": \"\",\n \"ServerPort\": \"\",\n \"ServerProtocol\": \"\",\n \"Subdirectory\": \"\",\n \"BucketName\": \"\",\n \"AccessKey\": \"\",\n \"SecretKey\": \"\",\n \"AgentArns\": \"\",\n \"Tags\": \"\",\n \"ServerCertificate\": \"\"\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=FmrsService.CreateLocationObjectStorage";
let payload = json!({
"ServerHostname": "",
"ServerPort": "",
"ServerProtocol": "",
"Subdirectory": "",
"BucketName": "",
"AccessKey": "",
"SecretKey": "",
"AgentArns": "",
"Tags": "",
"ServerCertificate": ""
});
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=FmrsService.CreateLocationObjectStorage' \
--header 'content-type: application/json' \
--header 'x-amz-target: ' \
--data '{
"ServerHostname": "",
"ServerPort": "",
"ServerProtocol": "",
"Subdirectory": "",
"BucketName": "",
"AccessKey": "",
"SecretKey": "",
"AgentArns": "",
"Tags": "",
"ServerCertificate": ""
}'
echo '{
"ServerHostname": "",
"ServerPort": "",
"ServerProtocol": "",
"Subdirectory": "",
"BucketName": "",
"AccessKey": "",
"SecretKey": "",
"AgentArns": "",
"Tags": "",
"ServerCertificate": ""
}' | \
http POST '{{baseUrl}}/#X-Amz-Target=FmrsService.CreateLocationObjectStorage' \
content-type:application/json \
x-amz-target:''
wget --quiet \
--method POST \
--header 'x-amz-target: ' \
--header 'content-type: application/json' \
--body-data '{\n "ServerHostname": "",\n "ServerPort": "",\n "ServerProtocol": "",\n "Subdirectory": "",\n "BucketName": "",\n "AccessKey": "",\n "SecretKey": "",\n "AgentArns": "",\n "Tags": "",\n "ServerCertificate": ""\n}' \
--output-document \
- '{{baseUrl}}/#X-Amz-Target=FmrsService.CreateLocationObjectStorage'
import Foundation
let headers = [
"x-amz-target": "",
"content-type": "application/json"
]
let parameters = [
"ServerHostname": "",
"ServerPort": "",
"ServerProtocol": "",
"Subdirectory": "",
"BucketName": "",
"AccessKey": "",
"SecretKey": "",
"AgentArns": "",
"Tags": "",
"ServerCertificate": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/#X-Amz-Target=FmrsService.CreateLocationObjectStorage")! 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
CreateLocationS3
{{baseUrl}}/#X-Amz-Target=FmrsService.CreateLocationS3
HEADERS
X-Amz-Target
BODY json
{
"Subdirectory": "",
"S3BucketArn": "",
"S3StorageClass": "",
"S3Config": {
"BucketAccessRoleArn": ""
},
"AgentArns": "",
"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=FmrsService.CreateLocationS3");
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 \"Subdirectory\": \"\",\n \"S3BucketArn\": \"\",\n \"S3StorageClass\": \"\",\n \"S3Config\": {\n \"BucketAccessRoleArn\": \"\"\n },\n \"AgentArns\": \"\",\n \"Tags\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/#X-Amz-Target=FmrsService.CreateLocationS3" {:headers {:x-amz-target ""}
:content-type :json
:form-params {:Subdirectory ""
:S3BucketArn ""
:S3StorageClass ""
:S3Config {:BucketAccessRoleArn ""}
:AgentArns ""
:Tags ""}})
require "http/client"
url = "{{baseUrl}}/#X-Amz-Target=FmrsService.CreateLocationS3"
headers = HTTP::Headers{
"x-amz-target" => ""
"content-type" => "application/json"
}
reqBody = "{\n \"Subdirectory\": \"\",\n \"S3BucketArn\": \"\",\n \"S3StorageClass\": \"\",\n \"S3Config\": {\n \"BucketAccessRoleArn\": \"\"\n },\n \"AgentArns\": \"\",\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=FmrsService.CreateLocationS3"),
Headers =
{
{ "x-amz-target", "" },
},
Content = new StringContent("{\n \"Subdirectory\": \"\",\n \"S3BucketArn\": \"\",\n \"S3StorageClass\": \"\",\n \"S3Config\": {\n \"BucketAccessRoleArn\": \"\"\n },\n \"AgentArns\": \"\",\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=FmrsService.CreateLocationS3");
var request = new RestRequest("", Method.Post);
request.AddHeader("x-amz-target", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"Subdirectory\": \"\",\n \"S3BucketArn\": \"\",\n \"S3StorageClass\": \"\",\n \"S3Config\": {\n \"BucketAccessRoleArn\": \"\"\n },\n \"AgentArns\": \"\",\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=FmrsService.CreateLocationS3"
payload := strings.NewReader("{\n \"Subdirectory\": \"\",\n \"S3BucketArn\": \"\",\n \"S3StorageClass\": \"\",\n \"S3Config\": {\n \"BucketAccessRoleArn\": \"\"\n },\n \"AgentArns\": \"\",\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: 153
{
"Subdirectory": "",
"S3BucketArn": "",
"S3StorageClass": "",
"S3Config": {
"BucketAccessRoleArn": ""
},
"AgentArns": "",
"Tags": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/#X-Amz-Target=FmrsService.CreateLocationS3")
.setHeader("x-amz-target", "")
.setHeader("content-type", "application/json")
.setBody("{\n \"Subdirectory\": \"\",\n \"S3BucketArn\": \"\",\n \"S3StorageClass\": \"\",\n \"S3Config\": {\n \"BucketAccessRoleArn\": \"\"\n },\n \"AgentArns\": \"\",\n \"Tags\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/#X-Amz-Target=FmrsService.CreateLocationS3"))
.header("x-amz-target", "")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"Subdirectory\": \"\",\n \"S3BucketArn\": \"\",\n \"S3StorageClass\": \"\",\n \"S3Config\": {\n \"BucketAccessRoleArn\": \"\"\n },\n \"AgentArns\": \"\",\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 \"Subdirectory\": \"\",\n \"S3BucketArn\": \"\",\n \"S3StorageClass\": \"\",\n \"S3Config\": {\n \"BucketAccessRoleArn\": \"\"\n },\n \"AgentArns\": \"\",\n \"Tags\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=FmrsService.CreateLocationS3")
.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=FmrsService.CreateLocationS3")
.header("x-amz-target", "")
.header("content-type", "application/json")
.body("{\n \"Subdirectory\": \"\",\n \"S3BucketArn\": \"\",\n \"S3StorageClass\": \"\",\n \"S3Config\": {\n \"BucketAccessRoleArn\": \"\"\n },\n \"AgentArns\": \"\",\n \"Tags\": \"\"\n}")
.asString();
const data = JSON.stringify({
Subdirectory: '',
S3BucketArn: '',
S3StorageClass: '',
S3Config: {
BucketAccessRoleArn: ''
},
AgentArns: '',
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=FmrsService.CreateLocationS3');
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=FmrsService.CreateLocationS3',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {
Subdirectory: '',
S3BucketArn: '',
S3StorageClass: '',
S3Config: {BucketAccessRoleArn: ''},
AgentArns: '',
Tags: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/#X-Amz-Target=FmrsService.CreateLocationS3';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"Subdirectory":"","S3BucketArn":"","S3StorageClass":"","S3Config":{"BucketAccessRoleArn":""},"AgentArns":"","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=FmrsService.CreateLocationS3',
method: 'POST',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
},
processData: false,
data: '{\n "Subdirectory": "",\n "S3BucketArn": "",\n "S3StorageClass": "",\n "S3Config": {\n "BucketAccessRoleArn": ""\n },\n "AgentArns": "",\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 \"Subdirectory\": \"\",\n \"S3BucketArn\": \"\",\n \"S3StorageClass\": \"\",\n \"S3Config\": {\n \"BucketAccessRoleArn\": \"\"\n },\n \"AgentArns\": \"\",\n \"Tags\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=FmrsService.CreateLocationS3")
.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({
Subdirectory: '',
S3BucketArn: '',
S3StorageClass: '',
S3Config: {BucketAccessRoleArn: ''},
AgentArns: '',
Tags: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=FmrsService.CreateLocationS3',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: {
Subdirectory: '',
S3BucketArn: '',
S3StorageClass: '',
S3Config: {BucketAccessRoleArn: ''},
AgentArns: '',
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=FmrsService.CreateLocationS3');
req.headers({
'x-amz-target': '',
'content-type': 'application/json'
});
req.type('json');
req.send({
Subdirectory: '',
S3BucketArn: '',
S3StorageClass: '',
S3Config: {
BucketAccessRoleArn: ''
},
AgentArns: '',
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=FmrsService.CreateLocationS3',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {
Subdirectory: '',
S3BucketArn: '',
S3StorageClass: '',
S3Config: {BucketAccessRoleArn: ''},
AgentArns: '',
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=FmrsService.CreateLocationS3';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"Subdirectory":"","S3BucketArn":"","S3StorageClass":"","S3Config":{"BucketAccessRoleArn":""},"AgentArns":"","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 = @{ @"Subdirectory": @"",
@"S3BucketArn": @"",
@"S3StorageClass": @"",
@"S3Config": @{ @"BucketAccessRoleArn": @"" },
@"AgentArns": @"",
@"Tags": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/#X-Amz-Target=FmrsService.CreateLocationS3"]
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=FmrsService.CreateLocationS3" in
let headers = Header.add_list (Header.init ()) [
("x-amz-target", "");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"Subdirectory\": \"\",\n \"S3BucketArn\": \"\",\n \"S3StorageClass\": \"\",\n \"S3Config\": {\n \"BucketAccessRoleArn\": \"\"\n },\n \"AgentArns\": \"\",\n \"Tags\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/#X-Amz-Target=FmrsService.CreateLocationS3",
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([
'Subdirectory' => '',
'S3BucketArn' => '',
'S3StorageClass' => '',
'S3Config' => [
'BucketAccessRoleArn' => ''
],
'AgentArns' => '',
'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=FmrsService.CreateLocationS3', [
'body' => '{
"Subdirectory": "",
"S3BucketArn": "",
"S3StorageClass": "",
"S3Config": {
"BucketAccessRoleArn": ""
},
"AgentArns": "",
"Tags": ""
}',
'headers' => [
'content-type' => 'application/json',
'x-amz-target' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/#X-Amz-Target=FmrsService.CreateLocationS3');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'Subdirectory' => '',
'S3BucketArn' => '',
'S3StorageClass' => '',
'S3Config' => [
'BucketAccessRoleArn' => ''
],
'AgentArns' => '',
'Tags' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'Subdirectory' => '',
'S3BucketArn' => '',
'S3StorageClass' => '',
'S3Config' => [
'BucketAccessRoleArn' => ''
],
'AgentArns' => '',
'Tags' => ''
]));
$request->setRequestUrl('{{baseUrl}}/#X-Amz-Target=FmrsService.CreateLocationS3');
$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=FmrsService.CreateLocationS3' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"Subdirectory": "",
"S3BucketArn": "",
"S3StorageClass": "",
"S3Config": {
"BucketAccessRoleArn": ""
},
"AgentArns": "",
"Tags": ""
}'
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/#X-Amz-Target=FmrsService.CreateLocationS3' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"Subdirectory": "",
"S3BucketArn": "",
"S3StorageClass": "",
"S3Config": {
"BucketAccessRoleArn": ""
},
"AgentArns": "",
"Tags": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"Subdirectory\": \"\",\n \"S3BucketArn\": \"\",\n \"S3StorageClass\": \"\",\n \"S3Config\": {\n \"BucketAccessRoleArn\": \"\"\n },\n \"AgentArns\": \"\",\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=FmrsService.CreateLocationS3"
payload = {
"Subdirectory": "",
"S3BucketArn": "",
"S3StorageClass": "",
"S3Config": { "BucketAccessRoleArn": "" },
"AgentArns": "",
"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=FmrsService.CreateLocationS3"
payload <- "{\n \"Subdirectory\": \"\",\n \"S3BucketArn\": \"\",\n \"S3StorageClass\": \"\",\n \"S3Config\": {\n \"BucketAccessRoleArn\": \"\"\n },\n \"AgentArns\": \"\",\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=FmrsService.CreateLocationS3")
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 \"Subdirectory\": \"\",\n \"S3BucketArn\": \"\",\n \"S3StorageClass\": \"\",\n \"S3Config\": {\n \"BucketAccessRoleArn\": \"\"\n },\n \"AgentArns\": \"\",\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 \"Subdirectory\": \"\",\n \"S3BucketArn\": \"\",\n \"S3StorageClass\": \"\",\n \"S3Config\": {\n \"BucketAccessRoleArn\": \"\"\n },\n \"AgentArns\": \"\",\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=FmrsService.CreateLocationS3";
let payload = json!({
"Subdirectory": "",
"S3BucketArn": "",
"S3StorageClass": "",
"S3Config": json!({"BucketAccessRoleArn": ""}),
"AgentArns": "",
"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=FmrsService.CreateLocationS3' \
--header 'content-type: application/json' \
--header 'x-amz-target: ' \
--data '{
"Subdirectory": "",
"S3BucketArn": "",
"S3StorageClass": "",
"S3Config": {
"BucketAccessRoleArn": ""
},
"AgentArns": "",
"Tags": ""
}'
echo '{
"Subdirectory": "",
"S3BucketArn": "",
"S3StorageClass": "",
"S3Config": {
"BucketAccessRoleArn": ""
},
"AgentArns": "",
"Tags": ""
}' | \
http POST '{{baseUrl}}/#X-Amz-Target=FmrsService.CreateLocationS3' \
content-type:application/json \
x-amz-target:''
wget --quiet \
--method POST \
--header 'x-amz-target: ' \
--header 'content-type: application/json' \
--body-data '{\n "Subdirectory": "",\n "S3BucketArn": "",\n "S3StorageClass": "",\n "S3Config": {\n "BucketAccessRoleArn": ""\n },\n "AgentArns": "",\n "Tags": ""\n}' \
--output-document \
- '{{baseUrl}}/#X-Amz-Target=FmrsService.CreateLocationS3'
import Foundation
let headers = [
"x-amz-target": "",
"content-type": "application/json"
]
let parameters = [
"Subdirectory": "",
"S3BucketArn": "",
"S3StorageClass": "",
"S3Config": ["BucketAccessRoleArn": ""],
"AgentArns": "",
"Tags": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/#X-Amz-Target=FmrsService.CreateLocationS3")! 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
CreateLocationSmb
{{baseUrl}}/#X-Amz-Target=FmrsService.CreateLocationSmb
HEADERS
X-Amz-Target
BODY json
{
"Subdirectory": "",
"ServerHostname": "",
"User": "",
"Domain": "",
"Password": "",
"AgentArns": "",
"MountOptions": "",
"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=FmrsService.CreateLocationSmb");
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 \"Subdirectory\": \"\",\n \"ServerHostname\": \"\",\n \"User\": \"\",\n \"Domain\": \"\",\n \"Password\": \"\",\n \"AgentArns\": \"\",\n \"MountOptions\": \"\",\n \"Tags\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/#X-Amz-Target=FmrsService.CreateLocationSmb" {:headers {:x-amz-target ""}
:content-type :json
:form-params {:Subdirectory ""
:ServerHostname ""
:User ""
:Domain ""
:Password ""
:AgentArns ""
:MountOptions ""
:Tags ""}})
require "http/client"
url = "{{baseUrl}}/#X-Amz-Target=FmrsService.CreateLocationSmb"
headers = HTTP::Headers{
"x-amz-target" => ""
"content-type" => "application/json"
}
reqBody = "{\n \"Subdirectory\": \"\",\n \"ServerHostname\": \"\",\n \"User\": \"\",\n \"Domain\": \"\",\n \"Password\": \"\",\n \"AgentArns\": \"\",\n \"MountOptions\": \"\",\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=FmrsService.CreateLocationSmb"),
Headers =
{
{ "x-amz-target", "" },
},
Content = new StringContent("{\n \"Subdirectory\": \"\",\n \"ServerHostname\": \"\",\n \"User\": \"\",\n \"Domain\": \"\",\n \"Password\": \"\",\n \"AgentArns\": \"\",\n \"MountOptions\": \"\",\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=FmrsService.CreateLocationSmb");
var request = new RestRequest("", Method.Post);
request.AddHeader("x-amz-target", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"Subdirectory\": \"\",\n \"ServerHostname\": \"\",\n \"User\": \"\",\n \"Domain\": \"\",\n \"Password\": \"\",\n \"AgentArns\": \"\",\n \"MountOptions\": \"\",\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=FmrsService.CreateLocationSmb"
payload := strings.NewReader("{\n \"Subdirectory\": \"\",\n \"ServerHostname\": \"\",\n \"User\": \"\",\n \"Domain\": \"\",\n \"Password\": \"\",\n \"AgentArns\": \"\",\n \"MountOptions\": \"\",\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: 151
{
"Subdirectory": "",
"ServerHostname": "",
"User": "",
"Domain": "",
"Password": "",
"AgentArns": "",
"MountOptions": "",
"Tags": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/#X-Amz-Target=FmrsService.CreateLocationSmb")
.setHeader("x-amz-target", "")
.setHeader("content-type", "application/json")
.setBody("{\n \"Subdirectory\": \"\",\n \"ServerHostname\": \"\",\n \"User\": \"\",\n \"Domain\": \"\",\n \"Password\": \"\",\n \"AgentArns\": \"\",\n \"MountOptions\": \"\",\n \"Tags\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/#X-Amz-Target=FmrsService.CreateLocationSmb"))
.header("x-amz-target", "")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"Subdirectory\": \"\",\n \"ServerHostname\": \"\",\n \"User\": \"\",\n \"Domain\": \"\",\n \"Password\": \"\",\n \"AgentArns\": \"\",\n \"MountOptions\": \"\",\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 \"Subdirectory\": \"\",\n \"ServerHostname\": \"\",\n \"User\": \"\",\n \"Domain\": \"\",\n \"Password\": \"\",\n \"AgentArns\": \"\",\n \"MountOptions\": \"\",\n \"Tags\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=FmrsService.CreateLocationSmb")
.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=FmrsService.CreateLocationSmb")
.header("x-amz-target", "")
.header("content-type", "application/json")
.body("{\n \"Subdirectory\": \"\",\n \"ServerHostname\": \"\",\n \"User\": \"\",\n \"Domain\": \"\",\n \"Password\": \"\",\n \"AgentArns\": \"\",\n \"MountOptions\": \"\",\n \"Tags\": \"\"\n}")
.asString();
const data = JSON.stringify({
Subdirectory: '',
ServerHostname: '',
User: '',
Domain: '',
Password: '',
AgentArns: '',
MountOptions: '',
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=FmrsService.CreateLocationSmb');
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=FmrsService.CreateLocationSmb',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {
Subdirectory: '',
ServerHostname: '',
User: '',
Domain: '',
Password: '',
AgentArns: '',
MountOptions: '',
Tags: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/#X-Amz-Target=FmrsService.CreateLocationSmb';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"Subdirectory":"","ServerHostname":"","User":"","Domain":"","Password":"","AgentArns":"","MountOptions":"","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=FmrsService.CreateLocationSmb',
method: 'POST',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
},
processData: false,
data: '{\n "Subdirectory": "",\n "ServerHostname": "",\n "User": "",\n "Domain": "",\n "Password": "",\n "AgentArns": "",\n "MountOptions": "",\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 \"Subdirectory\": \"\",\n \"ServerHostname\": \"\",\n \"User\": \"\",\n \"Domain\": \"\",\n \"Password\": \"\",\n \"AgentArns\": \"\",\n \"MountOptions\": \"\",\n \"Tags\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=FmrsService.CreateLocationSmb")
.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({
Subdirectory: '',
ServerHostname: '',
User: '',
Domain: '',
Password: '',
AgentArns: '',
MountOptions: '',
Tags: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=FmrsService.CreateLocationSmb',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: {
Subdirectory: '',
ServerHostname: '',
User: '',
Domain: '',
Password: '',
AgentArns: '',
MountOptions: '',
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=FmrsService.CreateLocationSmb');
req.headers({
'x-amz-target': '',
'content-type': 'application/json'
});
req.type('json');
req.send({
Subdirectory: '',
ServerHostname: '',
User: '',
Domain: '',
Password: '',
AgentArns: '',
MountOptions: '',
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=FmrsService.CreateLocationSmb',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {
Subdirectory: '',
ServerHostname: '',
User: '',
Domain: '',
Password: '',
AgentArns: '',
MountOptions: '',
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=FmrsService.CreateLocationSmb';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"Subdirectory":"","ServerHostname":"","User":"","Domain":"","Password":"","AgentArns":"","MountOptions":"","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 = @{ @"Subdirectory": @"",
@"ServerHostname": @"",
@"User": @"",
@"Domain": @"",
@"Password": @"",
@"AgentArns": @"",
@"MountOptions": @"",
@"Tags": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/#X-Amz-Target=FmrsService.CreateLocationSmb"]
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=FmrsService.CreateLocationSmb" in
let headers = Header.add_list (Header.init ()) [
("x-amz-target", "");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"Subdirectory\": \"\",\n \"ServerHostname\": \"\",\n \"User\": \"\",\n \"Domain\": \"\",\n \"Password\": \"\",\n \"AgentArns\": \"\",\n \"MountOptions\": \"\",\n \"Tags\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/#X-Amz-Target=FmrsService.CreateLocationSmb",
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([
'Subdirectory' => '',
'ServerHostname' => '',
'User' => '',
'Domain' => '',
'Password' => '',
'AgentArns' => '',
'MountOptions' => '',
'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=FmrsService.CreateLocationSmb', [
'body' => '{
"Subdirectory": "",
"ServerHostname": "",
"User": "",
"Domain": "",
"Password": "",
"AgentArns": "",
"MountOptions": "",
"Tags": ""
}',
'headers' => [
'content-type' => 'application/json',
'x-amz-target' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/#X-Amz-Target=FmrsService.CreateLocationSmb');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'Subdirectory' => '',
'ServerHostname' => '',
'User' => '',
'Domain' => '',
'Password' => '',
'AgentArns' => '',
'MountOptions' => '',
'Tags' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'Subdirectory' => '',
'ServerHostname' => '',
'User' => '',
'Domain' => '',
'Password' => '',
'AgentArns' => '',
'MountOptions' => '',
'Tags' => ''
]));
$request->setRequestUrl('{{baseUrl}}/#X-Amz-Target=FmrsService.CreateLocationSmb');
$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=FmrsService.CreateLocationSmb' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"Subdirectory": "",
"ServerHostname": "",
"User": "",
"Domain": "",
"Password": "",
"AgentArns": "",
"MountOptions": "",
"Tags": ""
}'
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/#X-Amz-Target=FmrsService.CreateLocationSmb' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"Subdirectory": "",
"ServerHostname": "",
"User": "",
"Domain": "",
"Password": "",
"AgentArns": "",
"MountOptions": "",
"Tags": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"Subdirectory\": \"\",\n \"ServerHostname\": \"\",\n \"User\": \"\",\n \"Domain\": \"\",\n \"Password\": \"\",\n \"AgentArns\": \"\",\n \"MountOptions\": \"\",\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=FmrsService.CreateLocationSmb"
payload = {
"Subdirectory": "",
"ServerHostname": "",
"User": "",
"Domain": "",
"Password": "",
"AgentArns": "",
"MountOptions": "",
"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=FmrsService.CreateLocationSmb"
payload <- "{\n \"Subdirectory\": \"\",\n \"ServerHostname\": \"\",\n \"User\": \"\",\n \"Domain\": \"\",\n \"Password\": \"\",\n \"AgentArns\": \"\",\n \"MountOptions\": \"\",\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=FmrsService.CreateLocationSmb")
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 \"Subdirectory\": \"\",\n \"ServerHostname\": \"\",\n \"User\": \"\",\n \"Domain\": \"\",\n \"Password\": \"\",\n \"AgentArns\": \"\",\n \"MountOptions\": \"\",\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 \"Subdirectory\": \"\",\n \"ServerHostname\": \"\",\n \"User\": \"\",\n \"Domain\": \"\",\n \"Password\": \"\",\n \"AgentArns\": \"\",\n \"MountOptions\": \"\",\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=FmrsService.CreateLocationSmb";
let payload = json!({
"Subdirectory": "",
"ServerHostname": "",
"User": "",
"Domain": "",
"Password": "",
"AgentArns": "",
"MountOptions": "",
"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=FmrsService.CreateLocationSmb' \
--header 'content-type: application/json' \
--header 'x-amz-target: ' \
--data '{
"Subdirectory": "",
"ServerHostname": "",
"User": "",
"Domain": "",
"Password": "",
"AgentArns": "",
"MountOptions": "",
"Tags": ""
}'
echo '{
"Subdirectory": "",
"ServerHostname": "",
"User": "",
"Domain": "",
"Password": "",
"AgentArns": "",
"MountOptions": "",
"Tags": ""
}' | \
http POST '{{baseUrl}}/#X-Amz-Target=FmrsService.CreateLocationSmb' \
content-type:application/json \
x-amz-target:''
wget --quiet \
--method POST \
--header 'x-amz-target: ' \
--header 'content-type: application/json' \
--body-data '{\n "Subdirectory": "",\n "ServerHostname": "",\n "User": "",\n "Domain": "",\n "Password": "",\n "AgentArns": "",\n "MountOptions": "",\n "Tags": ""\n}' \
--output-document \
- '{{baseUrl}}/#X-Amz-Target=FmrsService.CreateLocationSmb'
import Foundation
let headers = [
"x-amz-target": "",
"content-type": "application/json"
]
let parameters = [
"Subdirectory": "",
"ServerHostname": "",
"User": "",
"Domain": "",
"Password": "",
"AgentArns": "",
"MountOptions": "",
"Tags": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/#X-Amz-Target=FmrsService.CreateLocationSmb")! 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
CreateTask
{{baseUrl}}/#X-Amz-Target=FmrsService.CreateTask
HEADERS
X-Amz-Target
BODY json
{
"SourceLocationArn": "",
"DestinationLocationArn": "",
"CloudWatchLogGroupArn": "",
"Name": "",
"Options": "",
"Excludes": "",
"Schedule": "",
"Tags": "",
"Includes": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/#X-Amz-Target=FmrsService.CreateTask");
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 \"SourceLocationArn\": \"\",\n \"DestinationLocationArn\": \"\",\n \"CloudWatchLogGroupArn\": \"\",\n \"Name\": \"\",\n \"Options\": \"\",\n \"Excludes\": \"\",\n \"Schedule\": \"\",\n \"Tags\": \"\",\n \"Includes\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/#X-Amz-Target=FmrsService.CreateTask" {:headers {:x-amz-target ""}
:content-type :json
:form-params {:SourceLocationArn ""
:DestinationLocationArn ""
:CloudWatchLogGroupArn ""
:Name ""
:Options ""
:Excludes ""
:Schedule ""
:Tags ""
:Includes ""}})
require "http/client"
url = "{{baseUrl}}/#X-Amz-Target=FmrsService.CreateTask"
headers = HTTP::Headers{
"x-amz-target" => ""
"content-type" => "application/json"
}
reqBody = "{\n \"SourceLocationArn\": \"\",\n \"DestinationLocationArn\": \"\",\n \"CloudWatchLogGroupArn\": \"\",\n \"Name\": \"\",\n \"Options\": \"\",\n \"Excludes\": \"\",\n \"Schedule\": \"\",\n \"Tags\": \"\",\n \"Includes\": \"\"\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=FmrsService.CreateTask"),
Headers =
{
{ "x-amz-target", "" },
},
Content = new StringContent("{\n \"SourceLocationArn\": \"\",\n \"DestinationLocationArn\": \"\",\n \"CloudWatchLogGroupArn\": \"\",\n \"Name\": \"\",\n \"Options\": \"\",\n \"Excludes\": \"\",\n \"Schedule\": \"\",\n \"Tags\": \"\",\n \"Includes\": \"\"\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=FmrsService.CreateTask");
var request = new RestRequest("", Method.Post);
request.AddHeader("x-amz-target", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"SourceLocationArn\": \"\",\n \"DestinationLocationArn\": \"\",\n \"CloudWatchLogGroupArn\": \"\",\n \"Name\": \"\",\n \"Options\": \"\",\n \"Excludes\": \"\",\n \"Schedule\": \"\",\n \"Tags\": \"\",\n \"Includes\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/#X-Amz-Target=FmrsService.CreateTask"
payload := strings.NewReader("{\n \"SourceLocationArn\": \"\",\n \"DestinationLocationArn\": \"\",\n \"CloudWatchLogGroupArn\": \"\",\n \"Name\": \"\",\n \"Options\": \"\",\n \"Excludes\": \"\",\n \"Schedule\": \"\",\n \"Tags\": \"\",\n \"Includes\": \"\"\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: 191
{
"SourceLocationArn": "",
"DestinationLocationArn": "",
"CloudWatchLogGroupArn": "",
"Name": "",
"Options": "",
"Excludes": "",
"Schedule": "",
"Tags": "",
"Includes": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/#X-Amz-Target=FmrsService.CreateTask")
.setHeader("x-amz-target", "")
.setHeader("content-type", "application/json")
.setBody("{\n \"SourceLocationArn\": \"\",\n \"DestinationLocationArn\": \"\",\n \"CloudWatchLogGroupArn\": \"\",\n \"Name\": \"\",\n \"Options\": \"\",\n \"Excludes\": \"\",\n \"Schedule\": \"\",\n \"Tags\": \"\",\n \"Includes\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/#X-Amz-Target=FmrsService.CreateTask"))
.header("x-amz-target", "")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"SourceLocationArn\": \"\",\n \"DestinationLocationArn\": \"\",\n \"CloudWatchLogGroupArn\": \"\",\n \"Name\": \"\",\n \"Options\": \"\",\n \"Excludes\": \"\",\n \"Schedule\": \"\",\n \"Tags\": \"\",\n \"Includes\": \"\"\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 \"SourceLocationArn\": \"\",\n \"DestinationLocationArn\": \"\",\n \"CloudWatchLogGroupArn\": \"\",\n \"Name\": \"\",\n \"Options\": \"\",\n \"Excludes\": \"\",\n \"Schedule\": \"\",\n \"Tags\": \"\",\n \"Includes\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=FmrsService.CreateTask")
.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=FmrsService.CreateTask")
.header("x-amz-target", "")
.header("content-type", "application/json")
.body("{\n \"SourceLocationArn\": \"\",\n \"DestinationLocationArn\": \"\",\n \"CloudWatchLogGroupArn\": \"\",\n \"Name\": \"\",\n \"Options\": \"\",\n \"Excludes\": \"\",\n \"Schedule\": \"\",\n \"Tags\": \"\",\n \"Includes\": \"\"\n}")
.asString();
const data = JSON.stringify({
SourceLocationArn: '',
DestinationLocationArn: '',
CloudWatchLogGroupArn: '',
Name: '',
Options: '',
Excludes: '',
Schedule: '',
Tags: '',
Includes: ''
});
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=FmrsService.CreateTask');
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=FmrsService.CreateTask',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {
SourceLocationArn: '',
DestinationLocationArn: '',
CloudWatchLogGroupArn: '',
Name: '',
Options: '',
Excludes: '',
Schedule: '',
Tags: '',
Includes: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/#X-Amz-Target=FmrsService.CreateTask';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"SourceLocationArn":"","DestinationLocationArn":"","CloudWatchLogGroupArn":"","Name":"","Options":"","Excludes":"","Schedule":"","Tags":"","Includes":""}'
};
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=FmrsService.CreateTask',
method: 'POST',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
},
processData: false,
data: '{\n "SourceLocationArn": "",\n "DestinationLocationArn": "",\n "CloudWatchLogGroupArn": "",\n "Name": "",\n "Options": "",\n "Excludes": "",\n "Schedule": "",\n "Tags": "",\n "Includes": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"SourceLocationArn\": \"\",\n \"DestinationLocationArn\": \"\",\n \"CloudWatchLogGroupArn\": \"\",\n \"Name\": \"\",\n \"Options\": \"\",\n \"Excludes\": \"\",\n \"Schedule\": \"\",\n \"Tags\": \"\",\n \"Includes\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=FmrsService.CreateTask")
.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({
SourceLocationArn: '',
DestinationLocationArn: '',
CloudWatchLogGroupArn: '',
Name: '',
Options: '',
Excludes: '',
Schedule: '',
Tags: '',
Includes: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=FmrsService.CreateTask',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: {
SourceLocationArn: '',
DestinationLocationArn: '',
CloudWatchLogGroupArn: '',
Name: '',
Options: '',
Excludes: '',
Schedule: '',
Tags: '',
Includes: ''
},
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=FmrsService.CreateTask');
req.headers({
'x-amz-target': '',
'content-type': 'application/json'
});
req.type('json');
req.send({
SourceLocationArn: '',
DestinationLocationArn: '',
CloudWatchLogGroupArn: '',
Name: '',
Options: '',
Excludes: '',
Schedule: '',
Tags: '',
Includes: ''
});
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=FmrsService.CreateTask',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {
SourceLocationArn: '',
DestinationLocationArn: '',
CloudWatchLogGroupArn: '',
Name: '',
Options: '',
Excludes: '',
Schedule: '',
Tags: '',
Includes: ''
}
};
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=FmrsService.CreateTask';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"SourceLocationArn":"","DestinationLocationArn":"","CloudWatchLogGroupArn":"","Name":"","Options":"","Excludes":"","Schedule":"","Tags":"","Includes":""}'
};
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 = @{ @"SourceLocationArn": @"",
@"DestinationLocationArn": @"",
@"CloudWatchLogGroupArn": @"",
@"Name": @"",
@"Options": @"",
@"Excludes": @"",
@"Schedule": @"",
@"Tags": @"",
@"Includes": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/#X-Amz-Target=FmrsService.CreateTask"]
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=FmrsService.CreateTask" in
let headers = Header.add_list (Header.init ()) [
("x-amz-target", "");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"SourceLocationArn\": \"\",\n \"DestinationLocationArn\": \"\",\n \"CloudWatchLogGroupArn\": \"\",\n \"Name\": \"\",\n \"Options\": \"\",\n \"Excludes\": \"\",\n \"Schedule\": \"\",\n \"Tags\": \"\",\n \"Includes\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/#X-Amz-Target=FmrsService.CreateTask",
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([
'SourceLocationArn' => '',
'DestinationLocationArn' => '',
'CloudWatchLogGroupArn' => '',
'Name' => '',
'Options' => '',
'Excludes' => '',
'Schedule' => '',
'Tags' => '',
'Includes' => ''
]),
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=FmrsService.CreateTask', [
'body' => '{
"SourceLocationArn": "",
"DestinationLocationArn": "",
"CloudWatchLogGroupArn": "",
"Name": "",
"Options": "",
"Excludes": "",
"Schedule": "",
"Tags": "",
"Includes": ""
}',
'headers' => [
'content-type' => 'application/json',
'x-amz-target' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/#X-Amz-Target=FmrsService.CreateTask');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'SourceLocationArn' => '',
'DestinationLocationArn' => '',
'CloudWatchLogGroupArn' => '',
'Name' => '',
'Options' => '',
'Excludes' => '',
'Schedule' => '',
'Tags' => '',
'Includes' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'SourceLocationArn' => '',
'DestinationLocationArn' => '',
'CloudWatchLogGroupArn' => '',
'Name' => '',
'Options' => '',
'Excludes' => '',
'Schedule' => '',
'Tags' => '',
'Includes' => ''
]));
$request->setRequestUrl('{{baseUrl}}/#X-Amz-Target=FmrsService.CreateTask');
$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=FmrsService.CreateTask' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"SourceLocationArn": "",
"DestinationLocationArn": "",
"CloudWatchLogGroupArn": "",
"Name": "",
"Options": "",
"Excludes": "",
"Schedule": "",
"Tags": "",
"Includes": ""
}'
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/#X-Amz-Target=FmrsService.CreateTask' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"SourceLocationArn": "",
"DestinationLocationArn": "",
"CloudWatchLogGroupArn": "",
"Name": "",
"Options": "",
"Excludes": "",
"Schedule": "",
"Tags": "",
"Includes": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"SourceLocationArn\": \"\",\n \"DestinationLocationArn\": \"\",\n \"CloudWatchLogGroupArn\": \"\",\n \"Name\": \"\",\n \"Options\": \"\",\n \"Excludes\": \"\",\n \"Schedule\": \"\",\n \"Tags\": \"\",\n \"Includes\": \"\"\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=FmrsService.CreateTask"
payload = {
"SourceLocationArn": "",
"DestinationLocationArn": "",
"CloudWatchLogGroupArn": "",
"Name": "",
"Options": "",
"Excludes": "",
"Schedule": "",
"Tags": "",
"Includes": ""
}
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=FmrsService.CreateTask"
payload <- "{\n \"SourceLocationArn\": \"\",\n \"DestinationLocationArn\": \"\",\n \"CloudWatchLogGroupArn\": \"\",\n \"Name\": \"\",\n \"Options\": \"\",\n \"Excludes\": \"\",\n \"Schedule\": \"\",\n \"Tags\": \"\",\n \"Includes\": \"\"\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=FmrsService.CreateTask")
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 \"SourceLocationArn\": \"\",\n \"DestinationLocationArn\": \"\",\n \"CloudWatchLogGroupArn\": \"\",\n \"Name\": \"\",\n \"Options\": \"\",\n \"Excludes\": \"\",\n \"Schedule\": \"\",\n \"Tags\": \"\",\n \"Includes\": \"\"\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 \"SourceLocationArn\": \"\",\n \"DestinationLocationArn\": \"\",\n \"CloudWatchLogGroupArn\": \"\",\n \"Name\": \"\",\n \"Options\": \"\",\n \"Excludes\": \"\",\n \"Schedule\": \"\",\n \"Tags\": \"\",\n \"Includes\": \"\"\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=FmrsService.CreateTask";
let payload = json!({
"SourceLocationArn": "",
"DestinationLocationArn": "",
"CloudWatchLogGroupArn": "",
"Name": "",
"Options": "",
"Excludes": "",
"Schedule": "",
"Tags": "",
"Includes": ""
});
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=FmrsService.CreateTask' \
--header 'content-type: application/json' \
--header 'x-amz-target: ' \
--data '{
"SourceLocationArn": "",
"DestinationLocationArn": "",
"CloudWatchLogGroupArn": "",
"Name": "",
"Options": "",
"Excludes": "",
"Schedule": "",
"Tags": "",
"Includes": ""
}'
echo '{
"SourceLocationArn": "",
"DestinationLocationArn": "",
"CloudWatchLogGroupArn": "",
"Name": "",
"Options": "",
"Excludes": "",
"Schedule": "",
"Tags": "",
"Includes": ""
}' | \
http POST '{{baseUrl}}/#X-Amz-Target=FmrsService.CreateTask' \
content-type:application/json \
x-amz-target:''
wget --quiet \
--method POST \
--header 'x-amz-target: ' \
--header 'content-type: application/json' \
--body-data '{\n "SourceLocationArn": "",\n "DestinationLocationArn": "",\n "CloudWatchLogGroupArn": "",\n "Name": "",\n "Options": "",\n "Excludes": "",\n "Schedule": "",\n "Tags": "",\n "Includes": ""\n}' \
--output-document \
- '{{baseUrl}}/#X-Amz-Target=FmrsService.CreateTask'
import Foundation
let headers = [
"x-amz-target": "",
"content-type": "application/json"
]
let parameters = [
"SourceLocationArn": "",
"DestinationLocationArn": "",
"CloudWatchLogGroupArn": "",
"Name": "",
"Options": "",
"Excludes": "",
"Schedule": "",
"Tags": "",
"Includes": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/#X-Amz-Target=FmrsService.CreateTask")! 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
DeleteAgent
{{baseUrl}}/#X-Amz-Target=FmrsService.DeleteAgent
HEADERS
X-Amz-Target
BODY json
{
"AgentArn": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/#X-Amz-Target=FmrsService.DeleteAgent");
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 \"AgentArn\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/#X-Amz-Target=FmrsService.DeleteAgent" {:headers {:x-amz-target ""}
:content-type :json
:form-params {:AgentArn ""}})
require "http/client"
url = "{{baseUrl}}/#X-Amz-Target=FmrsService.DeleteAgent"
headers = HTTP::Headers{
"x-amz-target" => ""
"content-type" => "application/json"
}
reqBody = "{\n \"AgentArn\": \"\"\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=FmrsService.DeleteAgent"),
Headers =
{
{ "x-amz-target", "" },
},
Content = new StringContent("{\n \"AgentArn\": \"\"\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=FmrsService.DeleteAgent");
var request = new RestRequest("", Method.Post);
request.AddHeader("x-amz-target", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"AgentArn\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/#X-Amz-Target=FmrsService.DeleteAgent"
payload := strings.NewReader("{\n \"AgentArn\": \"\"\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: 20
{
"AgentArn": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/#X-Amz-Target=FmrsService.DeleteAgent")
.setHeader("x-amz-target", "")
.setHeader("content-type", "application/json")
.setBody("{\n \"AgentArn\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/#X-Amz-Target=FmrsService.DeleteAgent"))
.header("x-amz-target", "")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"AgentArn\": \"\"\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 \"AgentArn\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=FmrsService.DeleteAgent")
.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=FmrsService.DeleteAgent")
.header("x-amz-target", "")
.header("content-type", "application/json")
.body("{\n \"AgentArn\": \"\"\n}")
.asString();
const data = JSON.stringify({
AgentArn: ''
});
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=FmrsService.DeleteAgent');
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=FmrsService.DeleteAgent',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {AgentArn: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/#X-Amz-Target=FmrsService.DeleteAgent';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"AgentArn":""}'
};
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=FmrsService.DeleteAgent',
method: 'POST',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
},
processData: false,
data: '{\n "AgentArn": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"AgentArn\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=FmrsService.DeleteAgent")
.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({AgentArn: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=FmrsService.DeleteAgent',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: {AgentArn: ''},
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=FmrsService.DeleteAgent');
req.headers({
'x-amz-target': '',
'content-type': 'application/json'
});
req.type('json');
req.send({
AgentArn: ''
});
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=FmrsService.DeleteAgent',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {AgentArn: ''}
};
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=FmrsService.DeleteAgent';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"AgentArn":""}'
};
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 = @{ @"AgentArn": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/#X-Amz-Target=FmrsService.DeleteAgent"]
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=FmrsService.DeleteAgent" in
let headers = Header.add_list (Header.init ()) [
("x-amz-target", "");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"AgentArn\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/#X-Amz-Target=FmrsService.DeleteAgent",
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([
'AgentArn' => ''
]),
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=FmrsService.DeleteAgent', [
'body' => '{
"AgentArn": ""
}',
'headers' => [
'content-type' => 'application/json',
'x-amz-target' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/#X-Amz-Target=FmrsService.DeleteAgent');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'AgentArn' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'AgentArn' => ''
]));
$request->setRequestUrl('{{baseUrl}}/#X-Amz-Target=FmrsService.DeleteAgent');
$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=FmrsService.DeleteAgent' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"AgentArn": ""
}'
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/#X-Amz-Target=FmrsService.DeleteAgent' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"AgentArn": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"AgentArn\": \"\"\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=FmrsService.DeleteAgent"
payload = { "AgentArn": "" }
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=FmrsService.DeleteAgent"
payload <- "{\n \"AgentArn\": \"\"\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=FmrsService.DeleteAgent")
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 \"AgentArn\": \"\"\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 \"AgentArn\": \"\"\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=FmrsService.DeleteAgent";
let payload = json!({"AgentArn": ""});
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=FmrsService.DeleteAgent' \
--header 'content-type: application/json' \
--header 'x-amz-target: ' \
--data '{
"AgentArn": ""
}'
echo '{
"AgentArn": ""
}' | \
http POST '{{baseUrl}}/#X-Amz-Target=FmrsService.DeleteAgent' \
content-type:application/json \
x-amz-target:''
wget --quiet \
--method POST \
--header 'x-amz-target: ' \
--header 'content-type: application/json' \
--body-data '{\n "AgentArn": ""\n}' \
--output-document \
- '{{baseUrl}}/#X-Amz-Target=FmrsService.DeleteAgent'
import Foundation
let headers = [
"x-amz-target": "",
"content-type": "application/json"
]
let parameters = ["AgentArn": ""] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/#X-Amz-Target=FmrsService.DeleteAgent")! 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
DeleteLocation
{{baseUrl}}/#X-Amz-Target=FmrsService.DeleteLocation
HEADERS
X-Amz-Target
BODY json
{
"LocationArn": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/#X-Amz-Target=FmrsService.DeleteLocation");
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 \"LocationArn\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/#X-Amz-Target=FmrsService.DeleteLocation" {:headers {:x-amz-target ""}
:content-type :json
:form-params {:LocationArn ""}})
require "http/client"
url = "{{baseUrl}}/#X-Amz-Target=FmrsService.DeleteLocation"
headers = HTTP::Headers{
"x-amz-target" => ""
"content-type" => "application/json"
}
reqBody = "{\n \"LocationArn\": \"\"\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=FmrsService.DeleteLocation"),
Headers =
{
{ "x-amz-target", "" },
},
Content = new StringContent("{\n \"LocationArn\": \"\"\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=FmrsService.DeleteLocation");
var request = new RestRequest("", Method.Post);
request.AddHeader("x-amz-target", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"LocationArn\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/#X-Amz-Target=FmrsService.DeleteLocation"
payload := strings.NewReader("{\n \"LocationArn\": \"\"\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: 23
{
"LocationArn": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/#X-Amz-Target=FmrsService.DeleteLocation")
.setHeader("x-amz-target", "")
.setHeader("content-type", "application/json")
.setBody("{\n \"LocationArn\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/#X-Amz-Target=FmrsService.DeleteLocation"))
.header("x-amz-target", "")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"LocationArn\": \"\"\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 \"LocationArn\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=FmrsService.DeleteLocation")
.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=FmrsService.DeleteLocation")
.header("x-amz-target", "")
.header("content-type", "application/json")
.body("{\n \"LocationArn\": \"\"\n}")
.asString();
const data = JSON.stringify({
LocationArn: ''
});
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=FmrsService.DeleteLocation');
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=FmrsService.DeleteLocation',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {LocationArn: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/#X-Amz-Target=FmrsService.DeleteLocation';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"LocationArn":""}'
};
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=FmrsService.DeleteLocation',
method: 'POST',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
},
processData: false,
data: '{\n "LocationArn": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"LocationArn\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=FmrsService.DeleteLocation")
.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({LocationArn: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=FmrsService.DeleteLocation',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: {LocationArn: ''},
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=FmrsService.DeleteLocation');
req.headers({
'x-amz-target': '',
'content-type': 'application/json'
});
req.type('json');
req.send({
LocationArn: ''
});
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=FmrsService.DeleteLocation',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {LocationArn: ''}
};
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=FmrsService.DeleteLocation';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"LocationArn":""}'
};
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 = @{ @"LocationArn": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/#X-Amz-Target=FmrsService.DeleteLocation"]
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=FmrsService.DeleteLocation" in
let headers = Header.add_list (Header.init ()) [
("x-amz-target", "");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"LocationArn\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/#X-Amz-Target=FmrsService.DeleteLocation",
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([
'LocationArn' => ''
]),
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=FmrsService.DeleteLocation', [
'body' => '{
"LocationArn": ""
}',
'headers' => [
'content-type' => 'application/json',
'x-amz-target' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/#X-Amz-Target=FmrsService.DeleteLocation');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'LocationArn' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'LocationArn' => ''
]));
$request->setRequestUrl('{{baseUrl}}/#X-Amz-Target=FmrsService.DeleteLocation');
$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=FmrsService.DeleteLocation' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"LocationArn": ""
}'
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/#X-Amz-Target=FmrsService.DeleteLocation' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"LocationArn": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"LocationArn\": \"\"\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=FmrsService.DeleteLocation"
payload = { "LocationArn": "" }
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=FmrsService.DeleteLocation"
payload <- "{\n \"LocationArn\": \"\"\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=FmrsService.DeleteLocation")
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 \"LocationArn\": \"\"\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 \"LocationArn\": \"\"\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=FmrsService.DeleteLocation";
let payload = json!({"LocationArn": ""});
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=FmrsService.DeleteLocation' \
--header 'content-type: application/json' \
--header 'x-amz-target: ' \
--data '{
"LocationArn": ""
}'
echo '{
"LocationArn": ""
}' | \
http POST '{{baseUrl}}/#X-Amz-Target=FmrsService.DeleteLocation' \
content-type:application/json \
x-amz-target:''
wget --quiet \
--method POST \
--header 'x-amz-target: ' \
--header 'content-type: application/json' \
--body-data '{\n "LocationArn": ""\n}' \
--output-document \
- '{{baseUrl}}/#X-Amz-Target=FmrsService.DeleteLocation'
import Foundation
let headers = [
"x-amz-target": "",
"content-type": "application/json"
]
let parameters = ["LocationArn": ""] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/#X-Amz-Target=FmrsService.DeleteLocation")! 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
DeleteTask
{{baseUrl}}/#X-Amz-Target=FmrsService.DeleteTask
HEADERS
X-Amz-Target
BODY json
{
"TaskArn": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/#X-Amz-Target=FmrsService.DeleteTask");
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 \"TaskArn\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/#X-Amz-Target=FmrsService.DeleteTask" {:headers {:x-amz-target ""}
:content-type :json
:form-params {:TaskArn ""}})
require "http/client"
url = "{{baseUrl}}/#X-Amz-Target=FmrsService.DeleteTask"
headers = HTTP::Headers{
"x-amz-target" => ""
"content-type" => "application/json"
}
reqBody = "{\n \"TaskArn\": \"\"\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=FmrsService.DeleteTask"),
Headers =
{
{ "x-amz-target", "" },
},
Content = new StringContent("{\n \"TaskArn\": \"\"\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=FmrsService.DeleteTask");
var request = new RestRequest("", Method.Post);
request.AddHeader("x-amz-target", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"TaskArn\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/#X-Amz-Target=FmrsService.DeleteTask"
payload := strings.NewReader("{\n \"TaskArn\": \"\"\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: 19
{
"TaskArn": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/#X-Amz-Target=FmrsService.DeleteTask")
.setHeader("x-amz-target", "")
.setHeader("content-type", "application/json")
.setBody("{\n \"TaskArn\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/#X-Amz-Target=FmrsService.DeleteTask"))
.header("x-amz-target", "")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"TaskArn\": \"\"\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 \"TaskArn\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=FmrsService.DeleteTask")
.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=FmrsService.DeleteTask")
.header("x-amz-target", "")
.header("content-type", "application/json")
.body("{\n \"TaskArn\": \"\"\n}")
.asString();
const data = JSON.stringify({
TaskArn: ''
});
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=FmrsService.DeleteTask');
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=FmrsService.DeleteTask',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {TaskArn: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/#X-Amz-Target=FmrsService.DeleteTask';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"TaskArn":""}'
};
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=FmrsService.DeleteTask',
method: 'POST',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
},
processData: false,
data: '{\n "TaskArn": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"TaskArn\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=FmrsService.DeleteTask")
.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({TaskArn: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=FmrsService.DeleteTask',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: {TaskArn: ''},
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=FmrsService.DeleteTask');
req.headers({
'x-amz-target': '',
'content-type': 'application/json'
});
req.type('json');
req.send({
TaskArn: ''
});
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=FmrsService.DeleteTask',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {TaskArn: ''}
};
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=FmrsService.DeleteTask';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"TaskArn":""}'
};
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 = @{ @"TaskArn": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/#X-Amz-Target=FmrsService.DeleteTask"]
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=FmrsService.DeleteTask" in
let headers = Header.add_list (Header.init ()) [
("x-amz-target", "");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"TaskArn\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/#X-Amz-Target=FmrsService.DeleteTask",
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([
'TaskArn' => ''
]),
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=FmrsService.DeleteTask', [
'body' => '{
"TaskArn": ""
}',
'headers' => [
'content-type' => 'application/json',
'x-amz-target' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/#X-Amz-Target=FmrsService.DeleteTask');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'TaskArn' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'TaskArn' => ''
]));
$request->setRequestUrl('{{baseUrl}}/#X-Amz-Target=FmrsService.DeleteTask');
$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=FmrsService.DeleteTask' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"TaskArn": ""
}'
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/#X-Amz-Target=FmrsService.DeleteTask' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"TaskArn": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"TaskArn\": \"\"\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=FmrsService.DeleteTask"
payload = { "TaskArn": "" }
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=FmrsService.DeleteTask"
payload <- "{\n \"TaskArn\": \"\"\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=FmrsService.DeleteTask")
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 \"TaskArn\": \"\"\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 \"TaskArn\": \"\"\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=FmrsService.DeleteTask";
let payload = json!({"TaskArn": ""});
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=FmrsService.DeleteTask' \
--header 'content-type: application/json' \
--header 'x-amz-target: ' \
--data '{
"TaskArn": ""
}'
echo '{
"TaskArn": ""
}' | \
http POST '{{baseUrl}}/#X-Amz-Target=FmrsService.DeleteTask' \
content-type:application/json \
x-amz-target:''
wget --quiet \
--method POST \
--header 'x-amz-target: ' \
--header 'content-type: application/json' \
--body-data '{\n "TaskArn": ""\n}' \
--output-document \
- '{{baseUrl}}/#X-Amz-Target=FmrsService.DeleteTask'
import Foundation
let headers = [
"x-amz-target": "",
"content-type": "application/json"
]
let parameters = ["TaskArn": ""] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/#X-Amz-Target=FmrsService.DeleteTask")! 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
DescribeAgent
{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeAgent
HEADERS
X-Amz-Target
BODY json
{
"AgentArn": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeAgent");
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 \"AgentArn\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeAgent" {:headers {:x-amz-target ""}
:content-type :json
:form-params {:AgentArn ""}})
require "http/client"
url = "{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeAgent"
headers = HTTP::Headers{
"x-amz-target" => ""
"content-type" => "application/json"
}
reqBody = "{\n \"AgentArn\": \"\"\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=FmrsService.DescribeAgent"),
Headers =
{
{ "x-amz-target", "" },
},
Content = new StringContent("{\n \"AgentArn\": \"\"\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=FmrsService.DescribeAgent");
var request = new RestRequest("", Method.Post);
request.AddHeader("x-amz-target", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"AgentArn\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeAgent"
payload := strings.NewReader("{\n \"AgentArn\": \"\"\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: 20
{
"AgentArn": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeAgent")
.setHeader("x-amz-target", "")
.setHeader("content-type", "application/json")
.setBody("{\n \"AgentArn\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeAgent"))
.header("x-amz-target", "")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"AgentArn\": \"\"\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 \"AgentArn\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeAgent")
.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=FmrsService.DescribeAgent")
.header("x-amz-target", "")
.header("content-type", "application/json")
.body("{\n \"AgentArn\": \"\"\n}")
.asString();
const data = JSON.stringify({
AgentArn: ''
});
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=FmrsService.DescribeAgent');
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=FmrsService.DescribeAgent',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {AgentArn: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeAgent';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"AgentArn":""}'
};
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=FmrsService.DescribeAgent',
method: 'POST',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
},
processData: false,
data: '{\n "AgentArn": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"AgentArn\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeAgent")
.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({AgentArn: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeAgent',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: {AgentArn: ''},
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=FmrsService.DescribeAgent');
req.headers({
'x-amz-target': '',
'content-type': 'application/json'
});
req.type('json');
req.send({
AgentArn: ''
});
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=FmrsService.DescribeAgent',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {AgentArn: ''}
};
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=FmrsService.DescribeAgent';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"AgentArn":""}'
};
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 = @{ @"AgentArn": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeAgent"]
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=FmrsService.DescribeAgent" in
let headers = Header.add_list (Header.init ()) [
("x-amz-target", "");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"AgentArn\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeAgent",
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([
'AgentArn' => ''
]),
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=FmrsService.DescribeAgent', [
'body' => '{
"AgentArn": ""
}',
'headers' => [
'content-type' => 'application/json',
'x-amz-target' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeAgent');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'AgentArn' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'AgentArn' => ''
]));
$request->setRequestUrl('{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeAgent');
$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=FmrsService.DescribeAgent' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"AgentArn": ""
}'
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeAgent' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"AgentArn": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"AgentArn\": \"\"\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=FmrsService.DescribeAgent"
payload = { "AgentArn": "" }
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=FmrsService.DescribeAgent"
payload <- "{\n \"AgentArn\": \"\"\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=FmrsService.DescribeAgent")
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 \"AgentArn\": \"\"\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 \"AgentArn\": \"\"\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=FmrsService.DescribeAgent";
let payload = json!({"AgentArn": ""});
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=FmrsService.DescribeAgent' \
--header 'content-type: application/json' \
--header 'x-amz-target: ' \
--data '{
"AgentArn": ""
}'
echo '{
"AgentArn": ""
}' | \
http POST '{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeAgent' \
content-type:application/json \
x-amz-target:''
wget --quiet \
--method POST \
--header 'x-amz-target: ' \
--header 'content-type: application/json' \
--body-data '{\n "AgentArn": ""\n}' \
--output-document \
- '{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeAgent'
import Foundation
let headers = [
"x-amz-target": "",
"content-type": "application/json"
]
let parameters = ["AgentArn": ""] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeAgent")! 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
DescribeLocationEfs
{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeLocationEfs
HEADERS
X-Amz-Target
BODY json
{
"LocationArn": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeLocationEfs");
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 \"LocationArn\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeLocationEfs" {:headers {:x-amz-target ""}
:content-type :json
:form-params {:LocationArn ""}})
require "http/client"
url = "{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeLocationEfs"
headers = HTTP::Headers{
"x-amz-target" => ""
"content-type" => "application/json"
}
reqBody = "{\n \"LocationArn\": \"\"\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=FmrsService.DescribeLocationEfs"),
Headers =
{
{ "x-amz-target", "" },
},
Content = new StringContent("{\n \"LocationArn\": \"\"\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=FmrsService.DescribeLocationEfs");
var request = new RestRequest("", Method.Post);
request.AddHeader("x-amz-target", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"LocationArn\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeLocationEfs"
payload := strings.NewReader("{\n \"LocationArn\": \"\"\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: 23
{
"LocationArn": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeLocationEfs")
.setHeader("x-amz-target", "")
.setHeader("content-type", "application/json")
.setBody("{\n \"LocationArn\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeLocationEfs"))
.header("x-amz-target", "")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"LocationArn\": \"\"\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 \"LocationArn\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeLocationEfs")
.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=FmrsService.DescribeLocationEfs")
.header("x-amz-target", "")
.header("content-type", "application/json")
.body("{\n \"LocationArn\": \"\"\n}")
.asString();
const data = JSON.stringify({
LocationArn: ''
});
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=FmrsService.DescribeLocationEfs');
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=FmrsService.DescribeLocationEfs',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {LocationArn: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeLocationEfs';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"LocationArn":""}'
};
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=FmrsService.DescribeLocationEfs',
method: 'POST',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
},
processData: false,
data: '{\n "LocationArn": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"LocationArn\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeLocationEfs")
.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({LocationArn: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeLocationEfs',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: {LocationArn: ''},
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=FmrsService.DescribeLocationEfs');
req.headers({
'x-amz-target': '',
'content-type': 'application/json'
});
req.type('json');
req.send({
LocationArn: ''
});
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=FmrsService.DescribeLocationEfs',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {LocationArn: ''}
};
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=FmrsService.DescribeLocationEfs';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"LocationArn":""}'
};
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 = @{ @"LocationArn": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeLocationEfs"]
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=FmrsService.DescribeLocationEfs" in
let headers = Header.add_list (Header.init ()) [
("x-amz-target", "");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"LocationArn\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeLocationEfs",
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([
'LocationArn' => ''
]),
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=FmrsService.DescribeLocationEfs', [
'body' => '{
"LocationArn": ""
}',
'headers' => [
'content-type' => 'application/json',
'x-amz-target' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeLocationEfs');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'LocationArn' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'LocationArn' => ''
]));
$request->setRequestUrl('{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeLocationEfs');
$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=FmrsService.DescribeLocationEfs' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"LocationArn": ""
}'
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeLocationEfs' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"LocationArn": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"LocationArn\": \"\"\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=FmrsService.DescribeLocationEfs"
payload = { "LocationArn": "" }
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=FmrsService.DescribeLocationEfs"
payload <- "{\n \"LocationArn\": \"\"\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=FmrsService.DescribeLocationEfs")
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 \"LocationArn\": \"\"\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 \"LocationArn\": \"\"\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=FmrsService.DescribeLocationEfs";
let payload = json!({"LocationArn": ""});
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=FmrsService.DescribeLocationEfs' \
--header 'content-type: application/json' \
--header 'x-amz-target: ' \
--data '{
"LocationArn": ""
}'
echo '{
"LocationArn": ""
}' | \
http POST '{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeLocationEfs' \
content-type:application/json \
x-amz-target:''
wget --quiet \
--method POST \
--header 'x-amz-target: ' \
--header 'content-type: application/json' \
--body-data '{\n "LocationArn": ""\n}' \
--output-document \
- '{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeLocationEfs'
import Foundation
let headers = [
"x-amz-target": "",
"content-type": "application/json"
]
let parameters = ["LocationArn": ""] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeLocationEfs")! 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
DescribeLocationFsxLustre
{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeLocationFsxLustre
HEADERS
X-Amz-Target
BODY json
{
"LocationArn": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeLocationFsxLustre");
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 \"LocationArn\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeLocationFsxLustre" {:headers {:x-amz-target ""}
:content-type :json
:form-params {:LocationArn ""}})
require "http/client"
url = "{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeLocationFsxLustre"
headers = HTTP::Headers{
"x-amz-target" => ""
"content-type" => "application/json"
}
reqBody = "{\n \"LocationArn\": \"\"\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=FmrsService.DescribeLocationFsxLustre"),
Headers =
{
{ "x-amz-target", "" },
},
Content = new StringContent("{\n \"LocationArn\": \"\"\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=FmrsService.DescribeLocationFsxLustre");
var request = new RestRequest("", Method.Post);
request.AddHeader("x-amz-target", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"LocationArn\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeLocationFsxLustre"
payload := strings.NewReader("{\n \"LocationArn\": \"\"\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: 23
{
"LocationArn": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeLocationFsxLustre")
.setHeader("x-amz-target", "")
.setHeader("content-type", "application/json")
.setBody("{\n \"LocationArn\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeLocationFsxLustre"))
.header("x-amz-target", "")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"LocationArn\": \"\"\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 \"LocationArn\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeLocationFsxLustre")
.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=FmrsService.DescribeLocationFsxLustre")
.header("x-amz-target", "")
.header("content-type", "application/json")
.body("{\n \"LocationArn\": \"\"\n}")
.asString();
const data = JSON.stringify({
LocationArn: ''
});
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=FmrsService.DescribeLocationFsxLustre');
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=FmrsService.DescribeLocationFsxLustre',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {LocationArn: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeLocationFsxLustre';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"LocationArn":""}'
};
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=FmrsService.DescribeLocationFsxLustre',
method: 'POST',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
},
processData: false,
data: '{\n "LocationArn": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"LocationArn\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeLocationFsxLustre")
.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({LocationArn: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeLocationFsxLustre',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: {LocationArn: ''},
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=FmrsService.DescribeLocationFsxLustre');
req.headers({
'x-amz-target': '',
'content-type': 'application/json'
});
req.type('json');
req.send({
LocationArn: ''
});
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=FmrsService.DescribeLocationFsxLustre',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {LocationArn: ''}
};
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=FmrsService.DescribeLocationFsxLustre';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"LocationArn":""}'
};
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 = @{ @"LocationArn": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeLocationFsxLustre"]
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=FmrsService.DescribeLocationFsxLustre" in
let headers = Header.add_list (Header.init ()) [
("x-amz-target", "");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"LocationArn\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeLocationFsxLustre",
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([
'LocationArn' => ''
]),
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=FmrsService.DescribeLocationFsxLustre', [
'body' => '{
"LocationArn": ""
}',
'headers' => [
'content-type' => 'application/json',
'x-amz-target' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeLocationFsxLustre');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'LocationArn' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'LocationArn' => ''
]));
$request->setRequestUrl('{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeLocationFsxLustre');
$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=FmrsService.DescribeLocationFsxLustre' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"LocationArn": ""
}'
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeLocationFsxLustre' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"LocationArn": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"LocationArn\": \"\"\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=FmrsService.DescribeLocationFsxLustre"
payload = { "LocationArn": "" }
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=FmrsService.DescribeLocationFsxLustre"
payload <- "{\n \"LocationArn\": \"\"\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=FmrsService.DescribeLocationFsxLustre")
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 \"LocationArn\": \"\"\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 \"LocationArn\": \"\"\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=FmrsService.DescribeLocationFsxLustre";
let payload = json!({"LocationArn": ""});
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=FmrsService.DescribeLocationFsxLustre' \
--header 'content-type: application/json' \
--header 'x-amz-target: ' \
--data '{
"LocationArn": ""
}'
echo '{
"LocationArn": ""
}' | \
http POST '{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeLocationFsxLustre' \
content-type:application/json \
x-amz-target:''
wget --quiet \
--method POST \
--header 'x-amz-target: ' \
--header 'content-type: application/json' \
--body-data '{\n "LocationArn": ""\n}' \
--output-document \
- '{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeLocationFsxLustre'
import Foundation
let headers = [
"x-amz-target": "",
"content-type": "application/json"
]
let parameters = ["LocationArn": ""] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeLocationFsxLustre")! 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
DescribeLocationFsxOntap
{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeLocationFsxOntap
HEADERS
X-Amz-Target
BODY json
{
"LocationArn": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeLocationFsxOntap");
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 \"LocationArn\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeLocationFsxOntap" {:headers {:x-amz-target ""}
:content-type :json
:form-params {:LocationArn ""}})
require "http/client"
url = "{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeLocationFsxOntap"
headers = HTTP::Headers{
"x-amz-target" => ""
"content-type" => "application/json"
}
reqBody = "{\n \"LocationArn\": \"\"\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=FmrsService.DescribeLocationFsxOntap"),
Headers =
{
{ "x-amz-target", "" },
},
Content = new StringContent("{\n \"LocationArn\": \"\"\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=FmrsService.DescribeLocationFsxOntap");
var request = new RestRequest("", Method.Post);
request.AddHeader("x-amz-target", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"LocationArn\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeLocationFsxOntap"
payload := strings.NewReader("{\n \"LocationArn\": \"\"\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: 23
{
"LocationArn": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeLocationFsxOntap")
.setHeader("x-amz-target", "")
.setHeader("content-type", "application/json")
.setBody("{\n \"LocationArn\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeLocationFsxOntap"))
.header("x-amz-target", "")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"LocationArn\": \"\"\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 \"LocationArn\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeLocationFsxOntap")
.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=FmrsService.DescribeLocationFsxOntap")
.header("x-amz-target", "")
.header("content-type", "application/json")
.body("{\n \"LocationArn\": \"\"\n}")
.asString();
const data = JSON.stringify({
LocationArn: ''
});
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=FmrsService.DescribeLocationFsxOntap');
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=FmrsService.DescribeLocationFsxOntap',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {LocationArn: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeLocationFsxOntap';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"LocationArn":""}'
};
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=FmrsService.DescribeLocationFsxOntap',
method: 'POST',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
},
processData: false,
data: '{\n "LocationArn": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"LocationArn\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeLocationFsxOntap")
.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({LocationArn: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeLocationFsxOntap',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: {LocationArn: ''},
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=FmrsService.DescribeLocationFsxOntap');
req.headers({
'x-amz-target': '',
'content-type': 'application/json'
});
req.type('json');
req.send({
LocationArn: ''
});
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=FmrsService.DescribeLocationFsxOntap',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {LocationArn: ''}
};
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=FmrsService.DescribeLocationFsxOntap';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"LocationArn":""}'
};
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 = @{ @"LocationArn": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeLocationFsxOntap"]
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=FmrsService.DescribeLocationFsxOntap" in
let headers = Header.add_list (Header.init ()) [
("x-amz-target", "");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"LocationArn\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeLocationFsxOntap",
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([
'LocationArn' => ''
]),
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=FmrsService.DescribeLocationFsxOntap', [
'body' => '{
"LocationArn": ""
}',
'headers' => [
'content-type' => 'application/json',
'x-amz-target' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeLocationFsxOntap');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'LocationArn' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'LocationArn' => ''
]));
$request->setRequestUrl('{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeLocationFsxOntap');
$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=FmrsService.DescribeLocationFsxOntap' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"LocationArn": ""
}'
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeLocationFsxOntap' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"LocationArn": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"LocationArn\": \"\"\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=FmrsService.DescribeLocationFsxOntap"
payload = { "LocationArn": "" }
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=FmrsService.DescribeLocationFsxOntap"
payload <- "{\n \"LocationArn\": \"\"\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=FmrsService.DescribeLocationFsxOntap")
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 \"LocationArn\": \"\"\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 \"LocationArn\": \"\"\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=FmrsService.DescribeLocationFsxOntap";
let payload = json!({"LocationArn": ""});
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=FmrsService.DescribeLocationFsxOntap' \
--header 'content-type: application/json' \
--header 'x-amz-target: ' \
--data '{
"LocationArn": ""
}'
echo '{
"LocationArn": ""
}' | \
http POST '{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeLocationFsxOntap' \
content-type:application/json \
x-amz-target:''
wget --quiet \
--method POST \
--header 'x-amz-target: ' \
--header 'content-type: application/json' \
--body-data '{\n "LocationArn": ""\n}' \
--output-document \
- '{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeLocationFsxOntap'
import Foundation
let headers = [
"x-amz-target": "",
"content-type": "application/json"
]
let parameters = ["LocationArn": ""] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeLocationFsxOntap")! 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
DescribeLocationFsxOpenZfs
{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeLocationFsxOpenZfs
HEADERS
X-Amz-Target
BODY json
{
"LocationArn": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeLocationFsxOpenZfs");
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 \"LocationArn\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeLocationFsxOpenZfs" {:headers {:x-amz-target ""}
:content-type :json
:form-params {:LocationArn ""}})
require "http/client"
url = "{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeLocationFsxOpenZfs"
headers = HTTP::Headers{
"x-amz-target" => ""
"content-type" => "application/json"
}
reqBody = "{\n \"LocationArn\": \"\"\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=FmrsService.DescribeLocationFsxOpenZfs"),
Headers =
{
{ "x-amz-target", "" },
},
Content = new StringContent("{\n \"LocationArn\": \"\"\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=FmrsService.DescribeLocationFsxOpenZfs");
var request = new RestRequest("", Method.Post);
request.AddHeader("x-amz-target", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"LocationArn\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeLocationFsxOpenZfs"
payload := strings.NewReader("{\n \"LocationArn\": \"\"\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: 23
{
"LocationArn": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeLocationFsxOpenZfs")
.setHeader("x-amz-target", "")
.setHeader("content-type", "application/json")
.setBody("{\n \"LocationArn\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeLocationFsxOpenZfs"))
.header("x-amz-target", "")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"LocationArn\": \"\"\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 \"LocationArn\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeLocationFsxOpenZfs")
.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=FmrsService.DescribeLocationFsxOpenZfs")
.header("x-amz-target", "")
.header("content-type", "application/json")
.body("{\n \"LocationArn\": \"\"\n}")
.asString();
const data = JSON.stringify({
LocationArn: ''
});
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=FmrsService.DescribeLocationFsxOpenZfs');
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=FmrsService.DescribeLocationFsxOpenZfs',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {LocationArn: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeLocationFsxOpenZfs';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"LocationArn":""}'
};
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=FmrsService.DescribeLocationFsxOpenZfs',
method: 'POST',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
},
processData: false,
data: '{\n "LocationArn": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"LocationArn\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeLocationFsxOpenZfs")
.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({LocationArn: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeLocationFsxOpenZfs',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: {LocationArn: ''},
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=FmrsService.DescribeLocationFsxOpenZfs');
req.headers({
'x-amz-target': '',
'content-type': 'application/json'
});
req.type('json');
req.send({
LocationArn: ''
});
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=FmrsService.DescribeLocationFsxOpenZfs',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {LocationArn: ''}
};
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=FmrsService.DescribeLocationFsxOpenZfs';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"LocationArn":""}'
};
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 = @{ @"LocationArn": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeLocationFsxOpenZfs"]
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=FmrsService.DescribeLocationFsxOpenZfs" in
let headers = Header.add_list (Header.init ()) [
("x-amz-target", "");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"LocationArn\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeLocationFsxOpenZfs",
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([
'LocationArn' => ''
]),
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=FmrsService.DescribeLocationFsxOpenZfs', [
'body' => '{
"LocationArn": ""
}',
'headers' => [
'content-type' => 'application/json',
'x-amz-target' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeLocationFsxOpenZfs');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'LocationArn' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'LocationArn' => ''
]));
$request->setRequestUrl('{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeLocationFsxOpenZfs');
$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=FmrsService.DescribeLocationFsxOpenZfs' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"LocationArn": ""
}'
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeLocationFsxOpenZfs' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"LocationArn": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"LocationArn\": \"\"\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=FmrsService.DescribeLocationFsxOpenZfs"
payload = { "LocationArn": "" }
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=FmrsService.DescribeLocationFsxOpenZfs"
payload <- "{\n \"LocationArn\": \"\"\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=FmrsService.DescribeLocationFsxOpenZfs")
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 \"LocationArn\": \"\"\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 \"LocationArn\": \"\"\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=FmrsService.DescribeLocationFsxOpenZfs";
let payload = json!({"LocationArn": ""});
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=FmrsService.DescribeLocationFsxOpenZfs' \
--header 'content-type: application/json' \
--header 'x-amz-target: ' \
--data '{
"LocationArn": ""
}'
echo '{
"LocationArn": ""
}' | \
http POST '{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeLocationFsxOpenZfs' \
content-type:application/json \
x-amz-target:''
wget --quiet \
--method POST \
--header 'x-amz-target: ' \
--header 'content-type: application/json' \
--body-data '{\n "LocationArn": ""\n}' \
--output-document \
- '{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeLocationFsxOpenZfs'
import Foundation
let headers = [
"x-amz-target": "",
"content-type": "application/json"
]
let parameters = ["LocationArn": ""] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeLocationFsxOpenZfs")! 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
DescribeLocationFsxWindows
{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeLocationFsxWindows
HEADERS
X-Amz-Target
BODY json
{
"LocationArn": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeLocationFsxWindows");
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 \"LocationArn\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeLocationFsxWindows" {:headers {:x-amz-target ""}
:content-type :json
:form-params {:LocationArn ""}})
require "http/client"
url = "{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeLocationFsxWindows"
headers = HTTP::Headers{
"x-amz-target" => ""
"content-type" => "application/json"
}
reqBody = "{\n \"LocationArn\": \"\"\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=FmrsService.DescribeLocationFsxWindows"),
Headers =
{
{ "x-amz-target", "" },
},
Content = new StringContent("{\n \"LocationArn\": \"\"\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=FmrsService.DescribeLocationFsxWindows");
var request = new RestRequest("", Method.Post);
request.AddHeader("x-amz-target", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"LocationArn\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeLocationFsxWindows"
payload := strings.NewReader("{\n \"LocationArn\": \"\"\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: 23
{
"LocationArn": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeLocationFsxWindows")
.setHeader("x-amz-target", "")
.setHeader("content-type", "application/json")
.setBody("{\n \"LocationArn\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeLocationFsxWindows"))
.header("x-amz-target", "")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"LocationArn\": \"\"\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 \"LocationArn\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeLocationFsxWindows")
.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=FmrsService.DescribeLocationFsxWindows")
.header("x-amz-target", "")
.header("content-type", "application/json")
.body("{\n \"LocationArn\": \"\"\n}")
.asString();
const data = JSON.stringify({
LocationArn: ''
});
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=FmrsService.DescribeLocationFsxWindows');
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=FmrsService.DescribeLocationFsxWindows',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {LocationArn: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeLocationFsxWindows';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"LocationArn":""}'
};
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=FmrsService.DescribeLocationFsxWindows',
method: 'POST',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
},
processData: false,
data: '{\n "LocationArn": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"LocationArn\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeLocationFsxWindows")
.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({LocationArn: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeLocationFsxWindows',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: {LocationArn: ''},
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=FmrsService.DescribeLocationFsxWindows');
req.headers({
'x-amz-target': '',
'content-type': 'application/json'
});
req.type('json');
req.send({
LocationArn: ''
});
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=FmrsService.DescribeLocationFsxWindows',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {LocationArn: ''}
};
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=FmrsService.DescribeLocationFsxWindows';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"LocationArn":""}'
};
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 = @{ @"LocationArn": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeLocationFsxWindows"]
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=FmrsService.DescribeLocationFsxWindows" in
let headers = Header.add_list (Header.init ()) [
("x-amz-target", "");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"LocationArn\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeLocationFsxWindows",
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([
'LocationArn' => ''
]),
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=FmrsService.DescribeLocationFsxWindows', [
'body' => '{
"LocationArn": ""
}',
'headers' => [
'content-type' => 'application/json',
'x-amz-target' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeLocationFsxWindows');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'LocationArn' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'LocationArn' => ''
]));
$request->setRequestUrl('{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeLocationFsxWindows');
$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=FmrsService.DescribeLocationFsxWindows' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"LocationArn": ""
}'
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeLocationFsxWindows' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"LocationArn": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"LocationArn\": \"\"\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=FmrsService.DescribeLocationFsxWindows"
payload = { "LocationArn": "" }
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=FmrsService.DescribeLocationFsxWindows"
payload <- "{\n \"LocationArn\": \"\"\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=FmrsService.DescribeLocationFsxWindows")
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 \"LocationArn\": \"\"\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 \"LocationArn\": \"\"\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=FmrsService.DescribeLocationFsxWindows";
let payload = json!({"LocationArn": ""});
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=FmrsService.DescribeLocationFsxWindows' \
--header 'content-type: application/json' \
--header 'x-amz-target: ' \
--data '{
"LocationArn": ""
}'
echo '{
"LocationArn": ""
}' | \
http POST '{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeLocationFsxWindows' \
content-type:application/json \
x-amz-target:''
wget --quiet \
--method POST \
--header 'x-amz-target: ' \
--header 'content-type: application/json' \
--body-data '{\n "LocationArn": ""\n}' \
--output-document \
- '{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeLocationFsxWindows'
import Foundation
let headers = [
"x-amz-target": "",
"content-type": "application/json"
]
let parameters = ["LocationArn": ""] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeLocationFsxWindows")! 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
DescribeLocationHdfs
{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeLocationHdfs
HEADERS
X-Amz-Target
BODY json
{
"LocationArn": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeLocationHdfs");
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 \"LocationArn\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeLocationHdfs" {:headers {:x-amz-target ""}
:content-type :json
:form-params {:LocationArn ""}})
require "http/client"
url = "{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeLocationHdfs"
headers = HTTP::Headers{
"x-amz-target" => ""
"content-type" => "application/json"
}
reqBody = "{\n \"LocationArn\": \"\"\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=FmrsService.DescribeLocationHdfs"),
Headers =
{
{ "x-amz-target", "" },
},
Content = new StringContent("{\n \"LocationArn\": \"\"\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=FmrsService.DescribeLocationHdfs");
var request = new RestRequest("", Method.Post);
request.AddHeader("x-amz-target", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"LocationArn\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeLocationHdfs"
payload := strings.NewReader("{\n \"LocationArn\": \"\"\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: 23
{
"LocationArn": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeLocationHdfs")
.setHeader("x-amz-target", "")
.setHeader("content-type", "application/json")
.setBody("{\n \"LocationArn\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeLocationHdfs"))
.header("x-amz-target", "")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"LocationArn\": \"\"\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 \"LocationArn\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeLocationHdfs")
.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=FmrsService.DescribeLocationHdfs")
.header("x-amz-target", "")
.header("content-type", "application/json")
.body("{\n \"LocationArn\": \"\"\n}")
.asString();
const data = JSON.stringify({
LocationArn: ''
});
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=FmrsService.DescribeLocationHdfs');
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=FmrsService.DescribeLocationHdfs',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {LocationArn: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeLocationHdfs';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"LocationArn":""}'
};
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=FmrsService.DescribeLocationHdfs',
method: 'POST',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
},
processData: false,
data: '{\n "LocationArn": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"LocationArn\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeLocationHdfs")
.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({LocationArn: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeLocationHdfs',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: {LocationArn: ''},
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=FmrsService.DescribeLocationHdfs');
req.headers({
'x-amz-target': '',
'content-type': 'application/json'
});
req.type('json');
req.send({
LocationArn: ''
});
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=FmrsService.DescribeLocationHdfs',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {LocationArn: ''}
};
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=FmrsService.DescribeLocationHdfs';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"LocationArn":""}'
};
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 = @{ @"LocationArn": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeLocationHdfs"]
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=FmrsService.DescribeLocationHdfs" in
let headers = Header.add_list (Header.init ()) [
("x-amz-target", "");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"LocationArn\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeLocationHdfs",
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([
'LocationArn' => ''
]),
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=FmrsService.DescribeLocationHdfs', [
'body' => '{
"LocationArn": ""
}',
'headers' => [
'content-type' => 'application/json',
'x-amz-target' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeLocationHdfs');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'LocationArn' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'LocationArn' => ''
]));
$request->setRequestUrl('{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeLocationHdfs');
$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=FmrsService.DescribeLocationHdfs' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"LocationArn": ""
}'
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeLocationHdfs' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"LocationArn": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"LocationArn\": \"\"\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=FmrsService.DescribeLocationHdfs"
payload = { "LocationArn": "" }
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=FmrsService.DescribeLocationHdfs"
payload <- "{\n \"LocationArn\": \"\"\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=FmrsService.DescribeLocationHdfs")
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 \"LocationArn\": \"\"\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 \"LocationArn\": \"\"\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=FmrsService.DescribeLocationHdfs";
let payload = json!({"LocationArn": ""});
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=FmrsService.DescribeLocationHdfs' \
--header 'content-type: application/json' \
--header 'x-amz-target: ' \
--data '{
"LocationArn": ""
}'
echo '{
"LocationArn": ""
}' | \
http POST '{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeLocationHdfs' \
content-type:application/json \
x-amz-target:''
wget --quiet \
--method POST \
--header 'x-amz-target: ' \
--header 'content-type: application/json' \
--body-data '{\n "LocationArn": ""\n}' \
--output-document \
- '{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeLocationHdfs'
import Foundation
let headers = [
"x-amz-target": "",
"content-type": "application/json"
]
let parameters = ["LocationArn": ""] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeLocationHdfs")! 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
DescribeLocationNfs
{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeLocationNfs
HEADERS
X-Amz-Target
BODY json
{
"LocationArn": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeLocationNfs");
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 \"LocationArn\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeLocationNfs" {:headers {:x-amz-target ""}
:content-type :json
:form-params {:LocationArn ""}})
require "http/client"
url = "{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeLocationNfs"
headers = HTTP::Headers{
"x-amz-target" => ""
"content-type" => "application/json"
}
reqBody = "{\n \"LocationArn\": \"\"\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=FmrsService.DescribeLocationNfs"),
Headers =
{
{ "x-amz-target", "" },
},
Content = new StringContent("{\n \"LocationArn\": \"\"\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=FmrsService.DescribeLocationNfs");
var request = new RestRequest("", Method.Post);
request.AddHeader("x-amz-target", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"LocationArn\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeLocationNfs"
payload := strings.NewReader("{\n \"LocationArn\": \"\"\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: 23
{
"LocationArn": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeLocationNfs")
.setHeader("x-amz-target", "")
.setHeader("content-type", "application/json")
.setBody("{\n \"LocationArn\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeLocationNfs"))
.header("x-amz-target", "")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"LocationArn\": \"\"\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 \"LocationArn\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeLocationNfs")
.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=FmrsService.DescribeLocationNfs")
.header("x-amz-target", "")
.header("content-type", "application/json")
.body("{\n \"LocationArn\": \"\"\n}")
.asString();
const data = JSON.stringify({
LocationArn: ''
});
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=FmrsService.DescribeLocationNfs');
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=FmrsService.DescribeLocationNfs',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {LocationArn: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeLocationNfs';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"LocationArn":""}'
};
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=FmrsService.DescribeLocationNfs',
method: 'POST',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
},
processData: false,
data: '{\n "LocationArn": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"LocationArn\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeLocationNfs")
.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({LocationArn: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeLocationNfs',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: {LocationArn: ''},
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=FmrsService.DescribeLocationNfs');
req.headers({
'x-amz-target': '',
'content-type': 'application/json'
});
req.type('json');
req.send({
LocationArn: ''
});
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=FmrsService.DescribeLocationNfs',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {LocationArn: ''}
};
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=FmrsService.DescribeLocationNfs';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"LocationArn":""}'
};
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 = @{ @"LocationArn": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeLocationNfs"]
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=FmrsService.DescribeLocationNfs" in
let headers = Header.add_list (Header.init ()) [
("x-amz-target", "");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"LocationArn\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeLocationNfs",
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([
'LocationArn' => ''
]),
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=FmrsService.DescribeLocationNfs', [
'body' => '{
"LocationArn": ""
}',
'headers' => [
'content-type' => 'application/json',
'x-amz-target' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeLocationNfs');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'LocationArn' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'LocationArn' => ''
]));
$request->setRequestUrl('{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeLocationNfs');
$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=FmrsService.DescribeLocationNfs' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"LocationArn": ""
}'
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeLocationNfs' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"LocationArn": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"LocationArn\": \"\"\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=FmrsService.DescribeLocationNfs"
payload = { "LocationArn": "" }
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=FmrsService.DescribeLocationNfs"
payload <- "{\n \"LocationArn\": \"\"\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=FmrsService.DescribeLocationNfs")
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 \"LocationArn\": \"\"\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 \"LocationArn\": \"\"\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=FmrsService.DescribeLocationNfs";
let payload = json!({"LocationArn": ""});
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=FmrsService.DescribeLocationNfs' \
--header 'content-type: application/json' \
--header 'x-amz-target: ' \
--data '{
"LocationArn": ""
}'
echo '{
"LocationArn": ""
}' | \
http POST '{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeLocationNfs' \
content-type:application/json \
x-amz-target:''
wget --quiet \
--method POST \
--header 'x-amz-target: ' \
--header 'content-type: application/json' \
--body-data '{\n "LocationArn": ""\n}' \
--output-document \
- '{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeLocationNfs'
import Foundation
let headers = [
"x-amz-target": "",
"content-type": "application/json"
]
let parameters = ["LocationArn": ""] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeLocationNfs")! 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
DescribeLocationObjectStorage
{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeLocationObjectStorage
HEADERS
X-Amz-Target
BODY json
{
"LocationArn": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeLocationObjectStorage");
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 \"LocationArn\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeLocationObjectStorage" {:headers {:x-amz-target ""}
:content-type :json
:form-params {:LocationArn ""}})
require "http/client"
url = "{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeLocationObjectStorage"
headers = HTTP::Headers{
"x-amz-target" => ""
"content-type" => "application/json"
}
reqBody = "{\n \"LocationArn\": \"\"\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=FmrsService.DescribeLocationObjectStorage"),
Headers =
{
{ "x-amz-target", "" },
},
Content = new StringContent("{\n \"LocationArn\": \"\"\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=FmrsService.DescribeLocationObjectStorage");
var request = new RestRequest("", Method.Post);
request.AddHeader("x-amz-target", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"LocationArn\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeLocationObjectStorage"
payload := strings.NewReader("{\n \"LocationArn\": \"\"\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: 23
{
"LocationArn": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeLocationObjectStorage")
.setHeader("x-amz-target", "")
.setHeader("content-type", "application/json")
.setBody("{\n \"LocationArn\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeLocationObjectStorage"))
.header("x-amz-target", "")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"LocationArn\": \"\"\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 \"LocationArn\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeLocationObjectStorage")
.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=FmrsService.DescribeLocationObjectStorage")
.header("x-amz-target", "")
.header("content-type", "application/json")
.body("{\n \"LocationArn\": \"\"\n}")
.asString();
const data = JSON.stringify({
LocationArn: ''
});
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=FmrsService.DescribeLocationObjectStorage');
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=FmrsService.DescribeLocationObjectStorage',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {LocationArn: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeLocationObjectStorage';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"LocationArn":""}'
};
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=FmrsService.DescribeLocationObjectStorage',
method: 'POST',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
},
processData: false,
data: '{\n "LocationArn": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"LocationArn\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeLocationObjectStorage")
.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({LocationArn: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeLocationObjectStorage',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: {LocationArn: ''},
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=FmrsService.DescribeLocationObjectStorage');
req.headers({
'x-amz-target': '',
'content-type': 'application/json'
});
req.type('json');
req.send({
LocationArn: ''
});
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=FmrsService.DescribeLocationObjectStorage',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {LocationArn: ''}
};
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=FmrsService.DescribeLocationObjectStorage';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"LocationArn":""}'
};
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 = @{ @"LocationArn": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeLocationObjectStorage"]
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=FmrsService.DescribeLocationObjectStorage" in
let headers = Header.add_list (Header.init ()) [
("x-amz-target", "");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"LocationArn\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeLocationObjectStorage",
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([
'LocationArn' => ''
]),
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=FmrsService.DescribeLocationObjectStorage', [
'body' => '{
"LocationArn": ""
}',
'headers' => [
'content-type' => 'application/json',
'x-amz-target' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeLocationObjectStorage');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'LocationArn' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'LocationArn' => ''
]));
$request->setRequestUrl('{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeLocationObjectStorage');
$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=FmrsService.DescribeLocationObjectStorage' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"LocationArn": ""
}'
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeLocationObjectStorage' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"LocationArn": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"LocationArn\": \"\"\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=FmrsService.DescribeLocationObjectStorage"
payload = { "LocationArn": "" }
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=FmrsService.DescribeLocationObjectStorage"
payload <- "{\n \"LocationArn\": \"\"\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=FmrsService.DescribeLocationObjectStorage")
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 \"LocationArn\": \"\"\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 \"LocationArn\": \"\"\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=FmrsService.DescribeLocationObjectStorage";
let payload = json!({"LocationArn": ""});
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=FmrsService.DescribeLocationObjectStorage' \
--header 'content-type: application/json' \
--header 'x-amz-target: ' \
--data '{
"LocationArn": ""
}'
echo '{
"LocationArn": ""
}' | \
http POST '{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeLocationObjectStorage' \
content-type:application/json \
x-amz-target:''
wget --quiet \
--method POST \
--header 'x-amz-target: ' \
--header 'content-type: application/json' \
--body-data '{\n "LocationArn": ""\n}' \
--output-document \
- '{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeLocationObjectStorage'
import Foundation
let headers = [
"x-amz-target": "",
"content-type": "application/json"
]
let parameters = ["LocationArn": ""] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeLocationObjectStorage")! 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
DescribeLocationS3
{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeLocationS3
HEADERS
X-Amz-Target
BODY json
{
"LocationArn": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeLocationS3");
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 \"LocationArn\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeLocationS3" {:headers {:x-amz-target ""}
:content-type :json
:form-params {:LocationArn ""}})
require "http/client"
url = "{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeLocationS3"
headers = HTTP::Headers{
"x-amz-target" => ""
"content-type" => "application/json"
}
reqBody = "{\n \"LocationArn\": \"\"\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=FmrsService.DescribeLocationS3"),
Headers =
{
{ "x-amz-target", "" },
},
Content = new StringContent("{\n \"LocationArn\": \"\"\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=FmrsService.DescribeLocationS3");
var request = new RestRequest("", Method.Post);
request.AddHeader("x-amz-target", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"LocationArn\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeLocationS3"
payload := strings.NewReader("{\n \"LocationArn\": \"\"\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: 23
{
"LocationArn": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeLocationS3")
.setHeader("x-amz-target", "")
.setHeader("content-type", "application/json")
.setBody("{\n \"LocationArn\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeLocationS3"))
.header("x-amz-target", "")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"LocationArn\": \"\"\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 \"LocationArn\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeLocationS3")
.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=FmrsService.DescribeLocationS3")
.header("x-amz-target", "")
.header("content-type", "application/json")
.body("{\n \"LocationArn\": \"\"\n}")
.asString();
const data = JSON.stringify({
LocationArn: ''
});
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=FmrsService.DescribeLocationS3');
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=FmrsService.DescribeLocationS3',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {LocationArn: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeLocationS3';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"LocationArn":""}'
};
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=FmrsService.DescribeLocationS3',
method: 'POST',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
},
processData: false,
data: '{\n "LocationArn": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"LocationArn\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeLocationS3")
.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({LocationArn: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeLocationS3',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: {LocationArn: ''},
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=FmrsService.DescribeLocationS3');
req.headers({
'x-amz-target': '',
'content-type': 'application/json'
});
req.type('json');
req.send({
LocationArn: ''
});
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=FmrsService.DescribeLocationS3',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {LocationArn: ''}
};
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=FmrsService.DescribeLocationS3';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"LocationArn":""}'
};
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 = @{ @"LocationArn": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeLocationS3"]
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=FmrsService.DescribeLocationS3" in
let headers = Header.add_list (Header.init ()) [
("x-amz-target", "");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"LocationArn\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeLocationS3",
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([
'LocationArn' => ''
]),
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=FmrsService.DescribeLocationS3', [
'body' => '{
"LocationArn": ""
}',
'headers' => [
'content-type' => 'application/json',
'x-amz-target' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeLocationS3');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'LocationArn' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'LocationArn' => ''
]));
$request->setRequestUrl('{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeLocationS3');
$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=FmrsService.DescribeLocationS3' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"LocationArn": ""
}'
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeLocationS3' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"LocationArn": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"LocationArn\": \"\"\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=FmrsService.DescribeLocationS3"
payload = { "LocationArn": "" }
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=FmrsService.DescribeLocationS3"
payload <- "{\n \"LocationArn\": \"\"\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=FmrsService.DescribeLocationS3")
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 \"LocationArn\": \"\"\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 \"LocationArn\": \"\"\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=FmrsService.DescribeLocationS3";
let payload = json!({"LocationArn": ""});
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=FmrsService.DescribeLocationS3' \
--header 'content-type: application/json' \
--header 'x-amz-target: ' \
--data '{
"LocationArn": ""
}'
echo '{
"LocationArn": ""
}' | \
http POST '{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeLocationS3' \
content-type:application/json \
x-amz-target:''
wget --quiet \
--method POST \
--header 'x-amz-target: ' \
--header 'content-type: application/json' \
--body-data '{\n "LocationArn": ""\n}' \
--output-document \
- '{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeLocationS3'
import Foundation
let headers = [
"x-amz-target": "",
"content-type": "application/json"
]
let parameters = ["LocationArn": ""] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeLocationS3")! 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
DescribeLocationSmb
{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeLocationSmb
HEADERS
X-Amz-Target
BODY json
{
"LocationArn": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeLocationSmb");
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 \"LocationArn\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeLocationSmb" {:headers {:x-amz-target ""}
:content-type :json
:form-params {:LocationArn ""}})
require "http/client"
url = "{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeLocationSmb"
headers = HTTP::Headers{
"x-amz-target" => ""
"content-type" => "application/json"
}
reqBody = "{\n \"LocationArn\": \"\"\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=FmrsService.DescribeLocationSmb"),
Headers =
{
{ "x-amz-target", "" },
},
Content = new StringContent("{\n \"LocationArn\": \"\"\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=FmrsService.DescribeLocationSmb");
var request = new RestRequest("", Method.Post);
request.AddHeader("x-amz-target", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"LocationArn\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeLocationSmb"
payload := strings.NewReader("{\n \"LocationArn\": \"\"\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: 23
{
"LocationArn": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeLocationSmb")
.setHeader("x-amz-target", "")
.setHeader("content-type", "application/json")
.setBody("{\n \"LocationArn\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeLocationSmb"))
.header("x-amz-target", "")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"LocationArn\": \"\"\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 \"LocationArn\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeLocationSmb")
.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=FmrsService.DescribeLocationSmb")
.header("x-amz-target", "")
.header("content-type", "application/json")
.body("{\n \"LocationArn\": \"\"\n}")
.asString();
const data = JSON.stringify({
LocationArn: ''
});
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=FmrsService.DescribeLocationSmb');
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=FmrsService.DescribeLocationSmb',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {LocationArn: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeLocationSmb';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"LocationArn":""}'
};
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=FmrsService.DescribeLocationSmb',
method: 'POST',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
},
processData: false,
data: '{\n "LocationArn": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"LocationArn\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeLocationSmb")
.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({LocationArn: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeLocationSmb',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: {LocationArn: ''},
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=FmrsService.DescribeLocationSmb');
req.headers({
'x-amz-target': '',
'content-type': 'application/json'
});
req.type('json');
req.send({
LocationArn: ''
});
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=FmrsService.DescribeLocationSmb',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {LocationArn: ''}
};
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=FmrsService.DescribeLocationSmb';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"LocationArn":""}'
};
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 = @{ @"LocationArn": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeLocationSmb"]
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=FmrsService.DescribeLocationSmb" in
let headers = Header.add_list (Header.init ()) [
("x-amz-target", "");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"LocationArn\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeLocationSmb",
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([
'LocationArn' => ''
]),
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=FmrsService.DescribeLocationSmb', [
'body' => '{
"LocationArn": ""
}',
'headers' => [
'content-type' => 'application/json',
'x-amz-target' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeLocationSmb');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'LocationArn' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'LocationArn' => ''
]));
$request->setRequestUrl('{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeLocationSmb');
$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=FmrsService.DescribeLocationSmb' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"LocationArn": ""
}'
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeLocationSmb' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"LocationArn": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"LocationArn\": \"\"\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=FmrsService.DescribeLocationSmb"
payload = { "LocationArn": "" }
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=FmrsService.DescribeLocationSmb"
payload <- "{\n \"LocationArn\": \"\"\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=FmrsService.DescribeLocationSmb")
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 \"LocationArn\": \"\"\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 \"LocationArn\": \"\"\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=FmrsService.DescribeLocationSmb";
let payload = json!({"LocationArn": ""});
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=FmrsService.DescribeLocationSmb' \
--header 'content-type: application/json' \
--header 'x-amz-target: ' \
--data '{
"LocationArn": ""
}'
echo '{
"LocationArn": ""
}' | \
http POST '{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeLocationSmb' \
content-type:application/json \
x-amz-target:''
wget --quiet \
--method POST \
--header 'x-amz-target: ' \
--header 'content-type: application/json' \
--body-data '{\n "LocationArn": ""\n}' \
--output-document \
- '{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeLocationSmb'
import Foundation
let headers = [
"x-amz-target": "",
"content-type": "application/json"
]
let parameters = ["LocationArn": ""] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeLocationSmb")! 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
DescribeTask
{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeTask
HEADERS
X-Amz-Target
BODY json
{
"TaskArn": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeTask");
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 \"TaskArn\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeTask" {:headers {:x-amz-target ""}
:content-type :json
:form-params {:TaskArn ""}})
require "http/client"
url = "{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeTask"
headers = HTTP::Headers{
"x-amz-target" => ""
"content-type" => "application/json"
}
reqBody = "{\n \"TaskArn\": \"\"\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=FmrsService.DescribeTask"),
Headers =
{
{ "x-amz-target", "" },
},
Content = new StringContent("{\n \"TaskArn\": \"\"\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=FmrsService.DescribeTask");
var request = new RestRequest("", Method.Post);
request.AddHeader("x-amz-target", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"TaskArn\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeTask"
payload := strings.NewReader("{\n \"TaskArn\": \"\"\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: 19
{
"TaskArn": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeTask")
.setHeader("x-amz-target", "")
.setHeader("content-type", "application/json")
.setBody("{\n \"TaskArn\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeTask"))
.header("x-amz-target", "")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"TaskArn\": \"\"\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 \"TaskArn\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeTask")
.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=FmrsService.DescribeTask")
.header("x-amz-target", "")
.header("content-type", "application/json")
.body("{\n \"TaskArn\": \"\"\n}")
.asString();
const data = JSON.stringify({
TaskArn: ''
});
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=FmrsService.DescribeTask');
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=FmrsService.DescribeTask',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {TaskArn: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeTask';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"TaskArn":""}'
};
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=FmrsService.DescribeTask',
method: 'POST',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
},
processData: false,
data: '{\n "TaskArn": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"TaskArn\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeTask")
.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({TaskArn: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeTask',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: {TaskArn: ''},
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=FmrsService.DescribeTask');
req.headers({
'x-amz-target': '',
'content-type': 'application/json'
});
req.type('json');
req.send({
TaskArn: ''
});
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=FmrsService.DescribeTask',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {TaskArn: ''}
};
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=FmrsService.DescribeTask';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"TaskArn":""}'
};
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 = @{ @"TaskArn": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeTask"]
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=FmrsService.DescribeTask" in
let headers = Header.add_list (Header.init ()) [
("x-amz-target", "");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"TaskArn\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeTask",
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([
'TaskArn' => ''
]),
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=FmrsService.DescribeTask', [
'body' => '{
"TaskArn": ""
}',
'headers' => [
'content-type' => 'application/json',
'x-amz-target' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeTask');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'TaskArn' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'TaskArn' => ''
]));
$request->setRequestUrl('{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeTask');
$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=FmrsService.DescribeTask' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"TaskArn": ""
}'
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeTask' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"TaskArn": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"TaskArn\": \"\"\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=FmrsService.DescribeTask"
payload = { "TaskArn": "" }
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=FmrsService.DescribeTask"
payload <- "{\n \"TaskArn\": \"\"\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=FmrsService.DescribeTask")
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 \"TaskArn\": \"\"\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 \"TaskArn\": \"\"\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=FmrsService.DescribeTask";
let payload = json!({"TaskArn": ""});
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=FmrsService.DescribeTask' \
--header 'content-type: application/json' \
--header 'x-amz-target: ' \
--data '{
"TaskArn": ""
}'
echo '{
"TaskArn": ""
}' | \
http POST '{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeTask' \
content-type:application/json \
x-amz-target:''
wget --quiet \
--method POST \
--header 'x-amz-target: ' \
--header 'content-type: application/json' \
--body-data '{\n "TaskArn": ""\n}' \
--output-document \
- '{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeTask'
import Foundation
let headers = [
"x-amz-target": "",
"content-type": "application/json"
]
let parameters = ["TaskArn": ""] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeTask")! 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
DescribeTaskExecution
{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeTaskExecution
HEADERS
X-Amz-Target
BODY json
{
"TaskExecutionArn": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeTaskExecution");
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 \"TaskExecutionArn\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeTaskExecution" {:headers {:x-amz-target ""}
:content-type :json
:form-params {:TaskExecutionArn ""}})
require "http/client"
url = "{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeTaskExecution"
headers = HTTP::Headers{
"x-amz-target" => ""
"content-type" => "application/json"
}
reqBody = "{\n \"TaskExecutionArn\": \"\"\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=FmrsService.DescribeTaskExecution"),
Headers =
{
{ "x-amz-target", "" },
},
Content = new StringContent("{\n \"TaskExecutionArn\": \"\"\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=FmrsService.DescribeTaskExecution");
var request = new RestRequest("", Method.Post);
request.AddHeader("x-amz-target", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"TaskExecutionArn\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeTaskExecution"
payload := strings.NewReader("{\n \"TaskExecutionArn\": \"\"\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
{
"TaskExecutionArn": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeTaskExecution")
.setHeader("x-amz-target", "")
.setHeader("content-type", "application/json")
.setBody("{\n \"TaskExecutionArn\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeTaskExecution"))
.header("x-amz-target", "")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"TaskExecutionArn\": \"\"\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 \"TaskExecutionArn\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeTaskExecution")
.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=FmrsService.DescribeTaskExecution")
.header("x-amz-target", "")
.header("content-type", "application/json")
.body("{\n \"TaskExecutionArn\": \"\"\n}")
.asString();
const data = JSON.stringify({
TaskExecutionArn: ''
});
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=FmrsService.DescribeTaskExecution');
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=FmrsService.DescribeTaskExecution',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {TaskExecutionArn: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeTaskExecution';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"TaskExecutionArn":""}'
};
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=FmrsService.DescribeTaskExecution',
method: 'POST',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
},
processData: false,
data: '{\n "TaskExecutionArn": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"TaskExecutionArn\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeTaskExecution")
.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({TaskExecutionArn: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeTaskExecution',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: {TaskExecutionArn: ''},
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=FmrsService.DescribeTaskExecution');
req.headers({
'x-amz-target': '',
'content-type': 'application/json'
});
req.type('json');
req.send({
TaskExecutionArn: ''
});
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=FmrsService.DescribeTaskExecution',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {TaskExecutionArn: ''}
};
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=FmrsService.DescribeTaskExecution';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"TaskExecutionArn":""}'
};
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 = @{ @"TaskExecutionArn": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeTaskExecution"]
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=FmrsService.DescribeTaskExecution" in
let headers = Header.add_list (Header.init ()) [
("x-amz-target", "");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"TaskExecutionArn\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeTaskExecution",
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([
'TaskExecutionArn' => ''
]),
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=FmrsService.DescribeTaskExecution', [
'body' => '{
"TaskExecutionArn": ""
}',
'headers' => [
'content-type' => 'application/json',
'x-amz-target' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeTaskExecution');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'TaskExecutionArn' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'TaskExecutionArn' => ''
]));
$request->setRequestUrl('{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeTaskExecution');
$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=FmrsService.DescribeTaskExecution' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"TaskExecutionArn": ""
}'
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeTaskExecution' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"TaskExecutionArn": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"TaskExecutionArn\": \"\"\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=FmrsService.DescribeTaskExecution"
payload = { "TaskExecutionArn": "" }
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=FmrsService.DescribeTaskExecution"
payload <- "{\n \"TaskExecutionArn\": \"\"\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=FmrsService.DescribeTaskExecution")
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 \"TaskExecutionArn\": \"\"\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 \"TaskExecutionArn\": \"\"\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=FmrsService.DescribeTaskExecution";
let payload = json!({"TaskExecutionArn": ""});
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=FmrsService.DescribeTaskExecution' \
--header 'content-type: application/json' \
--header 'x-amz-target: ' \
--data '{
"TaskExecutionArn": ""
}'
echo '{
"TaskExecutionArn": ""
}' | \
http POST '{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeTaskExecution' \
content-type:application/json \
x-amz-target:''
wget --quiet \
--method POST \
--header 'x-amz-target: ' \
--header 'content-type: application/json' \
--body-data '{\n "TaskExecutionArn": ""\n}' \
--output-document \
- '{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeTaskExecution'
import Foundation
let headers = [
"x-amz-target": "",
"content-type": "application/json"
]
let parameters = ["TaskExecutionArn": ""] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/#X-Amz-Target=FmrsService.DescribeTaskExecution")! 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
ListAgents
{{baseUrl}}/#X-Amz-Target=FmrsService.ListAgents
HEADERS
X-Amz-Target
BODY json
{
"MaxResults": "",
"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=FmrsService.ListAgents");
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 \"MaxResults\": \"\",\n \"NextToken\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/#X-Amz-Target=FmrsService.ListAgents" {:headers {:x-amz-target ""}
:content-type :json
:form-params {:MaxResults ""
:NextToken ""}})
require "http/client"
url = "{{baseUrl}}/#X-Amz-Target=FmrsService.ListAgents"
headers = HTTP::Headers{
"x-amz-target" => ""
"content-type" => "application/json"
}
reqBody = "{\n \"MaxResults\": \"\",\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=FmrsService.ListAgents"),
Headers =
{
{ "x-amz-target", "" },
},
Content = new StringContent("{\n \"MaxResults\": \"\",\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=FmrsService.ListAgents");
var request = new RestRequest("", Method.Post);
request.AddHeader("x-amz-target", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"MaxResults\": \"\",\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=FmrsService.ListAgents"
payload := strings.NewReader("{\n \"MaxResults\": \"\",\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: 41
{
"MaxResults": "",
"NextToken": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/#X-Amz-Target=FmrsService.ListAgents")
.setHeader("x-amz-target", "")
.setHeader("content-type", "application/json")
.setBody("{\n \"MaxResults\": \"\",\n \"NextToken\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/#X-Amz-Target=FmrsService.ListAgents"))
.header("x-amz-target", "")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"MaxResults\": \"\",\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 \"MaxResults\": \"\",\n \"NextToken\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=FmrsService.ListAgents")
.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=FmrsService.ListAgents")
.header("x-amz-target", "")
.header("content-type", "application/json")
.body("{\n \"MaxResults\": \"\",\n \"NextToken\": \"\"\n}")
.asString();
const data = JSON.stringify({
MaxResults: '',
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=FmrsService.ListAgents');
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=FmrsService.ListAgents',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {MaxResults: '', NextToken: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/#X-Amz-Target=FmrsService.ListAgents';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"MaxResults":"","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=FmrsService.ListAgents',
method: 'POST',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
},
processData: false,
data: '{\n "MaxResults": "",\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 \"MaxResults\": \"\",\n \"NextToken\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=FmrsService.ListAgents")
.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({MaxResults: '', NextToken: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=FmrsService.ListAgents',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: {MaxResults: '', 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=FmrsService.ListAgents');
req.headers({
'x-amz-target': '',
'content-type': 'application/json'
});
req.type('json');
req.send({
MaxResults: '',
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=FmrsService.ListAgents',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {MaxResults: '', 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=FmrsService.ListAgents';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"MaxResults":"","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 = @{ @"MaxResults": @"",
@"NextToken": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/#X-Amz-Target=FmrsService.ListAgents"]
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=FmrsService.ListAgents" in
let headers = Header.add_list (Header.init ()) [
("x-amz-target", "");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"MaxResults\": \"\",\n \"NextToken\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/#X-Amz-Target=FmrsService.ListAgents",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'MaxResults' => '',
'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=FmrsService.ListAgents', [
'body' => '{
"MaxResults": "",
"NextToken": ""
}',
'headers' => [
'content-type' => 'application/json',
'x-amz-target' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/#X-Amz-Target=FmrsService.ListAgents');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'MaxResults' => '',
'NextToken' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'MaxResults' => '',
'NextToken' => ''
]));
$request->setRequestUrl('{{baseUrl}}/#X-Amz-Target=FmrsService.ListAgents');
$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=FmrsService.ListAgents' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"MaxResults": "",
"NextToken": ""
}'
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/#X-Amz-Target=FmrsService.ListAgents' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"MaxResults": "",
"NextToken": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"MaxResults\": \"\",\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=FmrsService.ListAgents"
payload = {
"MaxResults": "",
"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=FmrsService.ListAgents"
payload <- "{\n \"MaxResults\": \"\",\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=FmrsService.ListAgents")
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 \"MaxResults\": \"\",\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 \"MaxResults\": \"\",\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=FmrsService.ListAgents";
let payload = json!({
"MaxResults": "",
"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=FmrsService.ListAgents' \
--header 'content-type: application/json' \
--header 'x-amz-target: ' \
--data '{
"MaxResults": "",
"NextToken": ""
}'
echo '{
"MaxResults": "",
"NextToken": ""
}' | \
http POST '{{baseUrl}}/#X-Amz-Target=FmrsService.ListAgents' \
content-type:application/json \
x-amz-target:''
wget --quiet \
--method POST \
--header 'x-amz-target: ' \
--header 'content-type: application/json' \
--body-data '{\n "MaxResults": "",\n "NextToken": ""\n}' \
--output-document \
- '{{baseUrl}}/#X-Amz-Target=FmrsService.ListAgents'
import Foundation
let headers = [
"x-amz-target": "",
"content-type": "application/json"
]
let parameters = [
"MaxResults": "",
"NextToken": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/#X-Amz-Target=FmrsService.ListAgents")! 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
ListLocations
{{baseUrl}}/#X-Amz-Target=FmrsService.ListLocations
HEADERS
X-Amz-Target
BODY json
{
"MaxResults": "",
"NextToken": "",
"Filters": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/#X-Amz-Target=FmrsService.ListLocations");
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 \"MaxResults\": \"\",\n \"NextToken\": \"\",\n \"Filters\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/#X-Amz-Target=FmrsService.ListLocations" {:headers {:x-amz-target ""}
:content-type :json
:form-params {:MaxResults ""
:NextToken ""
:Filters ""}})
require "http/client"
url = "{{baseUrl}}/#X-Amz-Target=FmrsService.ListLocations"
headers = HTTP::Headers{
"x-amz-target" => ""
"content-type" => "application/json"
}
reqBody = "{\n \"MaxResults\": \"\",\n \"NextToken\": \"\",\n \"Filters\": \"\"\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=FmrsService.ListLocations"),
Headers =
{
{ "x-amz-target", "" },
},
Content = new StringContent("{\n \"MaxResults\": \"\",\n \"NextToken\": \"\",\n \"Filters\": \"\"\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=FmrsService.ListLocations");
var request = new RestRequest("", Method.Post);
request.AddHeader("x-amz-target", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"MaxResults\": \"\",\n \"NextToken\": \"\",\n \"Filters\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/#X-Amz-Target=FmrsService.ListLocations"
payload := strings.NewReader("{\n \"MaxResults\": \"\",\n \"NextToken\": \"\",\n \"Filters\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-amz-target", "")
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/ HTTP/1.1
X-Amz-Target:
Content-Type: application/json
Host: example.com
Content-Length: 58
{
"MaxResults": "",
"NextToken": "",
"Filters": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/#X-Amz-Target=FmrsService.ListLocations")
.setHeader("x-amz-target", "")
.setHeader("content-type", "application/json")
.setBody("{\n \"MaxResults\": \"\",\n \"NextToken\": \"\",\n \"Filters\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/#X-Amz-Target=FmrsService.ListLocations"))
.header("x-amz-target", "")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"MaxResults\": \"\",\n \"NextToken\": \"\",\n \"Filters\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"MaxResults\": \"\",\n \"NextToken\": \"\",\n \"Filters\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=FmrsService.ListLocations")
.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=FmrsService.ListLocations")
.header("x-amz-target", "")
.header("content-type", "application/json")
.body("{\n \"MaxResults\": \"\",\n \"NextToken\": \"\",\n \"Filters\": \"\"\n}")
.asString();
const data = JSON.stringify({
MaxResults: '',
NextToken: '',
Filters: ''
});
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=FmrsService.ListLocations');
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=FmrsService.ListLocations',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {MaxResults: '', NextToken: '', Filters: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/#X-Amz-Target=FmrsService.ListLocations';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"MaxResults":"","NextToken":"","Filters":""}'
};
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=FmrsService.ListLocations',
method: 'POST',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
},
processData: false,
data: '{\n "MaxResults": "",\n "NextToken": "",\n "Filters": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"MaxResults\": \"\",\n \"NextToken\": \"\",\n \"Filters\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=FmrsService.ListLocations")
.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({MaxResults: '', NextToken: '', Filters: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=FmrsService.ListLocations',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: {MaxResults: '', NextToken: '', Filters: ''},
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=FmrsService.ListLocations');
req.headers({
'x-amz-target': '',
'content-type': 'application/json'
});
req.type('json');
req.send({
MaxResults: '',
NextToken: '',
Filters: ''
});
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=FmrsService.ListLocations',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {MaxResults: '', NextToken: '', Filters: ''}
};
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=FmrsService.ListLocations';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"MaxResults":"","NextToken":"","Filters":""}'
};
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 = @{ @"MaxResults": @"",
@"NextToken": @"",
@"Filters": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/#X-Amz-Target=FmrsService.ListLocations"]
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=FmrsService.ListLocations" in
let headers = Header.add_list (Header.init ()) [
("x-amz-target", "");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"MaxResults\": \"\",\n \"NextToken\": \"\",\n \"Filters\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/#X-Amz-Target=FmrsService.ListLocations",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'MaxResults' => '',
'NextToken' => '',
'Filters' => ''
]),
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=FmrsService.ListLocations', [
'body' => '{
"MaxResults": "",
"NextToken": "",
"Filters": ""
}',
'headers' => [
'content-type' => 'application/json',
'x-amz-target' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/#X-Amz-Target=FmrsService.ListLocations');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'MaxResults' => '',
'NextToken' => '',
'Filters' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'MaxResults' => '',
'NextToken' => '',
'Filters' => ''
]));
$request->setRequestUrl('{{baseUrl}}/#X-Amz-Target=FmrsService.ListLocations');
$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=FmrsService.ListLocations' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"MaxResults": "",
"NextToken": "",
"Filters": ""
}'
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/#X-Amz-Target=FmrsService.ListLocations' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"MaxResults": "",
"NextToken": "",
"Filters": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"MaxResults\": \"\",\n \"NextToken\": \"\",\n \"Filters\": \"\"\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=FmrsService.ListLocations"
payload = {
"MaxResults": "",
"NextToken": "",
"Filters": ""
}
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=FmrsService.ListLocations"
payload <- "{\n \"MaxResults\": \"\",\n \"NextToken\": \"\",\n \"Filters\": \"\"\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=FmrsService.ListLocations")
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 \"MaxResults\": \"\",\n \"NextToken\": \"\",\n \"Filters\": \"\"\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 \"MaxResults\": \"\",\n \"NextToken\": \"\",\n \"Filters\": \"\"\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=FmrsService.ListLocations";
let payload = json!({
"MaxResults": "",
"NextToken": "",
"Filters": ""
});
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=FmrsService.ListLocations' \
--header 'content-type: application/json' \
--header 'x-amz-target: ' \
--data '{
"MaxResults": "",
"NextToken": "",
"Filters": ""
}'
echo '{
"MaxResults": "",
"NextToken": "",
"Filters": ""
}' | \
http POST '{{baseUrl}}/#X-Amz-Target=FmrsService.ListLocations' \
content-type:application/json \
x-amz-target:''
wget --quiet \
--method POST \
--header 'x-amz-target: ' \
--header 'content-type: application/json' \
--body-data '{\n "MaxResults": "",\n "NextToken": "",\n "Filters": ""\n}' \
--output-document \
- '{{baseUrl}}/#X-Amz-Target=FmrsService.ListLocations'
import Foundation
let headers = [
"x-amz-target": "",
"content-type": "application/json"
]
let parameters = [
"MaxResults": "",
"NextToken": "",
"Filters": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/#X-Amz-Target=FmrsService.ListLocations")! 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=FmrsService.ListTagsForResource
HEADERS
X-Amz-Target
BODY json
{
"ResourceArn": "",
"MaxResults": "",
"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=FmrsService.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 \"MaxResults\": \"\",\n \"NextToken\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/#X-Amz-Target=FmrsService.ListTagsForResource" {:headers {:x-amz-target ""}
:content-type :json
:form-params {:ResourceArn ""
:MaxResults ""
:NextToken ""}})
require "http/client"
url = "{{baseUrl}}/#X-Amz-Target=FmrsService.ListTagsForResource"
headers = HTTP::Headers{
"x-amz-target" => ""
"content-type" => "application/json"
}
reqBody = "{\n \"ResourceArn\": \"\",\n \"MaxResults\": \"\",\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=FmrsService.ListTagsForResource"),
Headers =
{
{ "x-amz-target", "" },
},
Content = new StringContent("{\n \"ResourceArn\": \"\",\n \"MaxResults\": \"\",\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=FmrsService.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 \"MaxResults\": \"\",\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=FmrsService.ListTagsForResource"
payload := strings.NewReader("{\n \"ResourceArn\": \"\",\n \"MaxResults\": \"\",\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: 62
{
"ResourceArn": "",
"MaxResults": "",
"NextToken": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/#X-Amz-Target=FmrsService.ListTagsForResource")
.setHeader("x-amz-target", "")
.setHeader("content-type", "application/json")
.setBody("{\n \"ResourceArn\": \"\",\n \"MaxResults\": \"\",\n \"NextToken\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/#X-Amz-Target=FmrsService.ListTagsForResource"))
.header("x-amz-target", "")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"ResourceArn\": \"\",\n \"MaxResults\": \"\",\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 \"MaxResults\": \"\",\n \"NextToken\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=FmrsService.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=FmrsService.ListTagsForResource")
.header("x-amz-target", "")
.header("content-type", "application/json")
.body("{\n \"ResourceArn\": \"\",\n \"MaxResults\": \"\",\n \"NextToken\": \"\"\n}")
.asString();
const data = JSON.stringify({
ResourceArn: '',
MaxResults: '',
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=FmrsService.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=FmrsService.ListTagsForResource',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {ResourceArn: '', MaxResults: '', NextToken: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/#X-Amz-Target=FmrsService.ListTagsForResource';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"ResourceArn":"","MaxResults":"","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=FmrsService.ListTagsForResource',
method: 'POST',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
},
processData: false,
data: '{\n "ResourceArn": "",\n "MaxResults": "",\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 \"MaxResults\": \"\",\n \"NextToken\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=FmrsService.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: '', MaxResults: '', NextToken: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=FmrsService.ListTagsForResource',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: {ResourceArn: '', MaxResults: '', 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=FmrsService.ListTagsForResource');
req.headers({
'x-amz-target': '',
'content-type': 'application/json'
});
req.type('json');
req.send({
ResourceArn: '',
MaxResults: '',
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=FmrsService.ListTagsForResource',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {ResourceArn: '', MaxResults: '', 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=FmrsService.ListTagsForResource';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"ResourceArn":"","MaxResults":"","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": @"",
@"MaxResults": @"",
@"NextToken": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/#X-Amz-Target=FmrsService.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=FmrsService.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 \"MaxResults\": \"\",\n \"NextToken\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/#X-Amz-Target=FmrsService.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' => '',
'MaxResults' => '',
'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=FmrsService.ListTagsForResource', [
'body' => '{
"ResourceArn": "",
"MaxResults": "",
"NextToken": ""
}',
'headers' => [
'content-type' => 'application/json',
'x-amz-target' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/#X-Amz-Target=FmrsService.ListTagsForResource');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'ResourceArn' => '',
'MaxResults' => '',
'NextToken' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'ResourceArn' => '',
'MaxResults' => '',
'NextToken' => ''
]));
$request->setRequestUrl('{{baseUrl}}/#X-Amz-Target=FmrsService.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=FmrsService.ListTagsForResource' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"ResourceArn": "",
"MaxResults": "",
"NextToken": ""
}'
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/#X-Amz-Target=FmrsService.ListTagsForResource' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"ResourceArn": "",
"MaxResults": "",
"NextToken": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"ResourceArn\": \"\",\n \"MaxResults\": \"\",\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=FmrsService.ListTagsForResource"
payload = {
"ResourceArn": "",
"MaxResults": "",
"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=FmrsService.ListTagsForResource"
payload <- "{\n \"ResourceArn\": \"\",\n \"MaxResults\": \"\",\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=FmrsService.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 \"MaxResults\": \"\",\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 \"MaxResults\": \"\",\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=FmrsService.ListTagsForResource";
let payload = json!({
"ResourceArn": "",
"MaxResults": "",
"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=FmrsService.ListTagsForResource' \
--header 'content-type: application/json' \
--header 'x-amz-target: ' \
--data '{
"ResourceArn": "",
"MaxResults": "",
"NextToken": ""
}'
echo '{
"ResourceArn": "",
"MaxResults": "",
"NextToken": ""
}' | \
http POST '{{baseUrl}}/#X-Amz-Target=FmrsService.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 "MaxResults": "",\n "NextToken": ""\n}' \
--output-document \
- '{{baseUrl}}/#X-Amz-Target=FmrsService.ListTagsForResource'
import Foundation
let headers = [
"x-amz-target": "",
"content-type": "application/json"
]
let parameters = [
"ResourceArn": "",
"MaxResults": "",
"NextToken": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/#X-Amz-Target=FmrsService.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
ListTaskExecutions
{{baseUrl}}/#X-Amz-Target=FmrsService.ListTaskExecutions
HEADERS
X-Amz-Target
BODY json
{
"TaskArn": "",
"MaxResults": "",
"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=FmrsService.ListTaskExecutions");
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 \"TaskArn\": \"\",\n \"MaxResults\": \"\",\n \"NextToken\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/#X-Amz-Target=FmrsService.ListTaskExecutions" {:headers {:x-amz-target ""}
:content-type :json
:form-params {:TaskArn ""
:MaxResults ""
:NextToken ""}})
require "http/client"
url = "{{baseUrl}}/#X-Amz-Target=FmrsService.ListTaskExecutions"
headers = HTTP::Headers{
"x-amz-target" => ""
"content-type" => "application/json"
}
reqBody = "{\n \"TaskArn\": \"\",\n \"MaxResults\": \"\",\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=FmrsService.ListTaskExecutions"),
Headers =
{
{ "x-amz-target", "" },
},
Content = new StringContent("{\n \"TaskArn\": \"\",\n \"MaxResults\": \"\",\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=FmrsService.ListTaskExecutions");
var request = new RestRequest("", Method.Post);
request.AddHeader("x-amz-target", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"TaskArn\": \"\",\n \"MaxResults\": \"\",\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=FmrsService.ListTaskExecutions"
payload := strings.NewReader("{\n \"TaskArn\": \"\",\n \"MaxResults\": \"\",\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: 58
{
"TaskArn": "",
"MaxResults": "",
"NextToken": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/#X-Amz-Target=FmrsService.ListTaskExecutions")
.setHeader("x-amz-target", "")
.setHeader("content-type", "application/json")
.setBody("{\n \"TaskArn\": \"\",\n \"MaxResults\": \"\",\n \"NextToken\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/#X-Amz-Target=FmrsService.ListTaskExecutions"))
.header("x-amz-target", "")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"TaskArn\": \"\",\n \"MaxResults\": \"\",\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 \"TaskArn\": \"\",\n \"MaxResults\": \"\",\n \"NextToken\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=FmrsService.ListTaskExecutions")
.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=FmrsService.ListTaskExecutions")
.header("x-amz-target", "")
.header("content-type", "application/json")
.body("{\n \"TaskArn\": \"\",\n \"MaxResults\": \"\",\n \"NextToken\": \"\"\n}")
.asString();
const data = JSON.stringify({
TaskArn: '',
MaxResults: '',
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=FmrsService.ListTaskExecutions');
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=FmrsService.ListTaskExecutions',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {TaskArn: '', MaxResults: '', NextToken: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/#X-Amz-Target=FmrsService.ListTaskExecutions';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"TaskArn":"","MaxResults":"","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=FmrsService.ListTaskExecutions',
method: 'POST',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
},
processData: false,
data: '{\n "TaskArn": "",\n "MaxResults": "",\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 \"TaskArn\": \"\",\n \"MaxResults\": \"\",\n \"NextToken\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=FmrsService.ListTaskExecutions")
.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({TaskArn: '', MaxResults: '', NextToken: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=FmrsService.ListTaskExecutions',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: {TaskArn: '', MaxResults: '', 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=FmrsService.ListTaskExecutions');
req.headers({
'x-amz-target': '',
'content-type': 'application/json'
});
req.type('json');
req.send({
TaskArn: '',
MaxResults: '',
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=FmrsService.ListTaskExecutions',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {TaskArn: '', MaxResults: '', 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=FmrsService.ListTaskExecutions';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"TaskArn":"","MaxResults":"","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 = @{ @"TaskArn": @"",
@"MaxResults": @"",
@"NextToken": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/#X-Amz-Target=FmrsService.ListTaskExecutions"]
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=FmrsService.ListTaskExecutions" in
let headers = Header.add_list (Header.init ()) [
("x-amz-target", "");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"TaskArn\": \"\",\n \"MaxResults\": \"\",\n \"NextToken\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/#X-Amz-Target=FmrsService.ListTaskExecutions",
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([
'TaskArn' => '',
'MaxResults' => '',
'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=FmrsService.ListTaskExecutions', [
'body' => '{
"TaskArn": "",
"MaxResults": "",
"NextToken": ""
}',
'headers' => [
'content-type' => 'application/json',
'x-amz-target' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/#X-Amz-Target=FmrsService.ListTaskExecutions');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'TaskArn' => '',
'MaxResults' => '',
'NextToken' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'TaskArn' => '',
'MaxResults' => '',
'NextToken' => ''
]));
$request->setRequestUrl('{{baseUrl}}/#X-Amz-Target=FmrsService.ListTaskExecutions');
$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=FmrsService.ListTaskExecutions' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"TaskArn": "",
"MaxResults": "",
"NextToken": ""
}'
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/#X-Amz-Target=FmrsService.ListTaskExecutions' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"TaskArn": "",
"MaxResults": "",
"NextToken": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"TaskArn\": \"\",\n \"MaxResults\": \"\",\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=FmrsService.ListTaskExecutions"
payload = {
"TaskArn": "",
"MaxResults": "",
"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=FmrsService.ListTaskExecutions"
payload <- "{\n \"TaskArn\": \"\",\n \"MaxResults\": \"\",\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=FmrsService.ListTaskExecutions")
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 \"TaskArn\": \"\",\n \"MaxResults\": \"\",\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 \"TaskArn\": \"\",\n \"MaxResults\": \"\",\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=FmrsService.ListTaskExecutions";
let payload = json!({
"TaskArn": "",
"MaxResults": "",
"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=FmrsService.ListTaskExecutions' \
--header 'content-type: application/json' \
--header 'x-amz-target: ' \
--data '{
"TaskArn": "",
"MaxResults": "",
"NextToken": ""
}'
echo '{
"TaskArn": "",
"MaxResults": "",
"NextToken": ""
}' | \
http POST '{{baseUrl}}/#X-Amz-Target=FmrsService.ListTaskExecutions' \
content-type:application/json \
x-amz-target:''
wget --quiet \
--method POST \
--header 'x-amz-target: ' \
--header 'content-type: application/json' \
--body-data '{\n "TaskArn": "",\n "MaxResults": "",\n "NextToken": ""\n}' \
--output-document \
- '{{baseUrl}}/#X-Amz-Target=FmrsService.ListTaskExecutions'
import Foundation
let headers = [
"x-amz-target": "",
"content-type": "application/json"
]
let parameters = [
"TaskArn": "",
"MaxResults": "",
"NextToken": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/#X-Amz-Target=FmrsService.ListTaskExecutions")! 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
ListTasks
{{baseUrl}}/#X-Amz-Target=FmrsService.ListTasks
HEADERS
X-Amz-Target
BODY json
{
"MaxResults": "",
"NextToken": "",
"Filters": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/#X-Amz-Target=FmrsService.ListTasks");
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 \"MaxResults\": \"\",\n \"NextToken\": \"\",\n \"Filters\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/#X-Amz-Target=FmrsService.ListTasks" {:headers {:x-amz-target ""}
:content-type :json
:form-params {:MaxResults ""
:NextToken ""
:Filters ""}})
require "http/client"
url = "{{baseUrl}}/#X-Amz-Target=FmrsService.ListTasks"
headers = HTTP::Headers{
"x-amz-target" => ""
"content-type" => "application/json"
}
reqBody = "{\n \"MaxResults\": \"\",\n \"NextToken\": \"\",\n \"Filters\": \"\"\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=FmrsService.ListTasks"),
Headers =
{
{ "x-amz-target", "" },
},
Content = new StringContent("{\n \"MaxResults\": \"\",\n \"NextToken\": \"\",\n \"Filters\": \"\"\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=FmrsService.ListTasks");
var request = new RestRequest("", Method.Post);
request.AddHeader("x-amz-target", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"MaxResults\": \"\",\n \"NextToken\": \"\",\n \"Filters\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/#X-Amz-Target=FmrsService.ListTasks"
payload := strings.NewReader("{\n \"MaxResults\": \"\",\n \"NextToken\": \"\",\n \"Filters\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-amz-target", "")
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/ HTTP/1.1
X-Amz-Target:
Content-Type: application/json
Host: example.com
Content-Length: 58
{
"MaxResults": "",
"NextToken": "",
"Filters": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/#X-Amz-Target=FmrsService.ListTasks")
.setHeader("x-amz-target", "")
.setHeader("content-type", "application/json")
.setBody("{\n \"MaxResults\": \"\",\n \"NextToken\": \"\",\n \"Filters\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/#X-Amz-Target=FmrsService.ListTasks"))
.header("x-amz-target", "")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"MaxResults\": \"\",\n \"NextToken\": \"\",\n \"Filters\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"MaxResults\": \"\",\n \"NextToken\": \"\",\n \"Filters\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=FmrsService.ListTasks")
.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=FmrsService.ListTasks")
.header("x-amz-target", "")
.header("content-type", "application/json")
.body("{\n \"MaxResults\": \"\",\n \"NextToken\": \"\",\n \"Filters\": \"\"\n}")
.asString();
const data = JSON.stringify({
MaxResults: '',
NextToken: '',
Filters: ''
});
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=FmrsService.ListTasks');
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=FmrsService.ListTasks',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {MaxResults: '', NextToken: '', Filters: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/#X-Amz-Target=FmrsService.ListTasks';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"MaxResults":"","NextToken":"","Filters":""}'
};
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=FmrsService.ListTasks',
method: 'POST',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
},
processData: false,
data: '{\n "MaxResults": "",\n "NextToken": "",\n "Filters": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"MaxResults\": \"\",\n \"NextToken\": \"\",\n \"Filters\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=FmrsService.ListTasks")
.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({MaxResults: '', NextToken: '', Filters: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=FmrsService.ListTasks',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: {MaxResults: '', NextToken: '', Filters: ''},
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=FmrsService.ListTasks');
req.headers({
'x-amz-target': '',
'content-type': 'application/json'
});
req.type('json');
req.send({
MaxResults: '',
NextToken: '',
Filters: ''
});
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=FmrsService.ListTasks',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {MaxResults: '', NextToken: '', Filters: ''}
};
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=FmrsService.ListTasks';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"MaxResults":"","NextToken":"","Filters":""}'
};
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 = @{ @"MaxResults": @"",
@"NextToken": @"",
@"Filters": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/#X-Amz-Target=FmrsService.ListTasks"]
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=FmrsService.ListTasks" in
let headers = Header.add_list (Header.init ()) [
("x-amz-target", "");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"MaxResults\": \"\",\n \"NextToken\": \"\",\n \"Filters\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/#X-Amz-Target=FmrsService.ListTasks",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'MaxResults' => '',
'NextToken' => '',
'Filters' => ''
]),
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=FmrsService.ListTasks', [
'body' => '{
"MaxResults": "",
"NextToken": "",
"Filters": ""
}',
'headers' => [
'content-type' => 'application/json',
'x-amz-target' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/#X-Amz-Target=FmrsService.ListTasks');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'MaxResults' => '',
'NextToken' => '',
'Filters' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'MaxResults' => '',
'NextToken' => '',
'Filters' => ''
]));
$request->setRequestUrl('{{baseUrl}}/#X-Amz-Target=FmrsService.ListTasks');
$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=FmrsService.ListTasks' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"MaxResults": "",
"NextToken": "",
"Filters": ""
}'
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/#X-Amz-Target=FmrsService.ListTasks' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"MaxResults": "",
"NextToken": "",
"Filters": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"MaxResults\": \"\",\n \"NextToken\": \"\",\n \"Filters\": \"\"\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=FmrsService.ListTasks"
payload = {
"MaxResults": "",
"NextToken": "",
"Filters": ""
}
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=FmrsService.ListTasks"
payload <- "{\n \"MaxResults\": \"\",\n \"NextToken\": \"\",\n \"Filters\": \"\"\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=FmrsService.ListTasks")
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 \"MaxResults\": \"\",\n \"NextToken\": \"\",\n \"Filters\": \"\"\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 \"MaxResults\": \"\",\n \"NextToken\": \"\",\n \"Filters\": \"\"\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=FmrsService.ListTasks";
let payload = json!({
"MaxResults": "",
"NextToken": "",
"Filters": ""
});
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=FmrsService.ListTasks' \
--header 'content-type: application/json' \
--header 'x-amz-target: ' \
--data '{
"MaxResults": "",
"NextToken": "",
"Filters": ""
}'
echo '{
"MaxResults": "",
"NextToken": "",
"Filters": ""
}' | \
http POST '{{baseUrl}}/#X-Amz-Target=FmrsService.ListTasks' \
content-type:application/json \
x-amz-target:''
wget --quiet \
--method POST \
--header 'x-amz-target: ' \
--header 'content-type: application/json' \
--body-data '{\n "MaxResults": "",\n "NextToken": "",\n "Filters": ""\n}' \
--output-document \
- '{{baseUrl}}/#X-Amz-Target=FmrsService.ListTasks'
import Foundation
let headers = [
"x-amz-target": "",
"content-type": "application/json"
]
let parameters = [
"MaxResults": "",
"NextToken": "",
"Filters": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/#X-Amz-Target=FmrsService.ListTasks")! 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
StartTaskExecution
{{baseUrl}}/#X-Amz-Target=FmrsService.StartTaskExecution
HEADERS
X-Amz-Target
BODY json
{
"TaskArn": "",
"OverrideOptions": {
"VerifyMode": "",
"OverwriteMode": "",
"Atime": "",
"Mtime": "",
"Uid": "",
"Gid": "",
"PreserveDeletedFiles": "",
"PreserveDevices": "",
"PosixPermissions": "",
"BytesPerSecond": "",
"TaskQueueing": "",
"LogLevel": "",
"TransferMode": "",
"SecurityDescriptorCopyFlags": "",
"ObjectTags": ""
},
"Includes": "",
"Excludes": "",
"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=FmrsService.StartTaskExecution");
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 \"TaskArn\": \"\",\n \"OverrideOptions\": {\n \"VerifyMode\": \"\",\n \"OverwriteMode\": \"\",\n \"Atime\": \"\",\n \"Mtime\": \"\",\n \"Uid\": \"\",\n \"Gid\": \"\",\n \"PreserveDeletedFiles\": \"\",\n \"PreserveDevices\": \"\",\n \"PosixPermissions\": \"\",\n \"BytesPerSecond\": \"\",\n \"TaskQueueing\": \"\",\n \"LogLevel\": \"\",\n \"TransferMode\": \"\",\n \"SecurityDescriptorCopyFlags\": \"\",\n \"ObjectTags\": \"\"\n },\n \"Includes\": \"\",\n \"Excludes\": \"\",\n \"Tags\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/#X-Amz-Target=FmrsService.StartTaskExecution" {:headers {:x-amz-target ""}
:content-type :json
:form-params {:TaskArn ""
:OverrideOptions {:VerifyMode ""
:OverwriteMode ""
:Atime ""
:Mtime ""
:Uid ""
:Gid ""
:PreserveDeletedFiles ""
:PreserveDevices ""
:PosixPermissions ""
:BytesPerSecond ""
:TaskQueueing ""
:LogLevel ""
:TransferMode ""
:SecurityDescriptorCopyFlags ""
:ObjectTags ""}
:Includes ""
:Excludes ""
:Tags ""}})
require "http/client"
url = "{{baseUrl}}/#X-Amz-Target=FmrsService.StartTaskExecution"
headers = HTTP::Headers{
"x-amz-target" => ""
"content-type" => "application/json"
}
reqBody = "{\n \"TaskArn\": \"\",\n \"OverrideOptions\": {\n \"VerifyMode\": \"\",\n \"OverwriteMode\": \"\",\n \"Atime\": \"\",\n \"Mtime\": \"\",\n \"Uid\": \"\",\n \"Gid\": \"\",\n \"PreserveDeletedFiles\": \"\",\n \"PreserveDevices\": \"\",\n \"PosixPermissions\": \"\",\n \"BytesPerSecond\": \"\",\n \"TaskQueueing\": \"\",\n \"LogLevel\": \"\",\n \"TransferMode\": \"\",\n \"SecurityDescriptorCopyFlags\": \"\",\n \"ObjectTags\": \"\"\n },\n \"Includes\": \"\",\n \"Excludes\": \"\",\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=FmrsService.StartTaskExecution"),
Headers =
{
{ "x-amz-target", "" },
},
Content = new StringContent("{\n \"TaskArn\": \"\",\n \"OverrideOptions\": {\n \"VerifyMode\": \"\",\n \"OverwriteMode\": \"\",\n \"Atime\": \"\",\n \"Mtime\": \"\",\n \"Uid\": \"\",\n \"Gid\": \"\",\n \"PreserveDeletedFiles\": \"\",\n \"PreserveDevices\": \"\",\n \"PosixPermissions\": \"\",\n \"BytesPerSecond\": \"\",\n \"TaskQueueing\": \"\",\n \"LogLevel\": \"\",\n \"TransferMode\": \"\",\n \"SecurityDescriptorCopyFlags\": \"\",\n \"ObjectTags\": \"\"\n },\n \"Includes\": \"\",\n \"Excludes\": \"\",\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=FmrsService.StartTaskExecution");
var request = new RestRequest("", Method.Post);
request.AddHeader("x-amz-target", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"TaskArn\": \"\",\n \"OverrideOptions\": {\n \"VerifyMode\": \"\",\n \"OverwriteMode\": \"\",\n \"Atime\": \"\",\n \"Mtime\": \"\",\n \"Uid\": \"\",\n \"Gid\": \"\",\n \"PreserveDeletedFiles\": \"\",\n \"PreserveDevices\": \"\",\n \"PosixPermissions\": \"\",\n \"BytesPerSecond\": \"\",\n \"TaskQueueing\": \"\",\n \"LogLevel\": \"\",\n \"TransferMode\": \"\",\n \"SecurityDescriptorCopyFlags\": \"\",\n \"ObjectTags\": \"\"\n },\n \"Includes\": \"\",\n \"Excludes\": \"\",\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=FmrsService.StartTaskExecution"
payload := strings.NewReader("{\n \"TaskArn\": \"\",\n \"OverrideOptions\": {\n \"VerifyMode\": \"\",\n \"OverwriteMode\": \"\",\n \"Atime\": \"\",\n \"Mtime\": \"\",\n \"Uid\": \"\",\n \"Gid\": \"\",\n \"PreserveDeletedFiles\": \"\",\n \"PreserveDevices\": \"\",\n \"PosixPermissions\": \"\",\n \"BytesPerSecond\": \"\",\n \"TaskQueueing\": \"\",\n \"LogLevel\": \"\",\n \"TransferMode\": \"\",\n \"SecurityDescriptorCopyFlags\": \"\",\n \"ObjectTags\": \"\"\n },\n \"Includes\": \"\",\n \"Excludes\": \"\",\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: 449
{
"TaskArn": "",
"OverrideOptions": {
"VerifyMode": "",
"OverwriteMode": "",
"Atime": "",
"Mtime": "",
"Uid": "",
"Gid": "",
"PreserveDeletedFiles": "",
"PreserveDevices": "",
"PosixPermissions": "",
"BytesPerSecond": "",
"TaskQueueing": "",
"LogLevel": "",
"TransferMode": "",
"SecurityDescriptorCopyFlags": "",
"ObjectTags": ""
},
"Includes": "",
"Excludes": "",
"Tags": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/#X-Amz-Target=FmrsService.StartTaskExecution")
.setHeader("x-amz-target", "")
.setHeader("content-type", "application/json")
.setBody("{\n \"TaskArn\": \"\",\n \"OverrideOptions\": {\n \"VerifyMode\": \"\",\n \"OverwriteMode\": \"\",\n \"Atime\": \"\",\n \"Mtime\": \"\",\n \"Uid\": \"\",\n \"Gid\": \"\",\n \"PreserveDeletedFiles\": \"\",\n \"PreserveDevices\": \"\",\n \"PosixPermissions\": \"\",\n \"BytesPerSecond\": \"\",\n \"TaskQueueing\": \"\",\n \"LogLevel\": \"\",\n \"TransferMode\": \"\",\n \"SecurityDescriptorCopyFlags\": \"\",\n \"ObjectTags\": \"\"\n },\n \"Includes\": \"\",\n \"Excludes\": \"\",\n \"Tags\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/#X-Amz-Target=FmrsService.StartTaskExecution"))
.header("x-amz-target", "")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"TaskArn\": \"\",\n \"OverrideOptions\": {\n \"VerifyMode\": \"\",\n \"OverwriteMode\": \"\",\n \"Atime\": \"\",\n \"Mtime\": \"\",\n \"Uid\": \"\",\n \"Gid\": \"\",\n \"PreserveDeletedFiles\": \"\",\n \"PreserveDevices\": \"\",\n \"PosixPermissions\": \"\",\n \"BytesPerSecond\": \"\",\n \"TaskQueueing\": \"\",\n \"LogLevel\": \"\",\n \"TransferMode\": \"\",\n \"SecurityDescriptorCopyFlags\": \"\",\n \"ObjectTags\": \"\"\n },\n \"Includes\": \"\",\n \"Excludes\": \"\",\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 \"TaskArn\": \"\",\n \"OverrideOptions\": {\n \"VerifyMode\": \"\",\n \"OverwriteMode\": \"\",\n \"Atime\": \"\",\n \"Mtime\": \"\",\n \"Uid\": \"\",\n \"Gid\": \"\",\n \"PreserveDeletedFiles\": \"\",\n \"PreserveDevices\": \"\",\n \"PosixPermissions\": \"\",\n \"BytesPerSecond\": \"\",\n \"TaskQueueing\": \"\",\n \"LogLevel\": \"\",\n \"TransferMode\": \"\",\n \"SecurityDescriptorCopyFlags\": \"\",\n \"ObjectTags\": \"\"\n },\n \"Includes\": \"\",\n \"Excludes\": \"\",\n \"Tags\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=FmrsService.StartTaskExecution")
.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=FmrsService.StartTaskExecution")
.header("x-amz-target", "")
.header("content-type", "application/json")
.body("{\n \"TaskArn\": \"\",\n \"OverrideOptions\": {\n \"VerifyMode\": \"\",\n \"OverwriteMode\": \"\",\n \"Atime\": \"\",\n \"Mtime\": \"\",\n \"Uid\": \"\",\n \"Gid\": \"\",\n \"PreserveDeletedFiles\": \"\",\n \"PreserveDevices\": \"\",\n \"PosixPermissions\": \"\",\n \"BytesPerSecond\": \"\",\n \"TaskQueueing\": \"\",\n \"LogLevel\": \"\",\n \"TransferMode\": \"\",\n \"SecurityDescriptorCopyFlags\": \"\",\n \"ObjectTags\": \"\"\n },\n \"Includes\": \"\",\n \"Excludes\": \"\",\n \"Tags\": \"\"\n}")
.asString();
const data = JSON.stringify({
TaskArn: '',
OverrideOptions: {
VerifyMode: '',
OverwriteMode: '',
Atime: '',
Mtime: '',
Uid: '',
Gid: '',
PreserveDeletedFiles: '',
PreserveDevices: '',
PosixPermissions: '',
BytesPerSecond: '',
TaskQueueing: '',
LogLevel: '',
TransferMode: '',
SecurityDescriptorCopyFlags: '',
ObjectTags: ''
},
Includes: '',
Excludes: '',
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=FmrsService.StartTaskExecution');
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=FmrsService.StartTaskExecution',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {
TaskArn: '',
OverrideOptions: {
VerifyMode: '',
OverwriteMode: '',
Atime: '',
Mtime: '',
Uid: '',
Gid: '',
PreserveDeletedFiles: '',
PreserveDevices: '',
PosixPermissions: '',
BytesPerSecond: '',
TaskQueueing: '',
LogLevel: '',
TransferMode: '',
SecurityDescriptorCopyFlags: '',
ObjectTags: ''
},
Includes: '',
Excludes: '',
Tags: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/#X-Amz-Target=FmrsService.StartTaskExecution';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"TaskArn":"","OverrideOptions":{"VerifyMode":"","OverwriteMode":"","Atime":"","Mtime":"","Uid":"","Gid":"","PreserveDeletedFiles":"","PreserveDevices":"","PosixPermissions":"","BytesPerSecond":"","TaskQueueing":"","LogLevel":"","TransferMode":"","SecurityDescriptorCopyFlags":"","ObjectTags":""},"Includes":"","Excludes":"","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=FmrsService.StartTaskExecution',
method: 'POST',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
},
processData: false,
data: '{\n "TaskArn": "",\n "OverrideOptions": {\n "VerifyMode": "",\n "OverwriteMode": "",\n "Atime": "",\n "Mtime": "",\n "Uid": "",\n "Gid": "",\n "PreserveDeletedFiles": "",\n "PreserveDevices": "",\n "PosixPermissions": "",\n "BytesPerSecond": "",\n "TaskQueueing": "",\n "LogLevel": "",\n "TransferMode": "",\n "SecurityDescriptorCopyFlags": "",\n "ObjectTags": ""\n },\n "Includes": "",\n "Excludes": "",\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 \"TaskArn\": \"\",\n \"OverrideOptions\": {\n \"VerifyMode\": \"\",\n \"OverwriteMode\": \"\",\n \"Atime\": \"\",\n \"Mtime\": \"\",\n \"Uid\": \"\",\n \"Gid\": \"\",\n \"PreserveDeletedFiles\": \"\",\n \"PreserveDevices\": \"\",\n \"PosixPermissions\": \"\",\n \"BytesPerSecond\": \"\",\n \"TaskQueueing\": \"\",\n \"LogLevel\": \"\",\n \"TransferMode\": \"\",\n \"SecurityDescriptorCopyFlags\": \"\",\n \"ObjectTags\": \"\"\n },\n \"Includes\": \"\",\n \"Excludes\": \"\",\n \"Tags\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=FmrsService.StartTaskExecution")
.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({
TaskArn: '',
OverrideOptions: {
VerifyMode: '',
OverwriteMode: '',
Atime: '',
Mtime: '',
Uid: '',
Gid: '',
PreserveDeletedFiles: '',
PreserveDevices: '',
PosixPermissions: '',
BytesPerSecond: '',
TaskQueueing: '',
LogLevel: '',
TransferMode: '',
SecurityDescriptorCopyFlags: '',
ObjectTags: ''
},
Includes: '',
Excludes: '',
Tags: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=FmrsService.StartTaskExecution',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: {
TaskArn: '',
OverrideOptions: {
VerifyMode: '',
OverwriteMode: '',
Atime: '',
Mtime: '',
Uid: '',
Gid: '',
PreserveDeletedFiles: '',
PreserveDevices: '',
PosixPermissions: '',
BytesPerSecond: '',
TaskQueueing: '',
LogLevel: '',
TransferMode: '',
SecurityDescriptorCopyFlags: '',
ObjectTags: ''
},
Includes: '',
Excludes: '',
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=FmrsService.StartTaskExecution');
req.headers({
'x-amz-target': '',
'content-type': 'application/json'
});
req.type('json');
req.send({
TaskArn: '',
OverrideOptions: {
VerifyMode: '',
OverwriteMode: '',
Atime: '',
Mtime: '',
Uid: '',
Gid: '',
PreserveDeletedFiles: '',
PreserveDevices: '',
PosixPermissions: '',
BytesPerSecond: '',
TaskQueueing: '',
LogLevel: '',
TransferMode: '',
SecurityDescriptorCopyFlags: '',
ObjectTags: ''
},
Includes: '',
Excludes: '',
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=FmrsService.StartTaskExecution',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {
TaskArn: '',
OverrideOptions: {
VerifyMode: '',
OverwriteMode: '',
Atime: '',
Mtime: '',
Uid: '',
Gid: '',
PreserveDeletedFiles: '',
PreserveDevices: '',
PosixPermissions: '',
BytesPerSecond: '',
TaskQueueing: '',
LogLevel: '',
TransferMode: '',
SecurityDescriptorCopyFlags: '',
ObjectTags: ''
},
Includes: '',
Excludes: '',
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=FmrsService.StartTaskExecution';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"TaskArn":"","OverrideOptions":{"VerifyMode":"","OverwriteMode":"","Atime":"","Mtime":"","Uid":"","Gid":"","PreserveDeletedFiles":"","PreserveDevices":"","PosixPermissions":"","BytesPerSecond":"","TaskQueueing":"","LogLevel":"","TransferMode":"","SecurityDescriptorCopyFlags":"","ObjectTags":""},"Includes":"","Excludes":"","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 = @{ @"TaskArn": @"",
@"OverrideOptions": @{ @"VerifyMode": @"", @"OverwriteMode": @"", @"Atime": @"", @"Mtime": @"", @"Uid": @"", @"Gid": @"", @"PreserveDeletedFiles": @"", @"PreserveDevices": @"", @"PosixPermissions": @"", @"BytesPerSecond": @"", @"TaskQueueing": @"", @"LogLevel": @"", @"TransferMode": @"", @"SecurityDescriptorCopyFlags": @"", @"ObjectTags": @"" },
@"Includes": @"",
@"Excludes": @"",
@"Tags": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/#X-Amz-Target=FmrsService.StartTaskExecution"]
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=FmrsService.StartTaskExecution" in
let headers = Header.add_list (Header.init ()) [
("x-amz-target", "");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"TaskArn\": \"\",\n \"OverrideOptions\": {\n \"VerifyMode\": \"\",\n \"OverwriteMode\": \"\",\n \"Atime\": \"\",\n \"Mtime\": \"\",\n \"Uid\": \"\",\n \"Gid\": \"\",\n \"PreserveDeletedFiles\": \"\",\n \"PreserveDevices\": \"\",\n \"PosixPermissions\": \"\",\n \"BytesPerSecond\": \"\",\n \"TaskQueueing\": \"\",\n \"LogLevel\": \"\",\n \"TransferMode\": \"\",\n \"SecurityDescriptorCopyFlags\": \"\",\n \"ObjectTags\": \"\"\n },\n \"Includes\": \"\",\n \"Excludes\": \"\",\n \"Tags\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/#X-Amz-Target=FmrsService.StartTaskExecution",
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([
'TaskArn' => '',
'OverrideOptions' => [
'VerifyMode' => '',
'OverwriteMode' => '',
'Atime' => '',
'Mtime' => '',
'Uid' => '',
'Gid' => '',
'PreserveDeletedFiles' => '',
'PreserveDevices' => '',
'PosixPermissions' => '',
'BytesPerSecond' => '',
'TaskQueueing' => '',
'LogLevel' => '',
'TransferMode' => '',
'SecurityDescriptorCopyFlags' => '',
'ObjectTags' => ''
],
'Includes' => '',
'Excludes' => '',
'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=FmrsService.StartTaskExecution', [
'body' => '{
"TaskArn": "",
"OverrideOptions": {
"VerifyMode": "",
"OverwriteMode": "",
"Atime": "",
"Mtime": "",
"Uid": "",
"Gid": "",
"PreserveDeletedFiles": "",
"PreserveDevices": "",
"PosixPermissions": "",
"BytesPerSecond": "",
"TaskQueueing": "",
"LogLevel": "",
"TransferMode": "",
"SecurityDescriptorCopyFlags": "",
"ObjectTags": ""
},
"Includes": "",
"Excludes": "",
"Tags": ""
}',
'headers' => [
'content-type' => 'application/json',
'x-amz-target' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/#X-Amz-Target=FmrsService.StartTaskExecution');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'TaskArn' => '',
'OverrideOptions' => [
'VerifyMode' => '',
'OverwriteMode' => '',
'Atime' => '',
'Mtime' => '',
'Uid' => '',
'Gid' => '',
'PreserveDeletedFiles' => '',
'PreserveDevices' => '',
'PosixPermissions' => '',
'BytesPerSecond' => '',
'TaskQueueing' => '',
'LogLevel' => '',
'TransferMode' => '',
'SecurityDescriptorCopyFlags' => '',
'ObjectTags' => ''
],
'Includes' => '',
'Excludes' => '',
'Tags' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'TaskArn' => '',
'OverrideOptions' => [
'VerifyMode' => '',
'OverwriteMode' => '',
'Atime' => '',
'Mtime' => '',
'Uid' => '',
'Gid' => '',
'PreserveDeletedFiles' => '',
'PreserveDevices' => '',
'PosixPermissions' => '',
'BytesPerSecond' => '',
'TaskQueueing' => '',
'LogLevel' => '',
'TransferMode' => '',
'SecurityDescriptorCopyFlags' => '',
'ObjectTags' => ''
],
'Includes' => '',
'Excludes' => '',
'Tags' => ''
]));
$request->setRequestUrl('{{baseUrl}}/#X-Amz-Target=FmrsService.StartTaskExecution');
$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=FmrsService.StartTaskExecution' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"TaskArn": "",
"OverrideOptions": {
"VerifyMode": "",
"OverwriteMode": "",
"Atime": "",
"Mtime": "",
"Uid": "",
"Gid": "",
"PreserveDeletedFiles": "",
"PreserveDevices": "",
"PosixPermissions": "",
"BytesPerSecond": "",
"TaskQueueing": "",
"LogLevel": "",
"TransferMode": "",
"SecurityDescriptorCopyFlags": "",
"ObjectTags": ""
},
"Includes": "",
"Excludes": "",
"Tags": ""
}'
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/#X-Amz-Target=FmrsService.StartTaskExecution' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"TaskArn": "",
"OverrideOptions": {
"VerifyMode": "",
"OverwriteMode": "",
"Atime": "",
"Mtime": "",
"Uid": "",
"Gid": "",
"PreserveDeletedFiles": "",
"PreserveDevices": "",
"PosixPermissions": "",
"BytesPerSecond": "",
"TaskQueueing": "",
"LogLevel": "",
"TransferMode": "",
"SecurityDescriptorCopyFlags": "",
"ObjectTags": ""
},
"Includes": "",
"Excludes": "",
"Tags": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"TaskArn\": \"\",\n \"OverrideOptions\": {\n \"VerifyMode\": \"\",\n \"OverwriteMode\": \"\",\n \"Atime\": \"\",\n \"Mtime\": \"\",\n \"Uid\": \"\",\n \"Gid\": \"\",\n \"PreserveDeletedFiles\": \"\",\n \"PreserveDevices\": \"\",\n \"PosixPermissions\": \"\",\n \"BytesPerSecond\": \"\",\n \"TaskQueueing\": \"\",\n \"LogLevel\": \"\",\n \"TransferMode\": \"\",\n \"SecurityDescriptorCopyFlags\": \"\",\n \"ObjectTags\": \"\"\n },\n \"Includes\": \"\",\n \"Excludes\": \"\",\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=FmrsService.StartTaskExecution"
payload = {
"TaskArn": "",
"OverrideOptions": {
"VerifyMode": "",
"OverwriteMode": "",
"Atime": "",
"Mtime": "",
"Uid": "",
"Gid": "",
"PreserveDeletedFiles": "",
"PreserveDevices": "",
"PosixPermissions": "",
"BytesPerSecond": "",
"TaskQueueing": "",
"LogLevel": "",
"TransferMode": "",
"SecurityDescriptorCopyFlags": "",
"ObjectTags": ""
},
"Includes": "",
"Excludes": "",
"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=FmrsService.StartTaskExecution"
payload <- "{\n \"TaskArn\": \"\",\n \"OverrideOptions\": {\n \"VerifyMode\": \"\",\n \"OverwriteMode\": \"\",\n \"Atime\": \"\",\n \"Mtime\": \"\",\n \"Uid\": \"\",\n \"Gid\": \"\",\n \"PreserveDeletedFiles\": \"\",\n \"PreserveDevices\": \"\",\n \"PosixPermissions\": \"\",\n \"BytesPerSecond\": \"\",\n \"TaskQueueing\": \"\",\n \"LogLevel\": \"\",\n \"TransferMode\": \"\",\n \"SecurityDescriptorCopyFlags\": \"\",\n \"ObjectTags\": \"\"\n },\n \"Includes\": \"\",\n \"Excludes\": \"\",\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=FmrsService.StartTaskExecution")
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 \"TaskArn\": \"\",\n \"OverrideOptions\": {\n \"VerifyMode\": \"\",\n \"OverwriteMode\": \"\",\n \"Atime\": \"\",\n \"Mtime\": \"\",\n \"Uid\": \"\",\n \"Gid\": \"\",\n \"PreserveDeletedFiles\": \"\",\n \"PreserveDevices\": \"\",\n \"PosixPermissions\": \"\",\n \"BytesPerSecond\": \"\",\n \"TaskQueueing\": \"\",\n \"LogLevel\": \"\",\n \"TransferMode\": \"\",\n \"SecurityDescriptorCopyFlags\": \"\",\n \"ObjectTags\": \"\"\n },\n \"Includes\": \"\",\n \"Excludes\": \"\",\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 \"TaskArn\": \"\",\n \"OverrideOptions\": {\n \"VerifyMode\": \"\",\n \"OverwriteMode\": \"\",\n \"Atime\": \"\",\n \"Mtime\": \"\",\n \"Uid\": \"\",\n \"Gid\": \"\",\n \"PreserveDeletedFiles\": \"\",\n \"PreserveDevices\": \"\",\n \"PosixPermissions\": \"\",\n \"BytesPerSecond\": \"\",\n \"TaskQueueing\": \"\",\n \"LogLevel\": \"\",\n \"TransferMode\": \"\",\n \"SecurityDescriptorCopyFlags\": \"\",\n \"ObjectTags\": \"\"\n },\n \"Includes\": \"\",\n \"Excludes\": \"\",\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=FmrsService.StartTaskExecution";
let payload = json!({
"TaskArn": "",
"OverrideOptions": json!({
"VerifyMode": "",
"OverwriteMode": "",
"Atime": "",
"Mtime": "",
"Uid": "",
"Gid": "",
"PreserveDeletedFiles": "",
"PreserveDevices": "",
"PosixPermissions": "",
"BytesPerSecond": "",
"TaskQueueing": "",
"LogLevel": "",
"TransferMode": "",
"SecurityDescriptorCopyFlags": "",
"ObjectTags": ""
}),
"Includes": "",
"Excludes": "",
"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=FmrsService.StartTaskExecution' \
--header 'content-type: application/json' \
--header 'x-amz-target: ' \
--data '{
"TaskArn": "",
"OverrideOptions": {
"VerifyMode": "",
"OverwriteMode": "",
"Atime": "",
"Mtime": "",
"Uid": "",
"Gid": "",
"PreserveDeletedFiles": "",
"PreserveDevices": "",
"PosixPermissions": "",
"BytesPerSecond": "",
"TaskQueueing": "",
"LogLevel": "",
"TransferMode": "",
"SecurityDescriptorCopyFlags": "",
"ObjectTags": ""
},
"Includes": "",
"Excludes": "",
"Tags": ""
}'
echo '{
"TaskArn": "",
"OverrideOptions": {
"VerifyMode": "",
"OverwriteMode": "",
"Atime": "",
"Mtime": "",
"Uid": "",
"Gid": "",
"PreserveDeletedFiles": "",
"PreserveDevices": "",
"PosixPermissions": "",
"BytesPerSecond": "",
"TaskQueueing": "",
"LogLevel": "",
"TransferMode": "",
"SecurityDescriptorCopyFlags": "",
"ObjectTags": ""
},
"Includes": "",
"Excludes": "",
"Tags": ""
}' | \
http POST '{{baseUrl}}/#X-Amz-Target=FmrsService.StartTaskExecution' \
content-type:application/json \
x-amz-target:''
wget --quiet \
--method POST \
--header 'x-amz-target: ' \
--header 'content-type: application/json' \
--body-data '{\n "TaskArn": "",\n "OverrideOptions": {\n "VerifyMode": "",\n "OverwriteMode": "",\n "Atime": "",\n "Mtime": "",\n "Uid": "",\n "Gid": "",\n "PreserveDeletedFiles": "",\n "PreserveDevices": "",\n "PosixPermissions": "",\n "BytesPerSecond": "",\n "TaskQueueing": "",\n "LogLevel": "",\n "TransferMode": "",\n "SecurityDescriptorCopyFlags": "",\n "ObjectTags": ""\n },\n "Includes": "",\n "Excludes": "",\n "Tags": ""\n}' \
--output-document \
- '{{baseUrl}}/#X-Amz-Target=FmrsService.StartTaskExecution'
import Foundation
let headers = [
"x-amz-target": "",
"content-type": "application/json"
]
let parameters = [
"TaskArn": "",
"OverrideOptions": [
"VerifyMode": "",
"OverwriteMode": "",
"Atime": "",
"Mtime": "",
"Uid": "",
"Gid": "",
"PreserveDeletedFiles": "",
"PreserveDevices": "",
"PosixPermissions": "",
"BytesPerSecond": "",
"TaskQueueing": "",
"LogLevel": "",
"TransferMode": "",
"SecurityDescriptorCopyFlags": "",
"ObjectTags": ""
],
"Includes": "",
"Excludes": "",
"Tags": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/#X-Amz-Target=FmrsService.StartTaskExecution")! 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=FmrsService.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=FmrsService.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=FmrsService.TagResource" {:headers {:x-amz-target ""}
:content-type :json
:form-params {:ResourceArn ""
:Tags ""}})
require "http/client"
url = "{{baseUrl}}/#X-Amz-Target=FmrsService.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=FmrsService.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=FmrsService.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=FmrsService.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=FmrsService.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=FmrsService.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=FmrsService.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=FmrsService.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=FmrsService.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=FmrsService.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=FmrsService.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=FmrsService.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=FmrsService.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=FmrsService.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=FmrsService.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=FmrsService.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=FmrsService.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=FmrsService.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=FmrsService.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=FmrsService.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=FmrsService.TagResource', [
'body' => '{
"ResourceArn": "",
"Tags": ""
}',
'headers' => [
'content-type' => 'application/json',
'x-amz-target' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/#X-Amz-Target=FmrsService.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=FmrsService.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=FmrsService.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=FmrsService.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=FmrsService.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=FmrsService.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=FmrsService.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=FmrsService.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=FmrsService.TagResource' \
--header 'content-type: application/json' \
--header 'x-amz-target: ' \
--data '{
"ResourceArn": "",
"Tags": ""
}'
echo '{
"ResourceArn": "",
"Tags": ""
}' | \
http POST '{{baseUrl}}/#X-Amz-Target=FmrsService.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=FmrsService.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=FmrsService.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=FmrsService.UntagResource
HEADERS
X-Amz-Target
BODY json
{
"ResourceArn": "",
"Keys": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/#X-Amz-Target=FmrsService.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 \"Keys\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/#X-Amz-Target=FmrsService.UntagResource" {:headers {:x-amz-target ""}
:content-type :json
:form-params {:ResourceArn ""
:Keys ""}})
require "http/client"
url = "{{baseUrl}}/#X-Amz-Target=FmrsService.UntagResource"
headers = HTTP::Headers{
"x-amz-target" => ""
"content-type" => "application/json"
}
reqBody = "{\n \"ResourceArn\": \"\",\n \"Keys\": \"\"\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=FmrsService.UntagResource"),
Headers =
{
{ "x-amz-target", "" },
},
Content = new StringContent("{\n \"ResourceArn\": \"\",\n \"Keys\": \"\"\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=FmrsService.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 \"Keys\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/#X-Amz-Target=FmrsService.UntagResource"
payload := strings.NewReader("{\n \"ResourceArn\": \"\",\n \"Keys\": \"\"\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": "",
"Keys": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/#X-Amz-Target=FmrsService.UntagResource")
.setHeader("x-amz-target", "")
.setHeader("content-type", "application/json")
.setBody("{\n \"ResourceArn\": \"\",\n \"Keys\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/#X-Amz-Target=FmrsService.UntagResource"))
.header("x-amz-target", "")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"ResourceArn\": \"\",\n \"Keys\": \"\"\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 \"Keys\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=FmrsService.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=FmrsService.UntagResource")
.header("x-amz-target", "")
.header("content-type", "application/json")
.body("{\n \"ResourceArn\": \"\",\n \"Keys\": \"\"\n}")
.asString();
const data = JSON.stringify({
ResourceArn: '',
Keys: ''
});
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=FmrsService.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=FmrsService.UntagResource',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {ResourceArn: '', Keys: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/#X-Amz-Target=FmrsService.UntagResource';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"ResourceArn":"","Keys":""}'
};
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=FmrsService.UntagResource',
method: 'POST',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
},
processData: false,
data: '{\n "ResourceArn": "",\n "Keys": ""\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 \"Keys\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=FmrsService.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: '', Keys: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=FmrsService.UntagResource',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: {ResourceArn: '', Keys: ''},
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=FmrsService.UntagResource');
req.headers({
'x-amz-target': '',
'content-type': 'application/json'
});
req.type('json');
req.send({
ResourceArn: '',
Keys: ''
});
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=FmrsService.UntagResource',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {ResourceArn: '', Keys: ''}
};
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=FmrsService.UntagResource';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"ResourceArn":"","Keys":""}'
};
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": @"",
@"Keys": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/#X-Amz-Target=FmrsService.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=FmrsService.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 \"Keys\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/#X-Amz-Target=FmrsService.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' => '',
'Keys' => ''
]),
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=FmrsService.UntagResource', [
'body' => '{
"ResourceArn": "",
"Keys": ""
}',
'headers' => [
'content-type' => 'application/json',
'x-amz-target' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/#X-Amz-Target=FmrsService.UntagResource');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'ResourceArn' => '',
'Keys' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'ResourceArn' => '',
'Keys' => ''
]));
$request->setRequestUrl('{{baseUrl}}/#X-Amz-Target=FmrsService.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=FmrsService.UntagResource' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"ResourceArn": "",
"Keys": ""
}'
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/#X-Amz-Target=FmrsService.UntagResource' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"ResourceArn": "",
"Keys": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"ResourceArn\": \"\",\n \"Keys\": \"\"\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=FmrsService.UntagResource"
payload = {
"ResourceArn": "",
"Keys": ""
}
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=FmrsService.UntagResource"
payload <- "{\n \"ResourceArn\": \"\",\n \"Keys\": \"\"\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=FmrsService.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 \"Keys\": \"\"\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 \"Keys\": \"\"\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=FmrsService.UntagResource";
let payload = json!({
"ResourceArn": "",
"Keys": ""
});
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=FmrsService.UntagResource' \
--header 'content-type: application/json' \
--header 'x-amz-target: ' \
--data '{
"ResourceArn": "",
"Keys": ""
}'
echo '{
"ResourceArn": "",
"Keys": ""
}' | \
http POST '{{baseUrl}}/#X-Amz-Target=FmrsService.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 "Keys": ""\n}' \
--output-document \
- '{{baseUrl}}/#X-Amz-Target=FmrsService.UntagResource'
import Foundation
let headers = [
"x-amz-target": "",
"content-type": "application/json"
]
let parameters = [
"ResourceArn": "",
"Keys": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/#X-Amz-Target=FmrsService.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
UpdateAgent
{{baseUrl}}/#X-Amz-Target=FmrsService.UpdateAgent
HEADERS
X-Amz-Target
BODY json
{
"AgentArn": "",
"Name": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/#X-Amz-Target=FmrsService.UpdateAgent");
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 \"AgentArn\": \"\",\n \"Name\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/#X-Amz-Target=FmrsService.UpdateAgent" {:headers {:x-amz-target ""}
:content-type :json
:form-params {:AgentArn ""
:Name ""}})
require "http/client"
url = "{{baseUrl}}/#X-Amz-Target=FmrsService.UpdateAgent"
headers = HTTP::Headers{
"x-amz-target" => ""
"content-type" => "application/json"
}
reqBody = "{\n \"AgentArn\": \"\",\n \"Name\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/#X-Amz-Target=FmrsService.UpdateAgent"),
Headers =
{
{ "x-amz-target", "" },
},
Content = new StringContent("{\n \"AgentArn\": \"\",\n \"Name\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/#X-Amz-Target=FmrsService.UpdateAgent");
var request = new RestRequest("", Method.Post);
request.AddHeader("x-amz-target", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"AgentArn\": \"\",\n \"Name\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/#X-Amz-Target=FmrsService.UpdateAgent"
payload := strings.NewReader("{\n \"AgentArn\": \"\",\n \"Name\": \"\"\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: 34
{
"AgentArn": "",
"Name": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/#X-Amz-Target=FmrsService.UpdateAgent")
.setHeader("x-amz-target", "")
.setHeader("content-type", "application/json")
.setBody("{\n \"AgentArn\": \"\",\n \"Name\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/#X-Amz-Target=FmrsService.UpdateAgent"))
.header("x-amz-target", "")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"AgentArn\": \"\",\n \"Name\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"AgentArn\": \"\",\n \"Name\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=FmrsService.UpdateAgent")
.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=FmrsService.UpdateAgent")
.header("x-amz-target", "")
.header("content-type", "application/json")
.body("{\n \"AgentArn\": \"\",\n \"Name\": \"\"\n}")
.asString();
const data = JSON.stringify({
AgentArn: '',
Name: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/#X-Amz-Target=FmrsService.UpdateAgent');
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=FmrsService.UpdateAgent',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {AgentArn: '', Name: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/#X-Amz-Target=FmrsService.UpdateAgent';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"AgentArn":"","Name":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/#X-Amz-Target=FmrsService.UpdateAgent',
method: 'POST',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
},
processData: false,
data: '{\n "AgentArn": "",\n "Name": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"AgentArn\": \"\",\n \"Name\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=FmrsService.UpdateAgent")
.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({AgentArn: '', Name: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=FmrsService.UpdateAgent',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: {AgentArn: '', Name: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/#X-Amz-Target=FmrsService.UpdateAgent');
req.headers({
'x-amz-target': '',
'content-type': 'application/json'
});
req.type('json');
req.send({
AgentArn: '',
Name: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=FmrsService.UpdateAgent',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {AgentArn: '', Name: ''}
};
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=FmrsService.UpdateAgent';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"AgentArn":"","Name":""}'
};
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 = @{ @"AgentArn": @"",
@"Name": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/#X-Amz-Target=FmrsService.UpdateAgent"]
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=FmrsService.UpdateAgent" in
let headers = Header.add_list (Header.init ()) [
("x-amz-target", "");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"AgentArn\": \"\",\n \"Name\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/#X-Amz-Target=FmrsService.UpdateAgent",
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([
'AgentArn' => '',
'Name' => ''
]),
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=FmrsService.UpdateAgent', [
'body' => '{
"AgentArn": "",
"Name": ""
}',
'headers' => [
'content-type' => 'application/json',
'x-amz-target' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/#X-Amz-Target=FmrsService.UpdateAgent');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'AgentArn' => '',
'Name' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'AgentArn' => '',
'Name' => ''
]));
$request->setRequestUrl('{{baseUrl}}/#X-Amz-Target=FmrsService.UpdateAgent');
$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=FmrsService.UpdateAgent' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"AgentArn": "",
"Name": ""
}'
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/#X-Amz-Target=FmrsService.UpdateAgent' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"AgentArn": "",
"Name": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"AgentArn\": \"\",\n \"Name\": \"\"\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=FmrsService.UpdateAgent"
payload = {
"AgentArn": "",
"Name": ""
}
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=FmrsService.UpdateAgent"
payload <- "{\n \"AgentArn\": \"\",\n \"Name\": \"\"\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=FmrsService.UpdateAgent")
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 \"AgentArn\": \"\",\n \"Name\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/') do |req|
req.headers['x-amz-target'] = ''
req.body = "{\n \"AgentArn\": \"\",\n \"Name\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/#X-Amz-Target=FmrsService.UpdateAgent";
let payload = json!({
"AgentArn": "",
"Name": ""
});
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=FmrsService.UpdateAgent' \
--header 'content-type: application/json' \
--header 'x-amz-target: ' \
--data '{
"AgentArn": "",
"Name": ""
}'
echo '{
"AgentArn": "",
"Name": ""
}' | \
http POST '{{baseUrl}}/#X-Amz-Target=FmrsService.UpdateAgent' \
content-type:application/json \
x-amz-target:''
wget --quiet \
--method POST \
--header 'x-amz-target: ' \
--header 'content-type: application/json' \
--body-data '{\n "AgentArn": "",\n "Name": ""\n}' \
--output-document \
- '{{baseUrl}}/#X-Amz-Target=FmrsService.UpdateAgent'
import Foundation
let headers = [
"x-amz-target": "",
"content-type": "application/json"
]
let parameters = [
"AgentArn": "",
"Name": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/#X-Amz-Target=FmrsService.UpdateAgent")! 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
UpdateLocationHdfs
{{baseUrl}}/#X-Amz-Target=FmrsService.UpdateLocationHdfs
HEADERS
X-Amz-Target
BODY json
{
"LocationArn": "",
"Subdirectory": "",
"NameNodes": "",
"BlockSize": "",
"ReplicationFactor": "",
"KmsKeyProviderUri": "",
"QopConfiguration": "",
"AuthenticationType": "",
"SimpleUser": "",
"KerberosPrincipal": "",
"KerberosKeytab": "",
"KerberosKrb5Conf": "",
"AgentArns": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/#X-Amz-Target=FmrsService.UpdateLocationHdfs");
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 \"LocationArn\": \"\",\n \"Subdirectory\": \"\",\n \"NameNodes\": \"\",\n \"BlockSize\": \"\",\n \"ReplicationFactor\": \"\",\n \"KmsKeyProviderUri\": \"\",\n \"QopConfiguration\": \"\",\n \"AuthenticationType\": \"\",\n \"SimpleUser\": \"\",\n \"KerberosPrincipal\": \"\",\n \"KerberosKeytab\": \"\",\n \"KerberosKrb5Conf\": \"\",\n \"AgentArns\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/#X-Amz-Target=FmrsService.UpdateLocationHdfs" {:headers {:x-amz-target ""}
:content-type :json
:form-params {:LocationArn ""
:Subdirectory ""
:NameNodes ""
:BlockSize ""
:ReplicationFactor ""
:KmsKeyProviderUri ""
:QopConfiguration ""
:AuthenticationType ""
:SimpleUser ""
:KerberosPrincipal ""
:KerberosKeytab ""
:KerberosKrb5Conf ""
:AgentArns ""}})
require "http/client"
url = "{{baseUrl}}/#X-Amz-Target=FmrsService.UpdateLocationHdfs"
headers = HTTP::Headers{
"x-amz-target" => ""
"content-type" => "application/json"
}
reqBody = "{\n \"LocationArn\": \"\",\n \"Subdirectory\": \"\",\n \"NameNodes\": \"\",\n \"BlockSize\": \"\",\n \"ReplicationFactor\": \"\",\n \"KmsKeyProviderUri\": \"\",\n \"QopConfiguration\": \"\",\n \"AuthenticationType\": \"\",\n \"SimpleUser\": \"\",\n \"KerberosPrincipal\": \"\",\n \"KerberosKeytab\": \"\",\n \"KerberosKrb5Conf\": \"\",\n \"AgentArns\": \"\"\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=FmrsService.UpdateLocationHdfs"),
Headers =
{
{ "x-amz-target", "" },
},
Content = new StringContent("{\n \"LocationArn\": \"\",\n \"Subdirectory\": \"\",\n \"NameNodes\": \"\",\n \"BlockSize\": \"\",\n \"ReplicationFactor\": \"\",\n \"KmsKeyProviderUri\": \"\",\n \"QopConfiguration\": \"\",\n \"AuthenticationType\": \"\",\n \"SimpleUser\": \"\",\n \"KerberosPrincipal\": \"\",\n \"KerberosKeytab\": \"\",\n \"KerberosKrb5Conf\": \"\",\n \"AgentArns\": \"\"\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=FmrsService.UpdateLocationHdfs");
var request = new RestRequest("", Method.Post);
request.AddHeader("x-amz-target", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"LocationArn\": \"\",\n \"Subdirectory\": \"\",\n \"NameNodes\": \"\",\n \"BlockSize\": \"\",\n \"ReplicationFactor\": \"\",\n \"KmsKeyProviderUri\": \"\",\n \"QopConfiguration\": \"\",\n \"AuthenticationType\": \"\",\n \"SimpleUser\": \"\",\n \"KerberosPrincipal\": \"\",\n \"KerberosKeytab\": \"\",\n \"KerberosKrb5Conf\": \"\",\n \"AgentArns\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/#X-Amz-Target=FmrsService.UpdateLocationHdfs"
payload := strings.NewReader("{\n \"LocationArn\": \"\",\n \"Subdirectory\": \"\",\n \"NameNodes\": \"\",\n \"BlockSize\": \"\",\n \"ReplicationFactor\": \"\",\n \"KmsKeyProviderUri\": \"\",\n \"QopConfiguration\": \"\",\n \"AuthenticationType\": \"\",\n \"SimpleUser\": \"\",\n \"KerberosPrincipal\": \"\",\n \"KerberosKeytab\": \"\",\n \"KerberosKrb5Conf\": \"\",\n \"AgentArns\": \"\"\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: 307
{
"LocationArn": "",
"Subdirectory": "",
"NameNodes": "",
"BlockSize": "",
"ReplicationFactor": "",
"KmsKeyProviderUri": "",
"QopConfiguration": "",
"AuthenticationType": "",
"SimpleUser": "",
"KerberosPrincipal": "",
"KerberosKeytab": "",
"KerberosKrb5Conf": "",
"AgentArns": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/#X-Amz-Target=FmrsService.UpdateLocationHdfs")
.setHeader("x-amz-target", "")
.setHeader("content-type", "application/json")
.setBody("{\n \"LocationArn\": \"\",\n \"Subdirectory\": \"\",\n \"NameNodes\": \"\",\n \"BlockSize\": \"\",\n \"ReplicationFactor\": \"\",\n \"KmsKeyProviderUri\": \"\",\n \"QopConfiguration\": \"\",\n \"AuthenticationType\": \"\",\n \"SimpleUser\": \"\",\n \"KerberosPrincipal\": \"\",\n \"KerberosKeytab\": \"\",\n \"KerberosKrb5Conf\": \"\",\n \"AgentArns\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/#X-Amz-Target=FmrsService.UpdateLocationHdfs"))
.header("x-amz-target", "")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"LocationArn\": \"\",\n \"Subdirectory\": \"\",\n \"NameNodes\": \"\",\n \"BlockSize\": \"\",\n \"ReplicationFactor\": \"\",\n \"KmsKeyProviderUri\": \"\",\n \"QopConfiguration\": \"\",\n \"AuthenticationType\": \"\",\n \"SimpleUser\": \"\",\n \"KerberosPrincipal\": \"\",\n \"KerberosKeytab\": \"\",\n \"KerberosKrb5Conf\": \"\",\n \"AgentArns\": \"\"\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 \"LocationArn\": \"\",\n \"Subdirectory\": \"\",\n \"NameNodes\": \"\",\n \"BlockSize\": \"\",\n \"ReplicationFactor\": \"\",\n \"KmsKeyProviderUri\": \"\",\n \"QopConfiguration\": \"\",\n \"AuthenticationType\": \"\",\n \"SimpleUser\": \"\",\n \"KerberosPrincipal\": \"\",\n \"KerberosKeytab\": \"\",\n \"KerberosKrb5Conf\": \"\",\n \"AgentArns\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=FmrsService.UpdateLocationHdfs")
.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=FmrsService.UpdateLocationHdfs")
.header("x-amz-target", "")
.header("content-type", "application/json")
.body("{\n \"LocationArn\": \"\",\n \"Subdirectory\": \"\",\n \"NameNodes\": \"\",\n \"BlockSize\": \"\",\n \"ReplicationFactor\": \"\",\n \"KmsKeyProviderUri\": \"\",\n \"QopConfiguration\": \"\",\n \"AuthenticationType\": \"\",\n \"SimpleUser\": \"\",\n \"KerberosPrincipal\": \"\",\n \"KerberosKeytab\": \"\",\n \"KerberosKrb5Conf\": \"\",\n \"AgentArns\": \"\"\n}")
.asString();
const data = JSON.stringify({
LocationArn: '',
Subdirectory: '',
NameNodes: '',
BlockSize: '',
ReplicationFactor: '',
KmsKeyProviderUri: '',
QopConfiguration: '',
AuthenticationType: '',
SimpleUser: '',
KerberosPrincipal: '',
KerberosKeytab: '',
KerberosKrb5Conf: '',
AgentArns: ''
});
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=FmrsService.UpdateLocationHdfs');
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=FmrsService.UpdateLocationHdfs',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {
LocationArn: '',
Subdirectory: '',
NameNodes: '',
BlockSize: '',
ReplicationFactor: '',
KmsKeyProviderUri: '',
QopConfiguration: '',
AuthenticationType: '',
SimpleUser: '',
KerberosPrincipal: '',
KerberosKeytab: '',
KerberosKrb5Conf: '',
AgentArns: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/#X-Amz-Target=FmrsService.UpdateLocationHdfs';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"LocationArn":"","Subdirectory":"","NameNodes":"","BlockSize":"","ReplicationFactor":"","KmsKeyProviderUri":"","QopConfiguration":"","AuthenticationType":"","SimpleUser":"","KerberosPrincipal":"","KerberosKeytab":"","KerberosKrb5Conf":"","AgentArns":""}'
};
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=FmrsService.UpdateLocationHdfs',
method: 'POST',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
},
processData: false,
data: '{\n "LocationArn": "",\n "Subdirectory": "",\n "NameNodes": "",\n "BlockSize": "",\n "ReplicationFactor": "",\n "KmsKeyProviderUri": "",\n "QopConfiguration": "",\n "AuthenticationType": "",\n "SimpleUser": "",\n "KerberosPrincipal": "",\n "KerberosKeytab": "",\n "KerberosKrb5Conf": "",\n "AgentArns": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"LocationArn\": \"\",\n \"Subdirectory\": \"\",\n \"NameNodes\": \"\",\n \"BlockSize\": \"\",\n \"ReplicationFactor\": \"\",\n \"KmsKeyProviderUri\": \"\",\n \"QopConfiguration\": \"\",\n \"AuthenticationType\": \"\",\n \"SimpleUser\": \"\",\n \"KerberosPrincipal\": \"\",\n \"KerberosKeytab\": \"\",\n \"KerberosKrb5Conf\": \"\",\n \"AgentArns\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=FmrsService.UpdateLocationHdfs")
.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({
LocationArn: '',
Subdirectory: '',
NameNodes: '',
BlockSize: '',
ReplicationFactor: '',
KmsKeyProviderUri: '',
QopConfiguration: '',
AuthenticationType: '',
SimpleUser: '',
KerberosPrincipal: '',
KerberosKeytab: '',
KerberosKrb5Conf: '',
AgentArns: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=FmrsService.UpdateLocationHdfs',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: {
LocationArn: '',
Subdirectory: '',
NameNodes: '',
BlockSize: '',
ReplicationFactor: '',
KmsKeyProviderUri: '',
QopConfiguration: '',
AuthenticationType: '',
SimpleUser: '',
KerberosPrincipal: '',
KerberosKeytab: '',
KerberosKrb5Conf: '',
AgentArns: ''
},
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=FmrsService.UpdateLocationHdfs');
req.headers({
'x-amz-target': '',
'content-type': 'application/json'
});
req.type('json');
req.send({
LocationArn: '',
Subdirectory: '',
NameNodes: '',
BlockSize: '',
ReplicationFactor: '',
KmsKeyProviderUri: '',
QopConfiguration: '',
AuthenticationType: '',
SimpleUser: '',
KerberosPrincipal: '',
KerberosKeytab: '',
KerberosKrb5Conf: '',
AgentArns: ''
});
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=FmrsService.UpdateLocationHdfs',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {
LocationArn: '',
Subdirectory: '',
NameNodes: '',
BlockSize: '',
ReplicationFactor: '',
KmsKeyProviderUri: '',
QopConfiguration: '',
AuthenticationType: '',
SimpleUser: '',
KerberosPrincipal: '',
KerberosKeytab: '',
KerberosKrb5Conf: '',
AgentArns: ''
}
};
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=FmrsService.UpdateLocationHdfs';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"LocationArn":"","Subdirectory":"","NameNodes":"","BlockSize":"","ReplicationFactor":"","KmsKeyProviderUri":"","QopConfiguration":"","AuthenticationType":"","SimpleUser":"","KerberosPrincipal":"","KerberosKeytab":"","KerberosKrb5Conf":"","AgentArns":""}'
};
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 = @{ @"LocationArn": @"",
@"Subdirectory": @"",
@"NameNodes": @"",
@"BlockSize": @"",
@"ReplicationFactor": @"",
@"KmsKeyProviderUri": @"",
@"QopConfiguration": @"",
@"AuthenticationType": @"",
@"SimpleUser": @"",
@"KerberosPrincipal": @"",
@"KerberosKeytab": @"",
@"KerberosKrb5Conf": @"",
@"AgentArns": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/#X-Amz-Target=FmrsService.UpdateLocationHdfs"]
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=FmrsService.UpdateLocationHdfs" in
let headers = Header.add_list (Header.init ()) [
("x-amz-target", "");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"LocationArn\": \"\",\n \"Subdirectory\": \"\",\n \"NameNodes\": \"\",\n \"BlockSize\": \"\",\n \"ReplicationFactor\": \"\",\n \"KmsKeyProviderUri\": \"\",\n \"QopConfiguration\": \"\",\n \"AuthenticationType\": \"\",\n \"SimpleUser\": \"\",\n \"KerberosPrincipal\": \"\",\n \"KerberosKeytab\": \"\",\n \"KerberosKrb5Conf\": \"\",\n \"AgentArns\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/#X-Amz-Target=FmrsService.UpdateLocationHdfs",
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([
'LocationArn' => '',
'Subdirectory' => '',
'NameNodes' => '',
'BlockSize' => '',
'ReplicationFactor' => '',
'KmsKeyProviderUri' => '',
'QopConfiguration' => '',
'AuthenticationType' => '',
'SimpleUser' => '',
'KerberosPrincipal' => '',
'KerberosKeytab' => '',
'KerberosKrb5Conf' => '',
'AgentArns' => ''
]),
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=FmrsService.UpdateLocationHdfs', [
'body' => '{
"LocationArn": "",
"Subdirectory": "",
"NameNodes": "",
"BlockSize": "",
"ReplicationFactor": "",
"KmsKeyProviderUri": "",
"QopConfiguration": "",
"AuthenticationType": "",
"SimpleUser": "",
"KerberosPrincipal": "",
"KerberosKeytab": "",
"KerberosKrb5Conf": "",
"AgentArns": ""
}',
'headers' => [
'content-type' => 'application/json',
'x-amz-target' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/#X-Amz-Target=FmrsService.UpdateLocationHdfs');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'LocationArn' => '',
'Subdirectory' => '',
'NameNodes' => '',
'BlockSize' => '',
'ReplicationFactor' => '',
'KmsKeyProviderUri' => '',
'QopConfiguration' => '',
'AuthenticationType' => '',
'SimpleUser' => '',
'KerberosPrincipal' => '',
'KerberosKeytab' => '',
'KerberosKrb5Conf' => '',
'AgentArns' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'LocationArn' => '',
'Subdirectory' => '',
'NameNodes' => '',
'BlockSize' => '',
'ReplicationFactor' => '',
'KmsKeyProviderUri' => '',
'QopConfiguration' => '',
'AuthenticationType' => '',
'SimpleUser' => '',
'KerberosPrincipal' => '',
'KerberosKeytab' => '',
'KerberosKrb5Conf' => '',
'AgentArns' => ''
]));
$request->setRequestUrl('{{baseUrl}}/#X-Amz-Target=FmrsService.UpdateLocationHdfs');
$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=FmrsService.UpdateLocationHdfs' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"LocationArn": "",
"Subdirectory": "",
"NameNodes": "",
"BlockSize": "",
"ReplicationFactor": "",
"KmsKeyProviderUri": "",
"QopConfiguration": "",
"AuthenticationType": "",
"SimpleUser": "",
"KerberosPrincipal": "",
"KerberosKeytab": "",
"KerberosKrb5Conf": "",
"AgentArns": ""
}'
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/#X-Amz-Target=FmrsService.UpdateLocationHdfs' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"LocationArn": "",
"Subdirectory": "",
"NameNodes": "",
"BlockSize": "",
"ReplicationFactor": "",
"KmsKeyProviderUri": "",
"QopConfiguration": "",
"AuthenticationType": "",
"SimpleUser": "",
"KerberosPrincipal": "",
"KerberosKeytab": "",
"KerberosKrb5Conf": "",
"AgentArns": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"LocationArn\": \"\",\n \"Subdirectory\": \"\",\n \"NameNodes\": \"\",\n \"BlockSize\": \"\",\n \"ReplicationFactor\": \"\",\n \"KmsKeyProviderUri\": \"\",\n \"QopConfiguration\": \"\",\n \"AuthenticationType\": \"\",\n \"SimpleUser\": \"\",\n \"KerberosPrincipal\": \"\",\n \"KerberosKeytab\": \"\",\n \"KerberosKrb5Conf\": \"\",\n \"AgentArns\": \"\"\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=FmrsService.UpdateLocationHdfs"
payload = {
"LocationArn": "",
"Subdirectory": "",
"NameNodes": "",
"BlockSize": "",
"ReplicationFactor": "",
"KmsKeyProviderUri": "",
"QopConfiguration": "",
"AuthenticationType": "",
"SimpleUser": "",
"KerberosPrincipal": "",
"KerberosKeytab": "",
"KerberosKrb5Conf": "",
"AgentArns": ""
}
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=FmrsService.UpdateLocationHdfs"
payload <- "{\n \"LocationArn\": \"\",\n \"Subdirectory\": \"\",\n \"NameNodes\": \"\",\n \"BlockSize\": \"\",\n \"ReplicationFactor\": \"\",\n \"KmsKeyProviderUri\": \"\",\n \"QopConfiguration\": \"\",\n \"AuthenticationType\": \"\",\n \"SimpleUser\": \"\",\n \"KerberosPrincipal\": \"\",\n \"KerberosKeytab\": \"\",\n \"KerberosKrb5Conf\": \"\",\n \"AgentArns\": \"\"\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=FmrsService.UpdateLocationHdfs")
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 \"LocationArn\": \"\",\n \"Subdirectory\": \"\",\n \"NameNodes\": \"\",\n \"BlockSize\": \"\",\n \"ReplicationFactor\": \"\",\n \"KmsKeyProviderUri\": \"\",\n \"QopConfiguration\": \"\",\n \"AuthenticationType\": \"\",\n \"SimpleUser\": \"\",\n \"KerberosPrincipal\": \"\",\n \"KerberosKeytab\": \"\",\n \"KerberosKrb5Conf\": \"\",\n \"AgentArns\": \"\"\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 \"LocationArn\": \"\",\n \"Subdirectory\": \"\",\n \"NameNodes\": \"\",\n \"BlockSize\": \"\",\n \"ReplicationFactor\": \"\",\n \"KmsKeyProviderUri\": \"\",\n \"QopConfiguration\": \"\",\n \"AuthenticationType\": \"\",\n \"SimpleUser\": \"\",\n \"KerberosPrincipal\": \"\",\n \"KerberosKeytab\": \"\",\n \"KerberosKrb5Conf\": \"\",\n \"AgentArns\": \"\"\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=FmrsService.UpdateLocationHdfs";
let payload = json!({
"LocationArn": "",
"Subdirectory": "",
"NameNodes": "",
"BlockSize": "",
"ReplicationFactor": "",
"KmsKeyProviderUri": "",
"QopConfiguration": "",
"AuthenticationType": "",
"SimpleUser": "",
"KerberosPrincipal": "",
"KerberosKeytab": "",
"KerberosKrb5Conf": "",
"AgentArns": ""
});
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=FmrsService.UpdateLocationHdfs' \
--header 'content-type: application/json' \
--header 'x-amz-target: ' \
--data '{
"LocationArn": "",
"Subdirectory": "",
"NameNodes": "",
"BlockSize": "",
"ReplicationFactor": "",
"KmsKeyProviderUri": "",
"QopConfiguration": "",
"AuthenticationType": "",
"SimpleUser": "",
"KerberosPrincipal": "",
"KerberosKeytab": "",
"KerberosKrb5Conf": "",
"AgentArns": ""
}'
echo '{
"LocationArn": "",
"Subdirectory": "",
"NameNodes": "",
"BlockSize": "",
"ReplicationFactor": "",
"KmsKeyProviderUri": "",
"QopConfiguration": "",
"AuthenticationType": "",
"SimpleUser": "",
"KerberosPrincipal": "",
"KerberosKeytab": "",
"KerberosKrb5Conf": "",
"AgentArns": ""
}' | \
http POST '{{baseUrl}}/#X-Amz-Target=FmrsService.UpdateLocationHdfs' \
content-type:application/json \
x-amz-target:''
wget --quiet \
--method POST \
--header 'x-amz-target: ' \
--header 'content-type: application/json' \
--body-data '{\n "LocationArn": "",\n "Subdirectory": "",\n "NameNodes": "",\n "BlockSize": "",\n "ReplicationFactor": "",\n "KmsKeyProviderUri": "",\n "QopConfiguration": "",\n "AuthenticationType": "",\n "SimpleUser": "",\n "KerberosPrincipal": "",\n "KerberosKeytab": "",\n "KerberosKrb5Conf": "",\n "AgentArns": ""\n}' \
--output-document \
- '{{baseUrl}}/#X-Amz-Target=FmrsService.UpdateLocationHdfs'
import Foundation
let headers = [
"x-amz-target": "",
"content-type": "application/json"
]
let parameters = [
"LocationArn": "",
"Subdirectory": "",
"NameNodes": "",
"BlockSize": "",
"ReplicationFactor": "",
"KmsKeyProviderUri": "",
"QopConfiguration": "",
"AuthenticationType": "",
"SimpleUser": "",
"KerberosPrincipal": "",
"KerberosKeytab": "",
"KerberosKrb5Conf": "",
"AgentArns": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/#X-Amz-Target=FmrsService.UpdateLocationHdfs")! 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
UpdateLocationNfs
{{baseUrl}}/#X-Amz-Target=FmrsService.UpdateLocationNfs
HEADERS
X-Amz-Target
BODY json
{
"LocationArn": "",
"Subdirectory": "",
"OnPremConfig": {
"AgentArns": ""
},
"MountOptions": {
"Version": ""
}
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/#X-Amz-Target=FmrsService.UpdateLocationNfs");
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 \"LocationArn\": \"\",\n \"Subdirectory\": \"\",\n \"OnPremConfig\": {\n \"AgentArns\": \"\"\n },\n \"MountOptions\": {\n \"Version\": \"\"\n }\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/#X-Amz-Target=FmrsService.UpdateLocationNfs" {:headers {:x-amz-target ""}
:content-type :json
:form-params {:LocationArn ""
:Subdirectory ""
:OnPremConfig {:AgentArns ""}
:MountOptions {:Version ""}}})
require "http/client"
url = "{{baseUrl}}/#X-Amz-Target=FmrsService.UpdateLocationNfs"
headers = HTTP::Headers{
"x-amz-target" => ""
"content-type" => "application/json"
}
reqBody = "{\n \"LocationArn\": \"\",\n \"Subdirectory\": \"\",\n \"OnPremConfig\": {\n \"AgentArns\": \"\"\n },\n \"MountOptions\": {\n \"Version\": \"\"\n }\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/#X-Amz-Target=FmrsService.UpdateLocationNfs"),
Headers =
{
{ "x-amz-target", "" },
},
Content = new StringContent("{\n \"LocationArn\": \"\",\n \"Subdirectory\": \"\",\n \"OnPremConfig\": {\n \"AgentArns\": \"\"\n },\n \"MountOptions\": {\n \"Version\": \"\"\n }\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/#X-Amz-Target=FmrsService.UpdateLocationNfs");
var request = new RestRequest("", Method.Post);
request.AddHeader("x-amz-target", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"LocationArn\": \"\",\n \"Subdirectory\": \"\",\n \"OnPremConfig\": {\n \"AgentArns\": \"\"\n },\n \"MountOptions\": {\n \"Version\": \"\"\n }\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/#X-Amz-Target=FmrsService.UpdateLocationNfs"
payload := strings.NewReader("{\n \"LocationArn\": \"\",\n \"Subdirectory\": \"\",\n \"OnPremConfig\": {\n \"AgentArns\": \"\"\n },\n \"MountOptions\": {\n \"Version\": \"\"\n }\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: 133
{
"LocationArn": "",
"Subdirectory": "",
"OnPremConfig": {
"AgentArns": ""
},
"MountOptions": {
"Version": ""
}
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/#X-Amz-Target=FmrsService.UpdateLocationNfs")
.setHeader("x-amz-target", "")
.setHeader("content-type", "application/json")
.setBody("{\n \"LocationArn\": \"\",\n \"Subdirectory\": \"\",\n \"OnPremConfig\": {\n \"AgentArns\": \"\"\n },\n \"MountOptions\": {\n \"Version\": \"\"\n }\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/#X-Amz-Target=FmrsService.UpdateLocationNfs"))
.header("x-amz-target", "")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"LocationArn\": \"\",\n \"Subdirectory\": \"\",\n \"OnPremConfig\": {\n \"AgentArns\": \"\"\n },\n \"MountOptions\": {\n \"Version\": \"\"\n }\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"LocationArn\": \"\",\n \"Subdirectory\": \"\",\n \"OnPremConfig\": {\n \"AgentArns\": \"\"\n },\n \"MountOptions\": {\n \"Version\": \"\"\n }\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=FmrsService.UpdateLocationNfs")
.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=FmrsService.UpdateLocationNfs")
.header("x-amz-target", "")
.header("content-type", "application/json")
.body("{\n \"LocationArn\": \"\",\n \"Subdirectory\": \"\",\n \"OnPremConfig\": {\n \"AgentArns\": \"\"\n },\n \"MountOptions\": {\n \"Version\": \"\"\n }\n}")
.asString();
const data = JSON.stringify({
LocationArn: '',
Subdirectory: '',
OnPremConfig: {
AgentArns: ''
},
MountOptions: {
Version: ''
}
});
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=FmrsService.UpdateLocationNfs');
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=FmrsService.UpdateLocationNfs',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {
LocationArn: '',
Subdirectory: '',
OnPremConfig: {AgentArns: ''},
MountOptions: {Version: ''}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/#X-Amz-Target=FmrsService.UpdateLocationNfs';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"LocationArn":"","Subdirectory":"","OnPremConfig":{"AgentArns":""},"MountOptions":{"Version":""}}'
};
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=FmrsService.UpdateLocationNfs',
method: 'POST',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
},
processData: false,
data: '{\n "LocationArn": "",\n "Subdirectory": "",\n "OnPremConfig": {\n "AgentArns": ""\n },\n "MountOptions": {\n "Version": ""\n }\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"LocationArn\": \"\",\n \"Subdirectory\": \"\",\n \"OnPremConfig\": {\n \"AgentArns\": \"\"\n },\n \"MountOptions\": {\n \"Version\": \"\"\n }\n}")
val request = Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=FmrsService.UpdateLocationNfs")
.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({
LocationArn: '',
Subdirectory: '',
OnPremConfig: {AgentArns: ''},
MountOptions: {Version: ''}
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=FmrsService.UpdateLocationNfs',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: {
LocationArn: '',
Subdirectory: '',
OnPremConfig: {AgentArns: ''},
MountOptions: {Version: ''}
},
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=FmrsService.UpdateLocationNfs');
req.headers({
'x-amz-target': '',
'content-type': 'application/json'
});
req.type('json');
req.send({
LocationArn: '',
Subdirectory: '',
OnPremConfig: {
AgentArns: ''
},
MountOptions: {
Version: ''
}
});
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=FmrsService.UpdateLocationNfs',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {
LocationArn: '',
Subdirectory: '',
OnPremConfig: {AgentArns: ''},
MountOptions: {Version: ''}
}
};
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=FmrsService.UpdateLocationNfs';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"LocationArn":"","Subdirectory":"","OnPremConfig":{"AgentArns":""},"MountOptions":{"Version":""}}'
};
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 = @{ @"LocationArn": @"",
@"Subdirectory": @"",
@"OnPremConfig": @{ @"AgentArns": @"" },
@"MountOptions": @{ @"Version": @"" } };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/#X-Amz-Target=FmrsService.UpdateLocationNfs"]
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=FmrsService.UpdateLocationNfs" in
let headers = Header.add_list (Header.init ()) [
("x-amz-target", "");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"LocationArn\": \"\",\n \"Subdirectory\": \"\",\n \"OnPremConfig\": {\n \"AgentArns\": \"\"\n },\n \"MountOptions\": {\n \"Version\": \"\"\n }\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/#X-Amz-Target=FmrsService.UpdateLocationNfs",
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([
'LocationArn' => '',
'Subdirectory' => '',
'OnPremConfig' => [
'AgentArns' => ''
],
'MountOptions' => [
'Version' => ''
]
]),
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=FmrsService.UpdateLocationNfs', [
'body' => '{
"LocationArn": "",
"Subdirectory": "",
"OnPremConfig": {
"AgentArns": ""
},
"MountOptions": {
"Version": ""
}
}',
'headers' => [
'content-type' => 'application/json',
'x-amz-target' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/#X-Amz-Target=FmrsService.UpdateLocationNfs');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'LocationArn' => '',
'Subdirectory' => '',
'OnPremConfig' => [
'AgentArns' => ''
],
'MountOptions' => [
'Version' => ''
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'LocationArn' => '',
'Subdirectory' => '',
'OnPremConfig' => [
'AgentArns' => ''
],
'MountOptions' => [
'Version' => ''
]
]));
$request->setRequestUrl('{{baseUrl}}/#X-Amz-Target=FmrsService.UpdateLocationNfs');
$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=FmrsService.UpdateLocationNfs' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"LocationArn": "",
"Subdirectory": "",
"OnPremConfig": {
"AgentArns": ""
},
"MountOptions": {
"Version": ""
}
}'
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/#X-Amz-Target=FmrsService.UpdateLocationNfs' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"LocationArn": "",
"Subdirectory": "",
"OnPremConfig": {
"AgentArns": ""
},
"MountOptions": {
"Version": ""
}
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"LocationArn\": \"\",\n \"Subdirectory\": \"\",\n \"OnPremConfig\": {\n \"AgentArns\": \"\"\n },\n \"MountOptions\": {\n \"Version\": \"\"\n }\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=FmrsService.UpdateLocationNfs"
payload = {
"LocationArn": "",
"Subdirectory": "",
"OnPremConfig": { "AgentArns": "" },
"MountOptions": { "Version": "" }
}
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=FmrsService.UpdateLocationNfs"
payload <- "{\n \"LocationArn\": \"\",\n \"Subdirectory\": \"\",\n \"OnPremConfig\": {\n \"AgentArns\": \"\"\n },\n \"MountOptions\": {\n \"Version\": \"\"\n }\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=FmrsService.UpdateLocationNfs")
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 \"LocationArn\": \"\",\n \"Subdirectory\": \"\",\n \"OnPremConfig\": {\n \"AgentArns\": \"\"\n },\n \"MountOptions\": {\n \"Version\": \"\"\n }\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/') do |req|
req.headers['x-amz-target'] = ''
req.body = "{\n \"LocationArn\": \"\",\n \"Subdirectory\": \"\",\n \"OnPremConfig\": {\n \"AgentArns\": \"\"\n },\n \"MountOptions\": {\n \"Version\": \"\"\n }\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=FmrsService.UpdateLocationNfs";
let payload = json!({
"LocationArn": "",
"Subdirectory": "",
"OnPremConfig": json!({"AgentArns": ""}),
"MountOptions": json!({"Version": ""})
});
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=FmrsService.UpdateLocationNfs' \
--header 'content-type: application/json' \
--header 'x-amz-target: ' \
--data '{
"LocationArn": "",
"Subdirectory": "",
"OnPremConfig": {
"AgentArns": ""
},
"MountOptions": {
"Version": ""
}
}'
echo '{
"LocationArn": "",
"Subdirectory": "",
"OnPremConfig": {
"AgentArns": ""
},
"MountOptions": {
"Version": ""
}
}' | \
http POST '{{baseUrl}}/#X-Amz-Target=FmrsService.UpdateLocationNfs' \
content-type:application/json \
x-amz-target:''
wget --quiet \
--method POST \
--header 'x-amz-target: ' \
--header 'content-type: application/json' \
--body-data '{\n "LocationArn": "",\n "Subdirectory": "",\n "OnPremConfig": {\n "AgentArns": ""\n },\n "MountOptions": {\n "Version": ""\n }\n}' \
--output-document \
- '{{baseUrl}}/#X-Amz-Target=FmrsService.UpdateLocationNfs'
import Foundation
let headers = [
"x-amz-target": "",
"content-type": "application/json"
]
let parameters = [
"LocationArn": "",
"Subdirectory": "",
"OnPremConfig": ["AgentArns": ""],
"MountOptions": ["Version": ""]
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/#X-Amz-Target=FmrsService.UpdateLocationNfs")! 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
UpdateLocationObjectStorage
{{baseUrl}}/#X-Amz-Target=FmrsService.UpdateLocationObjectStorage
HEADERS
X-Amz-Target
BODY json
{
"LocationArn": "",
"ServerPort": "",
"ServerProtocol": "",
"Subdirectory": "",
"AccessKey": "",
"SecretKey": "",
"AgentArns": "",
"ServerCertificate": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/#X-Amz-Target=FmrsService.UpdateLocationObjectStorage");
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 \"LocationArn\": \"\",\n \"ServerPort\": \"\",\n \"ServerProtocol\": \"\",\n \"Subdirectory\": \"\",\n \"AccessKey\": \"\",\n \"SecretKey\": \"\",\n \"AgentArns\": \"\",\n \"ServerCertificate\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/#X-Amz-Target=FmrsService.UpdateLocationObjectStorage" {:headers {:x-amz-target ""}
:content-type :json
:form-params {:LocationArn ""
:ServerPort ""
:ServerProtocol ""
:Subdirectory ""
:AccessKey ""
:SecretKey ""
:AgentArns ""
:ServerCertificate ""}})
require "http/client"
url = "{{baseUrl}}/#X-Amz-Target=FmrsService.UpdateLocationObjectStorage"
headers = HTTP::Headers{
"x-amz-target" => ""
"content-type" => "application/json"
}
reqBody = "{\n \"LocationArn\": \"\",\n \"ServerPort\": \"\",\n \"ServerProtocol\": \"\",\n \"Subdirectory\": \"\",\n \"AccessKey\": \"\",\n \"SecretKey\": \"\",\n \"AgentArns\": \"\",\n \"ServerCertificate\": \"\"\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=FmrsService.UpdateLocationObjectStorage"),
Headers =
{
{ "x-amz-target", "" },
},
Content = new StringContent("{\n \"LocationArn\": \"\",\n \"ServerPort\": \"\",\n \"ServerProtocol\": \"\",\n \"Subdirectory\": \"\",\n \"AccessKey\": \"\",\n \"SecretKey\": \"\",\n \"AgentArns\": \"\",\n \"ServerCertificate\": \"\"\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=FmrsService.UpdateLocationObjectStorage");
var request = new RestRequest("", Method.Post);
request.AddHeader("x-amz-target", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"LocationArn\": \"\",\n \"ServerPort\": \"\",\n \"ServerProtocol\": \"\",\n \"Subdirectory\": \"\",\n \"AccessKey\": \"\",\n \"SecretKey\": \"\",\n \"AgentArns\": \"\",\n \"ServerCertificate\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/#X-Amz-Target=FmrsService.UpdateLocationObjectStorage"
payload := strings.NewReader("{\n \"LocationArn\": \"\",\n \"ServerPort\": \"\",\n \"ServerProtocol\": \"\",\n \"Subdirectory\": \"\",\n \"AccessKey\": \"\",\n \"SecretKey\": \"\",\n \"AgentArns\": \"\",\n \"ServerCertificate\": \"\"\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: 173
{
"LocationArn": "",
"ServerPort": "",
"ServerProtocol": "",
"Subdirectory": "",
"AccessKey": "",
"SecretKey": "",
"AgentArns": "",
"ServerCertificate": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/#X-Amz-Target=FmrsService.UpdateLocationObjectStorage")
.setHeader("x-amz-target", "")
.setHeader("content-type", "application/json")
.setBody("{\n \"LocationArn\": \"\",\n \"ServerPort\": \"\",\n \"ServerProtocol\": \"\",\n \"Subdirectory\": \"\",\n \"AccessKey\": \"\",\n \"SecretKey\": \"\",\n \"AgentArns\": \"\",\n \"ServerCertificate\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/#X-Amz-Target=FmrsService.UpdateLocationObjectStorage"))
.header("x-amz-target", "")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"LocationArn\": \"\",\n \"ServerPort\": \"\",\n \"ServerProtocol\": \"\",\n \"Subdirectory\": \"\",\n \"AccessKey\": \"\",\n \"SecretKey\": \"\",\n \"AgentArns\": \"\",\n \"ServerCertificate\": \"\"\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 \"LocationArn\": \"\",\n \"ServerPort\": \"\",\n \"ServerProtocol\": \"\",\n \"Subdirectory\": \"\",\n \"AccessKey\": \"\",\n \"SecretKey\": \"\",\n \"AgentArns\": \"\",\n \"ServerCertificate\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=FmrsService.UpdateLocationObjectStorage")
.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=FmrsService.UpdateLocationObjectStorage")
.header("x-amz-target", "")
.header("content-type", "application/json")
.body("{\n \"LocationArn\": \"\",\n \"ServerPort\": \"\",\n \"ServerProtocol\": \"\",\n \"Subdirectory\": \"\",\n \"AccessKey\": \"\",\n \"SecretKey\": \"\",\n \"AgentArns\": \"\",\n \"ServerCertificate\": \"\"\n}")
.asString();
const data = JSON.stringify({
LocationArn: '',
ServerPort: '',
ServerProtocol: '',
Subdirectory: '',
AccessKey: '',
SecretKey: '',
AgentArns: '',
ServerCertificate: ''
});
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=FmrsService.UpdateLocationObjectStorage');
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=FmrsService.UpdateLocationObjectStorage',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {
LocationArn: '',
ServerPort: '',
ServerProtocol: '',
Subdirectory: '',
AccessKey: '',
SecretKey: '',
AgentArns: '',
ServerCertificate: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/#X-Amz-Target=FmrsService.UpdateLocationObjectStorage';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"LocationArn":"","ServerPort":"","ServerProtocol":"","Subdirectory":"","AccessKey":"","SecretKey":"","AgentArns":"","ServerCertificate":""}'
};
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=FmrsService.UpdateLocationObjectStorage',
method: 'POST',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
},
processData: false,
data: '{\n "LocationArn": "",\n "ServerPort": "",\n "ServerProtocol": "",\n "Subdirectory": "",\n "AccessKey": "",\n "SecretKey": "",\n "AgentArns": "",\n "ServerCertificate": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"LocationArn\": \"\",\n \"ServerPort\": \"\",\n \"ServerProtocol\": \"\",\n \"Subdirectory\": \"\",\n \"AccessKey\": \"\",\n \"SecretKey\": \"\",\n \"AgentArns\": \"\",\n \"ServerCertificate\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=FmrsService.UpdateLocationObjectStorage")
.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({
LocationArn: '',
ServerPort: '',
ServerProtocol: '',
Subdirectory: '',
AccessKey: '',
SecretKey: '',
AgentArns: '',
ServerCertificate: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=FmrsService.UpdateLocationObjectStorage',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: {
LocationArn: '',
ServerPort: '',
ServerProtocol: '',
Subdirectory: '',
AccessKey: '',
SecretKey: '',
AgentArns: '',
ServerCertificate: ''
},
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=FmrsService.UpdateLocationObjectStorage');
req.headers({
'x-amz-target': '',
'content-type': 'application/json'
});
req.type('json');
req.send({
LocationArn: '',
ServerPort: '',
ServerProtocol: '',
Subdirectory: '',
AccessKey: '',
SecretKey: '',
AgentArns: '',
ServerCertificate: ''
});
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=FmrsService.UpdateLocationObjectStorage',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {
LocationArn: '',
ServerPort: '',
ServerProtocol: '',
Subdirectory: '',
AccessKey: '',
SecretKey: '',
AgentArns: '',
ServerCertificate: ''
}
};
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=FmrsService.UpdateLocationObjectStorage';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"LocationArn":"","ServerPort":"","ServerProtocol":"","Subdirectory":"","AccessKey":"","SecretKey":"","AgentArns":"","ServerCertificate":""}'
};
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 = @{ @"LocationArn": @"",
@"ServerPort": @"",
@"ServerProtocol": @"",
@"Subdirectory": @"",
@"AccessKey": @"",
@"SecretKey": @"",
@"AgentArns": @"",
@"ServerCertificate": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/#X-Amz-Target=FmrsService.UpdateLocationObjectStorage"]
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=FmrsService.UpdateLocationObjectStorage" in
let headers = Header.add_list (Header.init ()) [
("x-amz-target", "");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"LocationArn\": \"\",\n \"ServerPort\": \"\",\n \"ServerProtocol\": \"\",\n \"Subdirectory\": \"\",\n \"AccessKey\": \"\",\n \"SecretKey\": \"\",\n \"AgentArns\": \"\",\n \"ServerCertificate\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/#X-Amz-Target=FmrsService.UpdateLocationObjectStorage",
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([
'LocationArn' => '',
'ServerPort' => '',
'ServerProtocol' => '',
'Subdirectory' => '',
'AccessKey' => '',
'SecretKey' => '',
'AgentArns' => '',
'ServerCertificate' => ''
]),
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=FmrsService.UpdateLocationObjectStorage', [
'body' => '{
"LocationArn": "",
"ServerPort": "",
"ServerProtocol": "",
"Subdirectory": "",
"AccessKey": "",
"SecretKey": "",
"AgentArns": "",
"ServerCertificate": ""
}',
'headers' => [
'content-type' => 'application/json',
'x-amz-target' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/#X-Amz-Target=FmrsService.UpdateLocationObjectStorage');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'LocationArn' => '',
'ServerPort' => '',
'ServerProtocol' => '',
'Subdirectory' => '',
'AccessKey' => '',
'SecretKey' => '',
'AgentArns' => '',
'ServerCertificate' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'LocationArn' => '',
'ServerPort' => '',
'ServerProtocol' => '',
'Subdirectory' => '',
'AccessKey' => '',
'SecretKey' => '',
'AgentArns' => '',
'ServerCertificate' => ''
]));
$request->setRequestUrl('{{baseUrl}}/#X-Amz-Target=FmrsService.UpdateLocationObjectStorage');
$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=FmrsService.UpdateLocationObjectStorage' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"LocationArn": "",
"ServerPort": "",
"ServerProtocol": "",
"Subdirectory": "",
"AccessKey": "",
"SecretKey": "",
"AgentArns": "",
"ServerCertificate": ""
}'
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/#X-Amz-Target=FmrsService.UpdateLocationObjectStorage' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"LocationArn": "",
"ServerPort": "",
"ServerProtocol": "",
"Subdirectory": "",
"AccessKey": "",
"SecretKey": "",
"AgentArns": "",
"ServerCertificate": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"LocationArn\": \"\",\n \"ServerPort\": \"\",\n \"ServerProtocol\": \"\",\n \"Subdirectory\": \"\",\n \"AccessKey\": \"\",\n \"SecretKey\": \"\",\n \"AgentArns\": \"\",\n \"ServerCertificate\": \"\"\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=FmrsService.UpdateLocationObjectStorage"
payload = {
"LocationArn": "",
"ServerPort": "",
"ServerProtocol": "",
"Subdirectory": "",
"AccessKey": "",
"SecretKey": "",
"AgentArns": "",
"ServerCertificate": ""
}
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=FmrsService.UpdateLocationObjectStorage"
payload <- "{\n \"LocationArn\": \"\",\n \"ServerPort\": \"\",\n \"ServerProtocol\": \"\",\n \"Subdirectory\": \"\",\n \"AccessKey\": \"\",\n \"SecretKey\": \"\",\n \"AgentArns\": \"\",\n \"ServerCertificate\": \"\"\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=FmrsService.UpdateLocationObjectStorage")
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 \"LocationArn\": \"\",\n \"ServerPort\": \"\",\n \"ServerProtocol\": \"\",\n \"Subdirectory\": \"\",\n \"AccessKey\": \"\",\n \"SecretKey\": \"\",\n \"AgentArns\": \"\",\n \"ServerCertificate\": \"\"\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 \"LocationArn\": \"\",\n \"ServerPort\": \"\",\n \"ServerProtocol\": \"\",\n \"Subdirectory\": \"\",\n \"AccessKey\": \"\",\n \"SecretKey\": \"\",\n \"AgentArns\": \"\",\n \"ServerCertificate\": \"\"\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=FmrsService.UpdateLocationObjectStorage";
let payload = json!({
"LocationArn": "",
"ServerPort": "",
"ServerProtocol": "",
"Subdirectory": "",
"AccessKey": "",
"SecretKey": "",
"AgentArns": "",
"ServerCertificate": ""
});
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=FmrsService.UpdateLocationObjectStorage' \
--header 'content-type: application/json' \
--header 'x-amz-target: ' \
--data '{
"LocationArn": "",
"ServerPort": "",
"ServerProtocol": "",
"Subdirectory": "",
"AccessKey": "",
"SecretKey": "",
"AgentArns": "",
"ServerCertificate": ""
}'
echo '{
"LocationArn": "",
"ServerPort": "",
"ServerProtocol": "",
"Subdirectory": "",
"AccessKey": "",
"SecretKey": "",
"AgentArns": "",
"ServerCertificate": ""
}' | \
http POST '{{baseUrl}}/#X-Amz-Target=FmrsService.UpdateLocationObjectStorage' \
content-type:application/json \
x-amz-target:''
wget --quiet \
--method POST \
--header 'x-amz-target: ' \
--header 'content-type: application/json' \
--body-data '{\n "LocationArn": "",\n "ServerPort": "",\n "ServerProtocol": "",\n "Subdirectory": "",\n "AccessKey": "",\n "SecretKey": "",\n "AgentArns": "",\n "ServerCertificate": ""\n}' \
--output-document \
- '{{baseUrl}}/#X-Amz-Target=FmrsService.UpdateLocationObjectStorage'
import Foundation
let headers = [
"x-amz-target": "",
"content-type": "application/json"
]
let parameters = [
"LocationArn": "",
"ServerPort": "",
"ServerProtocol": "",
"Subdirectory": "",
"AccessKey": "",
"SecretKey": "",
"AgentArns": "",
"ServerCertificate": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/#X-Amz-Target=FmrsService.UpdateLocationObjectStorage")! 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
UpdateLocationSmb
{{baseUrl}}/#X-Amz-Target=FmrsService.UpdateLocationSmb
HEADERS
X-Amz-Target
BODY json
{
"LocationArn": "",
"Subdirectory": "",
"User": "",
"Domain": "",
"Password": "",
"AgentArns": "",
"MountOptions": {
"Version": ""
}
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/#X-Amz-Target=FmrsService.UpdateLocationSmb");
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 \"LocationArn\": \"\",\n \"Subdirectory\": \"\",\n \"User\": \"\",\n \"Domain\": \"\",\n \"Password\": \"\",\n \"AgentArns\": \"\",\n \"MountOptions\": {\n \"Version\": \"\"\n }\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/#X-Amz-Target=FmrsService.UpdateLocationSmb" {:headers {:x-amz-target ""}
:content-type :json
:form-params {:LocationArn ""
:Subdirectory ""
:User ""
:Domain ""
:Password ""
:AgentArns ""
:MountOptions {:Version ""}}})
require "http/client"
url = "{{baseUrl}}/#X-Amz-Target=FmrsService.UpdateLocationSmb"
headers = HTTP::Headers{
"x-amz-target" => ""
"content-type" => "application/json"
}
reqBody = "{\n \"LocationArn\": \"\",\n \"Subdirectory\": \"\",\n \"User\": \"\",\n \"Domain\": \"\",\n \"Password\": \"\",\n \"AgentArns\": \"\",\n \"MountOptions\": {\n \"Version\": \"\"\n }\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/#X-Amz-Target=FmrsService.UpdateLocationSmb"),
Headers =
{
{ "x-amz-target", "" },
},
Content = new StringContent("{\n \"LocationArn\": \"\",\n \"Subdirectory\": \"\",\n \"User\": \"\",\n \"Domain\": \"\",\n \"Password\": \"\",\n \"AgentArns\": \"\",\n \"MountOptions\": {\n \"Version\": \"\"\n }\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/#X-Amz-Target=FmrsService.UpdateLocationSmb");
var request = new RestRequest("", Method.Post);
request.AddHeader("x-amz-target", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"LocationArn\": \"\",\n \"Subdirectory\": \"\",\n \"User\": \"\",\n \"Domain\": \"\",\n \"Password\": \"\",\n \"AgentArns\": \"\",\n \"MountOptions\": {\n \"Version\": \"\"\n }\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/#X-Amz-Target=FmrsService.UpdateLocationSmb"
payload := strings.NewReader("{\n \"LocationArn\": \"\",\n \"Subdirectory\": \"\",\n \"User\": \"\",\n \"Domain\": \"\",\n \"Password\": \"\",\n \"AgentArns\": \"\",\n \"MountOptions\": {\n \"Version\": \"\"\n }\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: 155
{
"LocationArn": "",
"Subdirectory": "",
"User": "",
"Domain": "",
"Password": "",
"AgentArns": "",
"MountOptions": {
"Version": ""
}
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/#X-Amz-Target=FmrsService.UpdateLocationSmb")
.setHeader("x-amz-target", "")
.setHeader("content-type", "application/json")
.setBody("{\n \"LocationArn\": \"\",\n \"Subdirectory\": \"\",\n \"User\": \"\",\n \"Domain\": \"\",\n \"Password\": \"\",\n \"AgentArns\": \"\",\n \"MountOptions\": {\n \"Version\": \"\"\n }\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/#X-Amz-Target=FmrsService.UpdateLocationSmb"))
.header("x-amz-target", "")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"LocationArn\": \"\",\n \"Subdirectory\": \"\",\n \"User\": \"\",\n \"Domain\": \"\",\n \"Password\": \"\",\n \"AgentArns\": \"\",\n \"MountOptions\": {\n \"Version\": \"\"\n }\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"LocationArn\": \"\",\n \"Subdirectory\": \"\",\n \"User\": \"\",\n \"Domain\": \"\",\n \"Password\": \"\",\n \"AgentArns\": \"\",\n \"MountOptions\": {\n \"Version\": \"\"\n }\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=FmrsService.UpdateLocationSmb")
.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=FmrsService.UpdateLocationSmb")
.header("x-amz-target", "")
.header("content-type", "application/json")
.body("{\n \"LocationArn\": \"\",\n \"Subdirectory\": \"\",\n \"User\": \"\",\n \"Domain\": \"\",\n \"Password\": \"\",\n \"AgentArns\": \"\",\n \"MountOptions\": {\n \"Version\": \"\"\n }\n}")
.asString();
const data = JSON.stringify({
LocationArn: '',
Subdirectory: '',
User: '',
Domain: '',
Password: '',
AgentArns: '',
MountOptions: {
Version: ''
}
});
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=FmrsService.UpdateLocationSmb');
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=FmrsService.UpdateLocationSmb',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {
LocationArn: '',
Subdirectory: '',
User: '',
Domain: '',
Password: '',
AgentArns: '',
MountOptions: {Version: ''}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/#X-Amz-Target=FmrsService.UpdateLocationSmb';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"LocationArn":"","Subdirectory":"","User":"","Domain":"","Password":"","AgentArns":"","MountOptions":{"Version":""}}'
};
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=FmrsService.UpdateLocationSmb',
method: 'POST',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
},
processData: false,
data: '{\n "LocationArn": "",\n "Subdirectory": "",\n "User": "",\n "Domain": "",\n "Password": "",\n "AgentArns": "",\n "MountOptions": {\n "Version": ""\n }\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"LocationArn\": \"\",\n \"Subdirectory\": \"\",\n \"User\": \"\",\n \"Domain\": \"\",\n \"Password\": \"\",\n \"AgentArns\": \"\",\n \"MountOptions\": {\n \"Version\": \"\"\n }\n}")
val request = Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=FmrsService.UpdateLocationSmb")
.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({
LocationArn: '',
Subdirectory: '',
User: '',
Domain: '',
Password: '',
AgentArns: '',
MountOptions: {Version: ''}
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=FmrsService.UpdateLocationSmb',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: {
LocationArn: '',
Subdirectory: '',
User: '',
Domain: '',
Password: '',
AgentArns: '',
MountOptions: {Version: ''}
},
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=FmrsService.UpdateLocationSmb');
req.headers({
'x-amz-target': '',
'content-type': 'application/json'
});
req.type('json');
req.send({
LocationArn: '',
Subdirectory: '',
User: '',
Domain: '',
Password: '',
AgentArns: '',
MountOptions: {
Version: ''
}
});
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=FmrsService.UpdateLocationSmb',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {
LocationArn: '',
Subdirectory: '',
User: '',
Domain: '',
Password: '',
AgentArns: '',
MountOptions: {Version: ''}
}
};
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=FmrsService.UpdateLocationSmb';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"LocationArn":"","Subdirectory":"","User":"","Domain":"","Password":"","AgentArns":"","MountOptions":{"Version":""}}'
};
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 = @{ @"LocationArn": @"",
@"Subdirectory": @"",
@"User": @"",
@"Domain": @"",
@"Password": @"",
@"AgentArns": @"",
@"MountOptions": @{ @"Version": @"" } };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/#X-Amz-Target=FmrsService.UpdateLocationSmb"]
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=FmrsService.UpdateLocationSmb" in
let headers = Header.add_list (Header.init ()) [
("x-amz-target", "");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"LocationArn\": \"\",\n \"Subdirectory\": \"\",\n \"User\": \"\",\n \"Domain\": \"\",\n \"Password\": \"\",\n \"AgentArns\": \"\",\n \"MountOptions\": {\n \"Version\": \"\"\n }\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/#X-Amz-Target=FmrsService.UpdateLocationSmb",
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([
'LocationArn' => '',
'Subdirectory' => '',
'User' => '',
'Domain' => '',
'Password' => '',
'AgentArns' => '',
'MountOptions' => [
'Version' => ''
]
]),
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=FmrsService.UpdateLocationSmb', [
'body' => '{
"LocationArn": "",
"Subdirectory": "",
"User": "",
"Domain": "",
"Password": "",
"AgentArns": "",
"MountOptions": {
"Version": ""
}
}',
'headers' => [
'content-type' => 'application/json',
'x-amz-target' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/#X-Amz-Target=FmrsService.UpdateLocationSmb');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'LocationArn' => '',
'Subdirectory' => '',
'User' => '',
'Domain' => '',
'Password' => '',
'AgentArns' => '',
'MountOptions' => [
'Version' => ''
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'LocationArn' => '',
'Subdirectory' => '',
'User' => '',
'Domain' => '',
'Password' => '',
'AgentArns' => '',
'MountOptions' => [
'Version' => ''
]
]));
$request->setRequestUrl('{{baseUrl}}/#X-Amz-Target=FmrsService.UpdateLocationSmb');
$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=FmrsService.UpdateLocationSmb' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"LocationArn": "",
"Subdirectory": "",
"User": "",
"Domain": "",
"Password": "",
"AgentArns": "",
"MountOptions": {
"Version": ""
}
}'
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/#X-Amz-Target=FmrsService.UpdateLocationSmb' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"LocationArn": "",
"Subdirectory": "",
"User": "",
"Domain": "",
"Password": "",
"AgentArns": "",
"MountOptions": {
"Version": ""
}
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"LocationArn\": \"\",\n \"Subdirectory\": \"\",\n \"User\": \"\",\n \"Domain\": \"\",\n \"Password\": \"\",\n \"AgentArns\": \"\",\n \"MountOptions\": {\n \"Version\": \"\"\n }\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=FmrsService.UpdateLocationSmb"
payload = {
"LocationArn": "",
"Subdirectory": "",
"User": "",
"Domain": "",
"Password": "",
"AgentArns": "",
"MountOptions": { "Version": "" }
}
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=FmrsService.UpdateLocationSmb"
payload <- "{\n \"LocationArn\": \"\",\n \"Subdirectory\": \"\",\n \"User\": \"\",\n \"Domain\": \"\",\n \"Password\": \"\",\n \"AgentArns\": \"\",\n \"MountOptions\": {\n \"Version\": \"\"\n }\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=FmrsService.UpdateLocationSmb")
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 \"LocationArn\": \"\",\n \"Subdirectory\": \"\",\n \"User\": \"\",\n \"Domain\": \"\",\n \"Password\": \"\",\n \"AgentArns\": \"\",\n \"MountOptions\": {\n \"Version\": \"\"\n }\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/') do |req|
req.headers['x-amz-target'] = ''
req.body = "{\n \"LocationArn\": \"\",\n \"Subdirectory\": \"\",\n \"User\": \"\",\n \"Domain\": \"\",\n \"Password\": \"\",\n \"AgentArns\": \"\",\n \"MountOptions\": {\n \"Version\": \"\"\n }\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=FmrsService.UpdateLocationSmb";
let payload = json!({
"LocationArn": "",
"Subdirectory": "",
"User": "",
"Domain": "",
"Password": "",
"AgentArns": "",
"MountOptions": json!({"Version": ""})
});
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=FmrsService.UpdateLocationSmb' \
--header 'content-type: application/json' \
--header 'x-amz-target: ' \
--data '{
"LocationArn": "",
"Subdirectory": "",
"User": "",
"Domain": "",
"Password": "",
"AgentArns": "",
"MountOptions": {
"Version": ""
}
}'
echo '{
"LocationArn": "",
"Subdirectory": "",
"User": "",
"Domain": "",
"Password": "",
"AgentArns": "",
"MountOptions": {
"Version": ""
}
}' | \
http POST '{{baseUrl}}/#X-Amz-Target=FmrsService.UpdateLocationSmb' \
content-type:application/json \
x-amz-target:''
wget --quiet \
--method POST \
--header 'x-amz-target: ' \
--header 'content-type: application/json' \
--body-data '{\n "LocationArn": "",\n "Subdirectory": "",\n "User": "",\n "Domain": "",\n "Password": "",\n "AgentArns": "",\n "MountOptions": {\n "Version": ""\n }\n}' \
--output-document \
- '{{baseUrl}}/#X-Amz-Target=FmrsService.UpdateLocationSmb'
import Foundation
let headers = [
"x-amz-target": "",
"content-type": "application/json"
]
let parameters = [
"LocationArn": "",
"Subdirectory": "",
"User": "",
"Domain": "",
"Password": "",
"AgentArns": "",
"MountOptions": ["Version": ""]
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/#X-Amz-Target=FmrsService.UpdateLocationSmb")! 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
UpdateTask
{{baseUrl}}/#X-Amz-Target=FmrsService.UpdateTask
HEADERS
X-Amz-Target
BODY json
{
"TaskArn": "",
"Options": {
"VerifyMode": "",
"OverwriteMode": "",
"Atime": "",
"Mtime": "",
"Uid": "",
"Gid": "",
"PreserveDeletedFiles": "",
"PreserveDevices": "",
"PosixPermissions": "",
"BytesPerSecond": "",
"TaskQueueing": "",
"LogLevel": "",
"TransferMode": "",
"SecurityDescriptorCopyFlags": "",
"ObjectTags": ""
},
"Excludes": "",
"Schedule": "",
"Name": "",
"CloudWatchLogGroupArn": "",
"Includes": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/#X-Amz-Target=FmrsService.UpdateTask");
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 \"TaskArn\": \"\",\n \"Options\": {\n \"VerifyMode\": \"\",\n \"OverwriteMode\": \"\",\n \"Atime\": \"\",\n \"Mtime\": \"\",\n \"Uid\": \"\",\n \"Gid\": \"\",\n \"PreserveDeletedFiles\": \"\",\n \"PreserveDevices\": \"\",\n \"PosixPermissions\": \"\",\n \"BytesPerSecond\": \"\",\n \"TaskQueueing\": \"\",\n \"LogLevel\": \"\",\n \"TransferMode\": \"\",\n \"SecurityDescriptorCopyFlags\": \"\",\n \"ObjectTags\": \"\"\n },\n \"Excludes\": \"\",\n \"Schedule\": \"\",\n \"Name\": \"\",\n \"CloudWatchLogGroupArn\": \"\",\n \"Includes\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/#X-Amz-Target=FmrsService.UpdateTask" {:headers {:x-amz-target ""}
:content-type :json
:form-params {:TaskArn ""
:Options {:VerifyMode ""
:OverwriteMode ""
:Atime ""
:Mtime ""
:Uid ""
:Gid ""
:PreserveDeletedFiles ""
:PreserveDevices ""
:PosixPermissions ""
:BytesPerSecond ""
:TaskQueueing ""
:LogLevel ""
:TransferMode ""
:SecurityDescriptorCopyFlags ""
:ObjectTags ""}
:Excludes ""
:Schedule ""
:Name ""
:CloudWatchLogGroupArn ""
:Includes ""}})
require "http/client"
url = "{{baseUrl}}/#X-Amz-Target=FmrsService.UpdateTask"
headers = HTTP::Headers{
"x-amz-target" => ""
"content-type" => "application/json"
}
reqBody = "{\n \"TaskArn\": \"\",\n \"Options\": {\n \"VerifyMode\": \"\",\n \"OverwriteMode\": \"\",\n \"Atime\": \"\",\n \"Mtime\": \"\",\n \"Uid\": \"\",\n \"Gid\": \"\",\n \"PreserveDeletedFiles\": \"\",\n \"PreserveDevices\": \"\",\n \"PosixPermissions\": \"\",\n \"BytesPerSecond\": \"\",\n \"TaskQueueing\": \"\",\n \"LogLevel\": \"\",\n \"TransferMode\": \"\",\n \"SecurityDescriptorCopyFlags\": \"\",\n \"ObjectTags\": \"\"\n },\n \"Excludes\": \"\",\n \"Schedule\": \"\",\n \"Name\": \"\",\n \"CloudWatchLogGroupArn\": \"\",\n \"Includes\": \"\"\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=FmrsService.UpdateTask"),
Headers =
{
{ "x-amz-target", "" },
},
Content = new StringContent("{\n \"TaskArn\": \"\",\n \"Options\": {\n \"VerifyMode\": \"\",\n \"OverwriteMode\": \"\",\n \"Atime\": \"\",\n \"Mtime\": \"\",\n \"Uid\": \"\",\n \"Gid\": \"\",\n \"PreserveDeletedFiles\": \"\",\n \"PreserveDevices\": \"\",\n \"PosixPermissions\": \"\",\n \"BytesPerSecond\": \"\",\n \"TaskQueueing\": \"\",\n \"LogLevel\": \"\",\n \"TransferMode\": \"\",\n \"SecurityDescriptorCopyFlags\": \"\",\n \"ObjectTags\": \"\"\n },\n \"Excludes\": \"\",\n \"Schedule\": \"\",\n \"Name\": \"\",\n \"CloudWatchLogGroupArn\": \"\",\n \"Includes\": \"\"\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=FmrsService.UpdateTask");
var request = new RestRequest("", Method.Post);
request.AddHeader("x-amz-target", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"TaskArn\": \"\",\n \"Options\": {\n \"VerifyMode\": \"\",\n \"OverwriteMode\": \"\",\n \"Atime\": \"\",\n \"Mtime\": \"\",\n \"Uid\": \"\",\n \"Gid\": \"\",\n \"PreserveDeletedFiles\": \"\",\n \"PreserveDevices\": \"\",\n \"PosixPermissions\": \"\",\n \"BytesPerSecond\": \"\",\n \"TaskQueueing\": \"\",\n \"LogLevel\": \"\",\n \"TransferMode\": \"\",\n \"SecurityDescriptorCopyFlags\": \"\",\n \"ObjectTags\": \"\"\n },\n \"Excludes\": \"\",\n \"Schedule\": \"\",\n \"Name\": \"\",\n \"CloudWatchLogGroupArn\": \"\",\n \"Includes\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/#X-Amz-Target=FmrsService.UpdateTask"
payload := strings.NewReader("{\n \"TaskArn\": \"\",\n \"Options\": {\n \"VerifyMode\": \"\",\n \"OverwriteMode\": \"\",\n \"Atime\": \"\",\n \"Mtime\": \"\",\n \"Uid\": \"\",\n \"Gid\": \"\",\n \"PreserveDeletedFiles\": \"\",\n \"PreserveDevices\": \"\",\n \"PosixPermissions\": \"\",\n \"BytesPerSecond\": \"\",\n \"TaskQueueing\": \"\",\n \"LogLevel\": \"\",\n \"TransferMode\": \"\",\n \"SecurityDescriptorCopyFlags\": \"\",\n \"ObjectTags\": \"\"\n },\n \"Excludes\": \"\",\n \"Schedule\": \"\",\n \"Name\": \"\",\n \"CloudWatchLogGroupArn\": \"\",\n \"Includes\": \"\"\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: 490
{
"TaskArn": "",
"Options": {
"VerifyMode": "",
"OverwriteMode": "",
"Atime": "",
"Mtime": "",
"Uid": "",
"Gid": "",
"PreserveDeletedFiles": "",
"PreserveDevices": "",
"PosixPermissions": "",
"BytesPerSecond": "",
"TaskQueueing": "",
"LogLevel": "",
"TransferMode": "",
"SecurityDescriptorCopyFlags": "",
"ObjectTags": ""
},
"Excludes": "",
"Schedule": "",
"Name": "",
"CloudWatchLogGroupArn": "",
"Includes": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/#X-Amz-Target=FmrsService.UpdateTask")
.setHeader("x-amz-target", "")
.setHeader("content-type", "application/json")
.setBody("{\n \"TaskArn\": \"\",\n \"Options\": {\n \"VerifyMode\": \"\",\n \"OverwriteMode\": \"\",\n \"Atime\": \"\",\n \"Mtime\": \"\",\n \"Uid\": \"\",\n \"Gid\": \"\",\n \"PreserveDeletedFiles\": \"\",\n \"PreserveDevices\": \"\",\n \"PosixPermissions\": \"\",\n \"BytesPerSecond\": \"\",\n \"TaskQueueing\": \"\",\n \"LogLevel\": \"\",\n \"TransferMode\": \"\",\n \"SecurityDescriptorCopyFlags\": \"\",\n \"ObjectTags\": \"\"\n },\n \"Excludes\": \"\",\n \"Schedule\": \"\",\n \"Name\": \"\",\n \"CloudWatchLogGroupArn\": \"\",\n \"Includes\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/#X-Amz-Target=FmrsService.UpdateTask"))
.header("x-amz-target", "")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"TaskArn\": \"\",\n \"Options\": {\n \"VerifyMode\": \"\",\n \"OverwriteMode\": \"\",\n \"Atime\": \"\",\n \"Mtime\": \"\",\n \"Uid\": \"\",\n \"Gid\": \"\",\n \"PreserveDeletedFiles\": \"\",\n \"PreserveDevices\": \"\",\n \"PosixPermissions\": \"\",\n \"BytesPerSecond\": \"\",\n \"TaskQueueing\": \"\",\n \"LogLevel\": \"\",\n \"TransferMode\": \"\",\n \"SecurityDescriptorCopyFlags\": \"\",\n \"ObjectTags\": \"\"\n },\n \"Excludes\": \"\",\n \"Schedule\": \"\",\n \"Name\": \"\",\n \"CloudWatchLogGroupArn\": \"\",\n \"Includes\": \"\"\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 \"TaskArn\": \"\",\n \"Options\": {\n \"VerifyMode\": \"\",\n \"OverwriteMode\": \"\",\n \"Atime\": \"\",\n \"Mtime\": \"\",\n \"Uid\": \"\",\n \"Gid\": \"\",\n \"PreserveDeletedFiles\": \"\",\n \"PreserveDevices\": \"\",\n \"PosixPermissions\": \"\",\n \"BytesPerSecond\": \"\",\n \"TaskQueueing\": \"\",\n \"LogLevel\": \"\",\n \"TransferMode\": \"\",\n \"SecurityDescriptorCopyFlags\": \"\",\n \"ObjectTags\": \"\"\n },\n \"Excludes\": \"\",\n \"Schedule\": \"\",\n \"Name\": \"\",\n \"CloudWatchLogGroupArn\": \"\",\n \"Includes\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=FmrsService.UpdateTask")
.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=FmrsService.UpdateTask")
.header("x-amz-target", "")
.header("content-type", "application/json")
.body("{\n \"TaskArn\": \"\",\n \"Options\": {\n \"VerifyMode\": \"\",\n \"OverwriteMode\": \"\",\n \"Atime\": \"\",\n \"Mtime\": \"\",\n \"Uid\": \"\",\n \"Gid\": \"\",\n \"PreserveDeletedFiles\": \"\",\n \"PreserveDevices\": \"\",\n \"PosixPermissions\": \"\",\n \"BytesPerSecond\": \"\",\n \"TaskQueueing\": \"\",\n \"LogLevel\": \"\",\n \"TransferMode\": \"\",\n \"SecurityDescriptorCopyFlags\": \"\",\n \"ObjectTags\": \"\"\n },\n \"Excludes\": \"\",\n \"Schedule\": \"\",\n \"Name\": \"\",\n \"CloudWatchLogGroupArn\": \"\",\n \"Includes\": \"\"\n}")
.asString();
const data = JSON.stringify({
TaskArn: '',
Options: {
VerifyMode: '',
OverwriteMode: '',
Atime: '',
Mtime: '',
Uid: '',
Gid: '',
PreserveDeletedFiles: '',
PreserveDevices: '',
PosixPermissions: '',
BytesPerSecond: '',
TaskQueueing: '',
LogLevel: '',
TransferMode: '',
SecurityDescriptorCopyFlags: '',
ObjectTags: ''
},
Excludes: '',
Schedule: '',
Name: '',
CloudWatchLogGroupArn: '',
Includes: ''
});
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=FmrsService.UpdateTask');
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=FmrsService.UpdateTask',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {
TaskArn: '',
Options: {
VerifyMode: '',
OverwriteMode: '',
Atime: '',
Mtime: '',
Uid: '',
Gid: '',
PreserveDeletedFiles: '',
PreserveDevices: '',
PosixPermissions: '',
BytesPerSecond: '',
TaskQueueing: '',
LogLevel: '',
TransferMode: '',
SecurityDescriptorCopyFlags: '',
ObjectTags: ''
},
Excludes: '',
Schedule: '',
Name: '',
CloudWatchLogGroupArn: '',
Includes: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/#X-Amz-Target=FmrsService.UpdateTask';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"TaskArn":"","Options":{"VerifyMode":"","OverwriteMode":"","Atime":"","Mtime":"","Uid":"","Gid":"","PreserveDeletedFiles":"","PreserveDevices":"","PosixPermissions":"","BytesPerSecond":"","TaskQueueing":"","LogLevel":"","TransferMode":"","SecurityDescriptorCopyFlags":"","ObjectTags":""},"Excludes":"","Schedule":"","Name":"","CloudWatchLogGroupArn":"","Includes":""}'
};
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=FmrsService.UpdateTask',
method: 'POST',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
},
processData: false,
data: '{\n "TaskArn": "",\n "Options": {\n "VerifyMode": "",\n "OverwriteMode": "",\n "Atime": "",\n "Mtime": "",\n "Uid": "",\n "Gid": "",\n "PreserveDeletedFiles": "",\n "PreserveDevices": "",\n "PosixPermissions": "",\n "BytesPerSecond": "",\n "TaskQueueing": "",\n "LogLevel": "",\n "TransferMode": "",\n "SecurityDescriptorCopyFlags": "",\n "ObjectTags": ""\n },\n "Excludes": "",\n "Schedule": "",\n "Name": "",\n "CloudWatchLogGroupArn": "",\n "Includes": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"TaskArn\": \"\",\n \"Options\": {\n \"VerifyMode\": \"\",\n \"OverwriteMode\": \"\",\n \"Atime\": \"\",\n \"Mtime\": \"\",\n \"Uid\": \"\",\n \"Gid\": \"\",\n \"PreserveDeletedFiles\": \"\",\n \"PreserveDevices\": \"\",\n \"PosixPermissions\": \"\",\n \"BytesPerSecond\": \"\",\n \"TaskQueueing\": \"\",\n \"LogLevel\": \"\",\n \"TransferMode\": \"\",\n \"SecurityDescriptorCopyFlags\": \"\",\n \"ObjectTags\": \"\"\n },\n \"Excludes\": \"\",\n \"Schedule\": \"\",\n \"Name\": \"\",\n \"CloudWatchLogGroupArn\": \"\",\n \"Includes\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=FmrsService.UpdateTask")
.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({
TaskArn: '',
Options: {
VerifyMode: '',
OverwriteMode: '',
Atime: '',
Mtime: '',
Uid: '',
Gid: '',
PreserveDeletedFiles: '',
PreserveDevices: '',
PosixPermissions: '',
BytesPerSecond: '',
TaskQueueing: '',
LogLevel: '',
TransferMode: '',
SecurityDescriptorCopyFlags: '',
ObjectTags: ''
},
Excludes: '',
Schedule: '',
Name: '',
CloudWatchLogGroupArn: '',
Includes: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=FmrsService.UpdateTask',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: {
TaskArn: '',
Options: {
VerifyMode: '',
OverwriteMode: '',
Atime: '',
Mtime: '',
Uid: '',
Gid: '',
PreserveDeletedFiles: '',
PreserveDevices: '',
PosixPermissions: '',
BytesPerSecond: '',
TaskQueueing: '',
LogLevel: '',
TransferMode: '',
SecurityDescriptorCopyFlags: '',
ObjectTags: ''
},
Excludes: '',
Schedule: '',
Name: '',
CloudWatchLogGroupArn: '',
Includes: ''
},
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=FmrsService.UpdateTask');
req.headers({
'x-amz-target': '',
'content-type': 'application/json'
});
req.type('json');
req.send({
TaskArn: '',
Options: {
VerifyMode: '',
OverwriteMode: '',
Atime: '',
Mtime: '',
Uid: '',
Gid: '',
PreserveDeletedFiles: '',
PreserveDevices: '',
PosixPermissions: '',
BytesPerSecond: '',
TaskQueueing: '',
LogLevel: '',
TransferMode: '',
SecurityDescriptorCopyFlags: '',
ObjectTags: ''
},
Excludes: '',
Schedule: '',
Name: '',
CloudWatchLogGroupArn: '',
Includes: ''
});
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=FmrsService.UpdateTask',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {
TaskArn: '',
Options: {
VerifyMode: '',
OverwriteMode: '',
Atime: '',
Mtime: '',
Uid: '',
Gid: '',
PreserveDeletedFiles: '',
PreserveDevices: '',
PosixPermissions: '',
BytesPerSecond: '',
TaskQueueing: '',
LogLevel: '',
TransferMode: '',
SecurityDescriptorCopyFlags: '',
ObjectTags: ''
},
Excludes: '',
Schedule: '',
Name: '',
CloudWatchLogGroupArn: '',
Includes: ''
}
};
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=FmrsService.UpdateTask';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"TaskArn":"","Options":{"VerifyMode":"","OverwriteMode":"","Atime":"","Mtime":"","Uid":"","Gid":"","PreserveDeletedFiles":"","PreserveDevices":"","PosixPermissions":"","BytesPerSecond":"","TaskQueueing":"","LogLevel":"","TransferMode":"","SecurityDescriptorCopyFlags":"","ObjectTags":""},"Excludes":"","Schedule":"","Name":"","CloudWatchLogGroupArn":"","Includes":""}'
};
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 = @{ @"TaskArn": @"",
@"Options": @{ @"VerifyMode": @"", @"OverwriteMode": @"", @"Atime": @"", @"Mtime": @"", @"Uid": @"", @"Gid": @"", @"PreserveDeletedFiles": @"", @"PreserveDevices": @"", @"PosixPermissions": @"", @"BytesPerSecond": @"", @"TaskQueueing": @"", @"LogLevel": @"", @"TransferMode": @"", @"SecurityDescriptorCopyFlags": @"", @"ObjectTags": @"" },
@"Excludes": @"",
@"Schedule": @"",
@"Name": @"",
@"CloudWatchLogGroupArn": @"",
@"Includes": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/#X-Amz-Target=FmrsService.UpdateTask"]
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=FmrsService.UpdateTask" in
let headers = Header.add_list (Header.init ()) [
("x-amz-target", "");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"TaskArn\": \"\",\n \"Options\": {\n \"VerifyMode\": \"\",\n \"OverwriteMode\": \"\",\n \"Atime\": \"\",\n \"Mtime\": \"\",\n \"Uid\": \"\",\n \"Gid\": \"\",\n \"PreserveDeletedFiles\": \"\",\n \"PreserveDevices\": \"\",\n \"PosixPermissions\": \"\",\n \"BytesPerSecond\": \"\",\n \"TaskQueueing\": \"\",\n \"LogLevel\": \"\",\n \"TransferMode\": \"\",\n \"SecurityDescriptorCopyFlags\": \"\",\n \"ObjectTags\": \"\"\n },\n \"Excludes\": \"\",\n \"Schedule\": \"\",\n \"Name\": \"\",\n \"CloudWatchLogGroupArn\": \"\",\n \"Includes\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/#X-Amz-Target=FmrsService.UpdateTask",
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([
'TaskArn' => '',
'Options' => [
'VerifyMode' => '',
'OverwriteMode' => '',
'Atime' => '',
'Mtime' => '',
'Uid' => '',
'Gid' => '',
'PreserveDeletedFiles' => '',
'PreserveDevices' => '',
'PosixPermissions' => '',
'BytesPerSecond' => '',
'TaskQueueing' => '',
'LogLevel' => '',
'TransferMode' => '',
'SecurityDescriptorCopyFlags' => '',
'ObjectTags' => ''
],
'Excludes' => '',
'Schedule' => '',
'Name' => '',
'CloudWatchLogGroupArn' => '',
'Includes' => ''
]),
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=FmrsService.UpdateTask', [
'body' => '{
"TaskArn": "",
"Options": {
"VerifyMode": "",
"OverwriteMode": "",
"Atime": "",
"Mtime": "",
"Uid": "",
"Gid": "",
"PreserveDeletedFiles": "",
"PreserveDevices": "",
"PosixPermissions": "",
"BytesPerSecond": "",
"TaskQueueing": "",
"LogLevel": "",
"TransferMode": "",
"SecurityDescriptorCopyFlags": "",
"ObjectTags": ""
},
"Excludes": "",
"Schedule": "",
"Name": "",
"CloudWatchLogGroupArn": "",
"Includes": ""
}',
'headers' => [
'content-type' => 'application/json',
'x-amz-target' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/#X-Amz-Target=FmrsService.UpdateTask');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'TaskArn' => '',
'Options' => [
'VerifyMode' => '',
'OverwriteMode' => '',
'Atime' => '',
'Mtime' => '',
'Uid' => '',
'Gid' => '',
'PreserveDeletedFiles' => '',
'PreserveDevices' => '',
'PosixPermissions' => '',
'BytesPerSecond' => '',
'TaskQueueing' => '',
'LogLevel' => '',
'TransferMode' => '',
'SecurityDescriptorCopyFlags' => '',
'ObjectTags' => ''
],
'Excludes' => '',
'Schedule' => '',
'Name' => '',
'CloudWatchLogGroupArn' => '',
'Includes' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'TaskArn' => '',
'Options' => [
'VerifyMode' => '',
'OverwriteMode' => '',
'Atime' => '',
'Mtime' => '',
'Uid' => '',
'Gid' => '',
'PreserveDeletedFiles' => '',
'PreserveDevices' => '',
'PosixPermissions' => '',
'BytesPerSecond' => '',
'TaskQueueing' => '',
'LogLevel' => '',
'TransferMode' => '',
'SecurityDescriptorCopyFlags' => '',
'ObjectTags' => ''
],
'Excludes' => '',
'Schedule' => '',
'Name' => '',
'CloudWatchLogGroupArn' => '',
'Includes' => ''
]));
$request->setRequestUrl('{{baseUrl}}/#X-Amz-Target=FmrsService.UpdateTask');
$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=FmrsService.UpdateTask' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"TaskArn": "",
"Options": {
"VerifyMode": "",
"OverwriteMode": "",
"Atime": "",
"Mtime": "",
"Uid": "",
"Gid": "",
"PreserveDeletedFiles": "",
"PreserveDevices": "",
"PosixPermissions": "",
"BytesPerSecond": "",
"TaskQueueing": "",
"LogLevel": "",
"TransferMode": "",
"SecurityDescriptorCopyFlags": "",
"ObjectTags": ""
},
"Excludes": "",
"Schedule": "",
"Name": "",
"CloudWatchLogGroupArn": "",
"Includes": ""
}'
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/#X-Amz-Target=FmrsService.UpdateTask' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"TaskArn": "",
"Options": {
"VerifyMode": "",
"OverwriteMode": "",
"Atime": "",
"Mtime": "",
"Uid": "",
"Gid": "",
"PreserveDeletedFiles": "",
"PreserveDevices": "",
"PosixPermissions": "",
"BytesPerSecond": "",
"TaskQueueing": "",
"LogLevel": "",
"TransferMode": "",
"SecurityDescriptorCopyFlags": "",
"ObjectTags": ""
},
"Excludes": "",
"Schedule": "",
"Name": "",
"CloudWatchLogGroupArn": "",
"Includes": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"TaskArn\": \"\",\n \"Options\": {\n \"VerifyMode\": \"\",\n \"OverwriteMode\": \"\",\n \"Atime\": \"\",\n \"Mtime\": \"\",\n \"Uid\": \"\",\n \"Gid\": \"\",\n \"PreserveDeletedFiles\": \"\",\n \"PreserveDevices\": \"\",\n \"PosixPermissions\": \"\",\n \"BytesPerSecond\": \"\",\n \"TaskQueueing\": \"\",\n \"LogLevel\": \"\",\n \"TransferMode\": \"\",\n \"SecurityDescriptorCopyFlags\": \"\",\n \"ObjectTags\": \"\"\n },\n \"Excludes\": \"\",\n \"Schedule\": \"\",\n \"Name\": \"\",\n \"CloudWatchLogGroupArn\": \"\",\n \"Includes\": \"\"\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=FmrsService.UpdateTask"
payload = {
"TaskArn": "",
"Options": {
"VerifyMode": "",
"OverwriteMode": "",
"Atime": "",
"Mtime": "",
"Uid": "",
"Gid": "",
"PreserveDeletedFiles": "",
"PreserveDevices": "",
"PosixPermissions": "",
"BytesPerSecond": "",
"TaskQueueing": "",
"LogLevel": "",
"TransferMode": "",
"SecurityDescriptorCopyFlags": "",
"ObjectTags": ""
},
"Excludes": "",
"Schedule": "",
"Name": "",
"CloudWatchLogGroupArn": "",
"Includes": ""
}
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=FmrsService.UpdateTask"
payload <- "{\n \"TaskArn\": \"\",\n \"Options\": {\n \"VerifyMode\": \"\",\n \"OverwriteMode\": \"\",\n \"Atime\": \"\",\n \"Mtime\": \"\",\n \"Uid\": \"\",\n \"Gid\": \"\",\n \"PreserveDeletedFiles\": \"\",\n \"PreserveDevices\": \"\",\n \"PosixPermissions\": \"\",\n \"BytesPerSecond\": \"\",\n \"TaskQueueing\": \"\",\n \"LogLevel\": \"\",\n \"TransferMode\": \"\",\n \"SecurityDescriptorCopyFlags\": \"\",\n \"ObjectTags\": \"\"\n },\n \"Excludes\": \"\",\n \"Schedule\": \"\",\n \"Name\": \"\",\n \"CloudWatchLogGroupArn\": \"\",\n \"Includes\": \"\"\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=FmrsService.UpdateTask")
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 \"TaskArn\": \"\",\n \"Options\": {\n \"VerifyMode\": \"\",\n \"OverwriteMode\": \"\",\n \"Atime\": \"\",\n \"Mtime\": \"\",\n \"Uid\": \"\",\n \"Gid\": \"\",\n \"PreserveDeletedFiles\": \"\",\n \"PreserveDevices\": \"\",\n \"PosixPermissions\": \"\",\n \"BytesPerSecond\": \"\",\n \"TaskQueueing\": \"\",\n \"LogLevel\": \"\",\n \"TransferMode\": \"\",\n \"SecurityDescriptorCopyFlags\": \"\",\n \"ObjectTags\": \"\"\n },\n \"Excludes\": \"\",\n \"Schedule\": \"\",\n \"Name\": \"\",\n \"CloudWatchLogGroupArn\": \"\",\n \"Includes\": \"\"\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 \"TaskArn\": \"\",\n \"Options\": {\n \"VerifyMode\": \"\",\n \"OverwriteMode\": \"\",\n \"Atime\": \"\",\n \"Mtime\": \"\",\n \"Uid\": \"\",\n \"Gid\": \"\",\n \"PreserveDeletedFiles\": \"\",\n \"PreserveDevices\": \"\",\n \"PosixPermissions\": \"\",\n \"BytesPerSecond\": \"\",\n \"TaskQueueing\": \"\",\n \"LogLevel\": \"\",\n \"TransferMode\": \"\",\n \"SecurityDescriptorCopyFlags\": \"\",\n \"ObjectTags\": \"\"\n },\n \"Excludes\": \"\",\n \"Schedule\": \"\",\n \"Name\": \"\",\n \"CloudWatchLogGroupArn\": \"\",\n \"Includes\": \"\"\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=FmrsService.UpdateTask";
let payload = json!({
"TaskArn": "",
"Options": json!({
"VerifyMode": "",
"OverwriteMode": "",
"Atime": "",
"Mtime": "",
"Uid": "",
"Gid": "",
"PreserveDeletedFiles": "",
"PreserveDevices": "",
"PosixPermissions": "",
"BytesPerSecond": "",
"TaskQueueing": "",
"LogLevel": "",
"TransferMode": "",
"SecurityDescriptorCopyFlags": "",
"ObjectTags": ""
}),
"Excludes": "",
"Schedule": "",
"Name": "",
"CloudWatchLogGroupArn": "",
"Includes": ""
});
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=FmrsService.UpdateTask' \
--header 'content-type: application/json' \
--header 'x-amz-target: ' \
--data '{
"TaskArn": "",
"Options": {
"VerifyMode": "",
"OverwriteMode": "",
"Atime": "",
"Mtime": "",
"Uid": "",
"Gid": "",
"PreserveDeletedFiles": "",
"PreserveDevices": "",
"PosixPermissions": "",
"BytesPerSecond": "",
"TaskQueueing": "",
"LogLevel": "",
"TransferMode": "",
"SecurityDescriptorCopyFlags": "",
"ObjectTags": ""
},
"Excludes": "",
"Schedule": "",
"Name": "",
"CloudWatchLogGroupArn": "",
"Includes": ""
}'
echo '{
"TaskArn": "",
"Options": {
"VerifyMode": "",
"OverwriteMode": "",
"Atime": "",
"Mtime": "",
"Uid": "",
"Gid": "",
"PreserveDeletedFiles": "",
"PreserveDevices": "",
"PosixPermissions": "",
"BytesPerSecond": "",
"TaskQueueing": "",
"LogLevel": "",
"TransferMode": "",
"SecurityDescriptorCopyFlags": "",
"ObjectTags": ""
},
"Excludes": "",
"Schedule": "",
"Name": "",
"CloudWatchLogGroupArn": "",
"Includes": ""
}' | \
http POST '{{baseUrl}}/#X-Amz-Target=FmrsService.UpdateTask' \
content-type:application/json \
x-amz-target:''
wget --quiet \
--method POST \
--header 'x-amz-target: ' \
--header 'content-type: application/json' \
--body-data '{\n "TaskArn": "",\n "Options": {\n "VerifyMode": "",\n "OverwriteMode": "",\n "Atime": "",\n "Mtime": "",\n "Uid": "",\n "Gid": "",\n "PreserveDeletedFiles": "",\n "PreserveDevices": "",\n "PosixPermissions": "",\n "BytesPerSecond": "",\n "TaskQueueing": "",\n "LogLevel": "",\n "TransferMode": "",\n "SecurityDescriptorCopyFlags": "",\n "ObjectTags": ""\n },\n "Excludes": "",\n "Schedule": "",\n "Name": "",\n "CloudWatchLogGroupArn": "",\n "Includes": ""\n}' \
--output-document \
- '{{baseUrl}}/#X-Amz-Target=FmrsService.UpdateTask'
import Foundation
let headers = [
"x-amz-target": "",
"content-type": "application/json"
]
let parameters = [
"TaskArn": "",
"Options": [
"VerifyMode": "",
"OverwriteMode": "",
"Atime": "",
"Mtime": "",
"Uid": "",
"Gid": "",
"PreserveDeletedFiles": "",
"PreserveDevices": "",
"PosixPermissions": "",
"BytesPerSecond": "",
"TaskQueueing": "",
"LogLevel": "",
"TransferMode": "",
"SecurityDescriptorCopyFlags": "",
"ObjectTags": ""
],
"Excludes": "",
"Schedule": "",
"Name": "",
"CloudWatchLogGroupArn": "",
"Includes": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/#X-Amz-Target=FmrsService.UpdateTask")! 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
UpdateTaskExecution
{{baseUrl}}/#X-Amz-Target=FmrsService.UpdateTaskExecution
HEADERS
X-Amz-Target
BODY json
{
"TaskExecutionArn": "",
"Options": {
"VerifyMode": "",
"OverwriteMode": "",
"Atime": "",
"Mtime": "",
"Uid": "",
"Gid": "",
"PreserveDeletedFiles": "",
"PreserveDevices": "",
"PosixPermissions": "",
"BytesPerSecond": "",
"TaskQueueing": "",
"LogLevel": "",
"TransferMode": "",
"SecurityDescriptorCopyFlags": "",
"ObjectTags": ""
}
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/#X-Amz-Target=FmrsService.UpdateTaskExecution");
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 \"TaskExecutionArn\": \"\",\n \"Options\": {\n \"VerifyMode\": \"\",\n \"OverwriteMode\": \"\",\n \"Atime\": \"\",\n \"Mtime\": \"\",\n \"Uid\": \"\",\n \"Gid\": \"\",\n \"PreserveDeletedFiles\": \"\",\n \"PreserveDevices\": \"\",\n \"PosixPermissions\": \"\",\n \"BytesPerSecond\": \"\",\n \"TaskQueueing\": \"\",\n \"LogLevel\": \"\",\n \"TransferMode\": \"\",\n \"SecurityDescriptorCopyFlags\": \"\",\n \"ObjectTags\": \"\"\n }\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/#X-Amz-Target=FmrsService.UpdateTaskExecution" {:headers {:x-amz-target ""}
:content-type :json
:form-params {:TaskExecutionArn ""
:Options {:VerifyMode ""
:OverwriteMode ""
:Atime ""
:Mtime ""
:Uid ""
:Gid ""
:PreserveDeletedFiles ""
:PreserveDevices ""
:PosixPermissions ""
:BytesPerSecond ""
:TaskQueueing ""
:LogLevel ""
:TransferMode ""
:SecurityDescriptorCopyFlags ""
:ObjectTags ""}}})
require "http/client"
url = "{{baseUrl}}/#X-Amz-Target=FmrsService.UpdateTaskExecution"
headers = HTTP::Headers{
"x-amz-target" => ""
"content-type" => "application/json"
}
reqBody = "{\n \"TaskExecutionArn\": \"\",\n \"Options\": {\n \"VerifyMode\": \"\",\n \"OverwriteMode\": \"\",\n \"Atime\": \"\",\n \"Mtime\": \"\",\n \"Uid\": \"\",\n \"Gid\": \"\",\n \"PreserveDeletedFiles\": \"\",\n \"PreserveDevices\": \"\",\n \"PosixPermissions\": \"\",\n \"BytesPerSecond\": \"\",\n \"TaskQueueing\": \"\",\n \"LogLevel\": \"\",\n \"TransferMode\": \"\",\n \"SecurityDescriptorCopyFlags\": \"\",\n \"ObjectTags\": \"\"\n }\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/#X-Amz-Target=FmrsService.UpdateTaskExecution"),
Headers =
{
{ "x-amz-target", "" },
},
Content = new StringContent("{\n \"TaskExecutionArn\": \"\",\n \"Options\": {\n \"VerifyMode\": \"\",\n \"OverwriteMode\": \"\",\n \"Atime\": \"\",\n \"Mtime\": \"\",\n \"Uid\": \"\",\n \"Gid\": \"\",\n \"PreserveDeletedFiles\": \"\",\n \"PreserveDevices\": \"\",\n \"PosixPermissions\": \"\",\n \"BytesPerSecond\": \"\",\n \"TaskQueueing\": \"\",\n \"LogLevel\": \"\",\n \"TransferMode\": \"\",\n \"SecurityDescriptorCopyFlags\": \"\",\n \"ObjectTags\": \"\"\n }\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/#X-Amz-Target=FmrsService.UpdateTaskExecution");
var request = new RestRequest("", Method.Post);
request.AddHeader("x-amz-target", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"TaskExecutionArn\": \"\",\n \"Options\": {\n \"VerifyMode\": \"\",\n \"OverwriteMode\": \"\",\n \"Atime\": \"\",\n \"Mtime\": \"\",\n \"Uid\": \"\",\n \"Gid\": \"\",\n \"PreserveDeletedFiles\": \"\",\n \"PreserveDevices\": \"\",\n \"PosixPermissions\": \"\",\n \"BytesPerSecond\": \"\",\n \"TaskQueueing\": \"\",\n \"LogLevel\": \"\",\n \"TransferMode\": \"\",\n \"SecurityDescriptorCopyFlags\": \"\",\n \"ObjectTags\": \"\"\n }\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/#X-Amz-Target=FmrsService.UpdateTaskExecution"
payload := strings.NewReader("{\n \"TaskExecutionArn\": \"\",\n \"Options\": {\n \"VerifyMode\": \"\",\n \"OverwriteMode\": \"\",\n \"Atime\": \"\",\n \"Mtime\": \"\",\n \"Uid\": \"\",\n \"Gid\": \"\",\n \"PreserveDeletedFiles\": \"\",\n \"PreserveDevices\": \"\",\n \"PosixPermissions\": \"\",\n \"BytesPerSecond\": \"\",\n \"TaskQueueing\": \"\",\n \"LogLevel\": \"\",\n \"TransferMode\": \"\",\n \"SecurityDescriptorCopyFlags\": \"\",\n \"ObjectTags\": \"\"\n }\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: 400
{
"TaskExecutionArn": "",
"Options": {
"VerifyMode": "",
"OverwriteMode": "",
"Atime": "",
"Mtime": "",
"Uid": "",
"Gid": "",
"PreserveDeletedFiles": "",
"PreserveDevices": "",
"PosixPermissions": "",
"BytesPerSecond": "",
"TaskQueueing": "",
"LogLevel": "",
"TransferMode": "",
"SecurityDescriptorCopyFlags": "",
"ObjectTags": ""
}
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/#X-Amz-Target=FmrsService.UpdateTaskExecution")
.setHeader("x-amz-target", "")
.setHeader("content-type", "application/json")
.setBody("{\n \"TaskExecutionArn\": \"\",\n \"Options\": {\n \"VerifyMode\": \"\",\n \"OverwriteMode\": \"\",\n \"Atime\": \"\",\n \"Mtime\": \"\",\n \"Uid\": \"\",\n \"Gid\": \"\",\n \"PreserveDeletedFiles\": \"\",\n \"PreserveDevices\": \"\",\n \"PosixPermissions\": \"\",\n \"BytesPerSecond\": \"\",\n \"TaskQueueing\": \"\",\n \"LogLevel\": \"\",\n \"TransferMode\": \"\",\n \"SecurityDescriptorCopyFlags\": \"\",\n \"ObjectTags\": \"\"\n }\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/#X-Amz-Target=FmrsService.UpdateTaskExecution"))
.header("x-amz-target", "")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"TaskExecutionArn\": \"\",\n \"Options\": {\n \"VerifyMode\": \"\",\n \"OverwriteMode\": \"\",\n \"Atime\": \"\",\n \"Mtime\": \"\",\n \"Uid\": \"\",\n \"Gid\": \"\",\n \"PreserveDeletedFiles\": \"\",\n \"PreserveDevices\": \"\",\n \"PosixPermissions\": \"\",\n \"BytesPerSecond\": \"\",\n \"TaskQueueing\": \"\",\n \"LogLevel\": \"\",\n \"TransferMode\": \"\",\n \"SecurityDescriptorCopyFlags\": \"\",\n \"ObjectTags\": \"\"\n }\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"TaskExecutionArn\": \"\",\n \"Options\": {\n \"VerifyMode\": \"\",\n \"OverwriteMode\": \"\",\n \"Atime\": \"\",\n \"Mtime\": \"\",\n \"Uid\": \"\",\n \"Gid\": \"\",\n \"PreserveDeletedFiles\": \"\",\n \"PreserveDevices\": \"\",\n \"PosixPermissions\": \"\",\n \"BytesPerSecond\": \"\",\n \"TaskQueueing\": \"\",\n \"LogLevel\": \"\",\n \"TransferMode\": \"\",\n \"SecurityDescriptorCopyFlags\": \"\",\n \"ObjectTags\": \"\"\n }\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=FmrsService.UpdateTaskExecution")
.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=FmrsService.UpdateTaskExecution")
.header("x-amz-target", "")
.header("content-type", "application/json")
.body("{\n \"TaskExecutionArn\": \"\",\n \"Options\": {\n \"VerifyMode\": \"\",\n \"OverwriteMode\": \"\",\n \"Atime\": \"\",\n \"Mtime\": \"\",\n \"Uid\": \"\",\n \"Gid\": \"\",\n \"PreserveDeletedFiles\": \"\",\n \"PreserveDevices\": \"\",\n \"PosixPermissions\": \"\",\n \"BytesPerSecond\": \"\",\n \"TaskQueueing\": \"\",\n \"LogLevel\": \"\",\n \"TransferMode\": \"\",\n \"SecurityDescriptorCopyFlags\": \"\",\n \"ObjectTags\": \"\"\n }\n}")
.asString();
const data = JSON.stringify({
TaskExecutionArn: '',
Options: {
VerifyMode: '',
OverwriteMode: '',
Atime: '',
Mtime: '',
Uid: '',
Gid: '',
PreserveDeletedFiles: '',
PreserveDevices: '',
PosixPermissions: '',
BytesPerSecond: '',
TaskQueueing: '',
LogLevel: '',
TransferMode: '',
SecurityDescriptorCopyFlags: '',
ObjectTags: ''
}
});
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=FmrsService.UpdateTaskExecution');
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=FmrsService.UpdateTaskExecution',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {
TaskExecutionArn: '',
Options: {
VerifyMode: '',
OverwriteMode: '',
Atime: '',
Mtime: '',
Uid: '',
Gid: '',
PreserveDeletedFiles: '',
PreserveDevices: '',
PosixPermissions: '',
BytesPerSecond: '',
TaskQueueing: '',
LogLevel: '',
TransferMode: '',
SecurityDescriptorCopyFlags: '',
ObjectTags: ''
}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/#X-Amz-Target=FmrsService.UpdateTaskExecution';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"TaskExecutionArn":"","Options":{"VerifyMode":"","OverwriteMode":"","Atime":"","Mtime":"","Uid":"","Gid":"","PreserveDeletedFiles":"","PreserveDevices":"","PosixPermissions":"","BytesPerSecond":"","TaskQueueing":"","LogLevel":"","TransferMode":"","SecurityDescriptorCopyFlags":"","ObjectTags":""}}'
};
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=FmrsService.UpdateTaskExecution',
method: 'POST',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
},
processData: false,
data: '{\n "TaskExecutionArn": "",\n "Options": {\n "VerifyMode": "",\n "OverwriteMode": "",\n "Atime": "",\n "Mtime": "",\n "Uid": "",\n "Gid": "",\n "PreserveDeletedFiles": "",\n "PreserveDevices": "",\n "PosixPermissions": "",\n "BytesPerSecond": "",\n "TaskQueueing": "",\n "LogLevel": "",\n "TransferMode": "",\n "SecurityDescriptorCopyFlags": "",\n "ObjectTags": ""\n }\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"TaskExecutionArn\": \"\",\n \"Options\": {\n \"VerifyMode\": \"\",\n \"OverwriteMode\": \"\",\n \"Atime\": \"\",\n \"Mtime\": \"\",\n \"Uid\": \"\",\n \"Gid\": \"\",\n \"PreserveDeletedFiles\": \"\",\n \"PreserveDevices\": \"\",\n \"PosixPermissions\": \"\",\n \"BytesPerSecond\": \"\",\n \"TaskQueueing\": \"\",\n \"LogLevel\": \"\",\n \"TransferMode\": \"\",\n \"SecurityDescriptorCopyFlags\": \"\",\n \"ObjectTags\": \"\"\n }\n}")
val request = Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=FmrsService.UpdateTaskExecution")
.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({
TaskExecutionArn: '',
Options: {
VerifyMode: '',
OverwriteMode: '',
Atime: '',
Mtime: '',
Uid: '',
Gid: '',
PreserveDeletedFiles: '',
PreserveDevices: '',
PosixPermissions: '',
BytesPerSecond: '',
TaskQueueing: '',
LogLevel: '',
TransferMode: '',
SecurityDescriptorCopyFlags: '',
ObjectTags: ''
}
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=FmrsService.UpdateTaskExecution',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: {
TaskExecutionArn: '',
Options: {
VerifyMode: '',
OverwriteMode: '',
Atime: '',
Mtime: '',
Uid: '',
Gid: '',
PreserveDeletedFiles: '',
PreserveDevices: '',
PosixPermissions: '',
BytesPerSecond: '',
TaskQueueing: '',
LogLevel: '',
TransferMode: '',
SecurityDescriptorCopyFlags: '',
ObjectTags: ''
}
},
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=FmrsService.UpdateTaskExecution');
req.headers({
'x-amz-target': '',
'content-type': 'application/json'
});
req.type('json');
req.send({
TaskExecutionArn: '',
Options: {
VerifyMode: '',
OverwriteMode: '',
Atime: '',
Mtime: '',
Uid: '',
Gid: '',
PreserveDeletedFiles: '',
PreserveDevices: '',
PosixPermissions: '',
BytesPerSecond: '',
TaskQueueing: '',
LogLevel: '',
TransferMode: '',
SecurityDescriptorCopyFlags: '',
ObjectTags: ''
}
});
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=FmrsService.UpdateTaskExecution',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {
TaskExecutionArn: '',
Options: {
VerifyMode: '',
OverwriteMode: '',
Atime: '',
Mtime: '',
Uid: '',
Gid: '',
PreserveDeletedFiles: '',
PreserveDevices: '',
PosixPermissions: '',
BytesPerSecond: '',
TaskQueueing: '',
LogLevel: '',
TransferMode: '',
SecurityDescriptorCopyFlags: '',
ObjectTags: ''
}
}
};
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=FmrsService.UpdateTaskExecution';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"TaskExecutionArn":"","Options":{"VerifyMode":"","OverwriteMode":"","Atime":"","Mtime":"","Uid":"","Gid":"","PreserveDeletedFiles":"","PreserveDevices":"","PosixPermissions":"","BytesPerSecond":"","TaskQueueing":"","LogLevel":"","TransferMode":"","SecurityDescriptorCopyFlags":"","ObjectTags":""}}'
};
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 = @{ @"TaskExecutionArn": @"",
@"Options": @{ @"VerifyMode": @"", @"OverwriteMode": @"", @"Atime": @"", @"Mtime": @"", @"Uid": @"", @"Gid": @"", @"PreserveDeletedFiles": @"", @"PreserveDevices": @"", @"PosixPermissions": @"", @"BytesPerSecond": @"", @"TaskQueueing": @"", @"LogLevel": @"", @"TransferMode": @"", @"SecurityDescriptorCopyFlags": @"", @"ObjectTags": @"" } };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/#X-Amz-Target=FmrsService.UpdateTaskExecution"]
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=FmrsService.UpdateTaskExecution" in
let headers = Header.add_list (Header.init ()) [
("x-amz-target", "");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"TaskExecutionArn\": \"\",\n \"Options\": {\n \"VerifyMode\": \"\",\n \"OverwriteMode\": \"\",\n \"Atime\": \"\",\n \"Mtime\": \"\",\n \"Uid\": \"\",\n \"Gid\": \"\",\n \"PreserveDeletedFiles\": \"\",\n \"PreserveDevices\": \"\",\n \"PosixPermissions\": \"\",\n \"BytesPerSecond\": \"\",\n \"TaskQueueing\": \"\",\n \"LogLevel\": \"\",\n \"TransferMode\": \"\",\n \"SecurityDescriptorCopyFlags\": \"\",\n \"ObjectTags\": \"\"\n }\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/#X-Amz-Target=FmrsService.UpdateTaskExecution",
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([
'TaskExecutionArn' => '',
'Options' => [
'VerifyMode' => '',
'OverwriteMode' => '',
'Atime' => '',
'Mtime' => '',
'Uid' => '',
'Gid' => '',
'PreserveDeletedFiles' => '',
'PreserveDevices' => '',
'PosixPermissions' => '',
'BytesPerSecond' => '',
'TaskQueueing' => '',
'LogLevel' => '',
'TransferMode' => '',
'SecurityDescriptorCopyFlags' => '',
'ObjectTags' => ''
]
]),
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=FmrsService.UpdateTaskExecution', [
'body' => '{
"TaskExecutionArn": "",
"Options": {
"VerifyMode": "",
"OverwriteMode": "",
"Atime": "",
"Mtime": "",
"Uid": "",
"Gid": "",
"PreserveDeletedFiles": "",
"PreserveDevices": "",
"PosixPermissions": "",
"BytesPerSecond": "",
"TaskQueueing": "",
"LogLevel": "",
"TransferMode": "",
"SecurityDescriptorCopyFlags": "",
"ObjectTags": ""
}
}',
'headers' => [
'content-type' => 'application/json',
'x-amz-target' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/#X-Amz-Target=FmrsService.UpdateTaskExecution');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'TaskExecutionArn' => '',
'Options' => [
'VerifyMode' => '',
'OverwriteMode' => '',
'Atime' => '',
'Mtime' => '',
'Uid' => '',
'Gid' => '',
'PreserveDeletedFiles' => '',
'PreserveDevices' => '',
'PosixPermissions' => '',
'BytesPerSecond' => '',
'TaskQueueing' => '',
'LogLevel' => '',
'TransferMode' => '',
'SecurityDescriptorCopyFlags' => '',
'ObjectTags' => ''
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'TaskExecutionArn' => '',
'Options' => [
'VerifyMode' => '',
'OverwriteMode' => '',
'Atime' => '',
'Mtime' => '',
'Uid' => '',
'Gid' => '',
'PreserveDeletedFiles' => '',
'PreserveDevices' => '',
'PosixPermissions' => '',
'BytesPerSecond' => '',
'TaskQueueing' => '',
'LogLevel' => '',
'TransferMode' => '',
'SecurityDescriptorCopyFlags' => '',
'ObjectTags' => ''
]
]));
$request->setRequestUrl('{{baseUrl}}/#X-Amz-Target=FmrsService.UpdateTaskExecution');
$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=FmrsService.UpdateTaskExecution' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"TaskExecutionArn": "",
"Options": {
"VerifyMode": "",
"OverwriteMode": "",
"Atime": "",
"Mtime": "",
"Uid": "",
"Gid": "",
"PreserveDeletedFiles": "",
"PreserveDevices": "",
"PosixPermissions": "",
"BytesPerSecond": "",
"TaskQueueing": "",
"LogLevel": "",
"TransferMode": "",
"SecurityDescriptorCopyFlags": "",
"ObjectTags": ""
}
}'
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/#X-Amz-Target=FmrsService.UpdateTaskExecution' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"TaskExecutionArn": "",
"Options": {
"VerifyMode": "",
"OverwriteMode": "",
"Atime": "",
"Mtime": "",
"Uid": "",
"Gid": "",
"PreserveDeletedFiles": "",
"PreserveDevices": "",
"PosixPermissions": "",
"BytesPerSecond": "",
"TaskQueueing": "",
"LogLevel": "",
"TransferMode": "",
"SecurityDescriptorCopyFlags": "",
"ObjectTags": ""
}
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"TaskExecutionArn\": \"\",\n \"Options\": {\n \"VerifyMode\": \"\",\n \"OverwriteMode\": \"\",\n \"Atime\": \"\",\n \"Mtime\": \"\",\n \"Uid\": \"\",\n \"Gid\": \"\",\n \"PreserveDeletedFiles\": \"\",\n \"PreserveDevices\": \"\",\n \"PosixPermissions\": \"\",\n \"BytesPerSecond\": \"\",\n \"TaskQueueing\": \"\",\n \"LogLevel\": \"\",\n \"TransferMode\": \"\",\n \"SecurityDescriptorCopyFlags\": \"\",\n \"ObjectTags\": \"\"\n }\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=FmrsService.UpdateTaskExecution"
payload = {
"TaskExecutionArn": "",
"Options": {
"VerifyMode": "",
"OverwriteMode": "",
"Atime": "",
"Mtime": "",
"Uid": "",
"Gid": "",
"PreserveDeletedFiles": "",
"PreserveDevices": "",
"PosixPermissions": "",
"BytesPerSecond": "",
"TaskQueueing": "",
"LogLevel": "",
"TransferMode": "",
"SecurityDescriptorCopyFlags": "",
"ObjectTags": ""
}
}
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=FmrsService.UpdateTaskExecution"
payload <- "{\n \"TaskExecutionArn\": \"\",\n \"Options\": {\n \"VerifyMode\": \"\",\n \"OverwriteMode\": \"\",\n \"Atime\": \"\",\n \"Mtime\": \"\",\n \"Uid\": \"\",\n \"Gid\": \"\",\n \"PreserveDeletedFiles\": \"\",\n \"PreserveDevices\": \"\",\n \"PosixPermissions\": \"\",\n \"BytesPerSecond\": \"\",\n \"TaskQueueing\": \"\",\n \"LogLevel\": \"\",\n \"TransferMode\": \"\",\n \"SecurityDescriptorCopyFlags\": \"\",\n \"ObjectTags\": \"\"\n }\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=FmrsService.UpdateTaskExecution")
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 \"TaskExecutionArn\": \"\",\n \"Options\": {\n \"VerifyMode\": \"\",\n \"OverwriteMode\": \"\",\n \"Atime\": \"\",\n \"Mtime\": \"\",\n \"Uid\": \"\",\n \"Gid\": \"\",\n \"PreserveDeletedFiles\": \"\",\n \"PreserveDevices\": \"\",\n \"PosixPermissions\": \"\",\n \"BytesPerSecond\": \"\",\n \"TaskQueueing\": \"\",\n \"LogLevel\": \"\",\n \"TransferMode\": \"\",\n \"SecurityDescriptorCopyFlags\": \"\",\n \"ObjectTags\": \"\"\n }\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/') do |req|
req.headers['x-amz-target'] = ''
req.body = "{\n \"TaskExecutionArn\": \"\",\n \"Options\": {\n \"VerifyMode\": \"\",\n \"OverwriteMode\": \"\",\n \"Atime\": \"\",\n \"Mtime\": \"\",\n \"Uid\": \"\",\n \"Gid\": \"\",\n \"PreserveDeletedFiles\": \"\",\n \"PreserveDevices\": \"\",\n \"PosixPermissions\": \"\",\n \"BytesPerSecond\": \"\",\n \"TaskQueueing\": \"\",\n \"LogLevel\": \"\",\n \"TransferMode\": \"\",\n \"SecurityDescriptorCopyFlags\": \"\",\n \"ObjectTags\": \"\"\n }\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=FmrsService.UpdateTaskExecution";
let payload = json!({
"TaskExecutionArn": "",
"Options": json!({
"VerifyMode": "",
"OverwriteMode": "",
"Atime": "",
"Mtime": "",
"Uid": "",
"Gid": "",
"PreserveDeletedFiles": "",
"PreserveDevices": "",
"PosixPermissions": "",
"BytesPerSecond": "",
"TaskQueueing": "",
"LogLevel": "",
"TransferMode": "",
"SecurityDescriptorCopyFlags": "",
"ObjectTags": ""
})
});
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=FmrsService.UpdateTaskExecution' \
--header 'content-type: application/json' \
--header 'x-amz-target: ' \
--data '{
"TaskExecutionArn": "",
"Options": {
"VerifyMode": "",
"OverwriteMode": "",
"Atime": "",
"Mtime": "",
"Uid": "",
"Gid": "",
"PreserveDeletedFiles": "",
"PreserveDevices": "",
"PosixPermissions": "",
"BytesPerSecond": "",
"TaskQueueing": "",
"LogLevel": "",
"TransferMode": "",
"SecurityDescriptorCopyFlags": "",
"ObjectTags": ""
}
}'
echo '{
"TaskExecutionArn": "",
"Options": {
"VerifyMode": "",
"OverwriteMode": "",
"Atime": "",
"Mtime": "",
"Uid": "",
"Gid": "",
"PreserveDeletedFiles": "",
"PreserveDevices": "",
"PosixPermissions": "",
"BytesPerSecond": "",
"TaskQueueing": "",
"LogLevel": "",
"TransferMode": "",
"SecurityDescriptorCopyFlags": "",
"ObjectTags": ""
}
}' | \
http POST '{{baseUrl}}/#X-Amz-Target=FmrsService.UpdateTaskExecution' \
content-type:application/json \
x-amz-target:''
wget --quiet \
--method POST \
--header 'x-amz-target: ' \
--header 'content-type: application/json' \
--body-data '{\n "TaskExecutionArn": "",\n "Options": {\n "VerifyMode": "",\n "OverwriteMode": "",\n "Atime": "",\n "Mtime": "",\n "Uid": "",\n "Gid": "",\n "PreserveDeletedFiles": "",\n "PreserveDevices": "",\n "PosixPermissions": "",\n "BytesPerSecond": "",\n "TaskQueueing": "",\n "LogLevel": "",\n "TransferMode": "",\n "SecurityDescriptorCopyFlags": "",\n "ObjectTags": ""\n }\n}' \
--output-document \
- '{{baseUrl}}/#X-Amz-Target=FmrsService.UpdateTaskExecution'
import Foundation
let headers = [
"x-amz-target": "",
"content-type": "application/json"
]
let parameters = [
"TaskExecutionArn": "",
"Options": [
"VerifyMode": "",
"OverwriteMode": "",
"Atime": "",
"Mtime": "",
"Uid": "",
"Gid": "",
"PreserveDeletedFiles": "",
"PreserveDevices": "",
"PosixPermissions": "",
"BytesPerSecond": "",
"TaskQueueing": "",
"LogLevel": "",
"TransferMode": "",
"SecurityDescriptorCopyFlags": "",
"ObjectTags": ""
]
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/#X-Amz-Target=FmrsService.UpdateTaskExecution")! 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()