OpenAPI definition
GET
Actuator root web endpoint
{{baseUrl}}/actuator
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/actuator");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/actuator")
require "http/client"
url = "{{baseUrl}}/actuator"
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}}/actuator"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/actuator");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/actuator"
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/actuator HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/actuator")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/actuator"))
.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}}/actuator")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/actuator")
.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}}/actuator');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/actuator'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/actuator';
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}}/actuator',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/actuator")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/actuator',
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}}/actuator'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/actuator');
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}}/actuator'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/actuator';
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}}/actuator"]
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}}/actuator" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/actuator",
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}}/actuator');
echo $response->getBody();
setUrl('{{baseUrl}}/actuator');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/actuator');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/actuator' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/actuator' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/actuator")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/actuator"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/actuator"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/actuator")
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/actuator') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/actuator";
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}}/actuator
http GET {{baseUrl}}/actuator
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/actuator
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/actuator")! 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()
GET
Actuator web endpoint 'health'
{{baseUrl}}/actuator/health
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/actuator/health");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/actuator/health")
require "http/client"
url = "{{baseUrl}}/actuator/health"
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}}/actuator/health"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/actuator/health");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/actuator/health"
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/actuator/health HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/actuator/health")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/actuator/health"))
.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}}/actuator/health")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/actuator/health")
.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}}/actuator/health');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/actuator/health'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/actuator/health';
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}}/actuator/health',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/actuator/health")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/actuator/health',
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}}/actuator/health'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/actuator/health');
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}}/actuator/health'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/actuator/health';
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}}/actuator/health"]
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}}/actuator/health" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/actuator/health",
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}}/actuator/health');
echo $response->getBody();
setUrl('{{baseUrl}}/actuator/health');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/actuator/health');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/actuator/health' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/actuator/health' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/actuator/health")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/actuator/health"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/actuator/health"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/actuator/health")
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/actuator/health') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/actuator/health";
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}}/actuator/health
http GET {{baseUrl}}/actuator/health
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/actuator/health
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/actuator/health")! 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()
GET
Actuator web endpoint 'health-path'
{{baseUrl}}/actuator/health/**
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/actuator/health/**");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/actuator/health/**")
require "http/client"
url = "{{baseUrl}}/actuator/health/**"
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}}/actuator/health/**"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/actuator/health/**");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/actuator/health/**"
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/actuator/health/** HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/actuator/health/**")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/actuator/health/**"))
.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}}/actuator/health/**")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/actuator/health/**")
.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}}/actuator/health/**');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/actuator/health/**'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/actuator/health/**';
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}}/actuator/health/**',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/actuator/health/**")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/actuator/health/**',
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}}/actuator/health/**'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/actuator/health/**');
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}}/actuator/health/**'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/actuator/health/**';
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}}/actuator/health/**"]
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}}/actuator/health/**" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/actuator/health/**",
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}}/actuator/health/**');
echo $response->getBody();
setUrl('{{baseUrl}}/actuator/health/**');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/actuator/health/**');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/actuator/health/**' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/actuator/health/**' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/actuator/health/**")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/actuator/health/**"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/actuator/health/**"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/actuator/health/**")
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/actuator/health/**') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/actuator/health/**";
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}}/actuator/health/**'
http GET '{{baseUrl}}/actuator/health/**'
wget --quiet \
--method GET \
--output-document \
- '{{baseUrl}}/actuator/health/**'
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/actuator/health/**")! 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
extract
{{baseUrl}}/cms/extract
BODY json
{
"revocationCheck": [],
"cms": "",
"data": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/cms/extract");
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 \"revocationCheck\": [],\n \"cms\": \"\",\n \"data\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/cms/extract" {:content-type :json
:form-params {:revocationCheck []
:cms ""
:data ""}})
require "http/client"
url = "{{baseUrl}}/cms/extract"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"revocationCheck\": [],\n \"cms\": \"\",\n \"data\": \"\"\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}}/cms/extract"),
Content = new StringContent("{\n \"revocationCheck\": [],\n \"cms\": \"\",\n \"data\": \"\"\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}}/cms/extract");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"revocationCheck\": [],\n \"cms\": \"\",\n \"data\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/cms/extract"
payload := strings.NewReader("{\n \"revocationCheck\": [],\n \"cms\": \"\",\n \"data\": \"\"\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/cms/extract HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 54
{
"revocationCheck": [],
"cms": "",
"data": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/cms/extract")
.setHeader("content-type", "application/json")
.setBody("{\n \"revocationCheck\": [],\n \"cms\": \"\",\n \"data\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/cms/extract"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"revocationCheck\": [],\n \"cms\": \"\",\n \"data\": \"\"\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 \"revocationCheck\": [],\n \"cms\": \"\",\n \"data\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/cms/extract")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/cms/extract")
.header("content-type", "application/json")
.body("{\n \"revocationCheck\": [],\n \"cms\": \"\",\n \"data\": \"\"\n}")
.asString();
const data = JSON.stringify({
revocationCheck: [],
cms: '',
data: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/cms/extract');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/cms/extract',
headers: {'content-type': 'application/json'},
data: {revocationCheck: [], cms: '', data: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/cms/extract';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"revocationCheck":[],"cms":"","data":""}'
};
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}}/cms/extract',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "revocationCheck": [],\n "cms": "",\n "data": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"revocationCheck\": [],\n \"cms\": \"\",\n \"data\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/cms/extract")
.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/cms/extract',
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({revocationCheck: [], cms: '', data: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/cms/extract',
headers: {'content-type': 'application/json'},
body: {revocationCheck: [], cms: '', data: ''},
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}}/cms/extract');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
revocationCheck: [],
cms: '',
data: ''
});
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}}/cms/extract',
headers: {'content-type': 'application/json'},
data: {revocationCheck: [], cms: '', data: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/cms/extract';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"revocationCheck":[],"cms":"","data":""}'
};
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 = @{ @"revocationCheck": @[ ],
@"cms": @"",
@"data": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/cms/extract"]
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}}/cms/extract" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"revocationCheck\": [],\n \"cms\": \"\",\n \"data\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/cms/extract",
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([
'revocationCheck' => [
],
'cms' => '',
'data' => ''
]),
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}}/cms/extract', [
'body' => '{
"revocationCheck": [],
"cms": "",
"data": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/cms/extract');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'revocationCheck' => [
],
'cms' => '',
'data' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'revocationCheck' => [
],
'cms' => '',
'data' => ''
]));
$request->setRequestUrl('{{baseUrl}}/cms/extract');
$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}}/cms/extract' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"revocationCheck": [],
"cms": "",
"data": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/cms/extract' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"revocationCheck": [],
"cms": "",
"data": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"revocationCheck\": [],\n \"cms\": \"\",\n \"data\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/cms/extract", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/cms/extract"
payload = {
"revocationCheck": [],
"cms": "",
"data": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/cms/extract"
payload <- "{\n \"revocationCheck\": [],\n \"cms\": \"\",\n \"data\": \"\"\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}}/cms/extract")
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 \"revocationCheck\": [],\n \"cms\": \"\",\n \"data\": \"\"\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/cms/extract') do |req|
req.body = "{\n \"revocationCheck\": [],\n \"cms\": \"\",\n \"data\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/cms/extract";
let payload = json!({
"revocationCheck": (),
"cms": "",
"data": ""
});
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}}/cms/extract \
--header 'content-type: application/json' \
--data '{
"revocationCheck": [],
"cms": "",
"data": ""
}'
echo '{
"revocationCheck": [],
"cms": "",
"data": ""
}' | \
http POST {{baseUrl}}/cms/extract \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "revocationCheck": [],\n "cms": "",\n "data": ""\n}' \
--output-document \
- {{baseUrl}}/cms/extract
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"revocationCheck": [],
"cms": "",
"data": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/cms/extract")! 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
signAdd
{{baseUrl}}/cms/sign/add
BODY json
{
"cms": "",
"data": "",
"signers": [
{
"key": "",
"password": "",
"keyAlias": "",
"referenceUri": ""
}
],
"withTsp": false,
"tsaPolicy": "",
"detached": false
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/cms/sign/add");
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 \"cms\": \"\",\n \"data\": \"\",\n \"signers\": [\n {\n \"key\": \"\",\n \"password\": \"\",\n \"keyAlias\": \"\",\n \"referenceUri\": \"\"\n }\n ],\n \"withTsp\": false,\n \"tsaPolicy\": \"\",\n \"detached\": false\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/cms/sign/add" {:content-type :json
:form-params {:cms ""
:data ""
:signers [{:key ""
:password ""
:keyAlias ""
:referenceUri ""}]
:withTsp false
:tsaPolicy ""
:detached false}})
require "http/client"
url = "{{baseUrl}}/cms/sign/add"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"cms\": \"\",\n \"data\": \"\",\n \"signers\": [\n {\n \"key\": \"\",\n \"password\": \"\",\n \"keyAlias\": \"\",\n \"referenceUri\": \"\"\n }\n ],\n \"withTsp\": false,\n \"tsaPolicy\": \"\",\n \"detached\": 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}}/cms/sign/add"),
Content = new StringContent("{\n \"cms\": \"\",\n \"data\": \"\",\n \"signers\": [\n {\n \"key\": \"\",\n \"password\": \"\",\n \"keyAlias\": \"\",\n \"referenceUri\": \"\"\n }\n ],\n \"withTsp\": false,\n \"tsaPolicy\": \"\",\n \"detached\": 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}}/cms/sign/add");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"cms\": \"\",\n \"data\": \"\",\n \"signers\": [\n {\n \"key\": \"\",\n \"password\": \"\",\n \"keyAlias\": \"\",\n \"referenceUri\": \"\"\n }\n ],\n \"withTsp\": false,\n \"tsaPolicy\": \"\",\n \"detached\": false\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/cms/sign/add"
payload := strings.NewReader("{\n \"cms\": \"\",\n \"data\": \"\",\n \"signers\": [\n {\n \"key\": \"\",\n \"password\": \"\",\n \"keyAlias\": \"\",\n \"referenceUri\": \"\"\n }\n ],\n \"withTsp\": false,\n \"tsaPolicy\": \"\",\n \"detached\": 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/cms/sign/add HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 207
{
"cms": "",
"data": "",
"signers": [
{
"key": "",
"password": "",
"keyAlias": "",
"referenceUri": ""
}
],
"withTsp": false,
"tsaPolicy": "",
"detached": false
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/cms/sign/add")
.setHeader("content-type", "application/json")
.setBody("{\n \"cms\": \"\",\n \"data\": \"\",\n \"signers\": [\n {\n \"key\": \"\",\n \"password\": \"\",\n \"keyAlias\": \"\",\n \"referenceUri\": \"\"\n }\n ],\n \"withTsp\": false,\n \"tsaPolicy\": \"\",\n \"detached\": false\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/cms/sign/add"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"cms\": \"\",\n \"data\": \"\",\n \"signers\": [\n {\n \"key\": \"\",\n \"password\": \"\",\n \"keyAlias\": \"\",\n \"referenceUri\": \"\"\n }\n ],\n \"withTsp\": false,\n \"tsaPolicy\": \"\",\n \"detached\": 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 \"cms\": \"\",\n \"data\": \"\",\n \"signers\": [\n {\n \"key\": \"\",\n \"password\": \"\",\n \"keyAlias\": \"\",\n \"referenceUri\": \"\"\n }\n ],\n \"withTsp\": false,\n \"tsaPolicy\": \"\",\n \"detached\": false\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/cms/sign/add")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/cms/sign/add")
.header("content-type", "application/json")
.body("{\n \"cms\": \"\",\n \"data\": \"\",\n \"signers\": [\n {\n \"key\": \"\",\n \"password\": \"\",\n \"keyAlias\": \"\",\n \"referenceUri\": \"\"\n }\n ],\n \"withTsp\": false,\n \"tsaPolicy\": \"\",\n \"detached\": false\n}")
.asString();
const data = JSON.stringify({
cms: '',
data: '',
signers: [
{
key: '',
password: '',
keyAlias: '',
referenceUri: ''
}
],
withTsp: false,
tsaPolicy: '',
detached: 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}}/cms/sign/add');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/cms/sign/add',
headers: {'content-type': 'application/json'},
data: {
cms: '',
data: '',
signers: [{key: '', password: '', keyAlias: '', referenceUri: ''}],
withTsp: false,
tsaPolicy: '',
detached: false
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/cms/sign/add';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"cms":"","data":"","signers":[{"key":"","password":"","keyAlias":"","referenceUri":""}],"withTsp":false,"tsaPolicy":"","detached":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}}/cms/sign/add',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "cms": "",\n "data": "",\n "signers": [\n {\n "key": "",\n "password": "",\n "keyAlias": "",\n "referenceUri": ""\n }\n ],\n "withTsp": false,\n "tsaPolicy": "",\n "detached": 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 \"cms\": \"\",\n \"data\": \"\",\n \"signers\": [\n {\n \"key\": \"\",\n \"password\": \"\",\n \"keyAlias\": \"\",\n \"referenceUri\": \"\"\n }\n ],\n \"withTsp\": false,\n \"tsaPolicy\": \"\",\n \"detached\": false\n}")
val request = Request.Builder()
.url("{{baseUrl}}/cms/sign/add")
.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/cms/sign/add',
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({
cms: '',
data: '',
signers: [{key: '', password: '', keyAlias: '', referenceUri: ''}],
withTsp: false,
tsaPolicy: '',
detached: false
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/cms/sign/add',
headers: {'content-type': 'application/json'},
body: {
cms: '',
data: '',
signers: [{key: '', password: '', keyAlias: '', referenceUri: ''}],
withTsp: false,
tsaPolicy: '',
detached: 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}}/cms/sign/add');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
cms: '',
data: '',
signers: [
{
key: '',
password: '',
keyAlias: '',
referenceUri: ''
}
],
withTsp: false,
tsaPolicy: '',
detached: 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}}/cms/sign/add',
headers: {'content-type': 'application/json'},
data: {
cms: '',
data: '',
signers: [{key: '', password: '', keyAlias: '', referenceUri: ''}],
withTsp: false,
tsaPolicy: '',
detached: false
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/cms/sign/add';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"cms":"","data":"","signers":[{"key":"","password":"","keyAlias":"","referenceUri":""}],"withTsp":false,"tsaPolicy":"","detached":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 = @{ @"cms": @"",
@"data": @"",
@"signers": @[ @{ @"key": @"", @"password": @"", @"keyAlias": @"", @"referenceUri": @"" } ],
@"withTsp": @NO,
@"tsaPolicy": @"",
@"detached": @NO };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/cms/sign/add"]
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}}/cms/sign/add" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"cms\": \"\",\n \"data\": \"\",\n \"signers\": [\n {\n \"key\": \"\",\n \"password\": \"\",\n \"keyAlias\": \"\",\n \"referenceUri\": \"\"\n }\n ],\n \"withTsp\": false,\n \"tsaPolicy\": \"\",\n \"detached\": false\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/cms/sign/add",
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([
'cms' => '',
'data' => '',
'signers' => [
[
'key' => '',
'password' => '',
'keyAlias' => '',
'referenceUri' => ''
]
],
'withTsp' => null,
'tsaPolicy' => '',
'detached' => 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}}/cms/sign/add', [
'body' => '{
"cms": "",
"data": "",
"signers": [
{
"key": "",
"password": "",
"keyAlias": "",
"referenceUri": ""
}
],
"withTsp": false,
"tsaPolicy": "",
"detached": false
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/cms/sign/add');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'cms' => '',
'data' => '',
'signers' => [
[
'key' => '',
'password' => '',
'keyAlias' => '',
'referenceUri' => ''
]
],
'withTsp' => null,
'tsaPolicy' => '',
'detached' => null
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'cms' => '',
'data' => '',
'signers' => [
[
'key' => '',
'password' => '',
'keyAlias' => '',
'referenceUri' => ''
]
],
'withTsp' => null,
'tsaPolicy' => '',
'detached' => null
]));
$request->setRequestUrl('{{baseUrl}}/cms/sign/add');
$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}}/cms/sign/add' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"cms": "",
"data": "",
"signers": [
{
"key": "",
"password": "",
"keyAlias": "",
"referenceUri": ""
}
],
"withTsp": false,
"tsaPolicy": "",
"detached": false
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/cms/sign/add' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"cms": "",
"data": "",
"signers": [
{
"key": "",
"password": "",
"keyAlias": "",
"referenceUri": ""
}
],
"withTsp": false,
"tsaPolicy": "",
"detached": false
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"cms\": \"\",\n \"data\": \"\",\n \"signers\": [\n {\n \"key\": \"\",\n \"password\": \"\",\n \"keyAlias\": \"\",\n \"referenceUri\": \"\"\n }\n ],\n \"withTsp\": false,\n \"tsaPolicy\": \"\",\n \"detached\": false\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/cms/sign/add", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/cms/sign/add"
payload = {
"cms": "",
"data": "",
"signers": [
{
"key": "",
"password": "",
"keyAlias": "",
"referenceUri": ""
}
],
"withTsp": False,
"tsaPolicy": "",
"detached": False
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/cms/sign/add"
payload <- "{\n \"cms\": \"\",\n \"data\": \"\",\n \"signers\": [\n {\n \"key\": \"\",\n \"password\": \"\",\n \"keyAlias\": \"\",\n \"referenceUri\": \"\"\n }\n ],\n \"withTsp\": false,\n \"tsaPolicy\": \"\",\n \"detached\": 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}}/cms/sign/add")
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 \"cms\": \"\",\n \"data\": \"\",\n \"signers\": [\n {\n \"key\": \"\",\n \"password\": \"\",\n \"keyAlias\": \"\",\n \"referenceUri\": \"\"\n }\n ],\n \"withTsp\": false,\n \"tsaPolicy\": \"\",\n \"detached\": 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/cms/sign/add') do |req|
req.body = "{\n \"cms\": \"\",\n \"data\": \"\",\n \"signers\": [\n {\n \"key\": \"\",\n \"password\": \"\",\n \"keyAlias\": \"\",\n \"referenceUri\": \"\"\n }\n ],\n \"withTsp\": false,\n \"tsaPolicy\": \"\",\n \"detached\": false\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/cms/sign/add";
let payload = json!({
"cms": "",
"data": "",
"signers": (
json!({
"key": "",
"password": "",
"keyAlias": "",
"referenceUri": ""
})
),
"withTsp": false,
"tsaPolicy": "",
"detached": 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}}/cms/sign/add \
--header 'content-type: application/json' \
--data '{
"cms": "",
"data": "",
"signers": [
{
"key": "",
"password": "",
"keyAlias": "",
"referenceUri": ""
}
],
"withTsp": false,
"tsaPolicy": "",
"detached": false
}'
echo '{
"cms": "",
"data": "",
"signers": [
{
"key": "",
"password": "",
"keyAlias": "",
"referenceUri": ""
}
],
"withTsp": false,
"tsaPolicy": "",
"detached": false
}' | \
http POST {{baseUrl}}/cms/sign/add \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "cms": "",\n "data": "",\n "signers": [\n {\n "key": "",\n "password": "",\n "keyAlias": "",\n "referenceUri": ""\n }\n ],\n "withTsp": false,\n "tsaPolicy": "",\n "detached": false\n}' \
--output-document \
- {{baseUrl}}/cms/sign/add
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"cms": "",
"data": "",
"signers": [
[
"key": "",
"password": "",
"keyAlias": "",
"referenceUri": ""
]
],
"withTsp": false,
"tsaPolicy": "",
"detached": false
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/cms/sign/add")! 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
sign_3
{{baseUrl}}/cms/sign
BODY json
{
"cms": "",
"data": "",
"signers": [
{
"key": "",
"password": "",
"keyAlias": "",
"referenceUri": ""
}
],
"withTsp": false,
"tsaPolicy": "",
"detached": false
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/cms/sign");
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 \"cms\": \"\",\n \"data\": \"\",\n \"signers\": [\n {\n \"key\": \"\",\n \"password\": \"\",\n \"keyAlias\": \"\",\n \"referenceUri\": \"\"\n }\n ],\n \"withTsp\": false,\n \"tsaPolicy\": \"\",\n \"detached\": false\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/cms/sign" {:content-type :json
:form-params {:cms ""
:data ""
:signers [{:key ""
:password ""
:keyAlias ""
:referenceUri ""}]
:withTsp false
:tsaPolicy ""
:detached false}})
require "http/client"
url = "{{baseUrl}}/cms/sign"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"cms\": \"\",\n \"data\": \"\",\n \"signers\": [\n {\n \"key\": \"\",\n \"password\": \"\",\n \"keyAlias\": \"\",\n \"referenceUri\": \"\"\n }\n ],\n \"withTsp\": false,\n \"tsaPolicy\": \"\",\n \"detached\": 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}}/cms/sign"),
Content = new StringContent("{\n \"cms\": \"\",\n \"data\": \"\",\n \"signers\": [\n {\n \"key\": \"\",\n \"password\": \"\",\n \"keyAlias\": \"\",\n \"referenceUri\": \"\"\n }\n ],\n \"withTsp\": false,\n \"tsaPolicy\": \"\",\n \"detached\": 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}}/cms/sign");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"cms\": \"\",\n \"data\": \"\",\n \"signers\": [\n {\n \"key\": \"\",\n \"password\": \"\",\n \"keyAlias\": \"\",\n \"referenceUri\": \"\"\n }\n ],\n \"withTsp\": false,\n \"tsaPolicy\": \"\",\n \"detached\": false\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/cms/sign"
payload := strings.NewReader("{\n \"cms\": \"\",\n \"data\": \"\",\n \"signers\": [\n {\n \"key\": \"\",\n \"password\": \"\",\n \"keyAlias\": \"\",\n \"referenceUri\": \"\"\n }\n ],\n \"withTsp\": false,\n \"tsaPolicy\": \"\",\n \"detached\": 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/cms/sign HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 207
{
"cms": "",
"data": "",
"signers": [
{
"key": "",
"password": "",
"keyAlias": "",
"referenceUri": ""
}
],
"withTsp": false,
"tsaPolicy": "",
"detached": false
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/cms/sign")
.setHeader("content-type", "application/json")
.setBody("{\n \"cms\": \"\",\n \"data\": \"\",\n \"signers\": [\n {\n \"key\": \"\",\n \"password\": \"\",\n \"keyAlias\": \"\",\n \"referenceUri\": \"\"\n }\n ],\n \"withTsp\": false,\n \"tsaPolicy\": \"\",\n \"detached\": false\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/cms/sign"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"cms\": \"\",\n \"data\": \"\",\n \"signers\": [\n {\n \"key\": \"\",\n \"password\": \"\",\n \"keyAlias\": \"\",\n \"referenceUri\": \"\"\n }\n ],\n \"withTsp\": false,\n \"tsaPolicy\": \"\",\n \"detached\": 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 \"cms\": \"\",\n \"data\": \"\",\n \"signers\": [\n {\n \"key\": \"\",\n \"password\": \"\",\n \"keyAlias\": \"\",\n \"referenceUri\": \"\"\n }\n ],\n \"withTsp\": false,\n \"tsaPolicy\": \"\",\n \"detached\": false\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/cms/sign")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/cms/sign")
.header("content-type", "application/json")
.body("{\n \"cms\": \"\",\n \"data\": \"\",\n \"signers\": [\n {\n \"key\": \"\",\n \"password\": \"\",\n \"keyAlias\": \"\",\n \"referenceUri\": \"\"\n }\n ],\n \"withTsp\": false,\n \"tsaPolicy\": \"\",\n \"detached\": false\n}")
.asString();
const data = JSON.stringify({
cms: '',
data: '',
signers: [
{
key: '',
password: '',
keyAlias: '',
referenceUri: ''
}
],
withTsp: false,
tsaPolicy: '',
detached: 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}}/cms/sign');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/cms/sign',
headers: {'content-type': 'application/json'},
data: {
cms: '',
data: '',
signers: [{key: '', password: '', keyAlias: '', referenceUri: ''}],
withTsp: false,
tsaPolicy: '',
detached: false
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/cms/sign';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"cms":"","data":"","signers":[{"key":"","password":"","keyAlias":"","referenceUri":""}],"withTsp":false,"tsaPolicy":"","detached":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}}/cms/sign',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "cms": "",\n "data": "",\n "signers": [\n {\n "key": "",\n "password": "",\n "keyAlias": "",\n "referenceUri": ""\n }\n ],\n "withTsp": false,\n "tsaPolicy": "",\n "detached": 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 \"cms\": \"\",\n \"data\": \"\",\n \"signers\": [\n {\n \"key\": \"\",\n \"password\": \"\",\n \"keyAlias\": \"\",\n \"referenceUri\": \"\"\n }\n ],\n \"withTsp\": false,\n \"tsaPolicy\": \"\",\n \"detached\": false\n}")
val request = Request.Builder()
.url("{{baseUrl}}/cms/sign")
.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/cms/sign',
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({
cms: '',
data: '',
signers: [{key: '', password: '', keyAlias: '', referenceUri: ''}],
withTsp: false,
tsaPolicy: '',
detached: false
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/cms/sign',
headers: {'content-type': 'application/json'},
body: {
cms: '',
data: '',
signers: [{key: '', password: '', keyAlias: '', referenceUri: ''}],
withTsp: false,
tsaPolicy: '',
detached: 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}}/cms/sign');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
cms: '',
data: '',
signers: [
{
key: '',
password: '',
keyAlias: '',
referenceUri: ''
}
],
withTsp: false,
tsaPolicy: '',
detached: 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}}/cms/sign',
headers: {'content-type': 'application/json'},
data: {
cms: '',
data: '',
signers: [{key: '', password: '', keyAlias: '', referenceUri: ''}],
withTsp: false,
tsaPolicy: '',
detached: false
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/cms/sign';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"cms":"","data":"","signers":[{"key":"","password":"","keyAlias":"","referenceUri":""}],"withTsp":false,"tsaPolicy":"","detached":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 = @{ @"cms": @"",
@"data": @"",
@"signers": @[ @{ @"key": @"", @"password": @"", @"keyAlias": @"", @"referenceUri": @"" } ],
@"withTsp": @NO,
@"tsaPolicy": @"",
@"detached": @NO };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/cms/sign"]
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}}/cms/sign" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"cms\": \"\",\n \"data\": \"\",\n \"signers\": [\n {\n \"key\": \"\",\n \"password\": \"\",\n \"keyAlias\": \"\",\n \"referenceUri\": \"\"\n }\n ],\n \"withTsp\": false,\n \"tsaPolicy\": \"\",\n \"detached\": false\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/cms/sign",
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([
'cms' => '',
'data' => '',
'signers' => [
[
'key' => '',
'password' => '',
'keyAlias' => '',
'referenceUri' => ''
]
],
'withTsp' => null,
'tsaPolicy' => '',
'detached' => 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}}/cms/sign', [
'body' => '{
"cms": "",
"data": "",
"signers": [
{
"key": "",
"password": "",
"keyAlias": "",
"referenceUri": ""
}
],
"withTsp": false,
"tsaPolicy": "",
"detached": false
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/cms/sign');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'cms' => '',
'data' => '',
'signers' => [
[
'key' => '',
'password' => '',
'keyAlias' => '',
'referenceUri' => ''
]
],
'withTsp' => null,
'tsaPolicy' => '',
'detached' => null
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'cms' => '',
'data' => '',
'signers' => [
[
'key' => '',
'password' => '',
'keyAlias' => '',
'referenceUri' => ''
]
],
'withTsp' => null,
'tsaPolicy' => '',
'detached' => null
]));
$request->setRequestUrl('{{baseUrl}}/cms/sign');
$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}}/cms/sign' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"cms": "",
"data": "",
"signers": [
{
"key": "",
"password": "",
"keyAlias": "",
"referenceUri": ""
}
],
"withTsp": false,
"tsaPolicy": "",
"detached": false
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/cms/sign' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"cms": "",
"data": "",
"signers": [
{
"key": "",
"password": "",
"keyAlias": "",
"referenceUri": ""
}
],
"withTsp": false,
"tsaPolicy": "",
"detached": false
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"cms\": \"\",\n \"data\": \"\",\n \"signers\": [\n {\n \"key\": \"\",\n \"password\": \"\",\n \"keyAlias\": \"\",\n \"referenceUri\": \"\"\n }\n ],\n \"withTsp\": false,\n \"tsaPolicy\": \"\",\n \"detached\": false\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/cms/sign", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/cms/sign"
payload = {
"cms": "",
"data": "",
"signers": [
{
"key": "",
"password": "",
"keyAlias": "",
"referenceUri": ""
}
],
"withTsp": False,
"tsaPolicy": "",
"detached": False
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/cms/sign"
payload <- "{\n \"cms\": \"\",\n \"data\": \"\",\n \"signers\": [\n {\n \"key\": \"\",\n \"password\": \"\",\n \"keyAlias\": \"\",\n \"referenceUri\": \"\"\n }\n ],\n \"withTsp\": false,\n \"tsaPolicy\": \"\",\n \"detached\": 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}}/cms/sign")
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 \"cms\": \"\",\n \"data\": \"\",\n \"signers\": [\n {\n \"key\": \"\",\n \"password\": \"\",\n \"keyAlias\": \"\",\n \"referenceUri\": \"\"\n }\n ],\n \"withTsp\": false,\n \"tsaPolicy\": \"\",\n \"detached\": 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/cms/sign') do |req|
req.body = "{\n \"cms\": \"\",\n \"data\": \"\",\n \"signers\": [\n {\n \"key\": \"\",\n \"password\": \"\",\n \"keyAlias\": \"\",\n \"referenceUri\": \"\"\n }\n ],\n \"withTsp\": false,\n \"tsaPolicy\": \"\",\n \"detached\": false\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/cms/sign";
let payload = json!({
"cms": "",
"data": "",
"signers": (
json!({
"key": "",
"password": "",
"keyAlias": "",
"referenceUri": ""
})
),
"withTsp": false,
"tsaPolicy": "",
"detached": 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}}/cms/sign \
--header 'content-type: application/json' \
--data '{
"cms": "",
"data": "",
"signers": [
{
"key": "",
"password": "",
"keyAlias": "",
"referenceUri": ""
}
],
"withTsp": false,
"tsaPolicy": "",
"detached": false
}'
echo '{
"cms": "",
"data": "",
"signers": [
{
"key": "",
"password": "",
"keyAlias": "",
"referenceUri": ""
}
],
"withTsp": false,
"tsaPolicy": "",
"detached": false
}' | \
http POST {{baseUrl}}/cms/sign \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "cms": "",\n "data": "",\n "signers": [\n {\n "key": "",\n "password": "",\n "keyAlias": "",\n "referenceUri": ""\n }\n ],\n "withTsp": false,\n "tsaPolicy": "",\n "detached": false\n}' \
--output-document \
- {{baseUrl}}/cms/sign
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"cms": "",
"data": "",
"signers": [
[
"key": "",
"password": "",
"keyAlias": "",
"referenceUri": ""
]
],
"withTsp": false,
"tsaPolicy": "",
"detached": false
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/cms/sign")! 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
verify_5
{{baseUrl}}/cms/verify
BODY json
{
"revocationCheck": [],
"cms": "",
"data": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/cms/verify");
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 \"revocationCheck\": [],\n \"cms\": \"\",\n \"data\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/cms/verify" {:content-type :json
:form-params {:revocationCheck []
:cms ""
:data ""}})
require "http/client"
url = "{{baseUrl}}/cms/verify"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"revocationCheck\": [],\n \"cms\": \"\",\n \"data\": \"\"\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}}/cms/verify"),
Content = new StringContent("{\n \"revocationCheck\": [],\n \"cms\": \"\",\n \"data\": \"\"\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}}/cms/verify");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"revocationCheck\": [],\n \"cms\": \"\",\n \"data\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/cms/verify"
payload := strings.NewReader("{\n \"revocationCheck\": [],\n \"cms\": \"\",\n \"data\": \"\"\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/cms/verify HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 54
{
"revocationCheck": [],
"cms": "",
"data": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/cms/verify")
.setHeader("content-type", "application/json")
.setBody("{\n \"revocationCheck\": [],\n \"cms\": \"\",\n \"data\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/cms/verify"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"revocationCheck\": [],\n \"cms\": \"\",\n \"data\": \"\"\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 \"revocationCheck\": [],\n \"cms\": \"\",\n \"data\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/cms/verify")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/cms/verify")
.header("content-type", "application/json")
.body("{\n \"revocationCheck\": [],\n \"cms\": \"\",\n \"data\": \"\"\n}")
.asString();
const data = JSON.stringify({
revocationCheck: [],
cms: '',
data: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/cms/verify');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/cms/verify',
headers: {'content-type': 'application/json'},
data: {revocationCheck: [], cms: '', data: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/cms/verify';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"revocationCheck":[],"cms":"","data":""}'
};
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}}/cms/verify',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "revocationCheck": [],\n "cms": "",\n "data": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"revocationCheck\": [],\n \"cms\": \"\",\n \"data\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/cms/verify")
.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/cms/verify',
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({revocationCheck: [], cms: '', data: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/cms/verify',
headers: {'content-type': 'application/json'},
body: {revocationCheck: [], cms: '', data: ''},
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}}/cms/verify');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
revocationCheck: [],
cms: '',
data: ''
});
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}}/cms/verify',
headers: {'content-type': 'application/json'},
data: {revocationCheck: [], cms: '', data: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/cms/verify';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"revocationCheck":[],"cms":"","data":""}'
};
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 = @{ @"revocationCheck": @[ ],
@"cms": @"",
@"data": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/cms/verify"]
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}}/cms/verify" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"revocationCheck\": [],\n \"cms\": \"\",\n \"data\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/cms/verify",
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([
'revocationCheck' => [
],
'cms' => '',
'data' => ''
]),
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}}/cms/verify', [
'body' => '{
"revocationCheck": [],
"cms": "",
"data": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/cms/verify');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'revocationCheck' => [
],
'cms' => '',
'data' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'revocationCheck' => [
],
'cms' => '',
'data' => ''
]));
$request->setRequestUrl('{{baseUrl}}/cms/verify');
$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}}/cms/verify' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"revocationCheck": [],
"cms": "",
"data": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/cms/verify' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"revocationCheck": [],
"cms": "",
"data": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"revocationCheck\": [],\n \"cms\": \"\",\n \"data\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/cms/verify", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/cms/verify"
payload = {
"revocationCheck": [],
"cms": "",
"data": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/cms/verify"
payload <- "{\n \"revocationCheck\": [],\n \"cms\": \"\",\n \"data\": \"\"\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}}/cms/verify")
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 \"revocationCheck\": [],\n \"cms\": \"\",\n \"data\": \"\"\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/cms/verify') do |req|
req.body = "{\n \"revocationCheck\": [],\n \"cms\": \"\",\n \"data\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/cms/verify";
let payload = json!({
"revocationCheck": (),
"cms": "",
"data": ""
});
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}}/cms/verify \
--header 'content-type: application/json' \
--data '{
"revocationCheck": [],
"cms": "",
"data": ""
}'
echo '{
"revocationCheck": [],
"cms": "",
"data": ""
}' | \
http POST {{baseUrl}}/cms/verify \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "revocationCheck": [],\n "cms": "",\n "data": ""\n}' \
--output-document \
- {{baseUrl}}/cms/verify
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"revocationCheck": [],
"cms": "",
"data": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/cms/verify")! 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
sign_2
{{baseUrl}}/pdf/sign
BODY json
{
"pdf": "",
"signers": [
{
"reason": "",
"location": "",
"contactInfo": "",
"signer": {
"key": "",
"password": "",
"keyAlias": "",
"referenceUri": ""
}
}
],
"withTsp": false,
"tsaPolicy": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/pdf/sign");
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 \"pdf\": \"\",\n \"signers\": [\n {\n \"reason\": \"\",\n \"location\": \"\",\n \"contactInfo\": \"\",\n \"signer\": {\n \"key\": \"\",\n \"password\": \"\",\n \"keyAlias\": \"\",\n \"referenceUri\": \"\"\n }\n }\n ],\n \"withTsp\": false,\n \"tsaPolicy\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/pdf/sign" {:content-type :json
:form-params {:pdf ""
:signers [{:reason ""
:location ""
:contactInfo ""
:signer {:key ""
:password ""
:keyAlias ""
:referenceUri ""}}]
:withTsp false
:tsaPolicy ""}})
require "http/client"
url = "{{baseUrl}}/pdf/sign"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"pdf\": \"\",\n \"signers\": [\n {\n \"reason\": \"\",\n \"location\": \"\",\n \"contactInfo\": \"\",\n \"signer\": {\n \"key\": \"\",\n \"password\": \"\",\n \"keyAlias\": \"\",\n \"referenceUri\": \"\"\n }\n }\n ],\n \"withTsp\": false,\n \"tsaPolicy\": \"\"\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}}/pdf/sign"),
Content = new StringContent("{\n \"pdf\": \"\",\n \"signers\": [\n {\n \"reason\": \"\",\n \"location\": \"\",\n \"contactInfo\": \"\",\n \"signer\": {\n \"key\": \"\",\n \"password\": \"\",\n \"keyAlias\": \"\",\n \"referenceUri\": \"\"\n }\n }\n ],\n \"withTsp\": false,\n \"tsaPolicy\": \"\"\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}}/pdf/sign");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"pdf\": \"\",\n \"signers\": [\n {\n \"reason\": \"\",\n \"location\": \"\",\n \"contactInfo\": \"\",\n \"signer\": {\n \"key\": \"\",\n \"password\": \"\",\n \"keyAlias\": \"\",\n \"referenceUri\": \"\"\n }\n }\n ],\n \"withTsp\": false,\n \"tsaPolicy\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/pdf/sign"
payload := strings.NewReader("{\n \"pdf\": \"\",\n \"signers\": [\n {\n \"reason\": \"\",\n \"location\": \"\",\n \"contactInfo\": \"\",\n \"signer\": {\n \"key\": \"\",\n \"password\": \"\",\n \"keyAlias\": \"\",\n \"referenceUri\": \"\"\n }\n }\n ],\n \"withTsp\": false,\n \"tsaPolicy\": \"\"\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/pdf/sign HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 273
{
"pdf": "",
"signers": [
{
"reason": "",
"location": "",
"contactInfo": "",
"signer": {
"key": "",
"password": "",
"keyAlias": "",
"referenceUri": ""
}
}
],
"withTsp": false,
"tsaPolicy": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/pdf/sign")
.setHeader("content-type", "application/json")
.setBody("{\n \"pdf\": \"\",\n \"signers\": [\n {\n \"reason\": \"\",\n \"location\": \"\",\n \"contactInfo\": \"\",\n \"signer\": {\n \"key\": \"\",\n \"password\": \"\",\n \"keyAlias\": \"\",\n \"referenceUri\": \"\"\n }\n }\n ],\n \"withTsp\": false,\n \"tsaPolicy\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/pdf/sign"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"pdf\": \"\",\n \"signers\": [\n {\n \"reason\": \"\",\n \"location\": \"\",\n \"contactInfo\": \"\",\n \"signer\": {\n \"key\": \"\",\n \"password\": \"\",\n \"keyAlias\": \"\",\n \"referenceUri\": \"\"\n }\n }\n ],\n \"withTsp\": false,\n \"tsaPolicy\": \"\"\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 \"pdf\": \"\",\n \"signers\": [\n {\n \"reason\": \"\",\n \"location\": \"\",\n \"contactInfo\": \"\",\n \"signer\": {\n \"key\": \"\",\n \"password\": \"\",\n \"keyAlias\": \"\",\n \"referenceUri\": \"\"\n }\n }\n ],\n \"withTsp\": false,\n \"tsaPolicy\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/pdf/sign")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/pdf/sign")
.header("content-type", "application/json")
.body("{\n \"pdf\": \"\",\n \"signers\": [\n {\n \"reason\": \"\",\n \"location\": \"\",\n \"contactInfo\": \"\",\n \"signer\": {\n \"key\": \"\",\n \"password\": \"\",\n \"keyAlias\": \"\",\n \"referenceUri\": \"\"\n }\n }\n ],\n \"withTsp\": false,\n \"tsaPolicy\": \"\"\n}")
.asString();
const data = JSON.stringify({
pdf: '',
signers: [
{
reason: '',
location: '',
contactInfo: '',
signer: {
key: '',
password: '',
keyAlias: '',
referenceUri: ''
}
}
],
withTsp: false,
tsaPolicy: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/pdf/sign');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/pdf/sign',
headers: {'content-type': 'application/json'},
data: {
pdf: '',
signers: [
{
reason: '',
location: '',
contactInfo: '',
signer: {key: '', password: '', keyAlias: '', referenceUri: ''}
}
],
withTsp: false,
tsaPolicy: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/pdf/sign';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"pdf":"","signers":[{"reason":"","location":"","contactInfo":"","signer":{"key":"","password":"","keyAlias":"","referenceUri":""}}],"withTsp":false,"tsaPolicy":""}'
};
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}}/pdf/sign',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "pdf": "",\n "signers": [\n {\n "reason": "",\n "location": "",\n "contactInfo": "",\n "signer": {\n "key": "",\n "password": "",\n "keyAlias": "",\n "referenceUri": ""\n }\n }\n ],\n "withTsp": false,\n "tsaPolicy": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"pdf\": \"\",\n \"signers\": [\n {\n \"reason\": \"\",\n \"location\": \"\",\n \"contactInfo\": \"\",\n \"signer\": {\n \"key\": \"\",\n \"password\": \"\",\n \"keyAlias\": \"\",\n \"referenceUri\": \"\"\n }\n }\n ],\n \"withTsp\": false,\n \"tsaPolicy\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/pdf/sign")
.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/pdf/sign',
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({
pdf: '',
signers: [
{
reason: '',
location: '',
contactInfo: '',
signer: {key: '', password: '', keyAlias: '', referenceUri: ''}
}
],
withTsp: false,
tsaPolicy: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/pdf/sign',
headers: {'content-type': 'application/json'},
body: {
pdf: '',
signers: [
{
reason: '',
location: '',
contactInfo: '',
signer: {key: '', password: '', keyAlias: '', referenceUri: ''}
}
],
withTsp: false,
tsaPolicy: ''
},
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}}/pdf/sign');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
pdf: '',
signers: [
{
reason: '',
location: '',
contactInfo: '',
signer: {
key: '',
password: '',
keyAlias: '',
referenceUri: ''
}
}
],
withTsp: false,
tsaPolicy: ''
});
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}}/pdf/sign',
headers: {'content-type': 'application/json'},
data: {
pdf: '',
signers: [
{
reason: '',
location: '',
contactInfo: '',
signer: {key: '', password: '', keyAlias: '', referenceUri: ''}
}
],
withTsp: false,
tsaPolicy: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/pdf/sign';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"pdf":"","signers":[{"reason":"","location":"","contactInfo":"","signer":{"key":"","password":"","keyAlias":"","referenceUri":""}}],"withTsp":false,"tsaPolicy":""}'
};
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 = @{ @"pdf": @"",
@"signers": @[ @{ @"reason": @"", @"location": @"", @"contactInfo": @"", @"signer": @{ @"key": @"", @"password": @"", @"keyAlias": @"", @"referenceUri": @"" } } ],
@"withTsp": @NO,
@"tsaPolicy": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/pdf/sign"]
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}}/pdf/sign" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"pdf\": \"\",\n \"signers\": [\n {\n \"reason\": \"\",\n \"location\": \"\",\n \"contactInfo\": \"\",\n \"signer\": {\n \"key\": \"\",\n \"password\": \"\",\n \"keyAlias\": \"\",\n \"referenceUri\": \"\"\n }\n }\n ],\n \"withTsp\": false,\n \"tsaPolicy\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/pdf/sign",
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([
'pdf' => '',
'signers' => [
[
'reason' => '',
'location' => '',
'contactInfo' => '',
'signer' => [
'key' => '',
'password' => '',
'keyAlias' => '',
'referenceUri' => ''
]
]
],
'withTsp' => null,
'tsaPolicy' => ''
]),
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}}/pdf/sign', [
'body' => '{
"pdf": "",
"signers": [
{
"reason": "",
"location": "",
"contactInfo": "",
"signer": {
"key": "",
"password": "",
"keyAlias": "",
"referenceUri": ""
}
}
],
"withTsp": false,
"tsaPolicy": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/pdf/sign');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'pdf' => '',
'signers' => [
[
'reason' => '',
'location' => '',
'contactInfo' => '',
'signer' => [
'key' => '',
'password' => '',
'keyAlias' => '',
'referenceUri' => ''
]
]
],
'withTsp' => null,
'tsaPolicy' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'pdf' => '',
'signers' => [
[
'reason' => '',
'location' => '',
'contactInfo' => '',
'signer' => [
'key' => '',
'password' => '',
'keyAlias' => '',
'referenceUri' => ''
]
]
],
'withTsp' => null,
'tsaPolicy' => ''
]));
$request->setRequestUrl('{{baseUrl}}/pdf/sign');
$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}}/pdf/sign' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"pdf": "",
"signers": [
{
"reason": "",
"location": "",
"contactInfo": "",
"signer": {
"key": "",
"password": "",
"keyAlias": "",
"referenceUri": ""
}
}
],
"withTsp": false,
"tsaPolicy": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/pdf/sign' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"pdf": "",
"signers": [
{
"reason": "",
"location": "",
"contactInfo": "",
"signer": {
"key": "",
"password": "",
"keyAlias": "",
"referenceUri": ""
}
}
],
"withTsp": false,
"tsaPolicy": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"pdf\": \"\",\n \"signers\": [\n {\n \"reason\": \"\",\n \"location\": \"\",\n \"contactInfo\": \"\",\n \"signer\": {\n \"key\": \"\",\n \"password\": \"\",\n \"keyAlias\": \"\",\n \"referenceUri\": \"\"\n }\n }\n ],\n \"withTsp\": false,\n \"tsaPolicy\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/pdf/sign", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/pdf/sign"
payload = {
"pdf": "",
"signers": [
{
"reason": "",
"location": "",
"contactInfo": "",
"signer": {
"key": "",
"password": "",
"keyAlias": "",
"referenceUri": ""
}
}
],
"withTsp": False,
"tsaPolicy": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/pdf/sign"
payload <- "{\n \"pdf\": \"\",\n \"signers\": [\n {\n \"reason\": \"\",\n \"location\": \"\",\n \"contactInfo\": \"\",\n \"signer\": {\n \"key\": \"\",\n \"password\": \"\",\n \"keyAlias\": \"\",\n \"referenceUri\": \"\"\n }\n }\n ],\n \"withTsp\": false,\n \"tsaPolicy\": \"\"\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}}/pdf/sign")
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 \"pdf\": \"\",\n \"signers\": [\n {\n \"reason\": \"\",\n \"location\": \"\",\n \"contactInfo\": \"\",\n \"signer\": {\n \"key\": \"\",\n \"password\": \"\",\n \"keyAlias\": \"\",\n \"referenceUri\": \"\"\n }\n }\n ],\n \"withTsp\": false,\n \"tsaPolicy\": \"\"\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/pdf/sign') do |req|
req.body = "{\n \"pdf\": \"\",\n \"signers\": [\n {\n \"reason\": \"\",\n \"location\": \"\",\n \"contactInfo\": \"\",\n \"signer\": {\n \"key\": \"\",\n \"password\": \"\",\n \"keyAlias\": \"\",\n \"referenceUri\": \"\"\n }\n }\n ],\n \"withTsp\": false,\n \"tsaPolicy\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/pdf/sign";
let payload = json!({
"pdf": "",
"signers": (
json!({
"reason": "",
"location": "",
"contactInfo": "",
"signer": json!({
"key": "",
"password": "",
"keyAlias": "",
"referenceUri": ""
})
})
),
"withTsp": false,
"tsaPolicy": ""
});
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}}/pdf/sign \
--header 'content-type: application/json' \
--data '{
"pdf": "",
"signers": [
{
"reason": "",
"location": "",
"contactInfo": "",
"signer": {
"key": "",
"password": "",
"keyAlias": "",
"referenceUri": ""
}
}
],
"withTsp": false,
"tsaPolicy": ""
}'
echo '{
"pdf": "",
"signers": [
{
"reason": "",
"location": "",
"contactInfo": "",
"signer": {
"key": "",
"password": "",
"keyAlias": "",
"referenceUri": ""
}
}
],
"withTsp": false,
"tsaPolicy": ""
}' | \
http POST {{baseUrl}}/pdf/sign \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "pdf": "",\n "signers": [\n {\n "reason": "",\n "location": "",\n "contactInfo": "",\n "signer": {\n "key": "",\n "password": "",\n "keyAlias": "",\n "referenceUri": ""\n }\n }\n ],\n "withTsp": false,\n "tsaPolicy": ""\n}' \
--output-document \
- {{baseUrl}}/pdf/sign
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"pdf": "",
"signers": [
[
"reason": "",
"location": "",
"contactInfo": "",
"signer": [
"key": "",
"password": "",
"keyAlias": "",
"referenceUri": ""
]
]
],
"withTsp": false,
"tsaPolicy": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/pdf/sign")! 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
verify_4
{{baseUrl}}/pdf/verify
BODY json
{
"revocationCheck": [],
"pdf": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/pdf/verify");
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 \"revocationCheck\": [],\n \"pdf\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/pdf/verify" {:content-type :json
:form-params {:revocationCheck []
:pdf ""}})
require "http/client"
url = "{{baseUrl}}/pdf/verify"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"revocationCheck\": [],\n \"pdf\": \"\"\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}}/pdf/verify"),
Content = new StringContent("{\n \"revocationCheck\": [],\n \"pdf\": \"\"\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}}/pdf/verify");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"revocationCheck\": [],\n \"pdf\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/pdf/verify"
payload := strings.NewReader("{\n \"revocationCheck\": [],\n \"pdf\": \"\"\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/pdf/verify HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 40
{
"revocationCheck": [],
"pdf": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/pdf/verify")
.setHeader("content-type", "application/json")
.setBody("{\n \"revocationCheck\": [],\n \"pdf\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/pdf/verify"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"revocationCheck\": [],\n \"pdf\": \"\"\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 \"revocationCheck\": [],\n \"pdf\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/pdf/verify")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/pdf/verify")
.header("content-type", "application/json")
.body("{\n \"revocationCheck\": [],\n \"pdf\": \"\"\n}")
.asString();
const data = JSON.stringify({
revocationCheck: [],
pdf: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/pdf/verify');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/pdf/verify',
headers: {'content-type': 'application/json'},
data: {revocationCheck: [], pdf: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/pdf/verify';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"revocationCheck":[],"pdf":""}'
};
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}}/pdf/verify',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "revocationCheck": [],\n "pdf": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"revocationCheck\": [],\n \"pdf\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/pdf/verify")
.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/pdf/verify',
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({revocationCheck: [], pdf: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/pdf/verify',
headers: {'content-type': 'application/json'},
body: {revocationCheck: [], pdf: ''},
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}}/pdf/verify');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
revocationCheck: [],
pdf: ''
});
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}}/pdf/verify',
headers: {'content-type': 'application/json'},
data: {revocationCheck: [], pdf: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/pdf/verify';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"revocationCheck":[],"pdf":""}'
};
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 = @{ @"revocationCheck": @[ ],
@"pdf": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/pdf/verify"]
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}}/pdf/verify" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"revocationCheck\": [],\n \"pdf\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/pdf/verify",
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([
'revocationCheck' => [
],
'pdf' => ''
]),
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}}/pdf/verify', [
'body' => '{
"revocationCheck": [],
"pdf": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/pdf/verify');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'revocationCheck' => [
],
'pdf' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'revocationCheck' => [
],
'pdf' => ''
]));
$request->setRequestUrl('{{baseUrl}}/pdf/verify');
$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}}/pdf/verify' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"revocationCheck": [],
"pdf": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/pdf/verify' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"revocationCheck": [],
"pdf": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"revocationCheck\": [],\n \"pdf\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/pdf/verify", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/pdf/verify"
payload = {
"revocationCheck": [],
"pdf": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/pdf/verify"
payload <- "{\n \"revocationCheck\": [],\n \"pdf\": \"\"\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}}/pdf/verify")
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 \"revocationCheck\": [],\n \"pdf\": \"\"\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/pdf/verify') do |req|
req.body = "{\n \"revocationCheck\": [],\n \"pdf\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/pdf/verify";
let payload = json!({
"revocationCheck": (),
"pdf": ""
});
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}}/pdf/verify \
--header 'content-type: application/json' \
--data '{
"revocationCheck": [],
"pdf": ""
}'
echo '{
"revocationCheck": [],
"pdf": ""
}' | \
http POST {{baseUrl}}/pdf/verify \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "revocationCheck": [],\n "pdf": ""\n}' \
--output-document \
- {{baseUrl}}/pdf/verify
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"revocationCheck": [],
"pdf": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/pdf/verify")! 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
aliases
{{baseUrl}}/pkcs12/aliases
BODY json
{
"revocationCheck": [],
"keys": [
{
"key": "",
"password": "",
"keyAlias": "",
"referenceUri": ""
}
]
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/pkcs12/aliases");
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 \"revocationCheck\": [],\n \"keys\": [\n {\n \"key\": \"\",\n \"password\": \"\",\n \"keyAlias\": \"\",\n \"referenceUri\": \"\"\n }\n ]\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/pkcs12/aliases" {:content-type :json
:form-params {:revocationCheck []
:keys [{:key ""
:password ""
:keyAlias ""
:referenceUri ""}]}})
require "http/client"
url = "{{baseUrl}}/pkcs12/aliases"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"revocationCheck\": [],\n \"keys\": [\n {\n \"key\": \"\",\n \"password\": \"\",\n \"keyAlias\": \"\",\n \"referenceUri\": \"\"\n }\n ]\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/pkcs12/aliases"),
Content = new StringContent("{\n \"revocationCheck\": [],\n \"keys\": [\n {\n \"key\": \"\",\n \"password\": \"\",\n \"keyAlias\": \"\",\n \"referenceUri\": \"\"\n }\n ]\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/pkcs12/aliases");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"revocationCheck\": [],\n \"keys\": [\n {\n \"key\": \"\",\n \"password\": \"\",\n \"keyAlias\": \"\",\n \"referenceUri\": \"\"\n }\n ]\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/pkcs12/aliases"
payload := strings.NewReader("{\n \"revocationCheck\": [],\n \"keys\": [\n {\n \"key\": \"\",\n \"password\": \"\",\n \"keyAlias\": \"\",\n \"referenceUri\": \"\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/pkcs12/aliases HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 142
{
"revocationCheck": [],
"keys": [
{
"key": "",
"password": "",
"keyAlias": "",
"referenceUri": ""
}
]
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/pkcs12/aliases")
.setHeader("content-type", "application/json")
.setBody("{\n \"revocationCheck\": [],\n \"keys\": [\n {\n \"key\": \"\",\n \"password\": \"\",\n \"keyAlias\": \"\",\n \"referenceUri\": \"\"\n }\n ]\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/pkcs12/aliases"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"revocationCheck\": [],\n \"keys\": [\n {\n \"key\": \"\",\n \"password\": \"\",\n \"keyAlias\": \"\",\n \"referenceUri\": \"\"\n }\n ]\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"revocationCheck\": [],\n \"keys\": [\n {\n \"key\": \"\",\n \"password\": \"\",\n \"keyAlias\": \"\",\n \"referenceUri\": \"\"\n }\n ]\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/pkcs12/aliases")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/pkcs12/aliases")
.header("content-type", "application/json")
.body("{\n \"revocationCheck\": [],\n \"keys\": [\n {\n \"key\": \"\",\n \"password\": \"\",\n \"keyAlias\": \"\",\n \"referenceUri\": \"\"\n }\n ]\n}")
.asString();
const data = JSON.stringify({
revocationCheck: [],
keys: [
{
key: '',
password: '',
keyAlias: '',
referenceUri: ''
}
]
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/pkcs12/aliases');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/pkcs12/aliases',
headers: {'content-type': 'application/json'},
data: {
revocationCheck: [],
keys: [{key: '', password: '', keyAlias: '', referenceUri: ''}]
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/pkcs12/aliases';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"revocationCheck":[],"keys":[{"key":"","password":"","keyAlias":"","referenceUri":""}]}'
};
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}}/pkcs12/aliases',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "revocationCheck": [],\n "keys": [\n {\n "key": "",\n "password": "",\n "keyAlias": "",\n "referenceUri": ""\n }\n ]\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"revocationCheck\": [],\n \"keys\": [\n {\n \"key\": \"\",\n \"password\": \"\",\n \"keyAlias\": \"\",\n \"referenceUri\": \"\"\n }\n ]\n}")
val request = Request.Builder()
.url("{{baseUrl}}/pkcs12/aliases")
.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/pkcs12/aliases',
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({
revocationCheck: [],
keys: [{key: '', password: '', keyAlias: '', referenceUri: ''}]
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/pkcs12/aliases',
headers: {'content-type': 'application/json'},
body: {
revocationCheck: [],
keys: [{key: '', password: '', keyAlias: '', referenceUri: ''}]
},
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}}/pkcs12/aliases');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
revocationCheck: [],
keys: [
{
key: '',
password: '',
keyAlias: '',
referenceUri: ''
}
]
});
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}}/pkcs12/aliases',
headers: {'content-type': 'application/json'},
data: {
revocationCheck: [],
keys: [{key: '', password: '', keyAlias: '', referenceUri: ''}]
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/pkcs12/aliases';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"revocationCheck":[],"keys":[{"key":"","password":"","keyAlias":"","referenceUri":""}]}'
};
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 = @{ @"revocationCheck": @[ ],
@"keys": @[ @{ @"key": @"", @"password": @"", @"keyAlias": @"", @"referenceUri": @"" } ] };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/pkcs12/aliases"]
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}}/pkcs12/aliases" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"revocationCheck\": [],\n \"keys\": [\n {\n \"key\": \"\",\n \"password\": \"\",\n \"keyAlias\": \"\",\n \"referenceUri\": \"\"\n }\n ]\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/pkcs12/aliases",
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([
'revocationCheck' => [
],
'keys' => [
[
'key' => '',
'password' => '',
'keyAlias' => '',
'referenceUri' => ''
]
]
]),
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}}/pkcs12/aliases', [
'body' => '{
"revocationCheck": [],
"keys": [
{
"key": "",
"password": "",
"keyAlias": "",
"referenceUri": ""
}
]
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/pkcs12/aliases');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'revocationCheck' => [
],
'keys' => [
[
'key' => '',
'password' => '',
'keyAlias' => '',
'referenceUri' => ''
]
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'revocationCheck' => [
],
'keys' => [
[
'key' => '',
'password' => '',
'keyAlias' => '',
'referenceUri' => ''
]
]
]));
$request->setRequestUrl('{{baseUrl}}/pkcs12/aliases');
$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}}/pkcs12/aliases' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"revocationCheck": [],
"keys": [
{
"key": "",
"password": "",
"keyAlias": "",
"referenceUri": ""
}
]
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/pkcs12/aliases' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"revocationCheck": [],
"keys": [
{
"key": "",
"password": "",
"keyAlias": "",
"referenceUri": ""
}
]
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"revocationCheck\": [],\n \"keys\": [\n {\n \"key\": \"\",\n \"password\": \"\",\n \"keyAlias\": \"\",\n \"referenceUri\": \"\"\n }\n ]\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/pkcs12/aliases", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/pkcs12/aliases"
payload = {
"revocationCheck": [],
"keys": [
{
"key": "",
"password": "",
"keyAlias": "",
"referenceUri": ""
}
]
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/pkcs12/aliases"
payload <- "{\n \"revocationCheck\": [],\n \"keys\": [\n {\n \"key\": \"\",\n \"password\": \"\",\n \"keyAlias\": \"\",\n \"referenceUri\": \"\"\n }\n ]\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/pkcs12/aliases")
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 \"revocationCheck\": [],\n \"keys\": [\n {\n \"key\": \"\",\n \"password\": \"\",\n \"keyAlias\": \"\",\n \"referenceUri\": \"\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/pkcs12/aliases') do |req|
req.body = "{\n \"revocationCheck\": [],\n \"keys\": [\n {\n \"key\": \"\",\n \"password\": \"\",\n \"keyAlias\": \"\",\n \"referenceUri\": \"\"\n }\n ]\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/pkcs12/aliases";
let payload = json!({
"revocationCheck": (),
"keys": (
json!({
"key": "",
"password": "",
"keyAlias": "",
"referenceUri": ""
})
)
});
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}}/pkcs12/aliases \
--header 'content-type: application/json' \
--data '{
"revocationCheck": [],
"keys": [
{
"key": "",
"password": "",
"keyAlias": "",
"referenceUri": ""
}
]
}'
echo '{
"revocationCheck": [],
"keys": [
{
"key": "",
"password": "",
"keyAlias": "",
"referenceUri": ""
}
]
}' | \
http POST {{baseUrl}}/pkcs12/aliases \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "revocationCheck": [],\n "keys": [\n {\n "key": "",\n "password": "",\n "keyAlias": "",\n "referenceUri": ""\n }\n ]\n}' \
--output-document \
- {{baseUrl}}/pkcs12/aliases
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"revocationCheck": [],
"keys": [
[
"key": "",
"password": "",
"keyAlias": "",
"referenceUri": ""
]
]
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/pkcs12/aliases")! 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
info
{{baseUrl}}/pkcs12/info
BODY json
{
"revocationCheck": [],
"keys": [
{
"key": "",
"password": "",
"keyAlias": "",
"referenceUri": ""
}
]
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/pkcs12/info");
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 \"revocationCheck\": [],\n \"keys\": [\n {\n \"key\": \"\",\n \"password\": \"\",\n \"keyAlias\": \"\",\n \"referenceUri\": \"\"\n }\n ]\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/pkcs12/info" {:content-type :json
:form-params {:revocationCheck []
:keys [{:key ""
:password ""
:keyAlias ""
:referenceUri ""}]}})
require "http/client"
url = "{{baseUrl}}/pkcs12/info"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"revocationCheck\": [],\n \"keys\": [\n {\n \"key\": \"\",\n \"password\": \"\",\n \"keyAlias\": \"\",\n \"referenceUri\": \"\"\n }\n ]\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/pkcs12/info"),
Content = new StringContent("{\n \"revocationCheck\": [],\n \"keys\": [\n {\n \"key\": \"\",\n \"password\": \"\",\n \"keyAlias\": \"\",\n \"referenceUri\": \"\"\n }\n ]\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/pkcs12/info");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"revocationCheck\": [],\n \"keys\": [\n {\n \"key\": \"\",\n \"password\": \"\",\n \"keyAlias\": \"\",\n \"referenceUri\": \"\"\n }\n ]\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/pkcs12/info"
payload := strings.NewReader("{\n \"revocationCheck\": [],\n \"keys\": [\n {\n \"key\": \"\",\n \"password\": \"\",\n \"keyAlias\": \"\",\n \"referenceUri\": \"\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/pkcs12/info HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 142
{
"revocationCheck": [],
"keys": [
{
"key": "",
"password": "",
"keyAlias": "",
"referenceUri": ""
}
]
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/pkcs12/info")
.setHeader("content-type", "application/json")
.setBody("{\n \"revocationCheck\": [],\n \"keys\": [\n {\n \"key\": \"\",\n \"password\": \"\",\n \"keyAlias\": \"\",\n \"referenceUri\": \"\"\n }\n ]\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/pkcs12/info"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"revocationCheck\": [],\n \"keys\": [\n {\n \"key\": \"\",\n \"password\": \"\",\n \"keyAlias\": \"\",\n \"referenceUri\": \"\"\n }\n ]\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"revocationCheck\": [],\n \"keys\": [\n {\n \"key\": \"\",\n \"password\": \"\",\n \"keyAlias\": \"\",\n \"referenceUri\": \"\"\n }\n ]\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/pkcs12/info")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/pkcs12/info")
.header("content-type", "application/json")
.body("{\n \"revocationCheck\": [],\n \"keys\": [\n {\n \"key\": \"\",\n \"password\": \"\",\n \"keyAlias\": \"\",\n \"referenceUri\": \"\"\n }\n ]\n}")
.asString();
const data = JSON.stringify({
revocationCheck: [],
keys: [
{
key: '',
password: '',
keyAlias: '',
referenceUri: ''
}
]
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/pkcs12/info');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/pkcs12/info',
headers: {'content-type': 'application/json'},
data: {
revocationCheck: [],
keys: [{key: '', password: '', keyAlias: '', referenceUri: ''}]
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/pkcs12/info';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"revocationCheck":[],"keys":[{"key":"","password":"","keyAlias":"","referenceUri":""}]}'
};
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}}/pkcs12/info',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "revocationCheck": [],\n "keys": [\n {\n "key": "",\n "password": "",\n "keyAlias": "",\n "referenceUri": ""\n }\n ]\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"revocationCheck\": [],\n \"keys\": [\n {\n \"key\": \"\",\n \"password\": \"\",\n \"keyAlias\": \"\",\n \"referenceUri\": \"\"\n }\n ]\n}")
val request = Request.Builder()
.url("{{baseUrl}}/pkcs12/info")
.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/pkcs12/info',
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({
revocationCheck: [],
keys: [{key: '', password: '', keyAlias: '', referenceUri: ''}]
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/pkcs12/info',
headers: {'content-type': 'application/json'},
body: {
revocationCheck: [],
keys: [{key: '', password: '', keyAlias: '', referenceUri: ''}]
},
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}}/pkcs12/info');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
revocationCheck: [],
keys: [
{
key: '',
password: '',
keyAlias: '',
referenceUri: ''
}
]
});
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}}/pkcs12/info',
headers: {'content-type': 'application/json'},
data: {
revocationCheck: [],
keys: [{key: '', password: '', keyAlias: '', referenceUri: ''}]
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/pkcs12/info';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"revocationCheck":[],"keys":[{"key":"","password":"","keyAlias":"","referenceUri":""}]}'
};
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 = @{ @"revocationCheck": @[ ],
@"keys": @[ @{ @"key": @"", @"password": @"", @"keyAlias": @"", @"referenceUri": @"" } ] };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/pkcs12/info"]
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}}/pkcs12/info" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"revocationCheck\": [],\n \"keys\": [\n {\n \"key\": \"\",\n \"password\": \"\",\n \"keyAlias\": \"\",\n \"referenceUri\": \"\"\n }\n ]\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/pkcs12/info",
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([
'revocationCheck' => [
],
'keys' => [
[
'key' => '',
'password' => '',
'keyAlias' => '',
'referenceUri' => ''
]
]
]),
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}}/pkcs12/info', [
'body' => '{
"revocationCheck": [],
"keys": [
{
"key": "",
"password": "",
"keyAlias": "",
"referenceUri": ""
}
]
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/pkcs12/info');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'revocationCheck' => [
],
'keys' => [
[
'key' => '',
'password' => '',
'keyAlias' => '',
'referenceUri' => ''
]
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'revocationCheck' => [
],
'keys' => [
[
'key' => '',
'password' => '',
'keyAlias' => '',
'referenceUri' => ''
]
]
]));
$request->setRequestUrl('{{baseUrl}}/pkcs12/info');
$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}}/pkcs12/info' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"revocationCheck": [],
"keys": [
{
"key": "",
"password": "",
"keyAlias": "",
"referenceUri": ""
}
]
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/pkcs12/info' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"revocationCheck": [],
"keys": [
{
"key": "",
"password": "",
"keyAlias": "",
"referenceUri": ""
}
]
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"revocationCheck\": [],\n \"keys\": [\n {\n \"key\": \"\",\n \"password\": \"\",\n \"keyAlias\": \"\",\n \"referenceUri\": \"\"\n }\n ]\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/pkcs12/info", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/pkcs12/info"
payload = {
"revocationCheck": [],
"keys": [
{
"key": "",
"password": "",
"keyAlias": "",
"referenceUri": ""
}
]
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/pkcs12/info"
payload <- "{\n \"revocationCheck\": [],\n \"keys\": [\n {\n \"key\": \"\",\n \"password\": \"\",\n \"keyAlias\": \"\",\n \"referenceUri\": \"\"\n }\n ]\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/pkcs12/info")
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 \"revocationCheck\": [],\n \"keys\": [\n {\n \"key\": \"\",\n \"password\": \"\",\n \"keyAlias\": \"\",\n \"referenceUri\": \"\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/pkcs12/info') do |req|
req.body = "{\n \"revocationCheck\": [],\n \"keys\": [\n {\n \"key\": \"\",\n \"password\": \"\",\n \"keyAlias\": \"\",\n \"referenceUri\": \"\"\n }\n ]\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/pkcs12/info";
let payload = json!({
"revocationCheck": (),
"keys": (
json!({
"key": "",
"password": "",
"keyAlias": "",
"referenceUri": ""
})
)
});
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}}/pkcs12/info \
--header 'content-type: application/json' \
--data '{
"revocationCheck": [],
"keys": [
{
"key": "",
"password": "",
"keyAlias": "",
"referenceUri": ""
}
]
}'
echo '{
"revocationCheck": [],
"keys": [
{
"key": "",
"password": "",
"keyAlias": "",
"referenceUri": ""
}
]
}' | \
http POST {{baseUrl}}/pkcs12/info \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "revocationCheck": [],\n "keys": [\n {\n "key": "",\n "password": "",\n "keyAlias": "",\n "referenceUri": ""\n }\n ]\n}' \
--output-document \
- {{baseUrl}}/pkcs12/info
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"revocationCheck": [],
"keys": [
[
"key": "",
"password": "",
"keyAlias": "",
"referenceUri": ""
]
]
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/pkcs12/info")! 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
sign_1
{{baseUrl}}/wsse/sign
BODY json
{
"xml": "",
"key": "",
"password": "",
"keyAlias": "",
"trimXml": false
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/wsse/sign");
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 \"xml\": \"\",\n \"key\": \"\",\n \"password\": \"\",\n \"keyAlias\": \"\",\n \"trimXml\": false\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/wsse/sign" {:content-type :json
:form-params {:xml ""
:key ""
:password ""
:keyAlias ""
:trimXml false}})
require "http/client"
url = "{{baseUrl}}/wsse/sign"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"xml\": \"\",\n \"key\": \"\",\n \"password\": \"\",\n \"keyAlias\": \"\",\n \"trimXml\": 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}}/wsse/sign"),
Content = new StringContent("{\n \"xml\": \"\",\n \"key\": \"\",\n \"password\": \"\",\n \"keyAlias\": \"\",\n \"trimXml\": 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}}/wsse/sign");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"xml\": \"\",\n \"key\": \"\",\n \"password\": \"\",\n \"keyAlias\": \"\",\n \"trimXml\": false\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/wsse/sign"
payload := strings.NewReader("{\n \"xml\": \"\",\n \"key\": \"\",\n \"password\": \"\",\n \"keyAlias\": \"\",\n \"trimXml\": 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/wsse/sign HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 84
{
"xml": "",
"key": "",
"password": "",
"keyAlias": "",
"trimXml": false
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/wsse/sign")
.setHeader("content-type", "application/json")
.setBody("{\n \"xml\": \"\",\n \"key\": \"\",\n \"password\": \"\",\n \"keyAlias\": \"\",\n \"trimXml\": false\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/wsse/sign"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"xml\": \"\",\n \"key\": \"\",\n \"password\": \"\",\n \"keyAlias\": \"\",\n \"trimXml\": 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 \"xml\": \"\",\n \"key\": \"\",\n \"password\": \"\",\n \"keyAlias\": \"\",\n \"trimXml\": false\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/wsse/sign")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/wsse/sign")
.header("content-type", "application/json")
.body("{\n \"xml\": \"\",\n \"key\": \"\",\n \"password\": \"\",\n \"keyAlias\": \"\",\n \"trimXml\": false\n}")
.asString();
const data = JSON.stringify({
xml: '',
key: '',
password: '',
keyAlias: '',
trimXml: 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}}/wsse/sign');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/wsse/sign',
headers: {'content-type': 'application/json'},
data: {xml: '', key: '', password: '', keyAlias: '', trimXml: false}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/wsse/sign';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"xml":"","key":"","password":"","keyAlias":"","trimXml":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}}/wsse/sign',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "xml": "",\n "key": "",\n "password": "",\n "keyAlias": "",\n "trimXml": 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 \"xml\": \"\",\n \"key\": \"\",\n \"password\": \"\",\n \"keyAlias\": \"\",\n \"trimXml\": false\n}")
val request = Request.Builder()
.url("{{baseUrl}}/wsse/sign")
.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/wsse/sign',
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({xml: '', key: '', password: '', keyAlias: '', trimXml: false}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/wsse/sign',
headers: {'content-type': 'application/json'},
body: {xml: '', key: '', password: '', keyAlias: '', trimXml: 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}}/wsse/sign');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
xml: '',
key: '',
password: '',
keyAlias: '',
trimXml: 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}}/wsse/sign',
headers: {'content-type': 'application/json'},
data: {xml: '', key: '', password: '', keyAlias: '', trimXml: false}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/wsse/sign';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"xml":"","key":"","password":"","keyAlias":"","trimXml":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 = @{ @"xml": @"",
@"key": @"",
@"password": @"",
@"keyAlias": @"",
@"trimXml": @NO };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/wsse/sign"]
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}}/wsse/sign" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"xml\": \"\",\n \"key\": \"\",\n \"password\": \"\",\n \"keyAlias\": \"\",\n \"trimXml\": false\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/wsse/sign",
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([
'xml' => '',
'key' => '',
'password' => '',
'keyAlias' => '',
'trimXml' => 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}}/wsse/sign', [
'body' => '{
"xml": "",
"key": "",
"password": "",
"keyAlias": "",
"trimXml": false
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/wsse/sign');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'xml' => '',
'key' => '',
'password' => '',
'keyAlias' => '',
'trimXml' => null
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'xml' => '',
'key' => '',
'password' => '',
'keyAlias' => '',
'trimXml' => null
]));
$request->setRequestUrl('{{baseUrl}}/wsse/sign');
$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}}/wsse/sign' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"xml": "",
"key": "",
"password": "",
"keyAlias": "",
"trimXml": false
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/wsse/sign' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"xml": "",
"key": "",
"password": "",
"keyAlias": "",
"trimXml": false
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"xml\": \"\",\n \"key\": \"\",\n \"password\": \"\",\n \"keyAlias\": \"\",\n \"trimXml\": false\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/wsse/sign", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/wsse/sign"
payload = {
"xml": "",
"key": "",
"password": "",
"keyAlias": "",
"trimXml": False
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/wsse/sign"
payload <- "{\n \"xml\": \"\",\n \"key\": \"\",\n \"password\": \"\",\n \"keyAlias\": \"\",\n \"trimXml\": 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}}/wsse/sign")
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 \"xml\": \"\",\n \"key\": \"\",\n \"password\": \"\",\n \"keyAlias\": \"\",\n \"trimXml\": 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/wsse/sign') do |req|
req.body = "{\n \"xml\": \"\",\n \"key\": \"\",\n \"password\": \"\",\n \"keyAlias\": \"\",\n \"trimXml\": false\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/wsse/sign";
let payload = json!({
"xml": "",
"key": "",
"password": "",
"keyAlias": "",
"trimXml": 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}}/wsse/sign \
--header 'content-type: application/json' \
--data '{
"xml": "",
"key": "",
"password": "",
"keyAlias": "",
"trimXml": false
}'
echo '{
"xml": "",
"key": "",
"password": "",
"keyAlias": "",
"trimXml": false
}' | \
http POST {{baseUrl}}/wsse/sign \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "xml": "",\n "key": "",\n "password": "",\n "keyAlias": "",\n "trimXml": false\n}' \
--output-document \
- {{baseUrl}}/wsse/sign
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"xml": "",
"key": "",
"password": "",
"keyAlias": "",
"trimXml": false
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/wsse/sign")! 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
verify_3
{{baseUrl}}/wsse/verify
BODY json
{
"revocationCheck": [],
"xml": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/wsse/verify");
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 \"revocationCheck\": [],\n \"xml\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/wsse/verify" {:content-type :json
:form-params {:revocationCheck []
:xml ""}})
require "http/client"
url = "{{baseUrl}}/wsse/verify"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"revocationCheck\": [],\n \"xml\": \"\"\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}}/wsse/verify"),
Content = new StringContent("{\n \"revocationCheck\": [],\n \"xml\": \"\"\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}}/wsse/verify");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"revocationCheck\": [],\n \"xml\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/wsse/verify"
payload := strings.NewReader("{\n \"revocationCheck\": [],\n \"xml\": \"\"\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/wsse/verify HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 40
{
"revocationCheck": [],
"xml": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/wsse/verify")
.setHeader("content-type", "application/json")
.setBody("{\n \"revocationCheck\": [],\n \"xml\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/wsse/verify"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"revocationCheck\": [],\n \"xml\": \"\"\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 \"revocationCheck\": [],\n \"xml\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/wsse/verify")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/wsse/verify")
.header("content-type", "application/json")
.body("{\n \"revocationCheck\": [],\n \"xml\": \"\"\n}")
.asString();
const data = JSON.stringify({
revocationCheck: [],
xml: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/wsse/verify');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/wsse/verify',
headers: {'content-type': 'application/json'},
data: {revocationCheck: [], xml: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/wsse/verify';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"revocationCheck":[],"xml":""}'
};
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}}/wsse/verify',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "revocationCheck": [],\n "xml": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"revocationCheck\": [],\n \"xml\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/wsse/verify")
.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/wsse/verify',
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({revocationCheck: [], xml: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/wsse/verify',
headers: {'content-type': 'application/json'},
body: {revocationCheck: [], xml: ''},
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}}/wsse/verify');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
revocationCheck: [],
xml: ''
});
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}}/wsse/verify',
headers: {'content-type': 'application/json'},
data: {revocationCheck: [], xml: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/wsse/verify';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"revocationCheck":[],"xml":""}'
};
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 = @{ @"revocationCheck": @[ ],
@"xml": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/wsse/verify"]
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}}/wsse/verify" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"revocationCheck\": [],\n \"xml\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/wsse/verify",
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([
'revocationCheck' => [
],
'xml' => ''
]),
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}}/wsse/verify', [
'body' => '{
"revocationCheck": [],
"xml": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/wsse/verify');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'revocationCheck' => [
],
'xml' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'revocationCheck' => [
],
'xml' => ''
]));
$request->setRequestUrl('{{baseUrl}}/wsse/verify');
$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}}/wsse/verify' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"revocationCheck": [],
"xml": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/wsse/verify' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"revocationCheck": [],
"xml": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"revocationCheck\": [],\n \"xml\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/wsse/verify", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/wsse/verify"
payload = {
"revocationCheck": [],
"xml": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/wsse/verify"
payload <- "{\n \"revocationCheck\": [],\n \"xml\": \"\"\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}}/wsse/verify")
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 \"revocationCheck\": [],\n \"xml\": \"\"\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/wsse/verify') do |req|
req.body = "{\n \"revocationCheck\": [],\n \"xml\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/wsse/verify";
let payload = json!({
"revocationCheck": (),
"xml": ""
});
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}}/wsse/verify \
--header 'content-type: application/json' \
--data '{
"revocationCheck": [],
"xml": ""
}'
echo '{
"revocationCheck": [],
"xml": ""
}' | \
http POST {{baseUrl}}/wsse/verify \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "revocationCheck": [],\n "xml": ""\n}' \
--output-document \
- {{baseUrl}}/wsse/verify
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"revocationCheck": [],
"xml": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/wsse/verify")! 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
verify_1
{{baseUrl}}/x509/verify
BODY json
{
"revocationCheck": [],
"certificate": "",
"signature": "",
"data": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/x509/verify");
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 \"revocationCheck\": [],\n \"certificate\": \"\",\n \"signature\": \"\",\n \"data\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/x509/verify" {:content-type :json
:form-params {:revocationCheck []
:certificate ""
:signature ""
:data ""}})
require "http/client"
url = "{{baseUrl}}/x509/verify"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"revocationCheck\": [],\n \"certificate\": \"\",\n \"signature\": \"\",\n \"data\": \"\"\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}}/x509/verify"),
Content = new StringContent("{\n \"revocationCheck\": [],\n \"certificate\": \"\",\n \"signature\": \"\",\n \"data\": \"\"\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}}/x509/verify");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"revocationCheck\": [],\n \"certificate\": \"\",\n \"signature\": \"\",\n \"data\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/x509/verify"
payload := strings.NewReader("{\n \"revocationCheck\": [],\n \"certificate\": \"\",\n \"signature\": \"\",\n \"data\": \"\"\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/x509/verify HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 81
{
"revocationCheck": [],
"certificate": "",
"signature": "",
"data": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/x509/verify")
.setHeader("content-type", "application/json")
.setBody("{\n \"revocationCheck\": [],\n \"certificate\": \"\",\n \"signature\": \"\",\n \"data\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/x509/verify"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"revocationCheck\": [],\n \"certificate\": \"\",\n \"signature\": \"\",\n \"data\": \"\"\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 \"revocationCheck\": [],\n \"certificate\": \"\",\n \"signature\": \"\",\n \"data\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/x509/verify")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/x509/verify")
.header("content-type", "application/json")
.body("{\n \"revocationCheck\": [],\n \"certificate\": \"\",\n \"signature\": \"\",\n \"data\": \"\"\n}")
.asString();
const data = JSON.stringify({
revocationCheck: [],
certificate: '',
signature: '',
data: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/x509/verify');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/x509/verify',
headers: {'content-type': 'application/json'},
data: {revocationCheck: [], certificate: '', signature: '', data: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/x509/verify';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"revocationCheck":[],"certificate":"","signature":"","data":""}'
};
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}}/x509/verify',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "revocationCheck": [],\n "certificate": "",\n "signature": "",\n "data": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"revocationCheck\": [],\n \"certificate\": \"\",\n \"signature\": \"\",\n \"data\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/x509/verify")
.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/x509/verify',
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({revocationCheck: [], certificate: '', signature: '', data: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/x509/verify',
headers: {'content-type': 'application/json'},
body: {revocationCheck: [], certificate: '', signature: '', data: ''},
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}}/x509/verify');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
revocationCheck: [],
certificate: '',
signature: '',
data: ''
});
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}}/x509/verify',
headers: {'content-type': 'application/json'},
data: {revocationCheck: [], certificate: '', signature: '', data: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/x509/verify';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"revocationCheck":[],"certificate":"","signature":"","data":""}'
};
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 = @{ @"revocationCheck": @[ ],
@"certificate": @"",
@"signature": @"",
@"data": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/x509/verify"]
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}}/x509/verify" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"revocationCheck\": [],\n \"certificate\": \"\",\n \"signature\": \"\",\n \"data\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/x509/verify",
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([
'revocationCheck' => [
],
'certificate' => '',
'signature' => '',
'data' => ''
]),
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}}/x509/verify', [
'body' => '{
"revocationCheck": [],
"certificate": "",
"signature": "",
"data": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/x509/verify');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'revocationCheck' => [
],
'certificate' => '',
'signature' => '',
'data' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'revocationCheck' => [
],
'certificate' => '',
'signature' => '',
'data' => ''
]));
$request->setRequestUrl('{{baseUrl}}/x509/verify');
$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}}/x509/verify' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"revocationCheck": [],
"certificate": "",
"signature": "",
"data": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/x509/verify' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"revocationCheck": [],
"certificate": "",
"signature": "",
"data": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"revocationCheck\": [],\n \"certificate\": \"\",\n \"signature\": \"\",\n \"data\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/x509/verify", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/x509/verify"
payload = {
"revocationCheck": [],
"certificate": "",
"signature": "",
"data": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/x509/verify"
payload <- "{\n \"revocationCheck\": [],\n \"certificate\": \"\",\n \"signature\": \"\",\n \"data\": \"\"\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}}/x509/verify")
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 \"revocationCheck\": [],\n \"certificate\": \"\",\n \"signature\": \"\",\n \"data\": \"\"\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/x509/verify') do |req|
req.body = "{\n \"revocationCheck\": [],\n \"certificate\": \"\",\n \"signature\": \"\",\n \"data\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/x509/verify";
let payload = json!({
"revocationCheck": (),
"certificate": "",
"signature": "",
"data": ""
});
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}}/x509/verify \
--header 'content-type: application/json' \
--data '{
"revocationCheck": [],
"certificate": "",
"signature": "",
"data": ""
}'
echo '{
"revocationCheck": [],
"certificate": "",
"signature": "",
"data": ""
}' | \
http POST {{baseUrl}}/x509/verify \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "revocationCheck": [],\n "certificate": "",\n "signature": "",\n "data": ""\n}' \
--output-document \
- {{baseUrl}}/x509/verify
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"revocationCheck": [],
"certificate": "",
"signature": "",
"data": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/x509/verify")! 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
verify_2
{{baseUrl}}/x509/info
BODY json
{
"revocationCheck": [],
"certs": []
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/x509/info");
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 \"revocationCheck\": [],\n \"certs\": []\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/x509/info" {:content-type :json
:form-params {:revocationCheck []
:certs []}})
require "http/client"
url = "{{baseUrl}}/x509/info"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"revocationCheck\": [],\n \"certs\": []\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}}/x509/info"),
Content = new StringContent("{\n \"revocationCheck\": [],\n \"certs\": []\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}}/x509/info");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"revocationCheck\": [],\n \"certs\": []\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/x509/info"
payload := strings.NewReader("{\n \"revocationCheck\": [],\n \"certs\": []\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/x509/info HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 42
{
"revocationCheck": [],
"certs": []
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/x509/info")
.setHeader("content-type", "application/json")
.setBody("{\n \"revocationCheck\": [],\n \"certs\": []\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/x509/info"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"revocationCheck\": [],\n \"certs\": []\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 \"revocationCheck\": [],\n \"certs\": []\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/x509/info")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/x509/info")
.header("content-type", "application/json")
.body("{\n \"revocationCheck\": [],\n \"certs\": []\n}")
.asString();
const data = JSON.stringify({
revocationCheck: [],
certs: []
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/x509/info');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/x509/info',
headers: {'content-type': 'application/json'},
data: {revocationCheck: [], certs: []}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/x509/info';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"revocationCheck":[],"certs":[]}'
};
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}}/x509/info',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "revocationCheck": [],\n "certs": []\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"revocationCheck\": [],\n \"certs\": []\n}")
val request = Request.Builder()
.url("{{baseUrl}}/x509/info")
.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/x509/info',
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({revocationCheck: [], certs: []}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/x509/info',
headers: {'content-type': 'application/json'},
body: {revocationCheck: [], certs: []},
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}}/x509/info');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
revocationCheck: [],
certs: []
});
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}}/x509/info',
headers: {'content-type': 'application/json'},
data: {revocationCheck: [], certs: []}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/x509/info';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"revocationCheck":[],"certs":[]}'
};
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 = @{ @"revocationCheck": @[ ],
@"certs": @[ ] };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/x509/info"]
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}}/x509/info" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"revocationCheck\": [],\n \"certs\": []\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/x509/info",
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([
'revocationCheck' => [
],
'certs' => [
]
]),
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}}/x509/info', [
'body' => '{
"revocationCheck": [],
"certs": []
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/x509/info');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'revocationCheck' => [
],
'certs' => [
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'revocationCheck' => [
],
'certs' => [
]
]));
$request->setRequestUrl('{{baseUrl}}/x509/info');
$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}}/x509/info' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"revocationCheck": [],
"certs": []
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/x509/info' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"revocationCheck": [],
"certs": []
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"revocationCheck\": [],\n \"certs\": []\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/x509/info", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/x509/info"
payload = {
"revocationCheck": [],
"certs": []
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/x509/info"
payload <- "{\n \"revocationCheck\": [],\n \"certs\": []\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}}/x509/info")
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 \"revocationCheck\": [],\n \"certs\": []\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/x509/info') do |req|
req.body = "{\n \"revocationCheck\": [],\n \"certs\": []\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/x509/info";
let payload = json!({
"revocationCheck": (),
"certs": ()
});
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}}/x509/info \
--header 'content-type: application/json' \
--data '{
"revocationCheck": [],
"certs": []
}'
echo '{
"revocationCheck": [],
"certs": []
}' | \
http POST {{baseUrl}}/x509/info \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "revocationCheck": [],\n "certs": []\n}' \
--output-document \
- {{baseUrl}}/x509/info
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"revocationCheck": [],
"certs": []
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/x509/info")! 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
sign
{{baseUrl}}/xml/sign
BODY json
{
"xml": "",
"signers": [
{
"key": "",
"password": "",
"keyAlias": "",
"referenceUri": ""
}
],
"clearSignatures": false,
"trimXml": false
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/xml/sign");
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 \"xml\": \"\",\n \"signers\": [\n {\n \"key\": \"\",\n \"password\": \"\",\n \"keyAlias\": \"\",\n \"referenceUri\": \"\"\n }\n ],\n \"clearSignatures\": false,\n \"trimXml\": false\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/xml/sign" {:content-type :json
:form-params {:xml ""
:signers [{:key ""
:password ""
:keyAlias ""
:referenceUri ""}]
:clearSignatures false
:trimXml false}})
require "http/client"
url = "{{baseUrl}}/xml/sign"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"xml\": \"\",\n \"signers\": [\n {\n \"key\": \"\",\n \"password\": \"\",\n \"keyAlias\": \"\",\n \"referenceUri\": \"\"\n }\n ],\n \"clearSignatures\": false,\n \"trimXml\": 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}}/xml/sign"),
Content = new StringContent("{\n \"xml\": \"\",\n \"signers\": [\n {\n \"key\": \"\",\n \"password\": \"\",\n \"keyAlias\": \"\",\n \"referenceUri\": \"\"\n }\n ],\n \"clearSignatures\": false,\n \"trimXml\": 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}}/xml/sign");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"xml\": \"\",\n \"signers\": [\n {\n \"key\": \"\",\n \"password\": \"\",\n \"keyAlias\": \"\",\n \"referenceUri\": \"\"\n }\n ],\n \"clearSignatures\": false,\n \"trimXml\": false\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/xml/sign"
payload := strings.NewReader("{\n \"xml\": \"\",\n \"signers\": [\n {\n \"key\": \"\",\n \"password\": \"\",\n \"keyAlias\": \"\",\n \"referenceUri\": \"\"\n }\n ],\n \"clearSignatures\": false,\n \"trimXml\": 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/xml/sign HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 181
{
"xml": "",
"signers": [
{
"key": "",
"password": "",
"keyAlias": "",
"referenceUri": ""
}
],
"clearSignatures": false,
"trimXml": false
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/xml/sign")
.setHeader("content-type", "application/json")
.setBody("{\n \"xml\": \"\",\n \"signers\": [\n {\n \"key\": \"\",\n \"password\": \"\",\n \"keyAlias\": \"\",\n \"referenceUri\": \"\"\n }\n ],\n \"clearSignatures\": false,\n \"trimXml\": false\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/xml/sign"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"xml\": \"\",\n \"signers\": [\n {\n \"key\": \"\",\n \"password\": \"\",\n \"keyAlias\": \"\",\n \"referenceUri\": \"\"\n }\n ],\n \"clearSignatures\": false,\n \"trimXml\": 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 \"xml\": \"\",\n \"signers\": [\n {\n \"key\": \"\",\n \"password\": \"\",\n \"keyAlias\": \"\",\n \"referenceUri\": \"\"\n }\n ],\n \"clearSignatures\": false,\n \"trimXml\": false\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/xml/sign")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/xml/sign")
.header("content-type", "application/json")
.body("{\n \"xml\": \"\",\n \"signers\": [\n {\n \"key\": \"\",\n \"password\": \"\",\n \"keyAlias\": \"\",\n \"referenceUri\": \"\"\n }\n ],\n \"clearSignatures\": false,\n \"trimXml\": false\n}")
.asString();
const data = JSON.stringify({
xml: '',
signers: [
{
key: '',
password: '',
keyAlias: '',
referenceUri: ''
}
],
clearSignatures: false,
trimXml: 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}}/xml/sign');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/xml/sign',
headers: {'content-type': 'application/json'},
data: {
xml: '',
signers: [{key: '', password: '', keyAlias: '', referenceUri: ''}],
clearSignatures: false,
trimXml: false
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/xml/sign';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"xml":"","signers":[{"key":"","password":"","keyAlias":"","referenceUri":""}],"clearSignatures":false,"trimXml":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}}/xml/sign',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "xml": "",\n "signers": [\n {\n "key": "",\n "password": "",\n "keyAlias": "",\n "referenceUri": ""\n }\n ],\n "clearSignatures": false,\n "trimXml": 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 \"xml\": \"\",\n \"signers\": [\n {\n \"key\": \"\",\n \"password\": \"\",\n \"keyAlias\": \"\",\n \"referenceUri\": \"\"\n }\n ],\n \"clearSignatures\": false,\n \"trimXml\": false\n}")
val request = Request.Builder()
.url("{{baseUrl}}/xml/sign")
.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/xml/sign',
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({
xml: '',
signers: [{key: '', password: '', keyAlias: '', referenceUri: ''}],
clearSignatures: false,
trimXml: false
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/xml/sign',
headers: {'content-type': 'application/json'},
body: {
xml: '',
signers: [{key: '', password: '', keyAlias: '', referenceUri: ''}],
clearSignatures: false,
trimXml: 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}}/xml/sign');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
xml: '',
signers: [
{
key: '',
password: '',
keyAlias: '',
referenceUri: ''
}
],
clearSignatures: false,
trimXml: 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}}/xml/sign',
headers: {'content-type': 'application/json'},
data: {
xml: '',
signers: [{key: '', password: '', keyAlias: '', referenceUri: ''}],
clearSignatures: false,
trimXml: false
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/xml/sign';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"xml":"","signers":[{"key":"","password":"","keyAlias":"","referenceUri":""}],"clearSignatures":false,"trimXml":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 = @{ @"xml": @"",
@"signers": @[ @{ @"key": @"", @"password": @"", @"keyAlias": @"", @"referenceUri": @"" } ],
@"clearSignatures": @NO,
@"trimXml": @NO };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/xml/sign"]
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}}/xml/sign" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"xml\": \"\",\n \"signers\": [\n {\n \"key\": \"\",\n \"password\": \"\",\n \"keyAlias\": \"\",\n \"referenceUri\": \"\"\n }\n ],\n \"clearSignatures\": false,\n \"trimXml\": false\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/xml/sign",
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([
'xml' => '',
'signers' => [
[
'key' => '',
'password' => '',
'keyAlias' => '',
'referenceUri' => ''
]
],
'clearSignatures' => null,
'trimXml' => 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}}/xml/sign', [
'body' => '{
"xml": "",
"signers": [
{
"key": "",
"password": "",
"keyAlias": "",
"referenceUri": ""
}
],
"clearSignatures": false,
"trimXml": false
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/xml/sign');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'xml' => '',
'signers' => [
[
'key' => '',
'password' => '',
'keyAlias' => '',
'referenceUri' => ''
]
],
'clearSignatures' => null,
'trimXml' => null
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'xml' => '',
'signers' => [
[
'key' => '',
'password' => '',
'keyAlias' => '',
'referenceUri' => ''
]
],
'clearSignatures' => null,
'trimXml' => null
]));
$request->setRequestUrl('{{baseUrl}}/xml/sign');
$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}}/xml/sign' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"xml": "",
"signers": [
{
"key": "",
"password": "",
"keyAlias": "",
"referenceUri": ""
}
],
"clearSignatures": false,
"trimXml": false
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/xml/sign' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"xml": "",
"signers": [
{
"key": "",
"password": "",
"keyAlias": "",
"referenceUri": ""
}
],
"clearSignatures": false,
"trimXml": false
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"xml\": \"\",\n \"signers\": [\n {\n \"key\": \"\",\n \"password\": \"\",\n \"keyAlias\": \"\",\n \"referenceUri\": \"\"\n }\n ],\n \"clearSignatures\": false,\n \"trimXml\": false\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/xml/sign", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/xml/sign"
payload = {
"xml": "",
"signers": [
{
"key": "",
"password": "",
"keyAlias": "",
"referenceUri": ""
}
],
"clearSignatures": False,
"trimXml": False
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/xml/sign"
payload <- "{\n \"xml\": \"\",\n \"signers\": [\n {\n \"key\": \"\",\n \"password\": \"\",\n \"keyAlias\": \"\",\n \"referenceUri\": \"\"\n }\n ],\n \"clearSignatures\": false,\n \"trimXml\": 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}}/xml/sign")
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 \"xml\": \"\",\n \"signers\": [\n {\n \"key\": \"\",\n \"password\": \"\",\n \"keyAlias\": \"\",\n \"referenceUri\": \"\"\n }\n ],\n \"clearSignatures\": false,\n \"trimXml\": 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/xml/sign') do |req|
req.body = "{\n \"xml\": \"\",\n \"signers\": [\n {\n \"key\": \"\",\n \"password\": \"\",\n \"keyAlias\": \"\",\n \"referenceUri\": \"\"\n }\n ],\n \"clearSignatures\": false,\n \"trimXml\": false\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/xml/sign";
let payload = json!({
"xml": "",
"signers": (
json!({
"key": "",
"password": "",
"keyAlias": "",
"referenceUri": ""
})
),
"clearSignatures": false,
"trimXml": 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}}/xml/sign \
--header 'content-type: application/json' \
--data '{
"xml": "",
"signers": [
{
"key": "",
"password": "",
"keyAlias": "",
"referenceUri": ""
}
],
"clearSignatures": false,
"trimXml": false
}'
echo '{
"xml": "",
"signers": [
{
"key": "",
"password": "",
"keyAlias": "",
"referenceUri": ""
}
],
"clearSignatures": false,
"trimXml": false
}' | \
http POST {{baseUrl}}/xml/sign \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "xml": "",\n "signers": [\n {\n "key": "",\n "password": "",\n "keyAlias": "",\n "referenceUri": ""\n }\n ],\n "clearSignatures": false,\n "trimXml": false\n}' \
--output-document \
- {{baseUrl}}/xml/sign
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"xml": "",
"signers": [
[
"key": "",
"password": "",
"keyAlias": "",
"referenceUri": ""
]
],
"clearSignatures": false,
"trimXml": false
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/xml/sign")! 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
verify
{{baseUrl}}/xml/verify
BODY json
{
"revocationCheck": [],
"xml": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/xml/verify");
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 \"revocationCheck\": [],\n \"xml\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/xml/verify" {:content-type :json
:form-params {:revocationCheck []
:xml ""}})
require "http/client"
url = "{{baseUrl}}/xml/verify"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"revocationCheck\": [],\n \"xml\": \"\"\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}}/xml/verify"),
Content = new StringContent("{\n \"revocationCheck\": [],\n \"xml\": \"\"\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}}/xml/verify");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"revocationCheck\": [],\n \"xml\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/xml/verify"
payload := strings.NewReader("{\n \"revocationCheck\": [],\n \"xml\": \"\"\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/xml/verify HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 40
{
"revocationCheck": [],
"xml": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/xml/verify")
.setHeader("content-type", "application/json")
.setBody("{\n \"revocationCheck\": [],\n \"xml\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/xml/verify"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"revocationCheck\": [],\n \"xml\": \"\"\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 \"revocationCheck\": [],\n \"xml\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/xml/verify")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/xml/verify")
.header("content-type", "application/json")
.body("{\n \"revocationCheck\": [],\n \"xml\": \"\"\n}")
.asString();
const data = JSON.stringify({
revocationCheck: [],
xml: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/xml/verify');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/xml/verify',
headers: {'content-type': 'application/json'},
data: {revocationCheck: [], xml: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/xml/verify';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"revocationCheck":[],"xml":""}'
};
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}}/xml/verify',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "revocationCheck": [],\n "xml": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"revocationCheck\": [],\n \"xml\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/xml/verify")
.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/xml/verify',
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({revocationCheck: [], xml: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/xml/verify',
headers: {'content-type': 'application/json'},
body: {revocationCheck: [], xml: ''},
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}}/xml/verify');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
revocationCheck: [],
xml: ''
});
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}}/xml/verify',
headers: {'content-type': 'application/json'},
data: {revocationCheck: [], xml: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/xml/verify';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"revocationCheck":[],"xml":""}'
};
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 = @{ @"revocationCheck": @[ ],
@"xml": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/xml/verify"]
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}}/xml/verify" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"revocationCheck\": [],\n \"xml\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/xml/verify",
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([
'revocationCheck' => [
],
'xml' => ''
]),
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}}/xml/verify', [
'body' => '{
"revocationCheck": [],
"xml": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/xml/verify');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'revocationCheck' => [
],
'xml' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'revocationCheck' => [
],
'xml' => ''
]));
$request->setRequestUrl('{{baseUrl}}/xml/verify');
$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}}/xml/verify' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"revocationCheck": [],
"xml": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/xml/verify' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"revocationCheck": [],
"xml": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"revocationCheck\": [],\n \"xml\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/xml/verify", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/xml/verify"
payload = {
"revocationCheck": [],
"xml": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/xml/verify"
payload <- "{\n \"revocationCheck\": [],\n \"xml\": \"\"\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}}/xml/verify")
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 \"revocationCheck\": [],\n \"xml\": \"\"\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/xml/verify') do |req|
req.body = "{\n \"revocationCheck\": [],\n \"xml\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/xml/verify";
let payload = json!({
"revocationCheck": (),
"xml": ""
});
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}}/xml/verify \
--header 'content-type: application/json' \
--data '{
"revocationCheck": [],
"xml": ""
}'
echo '{
"revocationCheck": [],
"xml": ""
}' | \
http POST {{baseUrl}}/xml/verify \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "revocationCheck": [],\n "xml": ""\n}' \
--output-document \
- {{baseUrl}}/xml/verify
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"revocationCheck": [],
"xml": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/xml/verify")! 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()