POST 授予主题访问权限
{{baseUrl}}/event-fabric/acl/bindings:grant
BODY json

{
  "tenant_id": "",
  "topic_id": "",
  "principal_id": "",
  "actions": [],
  "expires_at": "",
  "operator_id": ""
}
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/event-fabric/acl/bindings:grant");

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

curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n  \"tenant_id\": \"\",\n  \"topic_id\": \"\",\n  \"principal_id\": \"\",\n  \"actions\": [],\n  \"expires_at\": \"\",\n  \"operator_id\": \"\"\n}");

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

(client/post "{{baseUrl}}/event-fabric/acl/bindings:grant" {:content-type :json
                                                                            :form-params {:tenant_id ""
                                                                                          :topic_id ""
                                                                                          :principal_id ""
                                                                                          :actions []
                                                                                          :expires_at ""
                                                                                          :operator_id ""}})
require "http/client"

url = "{{baseUrl}}/event-fabric/acl/bindings:grant"
headers = HTTP::Headers{
  "content-type" => "application/json"
}
reqBody = "{\n  \"tenant_id\": \"\",\n  \"topic_id\": \"\",\n  \"principal_id\": \"\",\n  \"actions\": [],\n  \"expires_at\": \"\",\n  \"operator_id\": \"\"\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}}/event-fabric/acl/bindings:grant"),
    Content = new StringContent("{\n  \"tenant_id\": \"\",\n  \"topic_id\": \"\",\n  \"principal_id\": \"\",\n  \"actions\": [],\n  \"expires_at\": \"\",\n  \"operator_id\": \"\"\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}}/event-fabric/acl/bindings:grant");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n  \"tenant_id\": \"\",\n  \"topic_id\": \"\",\n  \"principal_id\": \"\",\n  \"actions\": [],\n  \"expires_at\": \"\",\n  \"operator_id\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main

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

func main() {

	url := "{{baseUrl}}/event-fabric/acl/bindings:grant"

	payload := strings.NewReader("{\n  \"tenant_id\": \"\",\n  \"topic_id\": \"\",\n  \"principal_id\": \"\",\n  \"actions\": [],\n  \"expires_at\": \"\",\n  \"operator_id\": \"\"\n}")

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

	req.Header.Add("content-type", "application/json")

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

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

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

}
POST /baseUrl/event-fabric/acl/bindings:grant HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 119

{
  "tenant_id": "",
  "topic_id": "",
  "principal_id": "",
  "actions": [],
  "expires_at": "",
  "operator_id": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/event-fabric/acl/bindings:grant")
  .setHeader("content-type", "application/json")
  .setBody("{\n  \"tenant_id\": \"\",\n  \"topic_id\": \"\",\n  \"principal_id\": \"\",\n  \"actions\": [],\n  \"expires_at\": \"\",\n  \"operator_id\": \"\"\n}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/event-fabric/acl/bindings:grant"))
    .header("content-type", "application/json")
    .method("POST", HttpRequest.BodyPublishers.ofString("{\n  \"tenant_id\": \"\",\n  \"topic_id\": \"\",\n  \"principal_id\": \"\",\n  \"actions\": [],\n  \"expires_at\": \"\",\n  \"operator_id\": \"\"\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  \"tenant_id\": \"\",\n  \"topic_id\": \"\",\n  \"principal_id\": \"\",\n  \"actions\": [],\n  \"expires_at\": \"\",\n  \"operator_id\": \"\"\n}");
Request request = new Request.Builder()
  .url("{{baseUrl}}/event-fabric/acl/bindings:grant")
  .post(body)
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/event-fabric/acl/bindings:grant")
  .header("content-type", "application/json")
  .body("{\n  \"tenant_id\": \"\",\n  \"topic_id\": \"\",\n  \"principal_id\": \"\",\n  \"actions\": [],\n  \"expires_at\": \"\",\n  \"operator_id\": \"\"\n}")
  .asString();
const data = JSON.stringify({
  tenant_id: '',
  topic_id: '',
  principal_id: '',
  actions: [],
  expires_at: '',
  operator_id: ''
});

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

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

xhr.open('POST', '{{baseUrl}}/event-fabric/acl/bindings:grant');
xhr.setRequestHeader('content-type', 'application/json');

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

const options = {
  method: 'POST',
  url: '{{baseUrl}}/event-fabric/acl/bindings:grant',
  headers: {'content-type': 'application/json'},
  data: {
    tenant_id: '',
    topic_id: '',
    principal_id: '',
    actions: [],
    expires_at: '',
    operator_id: ''
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/event-fabric/acl/bindings:grant';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"tenant_id":"","topic_id":"","principal_id":"","actions":[],"expires_at":"","operator_id":""}'
};

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}}/event-fabric/acl/bindings:grant',
  method: 'POST',
  headers: {
    'content-type': 'application/json'
  },
  processData: false,
  data: '{\n  "tenant_id": "",\n  "topic_id": "",\n  "principal_id": "",\n  "actions": [],\n  "expires_at": "",\n  "operator_id": ""\n}'
};

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

val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n  \"tenant_id\": \"\",\n  \"topic_id\": \"\",\n  \"principal_id\": \"\",\n  \"actions\": [],\n  \"expires_at\": \"\",\n  \"operator_id\": \"\"\n}")
val request = Request.Builder()
  .url("{{baseUrl}}/event-fabric/acl/bindings:grant")
  .post(body)
  .addHeader("content-type", "application/json")
  .build()

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

const options = {
  method: 'POST',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/event-fabric/acl/bindings:grant',
  headers: {
    'content-type': 'application/json'
  }
};

const req = http.request(options, function (res) {
  const chunks = [];

  res.on('data', function (chunk) {
    chunks.push(chunk);
  });

  res.on('end', function () {
    const body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.write(JSON.stringify({
  tenant_id: '',
  topic_id: '',
  principal_id: '',
  actions: [],
  expires_at: '',
  operator_id: ''
}));
req.end();
const request = require('request');

const options = {
  method: 'POST',
  url: '{{baseUrl}}/event-fabric/acl/bindings:grant',
  headers: {'content-type': 'application/json'},
  body: {
    tenant_id: '',
    topic_id: '',
    principal_id: '',
    actions: [],
    expires_at: '',
    operator_id: ''
  },
  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}}/event-fabric/acl/bindings:grant');

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

req.type('json');
req.send({
  tenant_id: '',
  topic_id: '',
  principal_id: '',
  actions: [],
  expires_at: '',
  operator_id: ''
});

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}}/event-fabric/acl/bindings:grant',
  headers: {'content-type': 'application/json'},
  data: {
    tenant_id: '',
    topic_id: '',
    principal_id: '',
    actions: [],
    expires_at: '',
    operator_id: ''
  }
};

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

const url = '{{baseUrl}}/event-fabric/acl/bindings:grant';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"tenant_id":"","topic_id":"","principal_id":"","actions":[],"expires_at":"","operator_id":""}'
};

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

NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"tenant_id": @"",
                              @"topic_id": @"",
                              @"principal_id": @"",
                              @"actions": @[  ],
                              @"expires_at": @"",
                              @"operator_id": @"" };

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

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/event-fabric/acl/bindings:grant"]
                                                       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}}/event-fabric/acl/bindings:grant" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n  \"tenant_id\": \"\",\n  \"topic_id\": \"\",\n  \"principal_id\": \"\",\n  \"actions\": [],\n  \"expires_at\": \"\",\n  \"operator_id\": \"\"\n}" in

Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/event-fabric/acl/bindings:grant",
  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([
    'tenant_id' => '',
    'topic_id' => '',
    'principal_id' => '',
    'actions' => [
        
    ],
    'expires_at' => '',
    'operator_id' => ''
  ]),
  CURLOPT_HTTPHEADER => [
    "content-type: application/json"
  ],
]);

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

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('POST', '{{baseUrl}}/event-fabric/acl/bindings:grant', [
  'body' => '{
  "tenant_id": "",
  "topic_id": "",
  "principal_id": "",
  "actions": [],
  "expires_at": "",
  "operator_id": ""
}',
  'headers' => [
    'content-type' => 'application/json',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/event-fabric/acl/bindings:grant');
$request->setMethod(HTTP_METH_POST);

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

$request->setContentType('application/json');
$request->setBody(json_encode([
  'tenant_id' => '',
  'topic_id' => '',
  'principal_id' => '',
  'actions' => [
    
  ],
  'expires_at' => '',
  'operator_id' => ''
]));

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

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
append(json_encode([
  'tenant_id' => '',
  'topic_id' => '',
  'principal_id' => '',
  'actions' => [
    
  ],
  'expires_at' => '',
  'operator_id' => ''
]));
$request->setRequestUrl('{{baseUrl}}/event-fabric/acl/bindings:grant');
$request->setRequestMethod('POST');
$request->setBody($body);

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

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

echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/event-fabric/acl/bindings:grant' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "tenant_id": "",
  "topic_id": "",
  "principal_id": "",
  "actions": [],
  "expires_at": "",
  "operator_id": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/event-fabric/acl/bindings:grant' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "tenant_id": "",
  "topic_id": "",
  "principal_id": "",
  "actions": [],
  "expires_at": "",
  "operator_id": ""
}'
import http.client

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

payload = "{\n  \"tenant_id\": \"\",\n  \"topic_id\": \"\",\n  \"principal_id\": \"\",\n  \"actions\": [],\n  \"expires_at\": \"\",\n  \"operator_id\": \"\"\n}"

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

conn.request("POST", "/baseUrl/event-fabric/acl/bindings:grant", payload, headers)

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

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

url = "{{baseUrl}}/event-fabric/acl/bindings:grant"

payload = {
    "tenant_id": "",
    "topic_id": "",
    "principal_id": "",
    "actions": [],
    "expires_at": "",
    "operator_id": ""
}
headers = {"content-type": "application/json"}

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

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

url <- "{{baseUrl}}/event-fabric/acl/bindings:grant"

payload <- "{\n  \"tenant_id\": \"\",\n  \"topic_id\": \"\",\n  \"principal_id\": \"\",\n  \"actions\": [],\n  \"expires_at\": \"\",\n  \"operator_id\": \"\"\n}"

encode <- "json"

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

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

url = URI("{{baseUrl}}/event-fabric/acl/bindings:grant")

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

request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n  \"tenant_id\": \"\",\n  \"topic_id\": \"\",\n  \"principal_id\": \"\",\n  \"actions\": [],\n  \"expires_at\": \"\",\n  \"operator_id\": \"\"\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/event-fabric/acl/bindings:grant') do |req|
  req.body = "{\n  \"tenant_id\": \"\",\n  \"topic_id\": \"\",\n  \"principal_id\": \"\",\n  \"actions\": [],\n  \"expires_at\": \"\",\n  \"operator_id\": \"\"\n}"
end

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

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/event-fabric/acl/bindings:grant";

    let payload = json!({
        "tenant_id": "",
        "topic_id": "",
        "principal_id": "",
        "actions": (),
        "expires_at": "",
        "operator_id": ""
    });

    let mut headers = reqwest::header::HeaderMap::new();
    headers.insert("content-type", "application/json".parse().unwrap());

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

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

    dbg!(results);
}
curl --request POST \
  --url {{baseUrl}}/event-fabric/acl/bindings:grant \
  --header 'content-type: application/json' \
  --data '{
  "tenant_id": "",
  "topic_id": "",
  "principal_id": "",
  "actions": [],
  "expires_at": "",
  "operator_id": ""
}'
echo '{
  "tenant_id": "",
  "topic_id": "",
  "principal_id": "",
  "actions": [],
  "expires_at": "",
  "operator_id": ""
}' |  \
  http POST {{baseUrl}}/event-fabric/acl/bindings:grant \
  content-type:application/json
wget --quiet \
  --method POST \
  --header 'content-type: application/json' \
  --body-data '{\n  "tenant_id": "",\n  "topic_id": "",\n  "principal_id": "",\n  "actions": [],\n  "expires_at": "",\n  "operator_id": ""\n}' \
  --output-document \
  - {{baseUrl}}/event-fabric/acl/bindings:grant
import Foundation

let headers = ["content-type": "application/json"]
let parameters = [
  "tenant_id": "",
  "topic_id": "",
  "principal_id": "",
  "actions": [],
  "expires_at": "",
  "operator_id": ""
] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/event-fabric/acl/bindings:grant")! 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 撤销主题访问权限
{{baseUrl}}/event-fabric/acl/bindings:revoke
BODY json

{
  "tenant_id": "",
  "topic_id": "",
  "principal_id": "",
  "actions": [],
  "operator_id": ""
}
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/event-fabric/acl/bindings:revoke");

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

curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n  \"tenant_id\": \"\",\n  \"topic_id\": \"\",\n  \"principal_id\": \"\",\n  \"actions\": [],\n  \"operator_id\": \"\"\n}");

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

(client/post "{{baseUrl}}/event-fabric/acl/bindings:revoke" {:content-type :json
                                                                             :form-params {:tenant_id ""
                                                                                           :topic_id ""
                                                                                           :principal_id ""
                                                                                           :actions []
                                                                                           :operator_id ""}})
require "http/client"

url = "{{baseUrl}}/event-fabric/acl/bindings:revoke"
headers = HTTP::Headers{
  "content-type" => "application/json"
}
reqBody = "{\n  \"tenant_id\": \"\",\n  \"topic_id\": \"\",\n  \"principal_id\": \"\",\n  \"actions\": [],\n  \"operator_id\": \"\"\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}}/event-fabric/acl/bindings:revoke"),
    Content = new StringContent("{\n  \"tenant_id\": \"\",\n  \"topic_id\": \"\",\n  \"principal_id\": \"\",\n  \"actions\": [],\n  \"operator_id\": \"\"\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}}/event-fabric/acl/bindings:revoke");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n  \"tenant_id\": \"\",\n  \"topic_id\": \"\",\n  \"principal_id\": \"\",\n  \"actions\": [],\n  \"operator_id\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main

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

func main() {

	url := "{{baseUrl}}/event-fabric/acl/bindings:revoke"

	payload := strings.NewReader("{\n  \"tenant_id\": \"\",\n  \"topic_id\": \"\",\n  \"principal_id\": \"\",\n  \"actions\": [],\n  \"operator_id\": \"\"\n}")

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

	req.Header.Add("content-type", "application/json")

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

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

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

}
POST /baseUrl/event-fabric/acl/bindings:revoke HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 99

{
  "tenant_id": "",
  "topic_id": "",
  "principal_id": "",
  "actions": [],
  "operator_id": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/event-fabric/acl/bindings:revoke")
  .setHeader("content-type", "application/json")
  .setBody("{\n  \"tenant_id\": \"\",\n  \"topic_id\": \"\",\n  \"principal_id\": \"\",\n  \"actions\": [],\n  \"operator_id\": \"\"\n}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/event-fabric/acl/bindings:revoke"))
    .header("content-type", "application/json")
    .method("POST", HttpRequest.BodyPublishers.ofString("{\n  \"tenant_id\": \"\",\n  \"topic_id\": \"\",\n  \"principal_id\": \"\",\n  \"actions\": [],\n  \"operator_id\": \"\"\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  \"tenant_id\": \"\",\n  \"topic_id\": \"\",\n  \"principal_id\": \"\",\n  \"actions\": [],\n  \"operator_id\": \"\"\n}");
Request request = new Request.Builder()
  .url("{{baseUrl}}/event-fabric/acl/bindings:revoke")
  .post(body)
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/event-fabric/acl/bindings:revoke")
  .header("content-type", "application/json")
  .body("{\n  \"tenant_id\": \"\",\n  \"topic_id\": \"\",\n  \"principal_id\": \"\",\n  \"actions\": [],\n  \"operator_id\": \"\"\n}")
  .asString();
const data = JSON.stringify({
  tenant_id: '',
  topic_id: '',
  principal_id: '',
  actions: [],
  operator_id: ''
});

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

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

xhr.open('POST', '{{baseUrl}}/event-fabric/acl/bindings:revoke');
xhr.setRequestHeader('content-type', 'application/json');

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

const options = {
  method: 'POST',
  url: '{{baseUrl}}/event-fabric/acl/bindings:revoke',
  headers: {'content-type': 'application/json'},
  data: {tenant_id: '', topic_id: '', principal_id: '', actions: [], operator_id: ''}
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/event-fabric/acl/bindings:revoke';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"tenant_id":"","topic_id":"","principal_id":"","actions":[],"operator_id":""}'
};

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}}/event-fabric/acl/bindings:revoke',
  method: 'POST',
  headers: {
    'content-type': 'application/json'
  },
  processData: false,
  data: '{\n  "tenant_id": "",\n  "topic_id": "",\n  "principal_id": "",\n  "actions": [],\n  "operator_id": ""\n}'
};

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

val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n  \"tenant_id\": \"\",\n  \"topic_id\": \"\",\n  \"principal_id\": \"\",\n  \"actions\": [],\n  \"operator_id\": \"\"\n}")
val request = Request.Builder()
  .url("{{baseUrl}}/event-fabric/acl/bindings:revoke")
  .post(body)
  .addHeader("content-type", "application/json")
  .build()

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

const options = {
  method: 'POST',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/event-fabric/acl/bindings:revoke',
  headers: {
    'content-type': 'application/json'
  }
};

const req = http.request(options, function (res) {
  const chunks = [];

  res.on('data', function (chunk) {
    chunks.push(chunk);
  });

  res.on('end', function () {
    const body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.write(JSON.stringify({tenant_id: '', topic_id: '', principal_id: '', actions: [], operator_id: ''}));
req.end();
const request = require('request');

const options = {
  method: 'POST',
  url: '{{baseUrl}}/event-fabric/acl/bindings:revoke',
  headers: {'content-type': 'application/json'},
  body: {tenant_id: '', topic_id: '', principal_id: '', actions: [], operator_id: ''},
  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}}/event-fabric/acl/bindings:revoke');

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

req.type('json');
req.send({
  tenant_id: '',
  topic_id: '',
  principal_id: '',
  actions: [],
  operator_id: ''
});

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}}/event-fabric/acl/bindings:revoke',
  headers: {'content-type': 'application/json'},
  data: {tenant_id: '', topic_id: '', principal_id: '', actions: [], operator_id: ''}
};

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

const url = '{{baseUrl}}/event-fabric/acl/bindings:revoke';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"tenant_id":"","topic_id":"","principal_id":"","actions":[],"operator_id":""}'
};

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

NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"tenant_id": @"",
                              @"topic_id": @"",
                              @"principal_id": @"",
                              @"actions": @[  ],
                              @"operator_id": @"" };

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

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/event-fabric/acl/bindings:revoke"]
                                                       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}}/event-fabric/acl/bindings:revoke" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n  \"tenant_id\": \"\",\n  \"topic_id\": \"\",\n  \"principal_id\": \"\",\n  \"actions\": [],\n  \"operator_id\": \"\"\n}" in

Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/event-fabric/acl/bindings:revoke",
  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([
    'tenant_id' => '',
    'topic_id' => '',
    'principal_id' => '',
    'actions' => [
        
    ],
    'operator_id' => ''
  ]),
  CURLOPT_HTTPHEADER => [
    "content-type: application/json"
  ],
]);

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

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('POST', '{{baseUrl}}/event-fabric/acl/bindings:revoke', [
  'body' => '{
  "tenant_id": "",
  "topic_id": "",
  "principal_id": "",
  "actions": [],
  "operator_id": ""
}',
  'headers' => [
    'content-type' => 'application/json',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/event-fabric/acl/bindings:revoke');
$request->setMethod(HTTP_METH_POST);

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

$request->setContentType('application/json');
$request->setBody(json_encode([
  'tenant_id' => '',
  'topic_id' => '',
  'principal_id' => '',
  'actions' => [
    
  ],
  'operator_id' => ''
]));

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

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
append(json_encode([
  'tenant_id' => '',
  'topic_id' => '',
  'principal_id' => '',
  'actions' => [
    
  ],
  'operator_id' => ''
]));
$request->setRequestUrl('{{baseUrl}}/event-fabric/acl/bindings:revoke');
$request->setRequestMethod('POST');
$request->setBody($body);

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

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

echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/event-fabric/acl/bindings:revoke' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "tenant_id": "",
  "topic_id": "",
  "principal_id": "",
  "actions": [],
  "operator_id": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/event-fabric/acl/bindings:revoke' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "tenant_id": "",
  "topic_id": "",
  "principal_id": "",
  "actions": [],
  "operator_id": ""
}'
import http.client

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

payload = "{\n  \"tenant_id\": \"\",\n  \"topic_id\": \"\",\n  \"principal_id\": \"\",\n  \"actions\": [],\n  \"operator_id\": \"\"\n}"

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

conn.request("POST", "/baseUrl/event-fabric/acl/bindings:revoke", payload, headers)

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

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

url = "{{baseUrl}}/event-fabric/acl/bindings:revoke"

payload = {
    "tenant_id": "",
    "topic_id": "",
    "principal_id": "",
    "actions": [],
    "operator_id": ""
}
headers = {"content-type": "application/json"}

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

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

url <- "{{baseUrl}}/event-fabric/acl/bindings:revoke"

payload <- "{\n  \"tenant_id\": \"\",\n  \"topic_id\": \"\",\n  \"principal_id\": \"\",\n  \"actions\": [],\n  \"operator_id\": \"\"\n}"

encode <- "json"

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

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

url = URI("{{baseUrl}}/event-fabric/acl/bindings:revoke")

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

request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n  \"tenant_id\": \"\",\n  \"topic_id\": \"\",\n  \"principal_id\": \"\",\n  \"actions\": [],\n  \"operator_id\": \"\"\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/event-fabric/acl/bindings:revoke') do |req|
  req.body = "{\n  \"tenant_id\": \"\",\n  \"topic_id\": \"\",\n  \"principal_id\": \"\",\n  \"actions\": [],\n  \"operator_id\": \"\"\n}"
end

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

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/event-fabric/acl/bindings:revoke";

    let payload = json!({
        "tenant_id": "",
        "topic_id": "",
        "principal_id": "",
        "actions": (),
        "operator_id": ""
    });

    let mut headers = reqwest::header::HeaderMap::new();
    headers.insert("content-type", "application/json".parse().unwrap());

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

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

    dbg!(results);
}
curl --request POST \
  --url {{baseUrl}}/event-fabric/acl/bindings:revoke \
  --header 'content-type: application/json' \
  --data '{
  "tenant_id": "",
  "topic_id": "",
  "principal_id": "",
  "actions": [],
  "operator_id": ""
}'
echo '{
  "tenant_id": "",
  "topic_id": "",
  "principal_id": "",
  "actions": [],
  "operator_id": ""
}' |  \
  http POST {{baseUrl}}/event-fabric/acl/bindings:revoke \
  content-type:application/json
wget --quiet \
  --method POST \
  --header 'content-type: application/json' \
  --body-data '{\n  "tenant_id": "",\n  "topic_id": "",\n  "principal_id": "",\n  "actions": [],\n  "operator_id": ""\n}' \
  --output-document \
  - {{baseUrl}}/event-fabric/acl/bindings:revoke
import Foundation

let headers = ["content-type": "application/json"]
let parameters = [
  "tenant_id": "",
  "topic_id": "",
  "principal_id": "",
  "actions": [],
  "operator_id": ""
] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/event-fabric/acl/bindings:revoke")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
GET 查询授权绑定
{{baseUrl}}/event-fabric/acl/bindings
QUERY PARAMS

tenant_id
topic_id
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/event-fabric/acl/bindings?tenant_id=&topic_id=");

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

(client/get "{{baseUrl}}/event-fabric/acl/bindings" {:query-params {:tenant_id ""
                                                                                    :topic_id ""}})
require "http/client"

url = "{{baseUrl}}/event-fabric/acl/bindings?tenant_id=&topic_id="

response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
    Method = HttpMethod.Get,
    RequestUri = new Uri("{{baseUrl}}/event-fabric/acl/bindings?tenant_id=&topic_id="),
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/event-fabric/acl/bindings?tenant_id=&topic_id=");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main

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

func main() {

	url := "{{baseUrl}}/event-fabric/acl/bindings?tenant_id=&topic_id="

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

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

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

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

}
GET /baseUrl/event-fabric/acl/bindings?tenant_id=&topic_id= HTTP/1.1
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/event-fabric/acl/bindings?tenant_id=&topic_id=")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/event-fabric/acl/bindings?tenant_id=&topic_id="))
    .method("GET", HttpRequest.BodyPublishers.noBody())
    .build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("{{baseUrl}}/event-fabric/acl/bindings?tenant_id=&topic_id=")
  .get()
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/event-fabric/acl/bindings?tenant_id=&topic_id=")
  .asString();
const data = null;

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

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

xhr.open('GET', '{{baseUrl}}/event-fabric/acl/bindings?tenant_id=&topic_id=');

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

const options = {
  method: 'GET',
  url: '{{baseUrl}}/event-fabric/acl/bindings',
  params: {tenant_id: '', topic_id: ''}
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/event-fabric/acl/bindings?tenant_id=&topic_id=';
const options = {method: 'GET'};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
const settings = {
  async: true,
  crossDomain: true,
  url: '{{baseUrl}}/event-fabric/acl/bindings?tenant_id=&topic_id=',
  method: 'GET',
  headers: {}
};

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

val request = Request.Builder()
  .url("{{baseUrl}}/event-fabric/acl/bindings?tenant_id=&topic_id=")
  .get()
  .build()

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

const options = {
  method: 'GET',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/event-fabric/acl/bindings?tenant_id=&topic_id=',
  headers: {}
};

const req = http.request(options, function (res) {
  const chunks = [];

  res.on('data', function (chunk) {
    chunks.push(chunk);
  });

  res.on('end', function () {
    const body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.end();
const request = require('request');

const options = {
  method: 'GET',
  url: '{{baseUrl}}/event-fabric/acl/bindings',
  qs: {tenant_id: '', topic_id: ''}
};

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

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

const req = unirest('GET', '{{baseUrl}}/event-fabric/acl/bindings');

req.query({
  tenant_id: '',
  topic_id: ''
});

req.end(function (res) {
  if (res.error) throw new Error(res.error);

  console.log(res.body);
});
const axios = require('axios').default;

const options = {
  method: 'GET',
  url: '{{baseUrl}}/event-fabric/acl/bindings',
  params: {tenant_id: '', topic_id: ''}
};

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

const url = '{{baseUrl}}/event-fabric/acl/bindings?tenant_id=&topic_id=';
const options = {method: 'GET'};

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

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/event-fabric/acl/bindings?tenant_id=&topic_id="]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];

NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
                                            completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                if (error) {
                                                    NSLog(@"%@", error);
                                                } else {
                                                    NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                    NSLog(@"%@", httpResponse);
                                                }
                                            }];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt

let uri = Uri.of_string "{{baseUrl}}/event-fabric/acl/bindings?tenant_id=&topic_id=" in

Client.call `GET uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/event-fabric/acl/bindings?tenant_id=&topic_id=",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
]);

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

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('GET', '{{baseUrl}}/event-fabric/acl/bindings?tenant_id=&topic_id=');

echo $response->getBody();
setUrl('{{baseUrl}}/event-fabric/acl/bindings');
$request->setMethod(HTTP_METH_GET);

$request->setQueryData([
  'tenant_id' => '',
  'topic_id' => ''
]);

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

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/event-fabric/acl/bindings');
$request->setRequestMethod('GET');
$request->setQuery(new http\QueryString([
  'tenant_id' => '',
  'topic_id' => ''
]));

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

echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/event-fabric/acl/bindings?tenant_id=&topic_id=' -Method GET 
$response = Invoke-RestMethod -Uri '{{baseUrl}}/event-fabric/acl/bindings?tenant_id=&topic_id=' -Method GET 
import http.client

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

conn.request("GET", "/baseUrl/event-fabric/acl/bindings?tenant_id=&topic_id=")

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

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

url = "{{baseUrl}}/event-fabric/acl/bindings"

querystring = {"tenant_id":"","topic_id":""}

response = requests.get(url, params=querystring)

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

url <- "{{baseUrl}}/event-fabric/acl/bindings"

queryString <- list(
  tenant_id = "",
  topic_id = ""
)

response <- VERB("GET", url, query = queryString, content_type("application/octet-stream"))

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

url = URI("{{baseUrl}}/event-fabric/acl/bindings?tenant_id=&topic_id=")

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

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

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

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

response = conn.get('/baseUrl/event-fabric/acl/bindings') do |req|
  req.params['tenant_id'] = ''
  req.params['topic_id'] = ''
end

puts response.status
puts response.body
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/event-fabric/acl/bindings";

    let querystring = [
        ("tenant_id", ""),
        ("topic_id", ""),
    ];

    let client = reqwest::Client::new();
    let response = client.get(url)
        .query(&querystring)
        .send()
        .await;

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

    dbg!(results);
}
curl --request GET \
  --url '{{baseUrl}}/event-fabric/acl/bindings?tenant_id=&topic_id='
http GET '{{baseUrl}}/event-fabric/acl/bindings?tenant_id=&topic_id='
wget --quiet \
  --method GET \
  --output-document \
  - '{{baseUrl}}/event-fabric/acl/bindings?tenant_id=&topic_id='
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/event-fabric/acl/bindings?tenant_id=&topic_id=")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
POST 管理端模拟发布事件
{{baseUrl}}/event-fabric/events:publish
BODY json

{
  "tenant_id": "",
  "topic": "",
  "event_id": "",
  "trace_id": "",
  "version": "",
  "payload": "",
  "payload_format": "",
  "idempotency_key": "",
  "attributes": {}
}
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/event-fabric/events:publish");

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

curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n  \"tenant_id\": \"\",\n  \"topic\": \"\",\n  \"event_id\": \"\",\n  \"trace_id\": \"\",\n  \"version\": \"\",\n  \"payload\": \"\",\n  \"payload_format\": \"\",\n  \"idempotency_key\": \"\",\n  \"attributes\": {}\n}");

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

(client/post "{{baseUrl}}/event-fabric/events:publish" {:content-type :json
                                                                        :form-params {:tenant_id ""
                                                                                      :topic ""
                                                                                      :event_id ""
                                                                                      :trace_id ""
                                                                                      :version ""
                                                                                      :payload ""
                                                                                      :payload_format ""
                                                                                      :idempotency_key ""
                                                                                      :attributes {}}})
require "http/client"

url = "{{baseUrl}}/event-fabric/events:publish"
headers = HTTP::Headers{
  "content-type" => "application/json"
}
reqBody = "{\n  \"tenant_id\": \"\",\n  \"topic\": \"\",\n  \"event_id\": \"\",\n  \"trace_id\": \"\",\n  \"version\": \"\",\n  \"payload\": \"\",\n  \"payload_format\": \"\",\n  \"idempotency_key\": \"\",\n  \"attributes\": {}\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}}/event-fabric/events:publish"),
    Content = new StringContent("{\n  \"tenant_id\": \"\",\n  \"topic\": \"\",\n  \"event_id\": \"\",\n  \"trace_id\": \"\",\n  \"version\": \"\",\n  \"payload\": \"\",\n  \"payload_format\": \"\",\n  \"idempotency_key\": \"\",\n  \"attributes\": {}\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}}/event-fabric/events:publish");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n  \"tenant_id\": \"\",\n  \"topic\": \"\",\n  \"event_id\": \"\",\n  \"trace_id\": \"\",\n  \"version\": \"\",\n  \"payload\": \"\",\n  \"payload_format\": \"\",\n  \"idempotency_key\": \"\",\n  \"attributes\": {}\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main

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

func main() {

	url := "{{baseUrl}}/event-fabric/events:publish"

	payload := strings.NewReader("{\n  \"tenant_id\": \"\",\n  \"topic\": \"\",\n  \"event_id\": \"\",\n  \"trace_id\": \"\",\n  \"version\": \"\",\n  \"payload\": \"\",\n  \"payload_format\": \"\",\n  \"idempotency_key\": \"\",\n  \"attributes\": {}\n}")

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

	req.Header.Add("content-type", "application/json")

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

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

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

}
POST /baseUrl/event-fabric/events:publish HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 175

{
  "tenant_id": "",
  "topic": "",
  "event_id": "",
  "trace_id": "",
  "version": "",
  "payload": "",
  "payload_format": "",
  "idempotency_key": "",
  "attributes": {}
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/event-fabric/events:publish")
  .setHeader("content-type", "application/json")
  .setBody("{\n  \"tenant_id\": \"\",\n  \"topic\": \"\",\n  \"event_id\": \"\",\n  \"trace_id\": \"\",\n  \"version\": \"\",\n  \"payload\": \"\",\n  \"payload_format\": \"\",\n  \"idempotency_key\": \"\",\n  \"attributes\": {}\n}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/event-fabric/events:publish"))
    .header("content-type", "application/json")
    .method("POST", HttpRequest.BodyPublishers.ofString("{\n  \"tenant_id\": \"\",\n  \"topic\": \"\",\n  \"event_id\": \"\",\n  \"trace_id\": \"\",\n  \"version\": \"\",\n  \"payload\": \"\",\n  \"payload_format\": \"\",\n  \"idempotency_key\": \"\",\n  \"attributes\": {}\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  \"tenant_id\": \"\",\n  \"topic\": \"\",\n  \"event_id\": \"\",\n  \"trace_id\": \"\",\n  \"version\": \"\",\n  \"payload\": \"\",\n  \"payload_format\": \"\",\n  \"idempotency_key\": \"\",\n  \"attributes\": {}\n}");
Request request = new Request.Builder()
  .url("{{baseUrl}}/event-fabric/events:publish")
  .post(body)
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/event-fabric/events:publish")
  .header("content-type", "application/json")
  .body("{\n  \"tenant_id\": \"\",\n  \"topic\": \"\",\n  \"event_id\": \"\",\n  \"trace_id\": \"\",\n  \"version\": \"\",\n  \"payload\": \"\",\n  \"payload_format\": \"\",\n  \"idempotency_key\": \"\",\n  \"attributes\": {}\n}")
  .asString();
const data = JSON.stringify({
  tenant_id: '',
  topic: '',
  event_id: '',
  trace_id: '',
  version: '',
  payload: '',
  payload_format: '',
  idempotency_key: '',
  attributes: {}
});

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

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

xhr.open('POST', '{{baseUrl}}/event-fabric/events:publish');
xhr.setRequestHeader('content-type', 'application/json');

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

const options = {
  method: 'POST',
  url: '{{baseUrl}}/event-fabric/events:publish',
  headers: {'content-type': 'application/json'},
  data: {
    tenant_id: '',
    topic: '',
    event_id: '',
    trace_id: '',
    version: '',
    payload: '',
    payload_format: '',
    idempotency_key: '',
    attributes: {}
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/event-fabric/events:publish';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"tenant_id":"","topic":"","event_id":"","trace_id":"","version":"","payload":"","payload_format":"","idempotency_key":"","attributes":{}}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
const settings = {
  async: true,
  crossDomain: true,
  url: '{{baseUrl}}/event-fabric/events:publish',
  method: 'POST',
  headers: {
    'content-type': 'application/json'
  },
  processData: false,
  data: '{\n  "tenant_id": "",\n  "topic": "",\n  "event_id": "",\n  "trace_id": "",\n  "version": "",\n  "payload": "",\n  "payload_format": "",\n  "idempotency_key": "",\n  "attributes": {}\n}'
};

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

val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n  \"tenant_id\": \"\",\n  \"topic\": \"\",\n  \"event_id\": \"\",\n  \"trace_id\": \"\",\n  \"version\": \"\",\n  \"payload\": \"\",\n  \"payload_format\": \"\",\n  \"idempotency_key\": \"\",\n  \"attributes\": {}\n}")
val request = Request.Builder()
  .url("{{baseUrl}}/event-fabric/events:publish")
  .post(body)
  .addHeader("content-type", "application/json")
  .build()

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

const options = {
  method: 'POST',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/event-fabric/events:publish',
  headers: {
    'content-type': 'application/json'
  }
};

const req = http.request(options, function (res) {
  const chunks = [];

  res.on('data', function (chunk) {
    chunks.push(chunk);
  });

  res.on('end', function () {
    const body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.write(JSON.stringify({
  tenant_id: '',
  topic: '',
  event_id: '',
  trace_id: '',
  version: '',
  payload: '',
  payload_format: '',
  idempotency_key: '',
  attributes: {}
}));
req.end();
const request = require('request');

const options = {
  method: 'POST',
  url: '{{baseUrl}}/event-fabric/events:publish',
  headers: {'content-type': 'application/json'},
  body: {
    tenant_id: '',
    topic: '',
    event_id: '',
    trace_id: '',
    version: '',
    payload: '',
    payload_format: '',
    idempotency_key: '',
    attributes: {}
  },
  json: true
};

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

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

const req = unirest('POST', '{{baseUrl}}/event-fabric/events:publish');

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

req.type('json');
req.send({
  tenant_id: '',
  topic: '',
  event_id: '',
  trace_id: '',
  version: '',
  payload: '',
  payload_format: '',
  idempotency_key: '',
  attributes: {}
});

req.end(function (res) {
  if (res.error) throw new Error(res.error);

  console.log(res.body);
});
const axios = require('axios').default;

const options = {
  method: 'POST',
  url: '{{baseUrl}}/event-fabric/events:publish',
  headers: {'content-type': 'application/json'},
  data: {
    tenant_id: '',
    topic: '',
    event_id: '',
    trace_id: '',
    version: '',
    payload: '',
    payload_format: '',
    idempotency_key: '',
    attributes: {}
  }
};

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

const url = '{{baseUrl}}/event-fabric/events:publish';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"tenant_id":"","topic":"","event_id":"","trace_id":"","version":"","payload":"","payload_format":"","idempotency_key":"","attributes":{}}'
};

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

NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"tenant_id": @"",
                              @"topic": @"",
                              @"event_id": @"",
                              @"trace_id": @"",
                              @"version": @"",
                              @"payload": @"",
                              @"payload_format": @"",
                              @"idempotency_key": @"",
                              @"attributes": @{  } };

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

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/event-fabric/events:publish"]
                                                       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}}/event-fabric/events:publish" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n  \"tenant_id\": \"\",\n  \"topic\": \"\",\n  \"event_id\": \"\",\n  \"trace_id\": \"\",\n  \"version\": \"\",\n  \"payload\": \"\",\n  \"payload_format\": \"\",\n  \"idempotency_key\": \"\",\n  \"attributes\": {}\n}" in

Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/event-fabric/events:publish",
  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([
    'tenant_id' => '',
    'topic' => '',
    'event_id' => '',
    'trace_id' => '',
    'version' => '',
    'payload' => '',
    'payload_format' => '',
    'idempotency_key' => '',
    'attributes' => [
        
    ]
  ]),
  CURLOPT_HTTPHEADER => [
    "content-type: application/json"
  ],
]);

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

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('POST', '{{baseUrl}}/event-fabric/events:publish', [
  'body' => '{
  "tenant_id": "",
  "topic": "",
  "event_id": "",
  "trace_id": "",
  "version": "",
  "payload": "",
  "payload_format": "",
  "idempotency_key": "",
  "attributes": {}
}',
  'headers' => [
    'content-type' => 'application/json',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/event-fabric/events:publish');
$request->setMethod(HTTP_METH_POST);

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

$request->setContentType('application/json');
$request->setBody(json_encode([
  'tenant_id' => '',
  'topic' => '',
  'event_id' => '',
  'trace_id' => '',
  'version' => '',
  'payload' => '',
  'payload_format' => '',
  'idempotency_key' => '',
  'attributes' => [
    
  ]
]));

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

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
append(json_encode([
  'tenant_id' => '',
  'topic' => '',
  'event_id' => '',
  'trace_id' => '',
  'version' => '',
  'payload' => '',
  'payload_format' => '',
  'idempotency_key' => '',
  'attributes' => [
    
  ]
]));
$request->setRequestUrl('{{baseUrl}}/event-fabric/events:publish');
$request->setRequestMethod('POST');
$request->setBody($body);

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

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

echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/event-fabric/events:publish' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "tenant_id": "",
  "topic": "",
  "event_id": "",
  "trace_id": "",
  "version": "",
  "payload": "",
  "payload_format": "",
  "idempotency_key": "",
  "attributes": {}
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/event-fabric/events:publish' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "tenant_id": "",
  "topic": "",
  "event_id": "",
  "trace_id": "",
  "version": "",
  "payload": "",
  "payload_format": "",
  "idempotency_key": "",
  "attributes": {}
}'
import http.client

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

payload = "{\n  \"tenant_id\": \"\",\n  \"topic\": \"\",\n  \"event_id\": \"\",\n  \"trace_id\": \"\",\n  \"version\": \"\",\n  \"payload\": \"\",\n  \"payload_format\": \"\",\n  \"idempotency_key\": \"\",\n  \"attributes\": {}\n}"

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

conn.request("POST", "/baseUrl/event-fabric/events:publish", payload, headers)

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

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

url = "{{baseUrl}}/event-fabric/events:publish"

payload = {
    "tenant_id": "",
    "topic": "",
    "event_id": "",
    "trace_id": "",
    "version": "",
    "payload": "",
    "payload_format": "",
    "idempotency_key": "",
    "attributes": {}
}
headers = {"content-type": "application/json"}

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

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

url <- "{{baseUrl}}/event-fabric/events:publish"

payload <- "{\n  \"tenant_id\": \"\",\n  \"topic\": \"\",\n  \"event_id\": \"\",\n  \"trace_id\": \"\",\n  \"version\": \"\",\n  \"payload\": \"\",\n  \"payload_format\": \"\",\n  \"idempotency_key\": \"\",\n  \"attributes\": {}\n}"

encode <- "json"

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

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

url = URI("{{baseUrl}}/event-fabric/events:publish")

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

request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n  \"tenant_id\": \"\",\n  \"topic\": \"\",\n  \"event_id\": \"\",\n  \"trace_id\": \"\",\n  \"version\": \"\",\n  \"payload\": \"\",\n  \"payload_format\": \"\",\n  \"idempotency_key\": \"\",\n  \"attributes\": {}\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/event-fabric/events:publish') do |req|
  req.body = "{\n  \"tenant_id\": \"\",\n  \"topic\": \"\",\n  \"event_id\": \"\",\n  \"trace_id\": \"\",\n  \"version\": \"\",\n  \"payload\": \"\",\n  \"payload_format\": \"\",\n  \"idempotency_key\": \"\",\n  \"attributes\": {}\n}"
end

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

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/event-fabric/events:publish";

    let payload = json!({
        "tenant_id": "",
        "topic": "",
        "event_id": "",
        "trace_id": "",
        "version": "",
        "payload": "",
        "payload_format": "",
        "idempotency_key": "",
        "attributes": json!({})
    });

    let mut headers = reqwest::header::HeaderMap::new();
    headers.insert("content-type", "application/json".parse().unwrap());

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

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

    dbg!(results);
}
curl --request POST \
  --url {{baseUrl}}/event-fabric/events:publish \
  --header 'content-type: application/json' \
  --data '{
  "tenant_id": "",
  "topic": "",
  "event_id": "",
  "trace_id": "",
  "version": "",
  "payload": "",
  "payload_format": "",
  "idempotency_key": "",
  "attributes": {}
}'
echo '{
  "tenant_id": "",
  "topic": "",
  "event_id": "",
  "trace_id": "",
  "version": "",
  "payload": "",
  "payload_format": "",
  "idempotency_key": "",
  "attributes": {}
}' |  \
  http POST {{baseUrl}}/event-fabric/events:publish \
  content-type:application/json
wget --quiet \
  --method POST \
  --header 'content-type: application/json' \
  --body-data '{\n  "tenant_id": "",\n  "topic": "",\n  "event_id": "",\n  "trace_id": "",\n  "version": "",\n  "payload": "",\n  "payload_format": "",\n  "idempotency_key": "",\n  "attributes": {}\n}' \
  --output-document \
  - {{baseUrl}}/event-fabric/events:publish
import Foundation

let headers = ["content-type": "application/json"]
let parameters = [
  "tenant_id": "",
  "topic": "",
  "event_id": "",
  "trace_id": "",
  "version": "",
  "payload": "",
  "payload_format": "",
  "idempotency_key": "",
  "attributes": []
] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/event-fabric/events:publish")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
GET 分页查询死信消息
{{baseUrl}}/event-fabric/dlq/messages
QUERY PARAMS

tenant_id
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/event-fabric/dlq/messages?tenant_id=");

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

(client/get "{{baseUrl}}/event-fabric/dlq/messages" {:query-params {:tenant_id ""}})
require "http/client"

url = "{{baseUrl}}/event-fabric/dlq/messages?tenant_id="

response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
    Method = HttpMethod.Get,
    RequestUri = new Uri("{{baseUrl}}/event-fabric/dlq/messages?tenant_id="),
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/event-fabric/dlq/messages?tenant_id=");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main

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

func main() {

	url := "{{baseUrl}}/event-fabric/dlq/messages?tenant_id="

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

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

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

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

}
GET /baseUrl/event-fabric/dlq/messages?tenant_id= HTTP/1.1
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/event-fabric/dlq/messages?tenant_id=")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/event-fabric/dlq/messages?tenant_id="))
    .method("GET", HttpRequest.BodyPublishers.noBody())
    .build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("{{baseUrl}}/event-fabric/dlq/messages?tenant_id=")
  .get()
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/event-fabric/dlq/messages?tenant_id=")
  .asString();
const data = null;

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

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

xhr.open('GET', '{{baseUrl}}/event-fabric/dlq/messages?tenant_id=');

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

const options = {
  method: 'GET',
  url: '{{baseUrl}}/event-fabric/dlq/messages',
  params: {tenant_id: ''}
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/event-fabric/dlq/messages?tenant_id=';
const options = {method: 'GET'};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
const settings = {
  async: true,
  crossDomain: true,
  url: '{{baseUrl}}/event-fabric/dlq/messages?tenant_id=',
  method: 'GET',
  headers: {}
};

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

val request = Request.Builder()
  .url("{{baseUrl}}/event-fabric/dlq/messages?tenant_id=")
  .get()
  .build()

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

const options = {
  method: 'GET',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/event-fabric/dlq/messages?tenant_id=',
  headers: {}
};

const req = http.request(options, function (res) {
  const chunks = [];

  res.on('data', function (chunk) {
    chunks.push(chunk);
  });

  res.on('end', function () {
    const body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.end();
const request = require('request');

const options = {
  method: 'GET',
  url: '{{baseUrl}}/event-fabric/dlq/messages',
  qs: {tenant_id: ''}
};

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

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

const req = unirest('GET', '{{baseUrl}}/event-fabric/dlq/messages');

req.query({
  tenant_id: ''
});

req.end(function (res) {
  if (res.error) throw new Error(res.error);

  console.log(res.body);
});
const axios = require('axios').default;

const options = {
  method: 'GET',
  url: '{{baseUrl}}/event-fabric/dlq/messages',
  params: {tenant_id: ''}
};

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

const url = '{{baseUrl}}/event-fabric/dlq/messages?tenant_id=';
const options = {method: 'GET'};

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

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/event-fabric/dlq/messages?tenant_id="]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];

NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
                                            completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                if (error) {
                                                    NSLog(@"%@", error);
                                                } else {
                                                    NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                    NSLog(@"%@", httpResponse);
                                                }
                                            }];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt

let uri = Uri.of_string "{{baseUrl}}/event-fabric/dlq/messages?tenant_id=" in

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

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

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('GET', '{{baseUrl}}/event-fabric/dlq/messages?tenant_id=');

echo $response->getBody();
setUrl('{{baseUrl}}/event-fabric/dlq/messages');
$request->setMethod(HTTP_METH_GET);

$request->setQueryData([
  'tenant_id' => ''
]);

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

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/event-fabric/dlq/messages');
$request->setRequestMethod('GET');
$request->setQuery(new http\QueryString([
  'tenant_id' => ''
]));

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

echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/event-fabric/dlq/messages?tenant_id=' -Method GET 
$response = Invoke-RestMethod -Uri '{{baseUrl}}/event-fabric/dlq/messages?tenant_id=' -Method GET 
import http.client

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

conn.request("GET", "/baseUrl/event-fabric/dlq/messages?tenant_id=")

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

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

url = "{{baseUrl}}/event-fabric/dlq/messages"

querystring = {"tenant_id":""}

response = requests.get(url, params=querystring)

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

url <- "{{baseUrl}}/event-fabric/dlq/messages"

queryString <- list(tenant_id = "")

response <- VERB("GET", url, query = queryString, content_type("application/octet-stream"))

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

url = URI("{{baseUrl}}/event-fabric/dlq/messages?tenant_id=")

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

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

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

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

response = conn.get('/baseUrl/event-fabric/dlq/messages') do |req|
  req.params['tenant_id'] = ''
end

puts response.status
puts response.body
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/event-fabric/dlq/messages";

    let querystring = [
        ("tenant_id", ""),
    ];

    let client = reqwest::Client::new();
    let response = client.get(url)
        .query(&querystring)
        .send()
        .await;

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

    dbg!(results);
}
curl --request GET \
  --url '{{baseUrl}}/event-fabric/dlq/messages?tenant_id='
http GET '{{baseUrl}}/event-fabric/dlq/messages?tenant_id='
wget --quiet \
  --method GET \
  --output-document \
  - '{{baseUrl}}/event-fabric/dlq/messages?tenant_id='
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/event-fabric/dlq/messages?tenant_id=")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
POST 批量重放死信消息
{{baseUrl}}/event-fabric/dlq/messages:replay
BODY json

{
  "message_ids": [],
  "operator_id": "",
  "notes": ""
}
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/event-fabric/dlq/messages:replay");

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

curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n  \"message_ids\": [],\n  \"operator_id\": \"\",\n  \"notes\": \"\"\n}");

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

(client/post "{{baseUrl}}/event-fabric/dlq/messages:replay" {:content-type :json
                                                                             :form-params {:message_ids []
                                                                                           :operator_id ""
                                                                                           :notes ""}})
require "http/client"

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

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

func main() {

	url := "{{baseUrl}}/event-fabric/dlq/messages:replay"

	payload := strings.NewReader("{\n  \"message_ids\": [],\n  \"operator_id\": \"\",\n  \"notes\": \"\"\n}")

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

	req.Header.Add("content-type", "application/json")

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

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

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

}
POST /baseUrl/event-fabric/dlq/messages:replay HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 59

{
  "message_ids": [],
  "operator_id": "",
  "notes": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/event-fabric/dlq/messages:replay")
  .setHeader("content-type", "application/json")
  .setBody("{\n  \"message_ids\": [],\n  \"operator_id\": \"\",\n  \"notes\": \"\"\n}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

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

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/event-fabric/dlq/messages:replay")
  .header("content-type", "application/json")
  .body("{\n  \"message_ids\": [],\n  \"operator_id\": \"\",\n  \"notes\": \"\"\n}")
  .asString();
const data = JSON.stringify({
  message_ids: [],
  operator_id: '',
  notes: ''
});

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

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

xhr.open('POST', '{{baseUrl}}/event-fabric/dlq/messages:replay');
xhr.setRequestHeader('content-type', 'application/json');

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

const options = {
  method: 'POST',
  url: '{{baseUrl}}/event-fabric/dlq/messages:replay',
  headers: {'content-type': 'application/json'},
  data: {message_ids: [], operator_id: '', notes: ''}
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/event-fabric/dlq/messages:replay';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"message_ids":[],"operator_id":"","notes":""}'
};

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}}/event-fabric/dlq/messages:replay',
  method: 'POST',
  headers: {
    'content-type': 'application/json'
  },
  processData: false,
  data: '{\n  "message_ids": [],\n  "operator_id": "",\n  "notes": ""\n}'
};

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

val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n  \"message_ids\": [],\n  \"operator_id\": \"\",\n  \"notes\": \"\"\n}")
val request = Request.Builder()
  .url("{{baseUrl}}/event-fabric/dlq/messages:replay")
  .post(body)
  .addHeader("content-type", "application/json")
  .build()

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

const options = {
  method: 'POST',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/event-fabric/dlq/messages:replay',
  headers: {
    'content-type': 'application/json'
  }
};

const req = http.request(options, function (res) {
  const chunks = [];

  res.on('data', function (chunk) {
    chunks.push(chunk);
  });

  res.on('end', function () {
    const body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.write(JSON.stringify({message_ids: [], operator_id: '', notes: ''}));
req.end();
const request = require('request');

const options = {
  method: 'POST',
  url: '{{baseUrl}}/event-fabric/dlq/messages:replay',
  headers: {'content-type': 'application/json'},
  body: {message_ids: [], operator_id: '', notes: ''},
  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}}/event-fabric/dlq/messages:replay');

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

req.type('json');
req.send({
  message_ids: [],
  operator_id: '',
  notes: ''
});

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}}/event-fabric/dlq/messages:replay',
  headers: {'content-type': 'application/json'},
  data: {message_ids: [], operator_id: '', notes: ''}
};

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

const url = '{{baseUrl}}/event-fabric/dlq/messages:replay';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"message_ids":[],"operator_id":"","notes":""}'
};

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

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

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

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/event-fabric/dlq/messages:replay"]
                                                       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}}/event-fabric/dlq/messages:replay" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n  \"message_ids\": [],\n  \"operator_id\": \"\",\n  \"notes\": \"\"\n}" in

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

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

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('POST', '{{baseUrl}}/event-fabric/dlq/messages:replay', [
  'body' => '{
  "message_ids": [],
  "operator_id": "",
  "notes": ""
}',
  'headers' => [
    'content-type' => 'application/json',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/event-fabric/dlq/messages:replay');
$request->setMethod(HTTP_METH_POST);

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

$request->setContentType('application/json');
$request->setBody(json_encode([
  'message_ids' => [
    
  ],
  'operator_id' => '',
  'notes' => ''
]));

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

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
append(json_encode([
  'message_ids' => [
    
  ],
  'operator_id' => '',
  'notes' => ''
]));
$request->setRequestUrl('{{baseUrl}}/event-fabric/dlq/messages:replay');
$request->setRequestMethod('POST');
$request->setBody($body);

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

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

echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/event-fabric/dlq/messages:replay' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "message_ids": [],
  "operator_id": "",
  "notes": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/event-fabric/dlq/messages:replay' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "message_ids": [],
  "operator_id": "",
  "notes": ""
}'
import http.client

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

payload = "{\n  \"message_ids\": [],\n  \"operator_id\": \"\",\n  \"notes\": \"\"\n}"

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

conn.request("POST", "/baseUrl/event-fabric/dlq/messages:replay", payload, headers)

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

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

url = "{{baseUrl}}/event-fabric/dlq/messages:replay"

payload = {
    "message_ids": [],
    "operator_id": "",
    "notes": ""
}
headers = {"content-type": "application/json"}

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

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

url <- "{{baseUrl}}/event-fabric/dlq/messages:replay"

payload <- "{\n  \"message_ids\": [],\n  \"operator_id\": \"\",\n  \"notes\": \"\"\n}"

encode <- "json"

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

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

url = URI("{{baseUrl}}/event-fabric/dlq/messages:replay")

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

request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n  \"message_ids\": [],\n  \"operator_id\": \"\",\n  \"notes\": \"\"\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/event-fabric/dlq/messages:replay') do |req|
  req.body = "{\n  \"message_ids\": [],\n  \"operator_id\": \"\",\n  \"notes\": \"\"\n}"
end

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

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/event-fabric/dlq/messages:replay";

    let payload = json!({
        "message_ids": (),
        "operator_id": "",
        "notes": ""
    });

    let mut headers = reqwest::header::HeaderMap::new();
    headers.insert("content-type", "application/json".parse().unwrap());

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

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

    dbg!(results);
}
curl --request POST \
  --url {{baseUrl}}/event-fabric/dlq/messages:replay \
  --header 'content-type: application/json' \
  --data '{
  "message_ids": [],
  "operator_id": "",
  "notes": ""
}'
echo '{
  "message_ids": [],
  "operator_id": "",
  "notes": ""
}' |  \
  http POST {{baseUrl}}/event-fabric/dlq/messages:replay \
  content-type:application/json
wget --quiet \
  --method POST \
  --header 'content-type: application/json' \
  --body-data '{\n  "message_ids": [],\n  "operator_id": "",\n  "notes": ""\n}' \
  --output-document \
  - {{baseUrl}}/event-fabric/dlq/messages:replay
import Foundation

let headers = ["content-type": "application/json"]
let parameters = [
  "message_ids": [],
  "operator_id": "",
  "notes": ""
] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/event-fabric/dlq/messages:replay")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
DELETE 清理指定主题的死信消息
{{baseUrl}}/event-fabric/dlq/messages
QUERY PARAMS

tenant_id
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/event-fabric/dlq/messages?tenant_id=");

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

(client/delete "{{baseUrl}}/event-fabric/dlq/messages" {:query-params {:tenant_id ""}})
require "http/client"

url = "{{baseUrl}}/event-fabric/dlq/messages?tenant_id="

response = HTTP::Client.delete url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
    Method = HttpMethod.Delete,
    RequestUri = new Uri("{{baseUrl}}/event-fabric/dlq/messages?tenant_id="),
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/event-fabric/dlq/messages?tenant_id=");
var request = new RestRequest("", Method.Delete);
var response = client.Execute(request);
package main

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

func main() {

	url := "{{baseUrl}}/event-fabric/dlq/messages?tenant_id="

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

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

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

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

}
DELETE /baseUrl/event-fabric/dlq/messages?tenant_id= HTTP/1.1
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/event-fabric/dlq/messages?tenant_id=")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/event-fabric/dlq/messages?tenant_id="))
    .method("DELETE", HttpRequest.BodyPublishers.noBody())
    .build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("{{baseUrl}}/event-fabric/dlq/messages?tenant_id=")
  .delete(null)
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/event-fabric/dlq/messages?tenant_id=")
  .asString();
const data = null;

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

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

xhr.open('DELETE', '{{baseUrl}}/event-fabric/dlq/messages?tenant_id=');

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

const options = {
  method: 'DELETE',
  url: '{{baseUrl}}/event-fabric/dlq/messages',
  params: {tenant_id: ''}
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/event-fabric/dlq/messages?tenant_id=';
const options = {method: 'DELETE'};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
const settings = {
  async: true,
  crossDomain: true,
  url: '{{baseUrl}}/event-fabric/dlq/messages?tenant_id=',
  method: 'DELETE',
  headers: {}
};

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

val request = Request.Builder()
  .url("{{baseUrl}}/event-fabric/dlq/messages?tenant_id=")
  .delete(null)
  .build()

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

const options = {
  method: 'DELETE',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/event-fabric/dlq/messages?tenant_id=',
  headers: {}
};

const req = http.request(options, function (res) {
  const chunks = [];

  res.on('data', function (chunk) {
    chunks.push(chunk);
  });

  res.on('end', function () {
    const body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.end();
const request = require('request');

const options = {
  method: 'DELETE',
  url: '{{baseUrl}}/event-fabric/dlq/messages',
  qs: {tenant_id: ''}
};

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

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

const req = unirest('DELETE', '{{baseUrl}}/event-fabric/dlq/messages');

req.query({
  tenant_id: ''
});

req.end(function (res) {
  if (res.error) throw new Error(res.error);

  console.log(res.body);
});
const axios = require('axios').default;

const options = {
  method: 'DELETE',
  url: '{{baseUrl}}/event-fabric/dlq/messages',
  params: {tenant_id: ''}
};

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

const url = '{{baseUrl}}/event-fabric/dlq/messages?tenant_id=';
const options = {method: 'DELETE'};

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

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/event-fabric/dlq/messages?tenant_id="]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[request setHTTPMethod:@"DELETE"];

NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
                                            completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                if (error) {
                                                    NSLog(@"%@", error);
                                                } else {
                                                    NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                    NSLog(@"%@", httpResponse);
                                                }
                                            }];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt

let uri = Uri.of_string "{{baseUrl}}/event-fabric/dlq/messages?tenant_id=" in

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

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

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('DELETE', '{{baseUrl}}/event-fabric/dlq/messages?tenant_id=');

echo $response->getBody();
setUrl('{{baseUrl}}/event-fabric/dlq/messages');
$request->setMethod(HTTP_METH_DELETE);

$request->setQueryData([
  'tenant_id' => ''
]);

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

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/event-fabric/dlq/messages');
$request->setRequestMethod('DELETE');
$request->setQuery(new http\QueryString([
  'tenant_id' => ''
]));

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

echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/event-fabric/dlq/messages?tenant_id=' -Method DELETE 
$response = Invoke-RestMethod -Uri '{{baseUrl}}/event-fabric/dlq/messages?tenant_id=' -Method DELETE 
import http.client

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

conn.request("DELETE", "/baseUrl/event-fabric/dlq/messages?tenant_id=")

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

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

url = "{{baseUrl}}/event-fabric/dlq/messages"

querystring = {"tenant_id":""}

response = requests.delete(url, params=querystring)

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

url <- "{{baseUrl}}/event-fabric/dlq/messages"

queryString <- list(tenant_id = "")

response <- VERB("DELETE", url, query = queryString, content_type("application/octet-stream"))

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

url = URI("{{baseUrl}}/event-fabric/dlq/messages?tenant_id=")

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

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

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

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

response = conn.delete('/baseUrl/event-fabric/dlq/messages') do |req|
  req.params['tenant_id'] = ''
end

puts response.status
puts response.body
use std::str::FromStr;
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/event-fabric/dlq/messages";

    let querystring = [
        ("tenant_id", ""),
    ];

    let client = reqwest::Client::new();
    let response = client.request(reqwest::Method::from_str("DELETE").unwrap(), url)
        .query(&querystring)
        .send()
        .await;

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

    dbg!(results);
}
curl --request DELETE \
  --url '{{baseUrl}}/event-fabric/dlq/messages?tenant_id='
http DELETE '{{baseUrl}}/event-fabric/dlq/messages?tenant_id='
wget --quiet \
  --method DELETE \
  --output-document \
  - '{{baseUrl}}/event-fabric/dlq/messages?tenant_id='
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/event-fabric/dlq/messages?tenant_id=")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "DELETE"

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
POST 创建回放任务
{{baseUrl}}/event-fabric/replay/tasks
BODY json

{
  "tenant_id": "",
  "topic": "",
  "trace_id": "",
  "window": {
    "start": "",
    "end": ""
  },
  "reason": "",
  "operator_id": "",
  "shadow": false
}
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/event-fabric/replay/tasks");

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

curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n  \"tenant_id\": \"\",\n  \"topic\": \"\",\n  \"trace_id\": \"\",\n  \"window\": {\n    \"start\": \"\",\n    \"end\": \"\"\n  },\n  \"reason\": \"\",\n  \"operator_id\": \"\",\n  \"shadow\": false\n}");

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

(client/post "{{baseUrl}}/event-fabric/replay/tasks" {:content-type :json
                                                                      :form-params {:tenant_id ""
                                                                                    :topic ""
                                                                                    :trace_id ""
                                                                                    :window {:start ""
                                                                                             :end ""}
                                                                                    :reason ""
                                                                                    :operator_id ""
                                                                                    :shadow false}})
require "http/client"

url = "{{baseUrl}}/event-fabric/replay/tasks"
headers = HTTP::Headers{
  "content-type" => "application/json"
}
reqBody = "{\n  \"tenant_id\": \"\",\n  \"topic\": \"\",\n  \"trace_id\": \"\",\n  \"window\": {\n    \"start\": \"\",\n    \"end\": \"\"\n  },\n  \"reason\": \"\",\n  \"operator_id\": \"\",\n  \"shadow\": false\n}"

response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
    Method = HttpMethod.Post,
    RequestUri = new Uri("{{baseUrl}}/event-fabric/replay/tasks"),
    Content = new StringContent("{\n  \"tenant_id\": \"\",\n  \"topic\": \"\",\n  \"trace_id\": \"\",\n  \"window\": {\n    \"start\": \"\",\n    \"end\": \"\"\n  },\n  \"reason\": \"\",\n  \"operator_id\": \"\",\n  \"shadow\": false\n}")
    {
        Headers =
        {
            ContentType = new MediaTypeHeaderValue("application/json")
        }
    }
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/event-fabric/replay/tasks");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n  \"tenant_id\": \"\",\n  \"topic\": \"\",\n  \"trace_id\": \"\",\n  \"window\": {\n    \"start\": \"\",\n    \"end\": \"\"\n  },\n  \"reason\": \"\",\n  \"operator_id\": \"\",\n  \"shadow\": false\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main

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

func main() {

	url := "{{baseUrl}}/event-fabric/replay/tasks"

	payload := strings.NewReader("{\n  \"tenant_id\": \"\",\n  \"topic\": \"\",\n  \"trace_id\": \"\",\n  \"window\": {\n    \"start\": \"\",\n    \"end\": \"\"\n  },\n  \"reason\": \"\",\n  \"operator_id\": \"\",\n  \"shadow\": false\n}")

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

	req.Header.Add("content-type", "application/json")

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

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

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

}
POST /baseUrl/event-fabric/replay/tasks HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 160

{
  "tenant_id": "",
  "topic": "",
  "trace_id": "",
  "window": {
    "start": "",
    "end": ""
  },
  "reason": "",
  "operator_id": "",
  "shadow": false
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/event-fabric/replay/tasks")
  .setHeader("content-type", "application/json")
  .setBody("{\n  \"tenant_id\": \"\",\n  \"topic\": \"\",\n  \"trace_id\": \"\",\n  \"window\": {\n    \"start\": \"\",\n    \"end\": \"\"\n  },\n  \"reason\": \"\",\n  \"operator_id\": \"\",\n  \"shadow\": false\n}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/event-fabric/replay/tasks"))
    .header("content-type", "application/json")
    .method("POST", HttpRequest.BodyPublishers.ofString("{\n  \"tenant_id\": \"\",\n  \"topic\": \"\",\n  \"trace_id\": \"\",\n  \"window\": {\n    \"start\": \"\",\n    \"end\": \"\"\n  },\n  \"reason\": \"\",\n  \"operator_id\": \"\",\n  \"shadow\": false\n}"))
    .build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();

MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n  \"tenant_id\": \"\",\n  \"topic\": \"\",\n  \"trace_id\": \"\",\n  \"window\": {\n    \"start\": \"\",\n    \"end\": \"\"\n  },\n  \"reason\": \"\",\n  \"operator_id\": \"\",\n  \"shadow\": false\n}");
Request request = new Request.Builder()
  .url("{{baseUrl}}/event-fabric/replay/tasks")
  .post(body)
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/event-fabric/replay/tasks")
  .header("content-type", "application/json")
  .body("{\n  \"tenant_id\": \"\",\n  \"topic\": \"\",\n  \"trace_id\": \"\",\n  \"window\": {\n    \"start\": \"\",\n    \"end\": \"\"\n  },\n  \"reason\": \"\",\n  \"operator_id\": \"\",\n  \"shadow\": false\n}")
  .asString();
const data = JSON.stringify({
  tenant_id: '',
  topic: '',
  trace_id: '',
  window: {
    start: '',
    end: ''
  },
  reason: '',
  operator_id: '',
  shadow: false
});

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

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

xhr.open('POST', '{{baseUrl}}/event-fabric/replay/tasks');
xhr.setRequestHeader('content-type', 'application/json');

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

const options = {
  method: 'POST',
  url: '{{baseUrl}}/event-fabric/replay/tasks',
  headers: {'content-type': 'application/json'},
  data: {
    tenant_id: '',
    topic: '',
    trace_id: '',
    window: {start: '', end: ''},
    reason: '',
    operator_id: '',
    shadow: false
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/event-fabric/replay/tasks';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"tenant_id":"","topic":"","trace_id":"","window":{"start":"","end":""},"reason":"","operator_id":"","shadow":false}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
const settings = {
  async: true,
  crossDomain: true,
  url: '{{baseUrl}}/event-fabric/replay/tasks',
  method: 'POST',
  headers: {
    'content-type': 'application/json'
  },
  processData: false,
  data: '{\n  "tenant_id": "",\n  "topic": "",\n  "trace_id": "",\n  "window": {\n    "start": "",\n    "end": ""\n  },\n  "reason": "",\n  "operator_id": "",\n  "shadow": false\n}'
};

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

val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n  \"tenant_id\": \"\",\n  \"topic\": \"\",\n  \"trace_id\": \"\",\n  \"window\": {\n    \"start\": \"\",\n    \"end\": \"\"\n  },\n  \"reason\": \"\",\n  \"operator_id\": \"\",\n  \"shadow\": false\n}")
val request = Request.Builder()
  .url("{{baseUrl}}/event-fabric/replay/tasks")
  .post(body)
  .addHeader("content-type", "application/json")
  .build()

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

const options = {
  method: 'POST',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/event-fabric/replay/tasks',
  headers: {
    'content-type': 'application/json'
  }
};

const req = http.request(options, function (res) {
  const chunks = [];

  res.on('data', function (chunk) {
    chunks.push(chunk);
  });

  res.on('end', function () {
    const body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.write(JSON.stringify({
  tenant_id: '',
  topic: '',
  trace_id: '',
  window: {start: '', end: ''},
  reason: '',
  operator_id: '',
  shadow: false
}));
req.end();
const request = require('request');

const options = {
  method: 'POST',
  url: '{{baseUrl}}/event-fabric/replay/tasks',
  headers: {'content-type': 'application/json'},
  body: {
    tenant_id: '',
    topic: '',
    trace_id: '',
    window: {start: '', end: ''},
    reason: '',
    operator_id: '',
    shadow: false
  },
  json: true
};

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

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

const req = unirest('POST', '{{baseUrl}}/event-fabric/replay/tasks');

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

req.type('json');
req.send({
  tenant_id: '',
  topic: '',
  trace_id: '',
  window: {
    start: '',
    end: ''
  },
  reason: '',
  operator_id: '',
  shadow: false
});

req.end(function (res) {
  if (res.error) throw new Error(res.error);

  console.log(res.body);
});
const axios = require('axios').default;

const options = {
  method: 'POST',
  url: '{{baseUrl}}/event-fabric/replay/tasks',
  headers: {'content-type': 'application/json'},
  data: {
    tenant_id: '',
    topic: '',
    trace_id: '',
    window: {start: '', end: ''},
    reason: '',
    operator_id: '',
    shadow: false
  }
};

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

const url = '{{baseUrl}}/event-fabric/replay/tasks';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"tenant_id":"","topic":"","trace_id":"","window":{"start":"","end":""},"reason":"","operator_id":"","shadow":false}'
};

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

NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"tenant_id": @"",
                              @"topic": @"",
                              @"trace_id": @"",
                              @"window": @{ @"start": @"", @"end": @"" },
                              @"reason": @"",
                              @"operator_id": @"",
                              @"shadow": @NO };

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

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/event-fabric/replay/tasks"]
                                                       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}}/event-fabric/replay/tasks" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n  \"tenant_id\": \"\",\n  \"topic\": \"\",\n  \"trace_id\": \"\",\n  \"window\": {\n    \"start\": \"\",\n    \"end\": \"\"\n  },\n  \"reason\": \"\",\n  \"operator_id\": \"\",\n  \"shadow\": false\n}" in

Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/event-fabric/replay/tasks",
  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([
    'tenant_id' => '',
    'topic' => '',
    'trace_id' => '',
    'window' => [
        'start' => '',
        'end' => ''
    ],
    'reason' => '',
    'operator_id' => '',
    'shadow' => null
  ]),
  CURLOPT_HTTPHEADER => [
    "content-type: application/json"
  ],
]);

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

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('POST', '{{baseUrl}}/event-fabric/replay/tasks', [
  'body' => '{
  "tenant_id": "",
  "topic": "",
  "trace_id": "",
  "window": {
    "start": "",
    "end": ""
  },
  "reason": "",
  "operator_id": "",
  "shadow": false
}',
  'headers' => [
    'content-type' => 'application/json',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/event-fabric/replay/tasks');
$request->setMethod(HTTP_METH_POST);

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

$request->setContentType('application/json');
$request->setBody(json_encode([
  'tenant_id' => '',
  'topic' => '',
  'trace_id' => '',
  'window' => [
    'start' => '',
    'end' => ''
  ],
  'reason' => '',
  'operator_id' => '',
  'shadow' => null
]));

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

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
append(json_encode([
  'tenant_id' => '',
  'topic' => '',
  'trace_id' => '',
  'window' => [
    'start' => '',
    'end' => ''
  ],
  'reason' => '',
  'operator_id' => '',
  'shadow' => null
]));
$request->setRequestUrl('{{baseUrl}}/event-fabric/replay/tasks');
$request->setRequestMethod('POST');
$request->setBody($body);

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

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

echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/event-fabric/replay/tasks' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "tenant_id": "",
  "topic": "",
  "trace_id": "",
  "window": {
    "start": "",
    "end": ""
  },
  "reason": "",
  "operator_id": "",
  "shadow": false
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/event-fabric/replay/tasks' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "tenant_id": "",
  "topic": "",
  "trace_id": "",
  "window": {
    "start": "",
    "end": ""
  },
  "reason": "",
  "operator_id": "",
  "shadow": false
}'
import http.client

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

payload = "{\n  \"tenant_id\": \"\",\n  \"topic\": \"\",\n  \"trace_id\": \"\",\n  \"window\": {\n    \"start\": \"\",\n    \"end\": \"\"\n  },\n  \"reason\": \"\",\n  \"operator_id\": \"\",\n  \"shadow\": false\n}"

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

conn.request("POST", "/baseUrl/event-fabric/replay/tasks", payload, headers)

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

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

url = "{{baseUrl}}/event-fabric/replay/tasks"

payload = {
    "tenant_id": "",
    "topic": "",
    "trace_id": "",
    "window": {
        "start": "",
        "end": ""
    },
    "reason": "",
    "operator_id": "",
    "shadow": False
}
headers = {"content-type": "application/json"}

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

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

url <- "{{baseUrl}}/event-fabric/replay/tasks"

payload <- "{\n  \"tenant_id\": \"\",\n  \"topic\": \"\",\n  \"trace_id\": \"\",\n  \"window\": {\n    \"start\": \"\",\n    \"end\": \"\"\n  },\n  \"reason\": \"\",\n  \"operator_id\": \"\",\n  \"shadow\": false\n}"

encode <- "json"

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

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

url = URI("{{baseUrl}}/event-fabric/replay/tasks")

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

request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n  \"tenant_id\": \"\",\n  \"topic\": \"\",\n  \"trace_id\": \"\",\n  \"window\": {\n    \"start\": \"\",\n    \"end\": \"\"\n  },\n  \"reason\": \"\",\n  \"operator_id\": \"\",\n  \"shadow\": false\n}"

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

conn = Faraday.new(
  url: 'https://example.com',
  headers: {'Content-Type' => 'application/json'}
)

response = conn.post('/baseUrl/event-fabric/replay/tasks') do |req|
  req.body = "{\n  \"tenant_id\": \"\",\n  \"topic\": \"\",\n  \"trace_id\": \"\",\n  \"window\": {\n    \"start\": \"\",\n    \"end\": \"\"\n  },\n  \"reason\": \"\",\n  \"operator_id\": \"\",\n  \"shadow\": false\n}"
end

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

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/event-fabric/replay/tasks";

    let payload = json!({
        "tenant_id": "",
        "topic": "",
        "trace_id": "",
        "window": json!({
            "start": "",
            "end": ""
        }),
        "reason": "",
        "operator_id": "",
        "shadow": false
    });

    let mut headers = reqwest::header::HeaderMap::new();
    headers.insert("content-type", "application/json".parse().unwrap());

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

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

    dbg!(results);
}
curl --request POST \
  --url {{baseUrl}}/event-fabric/replay/tasks \
  --header 'content-type: application/json' \
  --data '{
  "tenant_id": "",
  "topic": "",
  "trace_id": "",
  "window": {
    "start": "",
    "end": ""
  },
  "reason": "",
  "operator_id": "",
  "shadow": false
}'
echo '{
  "tenant_id": "",
  "topic": "",
  "trace_id": "",
  "window": {
    "start": "",
    "end": ""
  },
  "reason": "",
  "operator_id": "",
  "shadow": false
}' |  \
  http POST {{baseUrl}}/event-fabric/replay/tasks \
  content-type:application/json
wget --quiet \
  --method POST \
  --header 'content-type: application/json' \
  --body-data '{\n  "tenant_id": "",\n  "topic": "",\n  "trace_id": "",\n  "window": {\n    "start": "",\n    "end": ""\n  },\n  "reason": "",\n  "operator_id": "",\n  "shadow": false\n}' \
  --output-document \
  - {{baseUrl}}/event-fabric/replay/tasks
import Foundation

let headers = ["content-type": "application/json"]
let parameters = [
  "tenant_id": "",
  "topic": "",
  "trace_id": "",
  "window": [
    "start": "",
    "end": ""
  ],
  "reason": "",
  "operator_id": "",
  "shadow": false
] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/event-fabric/replay/tasks")! 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 取消回放任务
{{baseUrl}}/event-fabric/replay/tasks/:task_id:cancel
QUERY PARAMS

task_id
BODY json

{
  "operator_id": ""
}
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/event-fabric/replay/tasks/:task_id:cancel");

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

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

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

(client/post "{{baseUrl}}/event-fabric/replay/tasks/:task_id:cancel" {:content-type :json
                                                                                      :form-params {:operator_id ""}})
require "http/client"

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

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

func main() {

	url := "{{baseUrl}}/event-fabric/replay/tasks/:task_id:cancel"

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

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

	req.Header.Add("content-type", "application/json")

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

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

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

}
POST /baseUrl/event-fabric/replay/tasks/:task_id:cancel HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 23

{
  "operator_id": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/event-fabric/replay/tasks/:task_id:cancel")
  .setHeader("content-type", "application/json")
  .setBody("{\n  \"operator_id\": \"\"\n}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

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

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

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

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

xhr.open('POST', '{{baseUrl}}/event-fabric/replay/tasks/:task_id:cancel');
xhr.setRequestHeader('content-type', 'application/json');

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

const options = {
  method: 'POST',
  url: '{{baseUrl}}/event-fabric/replay/tasks/:task_id:cancel',
  headers: {'content-type': 'application/json'},
  data: {operator_id: ''}
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/event-fabric/replay/tasks/:task_id:cancel';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"operator_id":""}'
};

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}}/event-fabric/replay/tasks/:task_id:cancel',
  method: 'POST',
  headers: {
    'content-type': 'application/json'
  },
  processData: false,
  data: '{\n  "operator_id": ""\n}'
};

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

val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n  \"operator_id\": \"\"\n}")
val request = Request.Builder()
  .url("{{baseUrl}}/event-fabric/replay/tasks/:task_id:cancel")
  .post(body)
  .addHeader("content-type", "application/json")
  .build()

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

const options = {
  method: 'POST',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/event-fabric/replay/tasks/:task_id:cancel',
  headers: {
    'content-type': 'application/json'
  }
};

const req = http.request(options, function (res) {
  const chunks = [];

  res.on('data', function (chunk) {
    chunks.push(chunk);
  });

  res.on('end', function () {
    const body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.write(JSON.stringify({operator_id: ''}));
req.end();
const request = require('request');

const options = {
  method: 'POST',
  url: '{{baseUrl}}/event-fabric/replay/tasks/:task_id:cancel',
  headers: {'content-type': 'application/json'},
  body: {operator_id: ''},
  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}}/event-fabric/replay/tasks/:task_id:cancel');

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

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

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}}/event-fabric/replay/tasks/:task_id:cancel',
  headers: {'content-type': 'application/json'},
  data: {operator_id: ''}
};

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

const url = '{{baseUrl}}/event-fabric/replay/tasks/:task_id:cancel';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"operator_id":""}'
};

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

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

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

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

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

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

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('POST', '{{baseUrl}}/event-fabric/replay/tasks/:task_id:cancel', [
  'body' => '{
  "operator_id": ""
}',
  'headers' => [
    'content-type' => 'application/json',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/event-fabric/replay/tasks/:task_id:cancel');
$request->setMethod(HTTP_METH_POST);

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

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

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

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
append(json_encode([
  'operator_id' => ''
]));
$request->setRequestUrl('{{baseUrl}}/event-fabric/replay/tasks/:task_id:cancel');
$request->setRequestMethod('POST');
$request->setBody($body);

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

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

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

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

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

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

conn.request("POST", "/baseUrl/event-fabric/replay/tasks/:task_id:cancel", payload, headers)

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

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

url = "{{baseUrl}}/event-fabric/replay/tasks/:task_id:cancel"

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

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

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

url <- "{{baseUrl}}/event-fabric/replay/tasks/:task_id:cancel"

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

encode <- "json"

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

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

url = URI("{{baseUrl}}/event-fabric/replay/tasks/:task_id:cancel")

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

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

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

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/event-fabric/replay/tasks/:task_id:cancel";

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

    let mut headers = reqwest::header::HeaderMap::new();
    headers.insert("content-type", "application/json".parse().unwrap());

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

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

    dbg!(results);
}
curl --request POST \
  --url {{baseUrl}}/event-fabric/replay/tasks/:task_id:cancel \
  --header 'content-type: application/json' \
  --data '{
  "operator_id": ""
}'
echo '{
  "operator_id": ""
}' |  \
  http POST {{baseUrl}}/event-fabric/replay/tasks/:task_id:cancel \
  content-type:application/json
wget --quiet \
  --method POST \
  --header 'content-type: application/json' \
  --body-data '{\n  "operator_id": ""\n}' \
  --output-document \
  - {{baseUrl}}/event-fabric/replay/tasks/:task_id:cancel
import Foundation

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

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

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/event-fabric/replay/tasks/:task_id:cancel")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
GET 查询回放任务状态
{{baseUrl}}/event-fabric/replay/tasks/:task_id
QUERY PARAMS

task_id
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/event-fabric/replay/tasks/:task_id");

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

(client/get "{{baseUrl}}/event-fabric/replay/tasks/:task_id")
require "http/client"

url = "{{baseUrl}}/event-fabric/replay/tasks/:task_id"

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

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

func main() {

	url := "{{baseUrl}}/event-fabric/replay/tasks/:task_id"

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

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

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

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

}
GET /baseUrl/event-fabric/replay/tasks/:task_id HTTP/1.1
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/event-fabric/replay/tasks/:task_id")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/event-fabric/replay/tasks/:task_id"))
    .method("GET", HttpRequest.BodyPublishers.noBody())
    .build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("{{baseUrl}}/event-fabric/replay/tasks/:task_id")
  .get()
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/event-fabric/replay/tasks/:task_id")
  .asString();
const data = null;

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

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

xhr.open('GET', '{{baseUrl}}/event-fabric/replay/tasks/:task_id');

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

const options = {
  method: 'GET',
  url: '{{baseUrl}}/event-fabric/replay/tasks/:task_id'
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/event-fabric/replay/tasks/:task_id';
const options = {method: 'GET'};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
const settings = {
  async: true,
  crossDomain: true,
  url: '{{baseUrl}}/event-fabric/replay/tasks/:task_id',
  method: 'GET',
  headers: {}
};

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

val request = Request.Builder()
  .url("{{baseUrl}}/event-fabric/replay/tasks/:task_id")
  .get()
  .build()

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

const options = {
  method: 'GET',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/event-fabric/replay/tasks/:task_id',
  headers: {}
};

const req = http.request(options, function (res) {
  const chunks = [];

  res.on('data', function (chunk) {
    chunks.push(chunk);
  });

  res.on('end', function () {
    const body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.end();
const request = require('request');

const options = {
  method: 'GET',
  url: '{{baseUrl}}/event-fabric/replay/tasks/:task_id'
};

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

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

const req = unirest('GET', '{{baseUrl}}/event-fabric/replay/tasks/:task_id');

req.end(function (res) {
  if (res.error) throw new Error(res.error);

  console.log(res.body);
});
const axios = require('axios').default;

const options = {
  method: 'GET',
  url: '{{baseUrl}}/event-fabric/replay/tasks/:task_id'
};

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

const url = '{{baseUrl}}/event-fabric/replay/tasks/:task_id';
const options = {method: 'GET'};

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

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/event-fabric/replay/tasks/:task_id"]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];

NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
                                            completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                if (error) {
                                                    NSLog(@"%@", error);
                                                } else {
                                                    NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                    NSLog(@"%@", httpResponse);
                                                }
                                            }];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt

let uri = Uri.of_string "{{baseUrl}}/event-fabric/replay/tasks/:task_id" in

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

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

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('GET', '{{baseUrl}}/event-fabric/replay/tasks/:task_id');

echo $response->getBody();
setUrl('{{baseUrl}}/event-fabric/replay/tasks/:task_id');
$request->setMethod(HTTP_METH_GET);

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

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/event-fabric/replay/tasks/:task_id');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/event-fabric/replay/tasks/:task_id' -Method GET 
$response = Invoke-RestMethod -Uri '{{baseUrl}}/event-fabric/replay/tasks/:task_id' -Method GET 
import http.client

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

conn.request("GET", "/baseUrl/event-fabric/replay/tasks/:task_id")

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

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

url = "{{baseUrl}}/event-fabric/replay/tasks/:task_id"

response = requests.get(url)

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

url <- "{{baseUrl}}/event-fabric/replay/tasks/:task_id"

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

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

url = URI("{{baseUrl}}/event-fabric/replay/tasks/:task_id")

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

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

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

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

response = conn.get('/baseUrl/event-fabric/replay/tasks/:task_id') do |req|
end

puts response.status
puts response.body
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/event-fabric/replay/tasks/:task_id";

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

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

    dbg!(results);
}
curl --request GET \
  --url {{baseUrl}}/event-fabric/replay/tasks/:task_id
http GET {{baseUrl}}/event-fabric/replay/tasks/:task_id
wget --quiet \
  --method GET \
  --output-document \
  - {{baseUrl}}/event-fabric/replay/tasks/:task_id
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/event-fabric/replay/tasks/:task_id")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
POST 创建新主题
{{baseUrl}}/event-fabric/topics
BODY json

{
  "tenant_id": "",
  "namespace": "",
  "name": "",
  "payload_format": "",
  "max_retry": 0
}
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/event-fabric/topics");

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

curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n  \"tenant_id\": \"\",\n  \"namespace\": \"\",\n  \"name\": \"\",\n  \"payload_format\": \"\",\n  \"max_retry\": 0\n}");

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

(client/post "{{baseUrl}}/event-fabric/topics" {:content-type :json
                                                                :form-params {:tenant_id ""
                                                                              :namespace ""
                                                                              :name ""
                                                                              :payload_format ""
                                                                              :max_retry 0}})
require "http/client"

url = "{{baseUrl}}/event-fabric/topics"
headers = HTTP::Headers{
  "content-type" => "application/json"
}
reqBody = "{\n  \"tenant_id\": \"\",\n  \"namespace\": \"\",\n  \"name\": \"\",\n  \"payload_format\": \"\",\n  \"max_retry\": 0\n}"

response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
    Method = HttpMethod.Post,
    RequestUri = new Uri("{{baseUrl}}/event-fabric/topics"),
    Content = new StringContent("{\n  \"tenant_id\": \"\",\n  \"namespace\": \"\",\n  \"name\": \"\",\n  \"payload_format\": \"\",\n  \"max_retry\": 0\n}")
    {
        Headers =
        {
            ContentType = new MediaTypeHeaderValue("application/json")
        }
    }
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/event-fabric/topics");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n  \"tenant_id\": \"\",\n  \"namespace\": \"\",\n  \"name\": \"\",\n  \"payload_format\": \"\",\n  \"max_retry\": 0\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main

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

func main() {

	url := "{{baseUrl}}/event-fabric/topics"

	payload := strings.NewReader("{\n  \"tenant_id\": \"\",\n  \"namespace\": \"\",\n  \"name\": \"\",\n  \"payload_format\": \"\",\n  \"max_retry\": 0\n}")

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

	req.Header.Add("content-type", "application/json")

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

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

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

}
POST /baseUrl/event-fabric/topics HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 96

{
  "tenant_id": "",
  "namespace": "",
  "name": "",
  "payload_format": "",
  "max_retry": 0
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/event-fabric/topics")
  .setHeader("content-type", "application/json")
  .setBody("{\n  \"tenant_id\": \"\",\n  \"namespace\": \"\",\n  \"name\": \"\",\n  \"payload_format\": \"\",\n  \"max_retry\": 0\n}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/event-fabric/topics"))
    .header("content-type", "application/json")
    .method("POST", HttpRequest.BodyPublishers.ofString("{\n  \"tenant_id\": \"\",\n  \"namespace\": \"\",\n  \"name\": \"\",\n  \"payload_format\": \"\",\n  \"max_retry\": 0\n}"))
    .build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();

MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n  \"tenant_id\": \"\",\n  \"namespace\": \"\",\n  \"name\": \"\",\n  \"payload_format\": \"\",\n  \"max_retry\": 0\n}");
Request request = new Request.Builder()
  .url("{{baseUrl}}/event-fabric/topics")
  .post(body)
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/event-fabric/topics")
  .header("content-type", "application/json")
  .body("{\n  \"tenant_id\": \"\",\n  \"namespace\": \"\",\n  \"name\": \"\",\n  \"payload_format\": \"\",\n  \"max_retry\": 0\n}")
  .asString();
const data = JSON.stringify({
  tenant_id: '',
  namespace: '',
  name: '',
  payload_format: '',
  max_retry: 0
});

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

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

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

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

const options = {
  method: 'POST',
  url: '{{baseUrl}}/event-fabric/topics',
  headers: {'content-type': 'application/json'},
  data: {tenant_id: '', namespace: '', name: '', payload_format: '', max_retry: 0}
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/event-fabric/topics';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"tenant_id":"","namespace":"","name":"","payload_format":"","max_retry":0}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
const settings = {
  async: true,
  crossDomain: true,
  url: '{{baseUrl}}/event-fabric/topics',
  method: 'POST',
  headers: {
    'content-type': 'application/json'
  },
  processData: false,
  data: '{\n  "tenant_id": "",\n  "namespace": "",\n  "name": "",\n  "payload_format": "",\n  "max_retry": 0\n}'
};

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

val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n  \"tenant_id\": \"\",\n  \"namespace\": \"\",\n  \"name\": \"\",\n  \"payload_format\": \"\",\n  \"max_retry\": 0\n}")
val request = Request.Builder()
  .url("{{baseUrl}}/event-fabric/topics")
  .post(body)
  .addHeader("content-type", "application/json")
  .build()

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

const options = {
  method: 'POST',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/event-fabric/topics',
  headers: {
    'content-type': 'application/json'
  }
};

const req = http.request(options, function (res) {
  const chunks = [];

  res.on('data', function (chunk) {
    chunks.push(chunk);
  });

  res.on('end', function () {
    const body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.write(JSON.stringify({tenant_id: '', namespace: '', name: '', payload_format: '', max_retry: 0}));
req.end();
const request = require('request');

const options = {
  method: 'POST',
  url: '{{baseUrl}}/event-fabric/topics',
  headers: {'content-type': 'application/json'},
  body: {tenant_id: '', namespace: '', name: '', payload_format: '', max_retry: 0},
  json: true
};

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

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

const req = unirest('POST', '{{baseUrl}}/event-fabric/topics');

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

req.type('json');
req.send({
  tenant_id: '',
  namespace: '',
  name: '',
  payload_format: '',
  max_retry: 0
});

req.end(function (res) {
  if (res.error) throw new Error(res.error);

  console.log(res.body);
});
const axios = require('axios').default;

const options = {
  method: 'POST',
  url: '{{baseUrl}}/event-fabric/topics',
  headers: {'content-type': 'application/json'},
  data: {tenant_id: '', namespace: '', name: '', payload_format: '', max_retry: 0}
};

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

const url = '{{baseUrl}}/event-fabric/topics';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"tenant_id":"","namespace":"","name":"","payload_format":"","max_retry":0}'
};

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

NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"tenant_id": @"",
                              @"namespace": @"",
                              @"name": @"",
                              @"payload_format": @"",
                              @"max_retry": @0 };

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

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/event-fabric/topics"]
                                                       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}}/event-fabric/topics" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n  \"tenant_id\": \"\",\n  \"namespace\": \"\",\n  \"name\": \"\",\n  \"payload_format\": \"\",\n  \"max_retry\": 0\n}" in

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

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

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('POST', '{{baseUrl}}/event-fabric/topics', [
  'body' => '{
  "tenant_id": "",
  "namespace": "",
  "name": "",
  "payload_format": "",
  "max_retry": 0
}',
  'headers' => [
    'content-type' => 'application/json',
  ],
]);

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

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

$request->setContentType('application/json');
$request->setBody(json_encode([
  'tenant_id' => '',
  'namespace' => '',
  'name' => '',
  'payload_format' => '',
  'max_retry' => 0
]));

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

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
append(json_encode([
  'tenant_id' => '',
  'namespace' => '',
  'name' => '',
  'payload_format' => '',
  'max_retry' => 0
]));
$request->setRequestUrl('{{baseUrl}}/event-fabric/topics');
$request->setRequestMethod('POST');
$request->setBody($body);

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

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

echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/event-fabric/topics' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "tenant_id": "",
  "namespace": "",
  "name": "",
  "payload_format": "",
  "max_retry": 0
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/event-fabric/topics' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "tenant_id": "",
  "namespace": "",
  "name": "",
  "payload_format": "",
  "max_retry": 0
}'
import http.client

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

payload = "{\n  \"tenant_id\": \"\",\n  \"namespace\": \"\",\n  \"name\": \"\",\n  \"payload_format\": \"\",\n  \"max_retry\": 0\n}"

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

conn.request("POST", "/baseUrl/event-fabric/topics", payload, headers)

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

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

url = "{{baseUrl}}/event-fabric/topics"

payload = {
    "tenant_id": "",
    "namespace": "",
    "name": "",
    "payload_format": "",
    "max_retry": 0
}
headers = {"content-type": "application/json"}

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

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

url <- "{{baseUrl}}/event-fabric/topics"

payload <- "{\n  \"tenant_id\": \"\",\n  \"namespace\": \"\",\n  \"name\": \"\",\n  \"payload_format\": \"\",\n  \"max_retry\": 0\n}"

encode <- "json"

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

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

url = URI("{{baseUrl}}/event-fabric/topics")

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

request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n  \"tenant_id\": \"\",\n  \"namespace\": \"\",\n  \"name\": \"\",\n  \"payload_format\": \"\",\n  \"max_retry\": 0\n}"

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

conn = Faraday.new(
  url: 'https://example.com',
  headers: {'Content-Type' => 'application/json'}
)

response = conn.post('/baseUrl/event-fabric/topics') do |req|
  req.body = "{\n  \"tenant_id\": \"\",\n  \"namespace\": \"\",\n  \"name\": \"\",\n  \"payload_format\": \"\",\n  \"max_retry\": 0\n}"
end

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

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

    let payload = json!({
        "tenant_id": "",
        "namespace": "",
        "name": "",
        "payload_format": "",
        "max_retry": 0
    });

    let mut headers = reqwest::header::HeaderMap::new();
    headers.insert("content-type", "application/json".parse().unwrap());

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

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

    dbg!(results);
}
curl --request POST \
  --url {{baseUrl}}/event-fabric/topics \
  --header 'content-type: application/json' \
  --data '{
  "tenant_id": "",
  "namespace": "",
  "name": "",
  "payload_format": "",
  "max_retry": 0
}'
echo '{
  "tenant_id": "",
  "namespace": "",
  "name": "",
  "payload_format": "",
  "max_retry": 0
}' |  \
  http POST {{baseUrl}}/event-fabric/topics \
  content-type:application/json
wget --quiet \
  --method POST \
  --header 'content-type: application/json' \
  --body-data '{\n  "tenant_id": "",\n  "namespace": "",\n  "name": "",\n  "payload_format": "",\n  "max_retry": 0\n}' \
  --output-document \
  - {{baseUrl}}/event-fabric/topics
import Foundation

let headers = ["content-type": "application/json"]
let parameters = [
  "tenant_id": "",
  "namespace": "",
  "name": "",
  "payload_format": "",
  "max_retry": 0
] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/event-fabric/topics")! 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()
PATCH 更新主题生命周期
{{baseUrl}}/event-fabric/topics/:topic_id/lifecycle
QUERY PARAMS

topic_id
BODY json

{
  "target_state": "",
  "change_reason": "",
  "deprecated_at": "",
  "retired_at": ""
}
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PATCH");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/event-fabric/topics/:topic_id/lifecycle");

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

curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n  \"target_state\": \"\",\n  \"change_reason\": \"\",\n  \"deprecated_at\": \"\",\n  \"retired_at\": \"\"\n}");

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

(client/patch "{{baseUrl}}/event-fabric/topics/:topic_id/lifecycle" {:content-type :json
                                                                                     :form-params {:target_state ""
                                                                                                   :change_reason ""
                                                                                                   :deprecated_at ""
                                                                                                   :retired_at ""}})
require "http/client"

url = "{{baseUrl}}/event-fabric/topics/:topic_id/lifecycle"
headers = HTTP::Headers{
  "content-type" => "application/json"
}
reqBody = "{\n  \"target_state\": \"\",\n  \"change_reason\": \"\",\n  \"deprecated_at\": \"\",\n  \"retired_at\": \"\"\n}"

response = HTTP::Client.patch url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
    Method = HttpMethod.Patch,
    RequestUri = new Uri("{{baseUrl}}/event-fabric/topics/:topic_id/lifecycle"),
    Content = new StringContent("{\n  \"target_state\": \"\",\n  \"change_reason\": \"\",\n  \"deprecated_at\": \"\",\n  \"retired_at\": \"\"\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}}/event-fabric/topics/:topic_id/lifecycle");
var request = new RestRequest("", Method.Patch);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n  \"target_state\": \"\",\n  \"change_reason\": \"\",\n  \"deprecated_at\": \"\",\n  \"retired_at\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main

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

func main() {

	url := "{{baseUrl}}/event-fabric/topics/:topic_id/lifecycle"

	payload := strings.NewReader("{\n  \"target_state\": \"\",\n  \"change_reason\": \"\",\n  \"deprecated_at\": \"\",\n  \"retired_at\": \"\"\n}")

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

	req.Header.Add("content-type", "application/json")

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

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

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

}
PATCH /baseUrl/event-fabric/topics/:topic_id/lifecycle HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 90

{
  "target_state": "",
  "change_reason": "",
  "deprecated_at": "",
  "retired_at": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PATCH", "{{baseUrl}}/event-fabric/topics/:topic_id/lifecycle")
  .setHeader("content-type", "application/json")
  .setBody("{\n  \"target_state\": \"\",\n  \"change_reason\": \"\",\n  \"deprecated_at\": \"\",\n  \"retired_at\": \"\"\n}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/event-fabric/topics/:topic_id/lifecycle"))
    .header("content-type", "application/json")
    .method("PATCH", HttpRequest.BodyPublishers.ofString("{\n  \"target_state\": \"\",\n  \"change_reason\": \"\",\n  \"deprecated_at\": \"\",\n  \"retired_at\": \"\"\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  \"target_state\": \"\",\n  \"change_reason\": \"\",\n  \"deprecated_at\": \"\",\n  \"retired_at\": \"\"\n}");
Request request = new Request.Builder()
  .url("{{baseUrl}}/event-fabric/topics/:topic_id/lifecycle")
  .patch(body)
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.patch("{{baseUrl}}/event-fabric/topics/:topic_id/lifecycle")
  .header("content-type", "application/json")
  .body("{\n  \"target_state\": \"\",\n  \"change_reason\": \"\",\n  \"deprecated_at\": \"\",\n  \"retired_at\": \"\"\n}")
  .asString();
const data = JSON.stringify({
  target_state: '',
  change_reason: '',
  deprecated_at: '',
  retired_at: ''
});

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

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

xhr.open('PATCH', '{{baseUrl}}/event-fabric/topics/:topic_id/lifecycle');
xhr.setRequestHeader('content-type', 'application/json');

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

const options = {
  method: 'PATCH',
  url: '{{baseUrl}}/event-fabric/topics/:topic_id/lifecycle',
  headers: {'content-type': 'application/json'},
  data: {target_state: '', change_reason: '', deprecated_at: '', retired_at: ''}
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/event-fabric/topics/:topic_id/lifecycle';
const options = {
  method: 'PATCH',
  headers: {'content-type': 'application/json'},
  body: '{"target_state":"","change_reason":"","deprecated_at":"","retired_at":""}'
};

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}}/event-fabric/topics/:topic_id/lifecycle',
  method: 'PATCH',
  headers: {
    'content-type': 'application/json'
  },
  processData: false,
  data: '{\n  "target_state": "",\n  "change_reason": "",\n  "deprecated_at": "",\n  "retired_at": ""\n}'
};

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

val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n  \"target_state\": \"\",\n  \"change_reason\": \"\",\n  \"deprecated_at\": \"\",\n  \"retired_at\": \"\"\n}")
val request = Request.Builder()
  .url("{{baseUrl}}/event-fabric/topics/:topic_id/lifecycle")
  .patch(body)
  .addHeader("content-type", "application/json")
  .build()

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

const options = {
  method: 'PATCH',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/event-fabric/topics/:topic_id/lifecycle',
  headers: {
    'content-type': 'application/json'
  }
};

const req = http.request(options, function (res) {
  const chunks = [];

  res.on('data', function (chunk) {
    chunks.push(chunk);
  });

  res.on('end', function () {
    const body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.write(JSON.stringify({target_state: '', change_reason: '', deprecated_at: '', retired_at: ''}));
req.end();
const request = require('request');

const options = {
  method: 'PATCH',
  url: '{{baseUrl}}/event-fabric/topics/:topic_id/lifecycle',
  headers: {'content-type': 'application/json'},
  body: {target_state: '', change_reason: '', deprecated_at: '', retired_at: ''},
  json: true
};

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

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

const req = unirest('PATCH', '{{baseUrl}}/event-fabric/topics/:topic_id/lifecycle');

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

req.type('json');
req.send({
  target_state: '',
  change_reason: '',
  deprecated_at: '',
  retired_at: ''
});

req.end(function (res) {
  if (res.error) throw new Error(res.error);

  console.log(res.body);
});
const axios = require('axios').default;

const options = {
  method: 'PATCH',
  url: '{{baseUrl}}/event-fabric/topics/:topic_id/lifecycle',
  headers: {'content-type': 'application/json'},
  data: {target_state: '', change_reason: '', deprecated_at: '', retired_at: ''}
};

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

const url = '{{baseUrl}}/event-fabric/topics/:topic_id/lifecycle';
const options = {
  method: 'PATCH',
  headers: {'content-type': 'application/json'},
  body: '{"target_state":"","change_reason":"","deprecated_at":"","retired_at":""}'
};

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

NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"target_state": @"",
                              @"change_reason": @"",
                              @"deprecated_at": @"",
                              @"retired_at": @"" };

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

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/event-fabric/topics/:topic_id/lifecycle"]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[request setHTTPMethod:@"PATCH"];
[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}}/event-fabric/topics/:topic_id/lifecycle" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n  \"target_state\": \"\",\n  \"change_reason\": \"\",\n  \"deprecated_at\": \"\",\n  \"retired_at\": \"\"\n}" in

Client.call ~headers ~body `PATCH uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/event-fabric/topics/:topic_id/lifecycle",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "PATCH",
  CURLOPT_POSTFIELDS => json_encode([
    'target_state' => '',
    'change_reason' => '',
    'deprecated_at' => '',
    'retired_at' => ''
  ]),
  CURLOPT_HTTPHEADER => [
    "content-type: application/json"
  ],
]);

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

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('PATCH', '{{baseUrl}}/event-fabric/topics/:topic_id/lifecycle', [
  'body' => '{
  "target_state": "",
  "change_reason": "",
  "deprecated_at": "",
  "retired_at": ""
}',
  'headers' => [
    'content-type' => 'application/json',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/event-fabric/topics/:topic_id/lifecycle');
$request->setMethod(HttpRequest::HTTP_METH_PATCH);

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

$request->setContentType('application/json');
$request->setBody(json_encode([
  'target_state' => '',
  'change_reason' => '',
  'deprecated_at' => '',
  'retired_at' => ''
]));

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

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
append(json_encode([
  'target_state' => '',
  'change_reason' => '',
  'deprecated_at' => '',
  'retired_at' => ''
]));
$request->setRequestUrl('{{baseUrl}}/event-fabric/topics/:topic_id/lifecycle');
$request->setRequestMethod('PATCH');
$request->setBody($body);

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

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

echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/event-fabric/topics/:topic_id/lifecycle' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
  "target_state": "",
  "change_reason": "",
  "deprecated_at": "",
  "retired_at": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/event-fabric/topics/:topic_id/lifecycle' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
  "target_state": "",
  "change_reason": "",
  "deprecated_at": "",
  "retired_at": ""
}'
import http.client

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

payload = "{\n  \"target_state\": \"\",\n  \"change_reason\": \"\",\n  \"deprecated_at\": \"\",\n  \"retired_at\": \"\"\n}"

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

conn.request("PATCH", "/baseUrl/event-fabric/topics/:topic_id/lifecycle", payload, headers)

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

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

url = "{{baseUrl}}/event-fabric/topics/:topic_id/lifecycle"

payload = {
    "target_state": "",
    "change_reason": "",
    "deprecated_at": "",
    "retired_at": ""
}
headers = {"content-type": "application/json"}

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

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

url <- "{{baseUrl}}/event-fabric/topics/:topic_id/lifecycle"

payload <- "{\n  \"target_state\": \"\",\n  \"change_reason\": \"\",\n  \"deprecated_at\": \"\",\n  \"retired_at\": \"\"\n}"

encode <- "json"

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

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

url = URI("{{baseUrl}}/event-fabric/topics/:topic_id/lifecycle")

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

request = Net::HTTP::Patch.new(url)
request["content-type"] = 'application/json'
request.body = "{\n  \"target_state\": \"\",\n  \"change_reason\": \"\",\n  \"deprecated_at\": \"\",\n  \"retired_at\": \"\"\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.patch('/baseUrl/event-fabric/topics/:topic_id/lifecycle') do |req|
  req.body = "{\n  \"target_state\": \"\",\n  \"change_reason\": \"\",\n  \"deprecated_at\": \"\",\n  \"retired_at\": \"\"\n}"
end

puts response.status
puts response.body
use std::str::FromStr;
use serde_json::json;
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/event-fabric/topics/:topic_id/lifecycle";

    let payload = json!({
        "target_state": "",
        "change_reason": "",
        "deprecated_at": "",
        "retired_at": ""
    });

    let mut headers = reqwest::header::HeaderMap::new();
    headers.insert("content-type", "application/json".parse().unwrap());

    let client = reqwest::Client::new();
    let response = client.request(reqwest::Method::from_str("PATCH").unwrap(), url)
        .headers(headers)
        .json(&payload)
        .send()
        .await;

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

    dbg!(results);
}
curl --request PATCH \
  --url {{baseUrl}}/event-fabric/topics/:topic_id/lifecycle \
  --header 'content-type: application/json' \
  --data '{
  "target_state": "",
  "change_reason": "",
  "deprecated_at": "",
  "retired_at": ""
}'
echo '{
  "target_state": "",
  "change_reason": "",
  "deprecated_at": "",
  "retired_at": ""
}' |  \
  http PATCH {{baseUrl}}/event-fabric/topics/:topic_id/lifecycle \
  content-type:application/json
wget --quiet \
  --method PATCH \
  --header 'content-type: application/json' \
  --body-data '{\n  "target_state": "",\n  "change_reason": "",\n  "deprecated_at": "",\n  "retired_at": ""\n}' \
  --output-document \
  - {{baseUrl}}/event-fabric/topics/:topic_id/lifecycle
import Foundation

let headers = ["content-type": "application/json"]
let parameters = [
  "target_state": "",
  "change_reason": "",
  "deprecated_at": "",
  "retired_at": ""
] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/event-fabric/topics/:topic_id/lifecycle")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "PATCH"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
GET 查询主题列表
{{baseUrl}}/event-fabric/topics
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/event-fabric/topics");

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

(client/get "{{baseUrl}}/event-fabric/topics")
require "http/client"

url = "{{baseUrl}}/event-fabric/topics"

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

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

func main() {

	url := "{{baseUrl}}/event-fabric/topics"

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

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

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

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

}
GET /baseUrl/event-fabric/topics HTTP/1.1
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/event-fabric/topics")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

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

Request request = new Request.Builder()
  .url("{{baseUrl}}/event-fabric/topics")
  .get()
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/event-fabric/topics")
  .asString();
const data = null;

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

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

xhr.open('GET', '{{baseUrl}}/event-fabric/topics');

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

const options = {method: 'GET', url: '{{baseUrl}}/event-fabric/topics'};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/event-fabric/topics';
const options = {method: 'GET'};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
const settings = {
  async: true,
  crossDomain: true,
  url: '{{baseUrl}}/event-fabric/topics',
  method: 'GET',
  headers: {}
};

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

val request = Request.Builder()
  .url("{{baseUrl}}/event-fabric/topics")
  .get()
  .build()

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

const options = {
  method: 'GET',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/event-fabric/topics',
  headers: {}
};

const req = http.request(options, function (res) {
  const chunks = [];

  res.on('data', function (chunk) {
    chunks.push(chunk);
  });

  res.on('end', function () {
    const body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.end();
const request = require('request');

const options = {method: 'GET', url: '{{baseUrl}}/event-fabric/topics'};

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

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

const req = unirest('GET', '{{baseUrl}}/event-fabric/topics');

req.end(function (res) {
  if (res.error) throw new Error(res.error);

  console.log(res.body);
});
const axios = require('axios').default;

const options = {method: 'GET', url: '{{baseUrl}}/event-fabric/topics'};

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

const url = '{{baseUrl}}/event-fabric/topics';
const options = {method: 'GET'};

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

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/event-fabric/topics"]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];

NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
                                            completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                if (error) {
                                                    NSLog(@"%@", error);
                                                } else {
                                                    NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                    NSLog(@"%@", httpResponse);
                                                }
                                            }];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt

let uri = Uri.of_string "{{baseUrl}}/event-fabric/topics" in

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

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

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('GET', '{{baseUrl}}/event-fabric/topics');

echo $response->getBody();
setUrl('{{baseUrl}}/event-fabric/topics');
$request->setMethod(HTTP_METH_GET);

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

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

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

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

conn.request("GET", "/baseUrl/event-fabric/topics")

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

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

url = "{{baseUrl}}/event-fabric/topics"

response = requests.get(url)

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

url <- "{{baseUrl}}/event-fabric/topics"

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

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

url = URI("{{baseUrl}}/event-fabric/topics")

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

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

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

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

response = conn.get('/baseUrl/event-fabric/topics') do |req|
end

puts response.status
puts response.body
use reqwest;

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

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

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

    dbg!(results);
}
curl --request GET \
  --url {{baseUrl}}/event-fabric/topics
http GET {{baseUrl}}/event-fabric/topics
wget --quiet \
  --method GET \
  --output-document \
  - {{baseUrl}}/event-fabric/topics
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/event-fabric/topics")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()