GET Basic method to verify api is up and running
{{baseUrl}}/api/pdf
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/api/pdf");

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

(client/get "{{baseUrl}}/api/pdf")
require "http/client"

url = "{{baseUrl}}/api/pdf"

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}}/api/pdf"),
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/api/pdf");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main

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

func main() {

	url := "{{baseUrl}}/api/pdf"

	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/api/pdf HTTP/1.1
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/api/pdf")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/api/pdf"))
    .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}}/api/pdf")
  .get()
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/api/pdf")
  .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}}/api/pdf');

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

const options = {method: 'GET', url: '{{baseUrl}}/api/pdf'};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/api/pdf';
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}}/api/pdf',
  method: 'GET',
  headers: {}
};

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

val request = Request.Builder()
  .url("{{baseUrl}}/api/pdf")
  .get()
  .build()

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

const options = {
  method: 'GET',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/api/pdf',
  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}}/api/pdf'};

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

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

const req = unirest('GET', '{{baseUrl}}/api/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: 'GET', url: '{{baseUrl}}/api/pdf'};

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

const url = '{{baseUrl}}/api/pdf';
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}}/api/pdf"]
                                                       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}}/api/pdf" in

Client.call `GET uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/api/pdf",
  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}}/api/pdf');

echo $response->getBody();
setUrl('{{baseUrl}}/api/pdf');
$request->setMethod(HTTP_METH_GET);

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

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/api/pdf');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/api/pdf' -Method GET 
$response = Invoke-RestMethod -Uri '{{baseUrl}}/api/pdf' -Method GET 
import http.client

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

conn.request("GET", "/baseUrl/api/pdf")

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

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

url = "{{baseUrl}}/api/pdf"

response = requests.get(url)

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

url <- "{{baseUrl}}/api/pdf"

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

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

url = URI("{{baseUrl}}/api/pdf")

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/api/pdf') do |req|
end

puts response.status
puts response.body
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/api/pdf";

    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}}/api/pdf
http GET {{baseUrl}}/api/pdf
wget --quiet \
  --method GET \
  --output-document \
  - {{baseUrl}}/api/pdf
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/api/pdf")! 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()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "description": "Always empty in the public response, used for internal error transport to logs",
  "statusCode": 400,
  "errorMessage": "The error message provided to client"
}
POST Concatenate multiple pdf files into single pdf file..
{{baseUrl}}/api/pdf/pdfconcat
BODY json

{
  "PdfDocumentsAsBase64String": []
}
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/api/pdf/pdfconcat");

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  \"PdfDocumentsAsBase64String\": []\n}");

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

(client/post "{{baseUrl}}/api/pdf/pdfconcat" {:content-type :json
                                                              :form-params {:PdfDocumentsAsBase64String []}})
require "http/client"

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

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

func main() {

	url := "{{baseUrl}}/api/pdf/pdfconcat"

	payload := strings.NewReader("{\n  \"PdfDocumentsAsBase64String\": []\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/api/pdf/pdfconcat HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 38

{
  "PdfDocumentsAsBase64String": []
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/api/pdf/pdfconcat")
  .setHeader("content-type", "application/json")
  .setBody("{\n  \"PdfDocumentsAsBase64String\": []\n}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

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

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/api/pdf/pdfconcat")
  .header("content-type", "application/json")
  .body("{\n  \"PdfDocumentsAsBase64String\": []\n}")
  .asString();
const data = JSON.stringify({
  PdfDocumentsAsBase64String: []
});

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

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

xhr.open('POST', '{{baseUrl}}/api/pdf/pdfconcat');
xhr.setRequestHeader('content-type', 'application/json');

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

const options = {
  method: 'POST',
  url: '{{baseUrl}}/api/pdf/pdfconcat',
  headers: {'content-type': 'application/json'},
  data: {PdfDocumentsAsBase64String: []}
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/api/pdf/pdfconcat';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"PdfDocumentsAsBase64String":[]}'
};

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}}/api/pdf/pdfconcat',
  method: 'POST',
  headers: {
    'content-type': 'application/json'
  },
  processData: false,
  data: '{\n  "PdfDocumentsAsBase64String": []\n}'
};

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

val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n  \"PdfDocumentsAsBase64String\": []\n}")
val request = Request.Builder()
  .url("{{baseUrl}}/api/pdf/pdfconcat")
  .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/api/pdf/pdfconcat',
  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({PdfDocumentsAsBase64String: []}));
req.end();
const request = require('request');

const options = {
  method: 'POST',
  url: '{{baseUrl}}/api/pdf/pdfconcat',
  headers: {'content-type': 'application/json'},
  body: {PdfDocumentsAsBase64String: []},
  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}}/api/pdf/pdfconcat');

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

req.type('json');
req.send({
  PdfDocumentsAsBase64String: []
});

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}}/api/pdf/pdfconcat',
  headers: {'content-type': 'application/json'},
  data: {PdfDocumentsAsBase64String: []}
};

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

const url = '{{baseUrl}}/api/pdf/pdfconcat';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"PdfDocumentsAsBase64String":[]}'
};

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 = @{ @"PdfDocumentsAsBase64String": @[  ] };

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

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/api/pdf/pdfconcat"]
                                                       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}}/api/pdf/pdfconcat" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n  \"PdfDocumentsAsBase64String\": []\n}" in

Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/api/pdf/pdfconcat",
  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([
    'PdfDocumentsAsBase64String' => [
        
    ]
  ]),
  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}}/api/pdf/pdfconcat', [
  'body' => '{
  "PdfDocumentsAsBase64String": []
}',
  'headers' => [
    'content-type' => 'application/json',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/api/pdf/pdfconcat');
$request->setMethod(HTTP_METH_POST);

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

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

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

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
append(json_encode([
  'PdfDocumentsAsBase64String' => [
    
  ]
]));
$request->setRequestUrl('{{baseUrl}}/api/pdf/pdfconcat');
$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}}/api/pdf/pdfconcat' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "PdfDocumentsAsBase64String": []
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/api/pdf/pdfconcat' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "PdfDocumentsAsBase64String": []
}'
import http.client

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

payload = "{\n  \"PdfDocumentsAsBase64String\": []\n}"

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

conn.request("POST", "/baseUrl/api/pdf/pdfconcat", payload, headers)

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

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

url = "{{baseUrl}}/api/pdf/pdfconcat"

payload = { "PdfDocumentsAsBase64String": [] }
headers = {"content-type": "application/json"}

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

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

url <- "{{baseUrl}}/api/pdf/pdfconcat"

payload <- "{\n  \"PdfDocumentsAsBase64String\": []\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}}/api/pdf/pdfconcat")

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  \"PdfDocumentsAsBase64String\": []\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/api/pdf/pdfconcat') do |req|
  req.body = "{\n  \"PdfDocumentsAsBase64String\": []\n}"
end

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

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/api/pdf/pdfconcat";

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

    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}}/api/pdf/pdfconcat \
  --header 'content-type: application/json' \
  --data '{
  "PdfDocumentsAsBase64String": []
}'
echo '{
  "PdfDocumentsAsBase64String": []
}' |  \
  http POST {{baseUrl}}/api/pdf/pdfconcat \
  content-type:application/json
wget --quiet \
  --method POST \
  --header 'content-type: application/json' \
  --body-data '{\n  "PdfDocumentsAsBase64String": []\n}' \
  --output-document \
  - {{baseUrl}}/api/pdf/pdfconcat
import Foundation

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

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

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/api/pdf/pdfconcat")! 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()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "pdfFileBase64String": "Base64 encoded pdf file content",
  "errorMessage": "If any error occured, info will be provided here"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "description": "Always empty in the public response, used for internal error transport to logs",
  "statusCode": 400,
  "errorMessage": "The error message provided to client"
}
POST Create pdf-file from complete XSL-FO document.
{{baseUrl}}/api/pdf/xslfo
BODY json

{
  "FoDocumentBase64String": "",
  "Metadata": {
    "Author": "",
    "EnableAdd": false,
    "EnableCopy": false,
    "EnableModify": false,
    "EnablePrinting": false,
    "Keywords": [],
    "OwnerPassword": "",
    "Subject": "",
    "Title": "",
    "UserPassword": ""
  },
  "Resources": {}
}
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/api/pdf/xslfo");

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  \"FoDocumentBase64String\": \"\",\n  \"Metadata\": {\n    \"Author\": \"\",\n    \"EnableAdd\": false,\n    \"EnableCopy\": false,\n    \"EnableModify\": false,\n    \"EnablePrinting\": false,\n    \"Keywords\": [],\n    \"OwnerPassword\": \"\",\n    \"Subject\": \"\",\n    \"Title\": \"\",\n    \"UserPassword\": \"\"\n  },\n  \"Resources\": {}\n}");

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

(client/post "{{baseUrl}}/api/pdf/xslfo" {:content-type :json
                                                          :form-params {:FoDocumentBase64String ""
                                                                        :Metadata {:Author ""
                                                                                   :EnableAdd false
                                                                                   :EnableCopy false
                                                                                   :EnableModify false
                                                                                   :EnablePrinting false
                                                                                   :Keywords []
                                                                                   :OwnerPassword ""
                                                                                   :Subject ""
                                                                                   :Title ""
                                                                                   :UserPassword ""}
                                                                        :Resources {}}})
require "http/client"

url = "{{baseUrl}}/api/pdf/xslfo"
headers = HTTP::Headers{
  "content-type" => "application/json"
}
reqBody = "{\n  \"FoDocumentBase64String\": \"\",\n  \"Metadata\": {\n    \"Author\": \"\",\n    \"EnableAdd\": false,\n    \"EnableCopy\": false,\n    \"EnableModify\": false,\n    \"EnablePrinting\": false,\n    \"Keywords\": [],\n    \"OwnerPassword\": \"\",\n    \"Subject\": \"\",\n    \"Title\": \"\",\n    \"UserPassword\": \"\"\n  },\n  \"Resources\": {}\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}}/api/pdf/xslfo"),
    Content = new StringContent("{\n  \"FoDocumentBase64String\": \"\",\n  \"Metadata\": {\n    \"Author\": \"\",\n    \"EnableAdd\": false,\n    \"EnableCopy\": false,\n    \"EnableModify\": false,\n    \"EnablePrinting\": false,\n    \"Keywords\": [],\n    \"OwnerPassword\": \"\",\n    \"Subject\": \"\",\n    \"Title\": \"\",\n    \"UserPassword\": \"\"\n  },\n  \"Resources\": {}\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}}/api/pdf/xslfo");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n  \"FoDocumentBase64String\": \"\",\n  \"Metadata\": {\n    \"Author\": \"\",\n    \"EnableAdd\": false,\n    \"EnableCopy\": false,\n    \"EnableModify\": false,\n    \"EnablePrinting\": false,\n    \"Keywords\": [],\n    \"OwnerPassword\": \"\",\n    \"Subject\": \"\",\n    \"Title\": \"\",\n    \"UserPassword\": \"\"\n  },\n  \"Resources\": {}\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main

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

func main() {

	url := "{{baseUrl}}/api/pdf/xslfo"

	payload := strings.NewReader("{\n  \"FoDocumentBase64String\": \"\",\n  \"Metadata\": {\n    \"Author\": \"\",\n    \"EnableAdd\": false,\n    \"EnableCopy\": false,\n    \"EnableModify\": false,\n    \"EnablePrinting\": false,\n    \"Keywords\": [],\n    \"OwnerPassword\": \"\",\n    \"Subject\": \"\",\n    \"Title\": \"\",\n    \"UserPassword\": \"\"\n  },\n  \"Resources\": {}\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/api/pdf/xslfo HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 301

{
  "FoDocumentBase64String": "",
  "Metadata": {
    "Author": "",
    "EnableAdd": false,
    "EnableCopy": false,
    "EnableModify": false,
    "EnablePrinting": false,
    "Keywords": [],
    "OwnerPassword": "",
    "Subject": "",
    "Title": "",
    "UserPassword": ""
  },
  "Resources": {}
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/api/pdf/xslfo")
  .setHeader("content-type", "application/json")
  .setBody("{\n  \"FoDocumentBase64String\": \"\",\n  \"Metadata\": {\n    \"Author\": \"\",\n    \"EnableAdd\": false,\n    \"EnableCopy\": false,\n    \"EnableModify\": false,\n    \"EnablePrinting\": false,\n    \"Keywords\": [],\n    \"OwnerPassword\": \"\",\n    \"Subject\": \"\",\n    \"Title\": \"\",\n    \"UserPassword\": \"\"\n  },\n  \"Resources\": {}\n}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/api/pdf/xslfo"))
    .header("content-type", "application/json")
    .method("POST", HttpRequest.BodyPublishers.ofString("{\n  \"FoDocumentBase64String\": \"\",\n  \"Metadata\": {\n    \"Author\": \"\",\n    \"EnableAdd\": false,\n    \"EnableCopy\": false,\n    \"EnableModify\": false,\n    \"EnablePrinting\": false,\n    \"Keywords\": [],\n    \"OwnerPassword\": \"\",\n    \"Subject\": \"\",\n    \"Title\": \"\",\n    \"UserPassword\": \"\"\n  },\n  \"Resources\": {}\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  \"FoDocumentBase64String\": \"\",\n  \"Metadata\": {\n    \"Author\": \"\",\n    \"EnableAdd\": false,\n    \"EnableCopy\": false,\n    \"EnableModify\": false,\n    \"EnablePrinting\": false,\n    \"Keywords\": [],\n    \"OwnerPassword\": \"\",\n    \"Subject\": \"\",\n    \"Title\": \"\",\n    \"UserPassword\": \"\"\n  },\n  \"Resources\": {}\n}");
Request request = new Request.Builder()
  .url("{{baseUrl}}/api/pdf/xslfo")
  .post(body)
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/api/pdf/xslfo")
  .header("content-type", "application/json")
  .body("{\n  \"FoDocumentBase64String\": \"\",\n  \"Metadata\": {\n    \"Author\": \"\",\n    \"EnableAdd\": false,\n    \"EnableCopy\": false,\n    \"EnableModify\": false,\n    \"EnablePrinting\": false,\n    \"Keywords\": [],\n    \"OwnerPassword\": \"\",\n    \"Subject\": \"\",\n    \"Title\": \"\",\n    \"UserPassword\": \"\"\n  },\n  \"Resources\": {}\n}")
  .asString();
const data = JSON.stringify({
  FoDocumentBase64String: '',
  Metadata: {
    Author: '',
    EnableAdd: false,
    EnableCopy: false,
    EnableModify: false,
    EnablePrinting: false,
    Keywords: [],
    OwnerPassword: '',
    Subject: '',
    Title: '',
    UserPassword: ''
  },
  Resources: {}
});

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

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

xhr.open('POST', '{{baseUrl}}/api/pdf/xslfo');
xhr.setRequestHeader('content-type', 'application/json');

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

const options = {
  method: 'POST',
  url: '{{baseUrl}}/api/pdf/xslfo',
  headers: {'content-type': 'application/json'},
  data: {
    FoDocumentBase64String: '',
    Metadata: {
      Author: '',
      EnableAdd: false,
      EnableCopy: false,
      EnableModify: false,
      EnablePrinting: false,
      Keywords: [],
      OwnerPassword: '',
      Subject: '',
      Title: '',
      UserPassword: ''
    },
    Resources: {}
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/api/pdf/xslfo';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"FoDocumentBase64String":"","Metadata":{"Author":"","EnableAdd":false,"EnableCopy":false,"EnableModify":false,"EnablePrinting":false,"Keywords":[],"OwnerPassword":"","Subject":"","Title":"","UserPassword":""},"Resources":{}}'
};

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}}/api/pdf/xslfo',
  method: 'POST',
  headers: {
    'content-type': 'application/json'
  },
  processData: false,
  data: '{\n  "FoDocumentBase64String": "",\n  "Metadata": {\n    "Author": "",\n    "EnableAdd": false,\n    "EnableCopy": false,\n    "EnableModify": false,\n    "EnablePrinting": false,\n    "Keywords": [],\n    "OwnerPassword": "",\n    "Subject": "",\n    "Title": "",\n    "UserPassword": ""\n  },\n  "Resources": {}\n}'
};

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

val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n  \"FoDocumentBase64String\": \"\",\n  \"Metadata\": {\n    \"Author\": \"\",\n    \"EnableAdd\": false,\n    \"EnableCopy\": false,\n    \"EnableModify\": false,\n    \"EnablePrinting\": false,\n    \"Keywords\": [],\n    \"OwnerPassword\": \"\",\n    \"Subject\": \"\",\n    \"Title\": \"\",\n    \"UserPassword\": \"\"\n  },\n  \"Resources\": {}\n}")
val request = Request.Builder()
  .url("{{baseUrl}}/api/pdf/xslfo")
  .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/api/pdf/xslfo',
  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({
  FoDocumentBase64String: '',
  Metadata: {
    Author: '',
    EnableAdd: false,
    EnableCopy: false,
    EnableModify: false,
    EnablePrinting: false,
    Keywords: [],
    OwnerPassword: '',
    Subject: '',
    Title: '',
    UserPassword: ''
  },
  Resources: {}
}));
req.end();
const request = require('request');

const options = {
  method: 'POST',
  url: '{{baseUrl}}/api/pdf/xslfo',
  headers: {'content-type': 'application/json'},
  body: {
    FoDocumentBase64String: '',
    Metadata: {
      Author: '',
      EnableAdd: false,
      EnableCopy: false,
      EnableModify: false,
      EnablePrinting: false,
      Keywords: [],
      OwnerPassword: '',
      Subject: '',
      Title: '',
      UserPassword: ''
    },
    Resources: {}
  },
  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}}/api/pdf/xslfo');

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

req.type('json');
req.send({
  FoDocumentBase64String: '',
  Metadata: {
    Author: '',
    EnableAdd: false,
    EnableCopy: false,
    EnableModify: false,
    EnablePrinting: false,
    Keywords: [],
    OwnerPassword: '',
    Subject: '',
    Title: '',
    UserPassword: ''
  },
  Resources: {}
});

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}}/api/pdf/xslfo',
  headers: {'content-type': 'application/json'},
  data: {
    FoDocumentBase64String: '',
    Metadata: {
      Author: '',
      EnableAdd: false,
      EnableCopy: false,
      EnableModify: false,
      EnablePrinting: false,
      Keywords: [],
      OwnerPassword: '',
      Subject: '',
      Title: '',
      UserPassword: ''
    },
    Resources: {}
  }
};

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

const url = '{{baseUrl}}/api/pdf/xslfo';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"FoDocumentBase64String":"","Metadata":{"Author":"","EnableAdd":false,"EnableCopy":false,"EnableModify":false,"EnablePrinting":false,"Keywords":[],"OwnerPassword":"","Subject":"","Title":"","UserPassword":""},"Resources":{}}'
};

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 = @{ @"FoDocumentBase64String": @"",
                              @"Metadata": @{ @"Author": @"", @"EnableAdd": @NO, @"EnableCopy": @NO, @"EnableModify": @NO, @"EnablePrinting": @NO, @"Keywords": @[  ], @"OwnerPassword": @"", @"Subject": @"", @"Title": @"", @"UserPassword": @"" },
                              @"Resources": @{  } };

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

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/api/pdf/xslfo"]
                                                       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}}/api/pdf/xslfo" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n  \"FoDocumentBase64String\": \"\",\n  \"Metadata\": {\n    \"Author\": \"\",\n    \"EnableAdd\": false,\n    \"EnableCopy\": false,\n    \"EnableModify\": false,\n    \"EnablePrinting\": false,\n    \"Keywords\": [],\n    \"OwnerPassword\": \"\",\n    \"Subject\": \"\",\n    \"Title\": \"\",\n    \"UserPassword\": \"\"\n  },\n  \"Resources\": {}\n}" in

Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/api/pdf/xslfo",
  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([
    'FoDocumentBase64String' => '',
    'Metadata' => [
        'Author' => '',
        'EnableAdd' => null,
        'EnableCopy' => null,
        'EnableModify' => null,
        'EnablePrinting' => null,
        'Keywords' => [
                
        ],
        'OwnerPassword' => '',
        'Subject' => '',
        'Title' => '',
        'UserPassword' => ''
    ],
    'Resources' => [
        
    ]
  ]),
  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}}/api/pdf/xslfo', [
  'body' => '{
  "FoDocumentBase64String": "",
  "Metadata": {
    "Author": "",
    "EnableAdd": false,
    "EnableCopy": false,
    "EnableModify": false,
    "EnablePrinting": false,
    "Keywords": [],
    "OwnerPassword": "",
    "Subject": "",
    "Title": "",
    "UserPassword": ""
  },
  "Resources": {}
}',
  'headers' => [
    'content-type' => 'application/json',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/api/pdf/xslfo');
$request->setMethod(HTTP_METH_POST);

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

$request->setContentType('application/json');
$request->setBody(json_encode([
  'FoDocumentBase64String' => '',
  'Metadata' => [
    'Author' => '',
    'EnableAdd' => null,
    'EnableCopy' => null,
    'EnableModify' => null,
    'EnablePrinting' => null,
    'Keywords' => [
        
    ],
    'OwnerPassword' => '',
    'Subject' => '',
    'Title' => '',
    'UserPassword' => ''
  ],
  'Resources' => [
    
  ]
]));

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

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
append(json_encode([
  'FoDocumentBase64String' => '',
  'Metadata' => [
    'Author' => '',
    'EnableAdd' => null,
    'EnableCopy' => null,
    'EnableModify' => null,
    'EnablePrinting' => null,
    'Keywords' => [
        
    ],
    'OwnerPassword' => '',
    'Subject' => '',
    'Title' => '',
    'UserPassword' => ''
  ],
  'Resources' => [
    
  ]
]));
$request->setRequestUrl('{{baseUrl}}/api/pdf/xslfo');
$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}}/api/pdf/xslfo' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "FoDocumentBase64String": "",
  "Metadata": {
    "Author": "",
    "EnableAdd": false,
    "EnableCopy": false,
    "EnableModify": false,
    "EnablePrinting": false,
    "Keywords": [],
    "OwnerPassword": "",
    "Subject": "",
    "Title": "",
    "UserPassword": ""
  },
  "Resources": {}
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/api/pdf/xslfo' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "FoDocumentBase64String": "",
  "Metadata": {
    "Author": "",
    "EnableAdd": false,
    "EnableCopy": false,
    "EnableModify": false,
    "EnablePrinting": false,
    "Keywords": [],
    "OwnerPassword": "",
    "Subject": "",
    "Title": "",
    "UserPassword": ""
  },
  "Resources": {}
}'
import http.client

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

payload = "{\n  \"FoDocumentBase64String\": \"\",\n  \"Metadata\": {\n    \"Author\": \"\",\n    \"EnableAdd\": false,\n    \"EnableCopy\": false,\n    \"EnableModify\": false,\n    \"EnablePrinting\": false,\n    \"Keywords\": [],\n    \"OwnerPassword\": \"\",\n    \"Subject\": \"\",\n    \"Title\": \"\",\n    \"UserPassword\": \"\"\n  },\n  \"Resources\": {}\n}"

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

conn.request("POST", "/baseUrl/api/pdf/xslfo", payload, headers)

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

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

url = "{{baseUrl}}/api/pdf/xslfo"

payload = {
    "FoDocumentBase64String": "",
    "Metadata": {
        "Author": "",
        "EnableAdd": False,
        "EnableCopy": False,
        "EnableModify": False,
        "EnablePrinting": False,
        "Keywords": [],
        "OwnerPassword": "",
        "Subject": "",
        "Title": "",
        "UserPassword": ""
    },
    "Resources": {}
}
headers = {"content-type": "application/json"}

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

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

url <- "{{baseUrl}}/api/pdf/xslfo"

payload <- "{\n  \"FoDocumentBase64String\": \"\",\n  \"Metadata\": {\n    \"Author\": \"\",\n    \"EnableAdd\": false,\n    \"EnableCopy\": false,\n    \"EnableModify\": false,\n    \"EnablePrinting\": false,\n    \"Keywords\": [],\n    \"OwnerPassword\": \"\",\n    \"Subject\": \"\",\n    \"Title\": \"\",\n    \"UserPassword\": \"\"\n  },\n  \"Resources\": {}\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}}/api/pdf/xslfo")

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  \"FoDocumentBase64String\": \"\",\n  \"Metadata\": {\n    \"Author\": \"\",\n    \"EnableAdd\": false,\n    \"EnableCopy\": false,\n    \"EnableModify\": false,\n    \"EnablePrinting\": false,\n    \"Keywords\": [],\n    \"OwnerPassword\": \"\",\n    \"Subject\": \"\",\n    \"Title\": \"\",\n    \"UserPassword\": \"\"\n  },\n  \"Resources\": {}\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/api/pdf/xslfo') do |req|
  req.body = "{\n  \"FoDocumentBase64String\": \"\",\n  \"Metadata\": {\n    \"Author\": \"\",\n    \"EnableAdd\": false,\n    \"EnableCopy\": false,\n    \"EnableModify\": false,\n    \"EnablePrinting\": false,\n    \"Keywords\": [],\n    \"OwnerPassword\": \"\",\n    \"Subject\": \"\",\n    \"Title\": \"\",\n    \"UserPassword\": \"\"\n  },\n  \"Resources\": {}\n}"
end

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

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/api/pdf/xslfo";

    let payload = json!({
        "FoDocumentBase64String": "",
        "Metadata": json!({
            "Author": "",
            "EnableAdd": false,
            "EnableCopy": false,
            "EnableModify": false,
            "EnablePrinting": false,
            "Keywords": (),
            "OwnerPassword": "",
            "Subject": "",
            "Title": "",
            "UserPassword": ""
        }),
        "Resources": json!({})
    });

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

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

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

    dbg!(results);
}
curl --request POST \
  --url {{baseUrl}}/api/pdf/xslfo \
  --header 'content-type: application/json' \
  --data '{
  "FoDocumentBase64String": "",
  "Metadata": {
    "Author": "",
    "EnableAdd": false,
    "EnableCopy": false,
    "EnableModify": false,
    "EnablePrinting": false,
    "Keywords": [],
    "OwnerPassword": "",
    "Subject": "",
    "Title": "",
    "UserPassword": ""
  },
  "Resources": {}
}'
echo '{
  "FoDocumentBase64String": "",
  "Metadata": {
    "Author": "",
    "EnableAdd": false,
    "EnableCopy": false,
    "EnableModify": false,
    "EnablePrinting": false,
    "Keywords": [],
    "OwnerPassword": "",
    "Subject": "",
    "Title": "",
    "UserPassword": ""
  },
  "Resources": {}
}' |  \
  http POST {{baseUrl}}/api/pdf/xslfo \
  content-type:application/json
wget --quiet \
  --method POST \
  --header 'content-type: application/json' \
  --body-data '{\n  "FoDocumentBase64String": "",\n  "Metadata": {\n    "Author": "",\n    "EnableAdd": false,\n    "EnableCopy": false,\n    "EnableModify": false,\n    "EnablePrinting": false,\n    "Keywords": [],\n    "OwnerPassword": "",\n    "Subject": "",\n    "Title": "",\n    "UserPassword": ""\n  },\n  "Resources": {}\n}' \
  --output-document \
  - {{baseUrl}}/api/pdf/xslfo
import Foundation

let headers = ["content-type": "application/json"]
let parameters = [
  "FoDocumentBase64String": "",
  "Metadata": [
    "Author": "",
    "EnableAdd": false,
    "EnableCopy": false,
    "EnableModify": false,
    "EnablePrinting": false,
    "Keywords": [],
    "OwnerPassword": "",
    "Subject": "",
    "Title": "",
    "UserPassword": ""
  ],
  "Resources": []
] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/api/pdf/xslfo")! 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()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "pdfFileBase64String": "Base64 encoded pdf file content",
  "errorMessage": "If any error occured, info will be provided here"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "description": "Always empty in the public response, used for internal error transport to logs",
  "statusCode": 400,
  "errorMessage": "The error message provided to client"
}
POST Create pdf-file from transforming xml document with Xsl-Fo transform document.
{{baseUrl}}/api/pdf/xslfowithtransform
BODY json

{
  "FoDocumentBase64String": "",
  "Metadata": {
    "Author": "",
    "EnableAdd": false,
    "EnableCopy": false,
    "EnableModify": false,
    "EnablePrinting": false,
    "Keywords": [],
    "OwnerPassword": "",
    "Subject": "",
    "Title": "",
    "UserPassword": ""
  },
  "Resources": {},
  "XmlDataDocumentBase64String": ""
}
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/api/pdf/xslfowithtransform");

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  \"FoDocumentBase64String\": \"\",\n  \"Metadata\": {\n    \"Author\": \"\",\n    \"EnableAdd\": false,\n    \"EnableCopy\": false,\n    \"EnableModify\": false,\n    \"EnablePrinting\": false,\n    \"Keywords\": [],\n    \"OwnerPassword\": \"\",\n    \"Subject\": \"\",\n    \"Title\": \"\",\n    \"UserPassword\": \"\"\n  },\n  \"Resources\": {},\n  \"XmlDataDocumentBase64String\": \"\"\n}");

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

(client/post "{{baseUrl}}/api/pdf/xslfowithtransform" {:content-type :json
                                                                       :form-params {:FoDocumentBase64String ""
                                                                                     :Metadata {:Author ""
                                                                                                :EnableAdd false
                                                                                                :EnableCopy false
                                                                                                :EnableModify false
                                                                                                :EnablePrinting false
                                                                                                :Keywords []
                                                                                                :OwnerPassword ""
                                                                                                :Subject ""
                                                                                                :Title ""
                                                                                                :UserPassword ""}
                                                                                     :Resources {}
                                                                                     :XmlDataDocumentBase64String ""}})
require "http/client"

url = "{{baseUrl}}/api/pdf/xslfowithtransform"
headers = HTTP::Headers{
  "content-type" => "application/json"
}
reqBody = "{\n  \"FoDocumentBase64String\": \"\",\n  \"Metadata\": {\n    \"Author\": \"\",\n    \"EnableAdd\": false,\n    \"EnableCopy\": false,\n    \"EnableModify\": false,\n    \"EnablePrinting\": false,\n    \"Keywords\": [],\n    \"OwnerPassword\": \"\",\n    \"Subject\": \"\",\n    \"Title\": \"\",\n    \"UserPassword\": \"\"\n  },\n  \"Resources\": {},\n  \"XmlDataDocumentBase64String\": \"\"\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}}/api/pdf/xslfowithtransform"),
    Content = new StringContent("{\n  \"FoDocumentBase64String\": \"\",\n  \"Metadata\": {\n    \"Author\": \"\",\n    \"EnableAdd\": false,\n    \"EnableCopy\": false,\n    \"EnableModify\": false,\n    \"EnablePrinting\": false,\n    \"Keywords\": [],\n    \"OwnerPassword\": \"\",\n    \"Subject\": \"\",\n    \"Title\": \"\",\n    \"UserPassword\": \"\"\n  },\n  \"Resources\": {},\n  \"XmlDataDocumentBase64String\": \"\"\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}}/api/pdf/xslfowithtransform");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n  \"FoDocumentBase64String\": \"\",\n  \"Metadata\": {\n    \"Author\": \"\",\n    \"EnableAdd\": false,\n    \"EnableCopy\": false,\n    \"EnableModify\": false,\n    \"EnablePrinting\": false,\n    \"Keywords\": [],\n    \"OwnerPassword\": \"\",\n    \"Subject\": \"\",\n    \"Title\": \"\",\n    \"UserPassword\": \"\"\n  },\n  \"Resources\": {},\n  \"XmlDataDocumentBase64String\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main

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

func main() {

	url := "{{baseUrl}}/api/pdf/xslfowithtransform"

	payload := strings.NewReader("{\n  \"FoDocumentBase64String\": \"\",\n  \"Metadata\": {\n    \"Author\": \"\",\n    \"EnableAdd\": false,\n    \"EnableCopy\": false,\n    \"EnableModify\": false,\n    \"EnablePrinting\": false,\n    \"Keywords\": [],\n    \"OwnerPassword\": \"\",\n    \"Subject\": \"\",\n    \"Title\": \"\",\n    \"UserPassword\": \"\"\n  },\n  \"Resources\": {},\n  \"XmlDataDocumentBase64String\": \"\"\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/api/pdf/xslfowithtransform HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 338

{
  "FoDocumentBase64String": "",
  "Metadata": {
    "Author": "",
    "EnableAdd": false,
    "EnableCopy": false,
    "EnableModify": false,
    "EnablePrinting": false,
    "Keywords": [],
    "OwnerPassword": "",
    "Subject": "",
    "Title": "",
    "UserPassword": ""
  },
  "Resources": {},
  "XmlDataDocumentBase64String": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/api/pdf/xslfowithtransform")
  .setHeader("content-type", "application/json")
  .setBody("{\n  \"FoDocumentBase64String\": \"\",\n  \"Metadata\": {\n    \"Author\": \"\",\n    \"EnableAdd\": false,\n    \"EnableCopy\": false,\n    \"EnableModify\": false,\n    \"EnablePrinting\": false,\n    \"Keywords\": [],\n    \"OwnerPassword\": \"\",\n    \"Subject\": \"\",\n    \"Title\": \"\",\n    \"UserPassword\": \"\"\n  },\n  \"Resources\": {},\n  \"XmlDataDocumentBase64String\": \"\"\n}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/api/pdf/xslfowithtransform"))
    .header("content-type", "application/json")
    .method("POST", HttpRequest.BodyPublishers.ofString("{\n  \"FoDocumentBase64String\": \"\",\n  \"Metadata\": {\n    \"Author\": \"\",\n    \"EnableAdd\": false,\n    \"EnableCopy\": false,\n    \"EnableModify\": false,\n    \"EnablePrinting\": false,\n    \"Keywords\": [],\n    \"OwnerPassword\": \"\",\n    \"Subject\": \"\",\n    \"Title\": \"\",\n    \"UserPassword\": \"\"\n  },\n  \"Resources\": {},\n  \"XmlDataDocumentBase64String\": \"\"\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  \"FoDocumentBase64String\": \"\",\n  \"Metadata\": {\n    \"Author\": \"\",\n    \"EnableAdd\": false,\n    \"EnableCopy\": false,\n    \"EnableModify\": false,\n    \"EnablePrinting\": false,\n    \"Keywords\": [],\n    \"OwnerPassword\": \"\",\n    \"Subject\": \"\",\n    \"Title\": \"\",\n    \"UserPassword\": \"\"\n  },\n  \"Resources\": {},\n  \"XmlDataDocumentBase64String\": \"\"\n}");
Request request = new Request.Builder()
  .url("{{baseUrl}}/api/pdf/xslfowithtransform")
  .post(body)
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/api/pdf/xslfowithtransform")
  .header("content-type", "application/json")
  .body("{\n  \"FoDocumentBase64String\": \"\",\n  \"Metadata\": {\n    \"Author\": \"\",\n    \"EnableAdd\": false,\n    \"EnableCopy\": false,\n    \"EnableModify\": false,\n    \"EnablePrinting\": false,\n    \"Keywords\": [],\n    \"OwnerPassword\": \"\",\n    \"Subject\": \"\",\n    \"Title\": \"\",\n    \"UserPassword\": \"\"\n  },\n  \"Resources\": {},\n  \"XmlDataDocumentBase64String\": \"\"\n}")
  .asString();
const data = JSON.stringify({
  FoDocumentBase64String: '',
  Metadata: {
    Author: '',
    EnableAdd: false,
    EnableCopy: false,
    EnableModify: false,
    EnablePrinting: false,
    Keywords: [],
    OwnerPassword: '',
    Subject: '',
    Title: '',
    UserPassword: ''
  },
  Resources: {},
  XmlDataDocumentBase64String: ''
});

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

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

xhr.open('POST', '{{baseUrl}}/api/pdf/xslfowithtransform');
xhr.setRequestHeader('content-type', 'application/json');

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

const options = {
  method: 'POST',
  url: '{{baseUrl}}/api/pdf/xslfowithtransform',
  headers: {'content-type': 'application/json'},
  data: {
    FoDocumentBase64String: '',
    Metadata: {
      Author: '',
      EnableAdd: false,
      EnableCopy: false,
      EnableModify: false,
      EnablePrinting: false,
      Keywords: [],
      OwnerPassword: '',
      Subject: '',
      Title: '',
      UserPassword: ''
    },
    Resources: {},
    XmlDataDocumentBase64String: ''
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/api/pdf/xslfowithtransform';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"FoDocumentBase64String":"","Metadata":{"Author":"","EnableAdd":false,"EnableCopy":false,"EnableModify":false,"EnablePrinting":false,"Keywords":[],"OwnerPassword":"","Subject":"","Title":"","UserPassword":""},"Resources":{},"XmlDataDocumentBase64String":""}'
};

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}}/api/pdf/xslfowithtransform',
  method: 'POST',
  headers: {
    'content-type': 'application/json'
  },
  processData: false,
  data: '{\n  "FoDocumentBase64String": "",\n  "Metadata": {\n    "Author": "",\n    "EnableAdd": false,\n    "EnableCopy": false,\n    "EnableModify": false,\n    "EnablePrinting": false,\n    "Keywords": [],\n    "OwnerPassword": "",\n    "Subject": "",\n    "Title": "",\n    "UserPassword": ""\n  },\n  "Resources": {},\n  "XmlDataDocumentBase64String": ""\n}'
};

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

val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n  \"FoDocumentBase64String\": \"\",\n  \"Metadata\": {\n    \"Author\": \"\",\n    \"EnableAdd\": false,\n    \"EnableCopy\": false,\n    \"EnableModify\": false,\n    \"EnablePrinting\": false,\n    \"Keywords\": [],\n    \"OwnerPassword\": \"\",\n    \"Subject\": \"\",\n    \"Title\": \"\",\n    \"UserPassword\": \"\"\n  },\n  \"Resources\": {},\n  \"XmlDataDocumentBase64String\": \"\"\n}")
val request = Request.Builder()
  .url("{{baseUrl}}/api/pdf/xslfowithtransform")
  .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/api/pdf/xslfowithtransform',
  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({
  FoDocumentBase64String: '',
  Metadata: {
    Author: '',
    EnableAdd: false,
    EnableCopy: false,
    EnableModify: false,
    EnablePrinting: false,
    Keywords: [],
    OwnerPassword: '',
    Subject: '',
    Title: '',
    UserPassword: ''
  },
  Resources: {},
  XmlDataDocumentBase64String: ''
}));
req.end();
const request = require('request');

const options = {
  method: 'POST',
  url: '{{baseUrl}}/api/pdf/xslfowithtransform',
  headers: {'content-type': 'application/json'},
  body: {
    FoDocumentBase64String: '',
    Metadata: {
      Author: '',
      EnableAdd: false,
      EnableCopy: false,
      EnableModify: false,
      EnablePrinting: false,
      Keywords: [],
      OwnerPassword: '',
      Subject: '',
      Title: '',
      UserPassword: ''
    },
    Resources: {},
    XmlDataDocumentBase64String: ''
  },
  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}}/api/pdf/xslfowithtransform');

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

req.type('json');
req.send({
  FoDocumentBase64String: '',
  Metadata: {
    Author: '',
    EnableAdd: false,
    EnableCopy: false,
    EnableModify: false,
    EnablePrinting: false,
    Keywords: [],
    OwnerPassword: '',
    Subject: '',
    Title: '',
    UserPassword: ''
  },
  Resources: {},
  XmlDataDocumentBase64String: ''
});

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}}/api/pdf/xslfowithtransform',
  headers: {'content-type': 'application/json'},
  data: {
    FoDocumentBase64String: '',
    Metadata: {
      Author: '',
      EnableAdd: false,
      EnableCopy: false,
      EnableModify: false,
      EnablePrinting: false,
      Keywords: [],
      OwnerPassword: '',
      Subject: '',
      Title: '',
      UserPassword: ''
    },
    Resources: {},
    XmlDataDocumentBase64String: ''
  }
};

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

const url = '{{baseUrl}}/api/pdf/xslfowithtransform';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"FoDocumentBase64String":"","Metadata":{"Author":"","EnableAdd":false,"EnableCopy":false,"EnableModify":false,"EnablePrinting":false,"Keywords":[],"OwnerPassword":"","Subject":"","Title":"","UserPassword":""},"Resources":{},"XmlDataDocumentBase64String":""}'
};

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 = @{ @"FoDocumentBase64String": @"",
                              @"Metadata": @{ @"Author": @"", @"EnableAdd": @NO, @"EnableCopy": @NO, @"EnableModify": @NO, @"EnablePrinting": @NO, @"Keywords": @[  ], @"OwnerPassword": @"", @"Subject": @"", @"Title": @"", @"UserPassword": @"" },
                              @"Resources": @{  },
                              @"XmlDataDocumentBase64String": @"" };

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

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/api/pdf/xslfowithtransform"]
                                                       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}}/api/pdf/xslfowithtransform" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n  \"FoDocumentBase64String\": \"\",\n  \"Metadata\": {\n    \"Author\": \"\",\n    \"EnableAdd\": false,\n    \"EnableCopy\": false,\n    \"EnableModify\": false,\n    \"EnablePrinting\": false,\n    \"Keywords\": [],\n    \"OwnerPassword\": \"\",\n    \"Subject\": \"\",\n    \"Title\": \"\",\n    \"UserPassword\": \"\"\n  },\n  \"Resources\": {},\n  \"XmlDataDocumentBase64String\": \"\"\n}" in

Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/api/pdf/xslfowithtransform",
  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([
    'FoDocumentBase64String' => '',
    'Metadata' => [
        'Author' => '',
        'EnableAdd' => null,
        'EnableCopy' => null,
        'EnableModify' => null,
        'EnablePrinting' => null,
        'Keywords' => [
                
        ],
        'OwnerPassword' => '',
        'Subject' => '',
        'Title' => '',
        'UserPassword' => ''
    ],
    'Resources' => [
        
    ],
    'XmlDataDocumentBase64String' => ''
  ]),
  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}}/api/pdf/xslfowithtransform', [
  'body' => '{
  "FoDocumentBase64String": "",
  "Metadata": {
    "Author": "",
    "EnableAdd": false,
    "EnableCopy": false,
    "EnableModify": false,
    "EnablePrinting": false,
    "Keywords": [],
    "OwnerPassword": "",
    "Subject": "",
    "Title": "",
    "UserPassword": ""
  },
  "Resources": {},
  "XmlDataDocumentBase64String": ""
}',
  'headers' => [
    'content-type' => 'application/json',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/api/pdf/xslfowithtransform');
$request->setMethod(HTTP_METH_POST);

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

$request->setContentType('application/json');
$request->setBody(json_encode([
  'FoDocumentBase64String' => '',
  'Metadata' => [
    'Author' => '',
    'EnableAdd' => null,
    'EnableCopy' => null,
    'EnableModify' => null,
    'EnablePrinting' => null,
    'Keywords' => [
        
    ],
    'OwnerPassword' => '',
    'Subject' => '',
    'Title' => '',
    'UserPassword' => ''
  ],
  'Resources' => [
    
  ],
  'XmlDataDocumentBase64String' => ''
]));

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

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
append(json_encode([
  'FoDocumentBase64String' => '',
  'Metadata' => [
    'Author' => '',
    'EnableAdd' => null,
    'EnableCopy' => null,
    'EnableModify' => null,
    'EnablePrinting' => null,
    'Keywords' => [
        
    ],
    'OwnerPassword' => '',
    'Subject' => '',
    'Title' => '',
    'UserPassword' => ''
  ],
  'Resources' => [
    
  ],
  'XmlDataDocumentBase64String' => ''
]));
$request->setRequestUrl('{{baseUrl}}/api/pdf/xslfowithtransform');
$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}}/api/pdf/xslfowithtransform' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "FoDocumentBase64String": "",
  "Metadata": {
    "Author": "",
    "EnableAdd": false,
    "EnableCopy": false,
    "EnableModify": false,
    "EnablePrinting": false,
    "Keywords": [],
    "OwnerPassword": "",
    "Subject": "",
    "Title": "",
    "UserPassword": ""
  },
  "Resources": {},
  "XmlDataDocumentBase64String": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/api/pdf/xslfowithtransform' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "FoDocumentBase64String": "",
  "Metadata": {
    "Author": "",
    "EnableAdd": false,
    "EnableCopy": false,
    "EnableModify": false,
    "EnablePrinting": false,
    "Keywords": [],
    "OwnerPassword": "",
    "Subject": "",
    "Title": "",
    "UserPassword": ""
  },
  "Resources": {},
  "XmlDataDocumentBase64String": ""
}'
import http.client

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

payload = "{\n  \"FoDocumentBase64String\": \"\",\n  \"Metadata\": {\n    \"Author\": \"\",\n    \"EnableAdd\": false,\n    \"EnableCopy\": false,\n    \"EnableModify\": false,\n    \"EnablePrinting\": false,\n    \"Keywords\": [],\n    \"OwnerPassword\": \"\",\n    \"Subject\": \"\",\n    \"Title\": \"\",\n    \"UserPassword\": \"\"\n  },\n  \"Resources\": {},\n  \"XmlDataDocumentBase64String\": \"\"\n}"

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

conn.request("POST", "/baseUrl/api/pdf/xslfowithtransform", payload, headers)

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

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

url = "{{baseUrl}}/api/pdf/xslfowithtransform"

payload = {
    "FoDocumentBase64String": "",
    "Metadata": {
        "Author": "",
        "EnableAdd": False,
        "EnableCopy": False,
        "EnableModify": False,
        "EnablePrinting": False,
        "Keywords": [],
        "OwnerPassword": "",
        "Subject": "",
        "Title": "",
        "UserPassword": ""
    },
    "Resources": {},
    "XmlDataDocumentBase64String": ""
}
headers = {"content-type": "application/json"}

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

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

url <- "{{baseUrl}}/api/pdf/xslfowithtransform"

payload <- "{\n  \"FoDocumentBase64String\": \"\",\n  \"Metadata\": {\n    \"Author\": \"\",\n    \"EnableAdd\": false,\n    \"EnableCopy\": false,\n    \"EnableModify\": false,\n    \"EnablePrinting\": false,\n    \"Keywords\": [],\n    \"OwnerPassword\": \"\",\n    \"Subject\": \"\",\n    \"Title\": \"\",\n    \"UserPassword\": \"\"\n  },\n  \"Resources\": {},\n  \"XmlDataDocumentBase64String\": \"\"\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}}/api/pdf/xslfowithtransform")

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  \"FoDocumentBase64String\": \"\",\n  \"Metadata\": {\n    \"Author\": \"\",\n    \"EnableAdd\": false,\n    \"EnableCopy\": false,\n    \"EnableModify\": false,\n    \"EnablePrinting\": false,\n    \"Keywords\": [],\n    \"OwnerPassword\": \"\",\n    \"Subject\": \"\",\n    \"Title\": \"\",\n    \"UserPassword\": \"\"\n  },\n  \"Resources\": {},\n  \"XmlDataDocumentBase64String\": \"\"\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/api/pdf/xslfowithtransform') do |req|
  req.body = "{\n  \"FoDocumentBase64String\": \"\",\n  \"Metadata\": {\n    \"Author\": \"\",\n    \"EnableAdd\": false,\n    \"EnableCopy\": false,\n    \"EnableModify\": false,\n    \"EnablePrinting\": false,\n    \"Keywords\": [],\n    \"OwnerPassword\": \"\",\n    \"Subject\": \"\",\n    \"Title\": \"\",\n    \"UserPassword\": \"\"\n  },\n  \"Resources\": {},\n  \"XmlDataDocumentBase64String\": \"\"\n}"
end

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

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/api/pdf/xslfowithtransform";

    let payload = json!({
        "FoDocumentBase64String": "",
        "Metadata": json!({
            "Author": "",
            "EnableAdd": false,
            "EnableCopy": false,
            "EnableModify": false,
            "EnablePrinting": false,
            "Keywords": (),
            "OwnerPassword": "",
            "Subject": "",
            "Title": "",
            "UserPassword": ""
        }),
        "Resources": json!({}),
        "XmlDataDocumentBase64String": ""
    });

    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}}/api/pdf/xslfowithtransform \
  --header 'content-type: application/json' \
  --data '{
  "FoDocumentBase64String": "",
  "Metadata": {
    "Author": "",
    "EnableAdd": false,
    "EnableCopy": false,
    "EnableModify": false,
    "EnablePrinting": false,
    "Keywords": [],
    "OwnerPassword": "",
    "Subject": "",
    "Title": "",
    "UserPassword": ""
  },
  "Resources": {},
  "XmlDataDocumentBase64String": ""
}'
echo '{
  "FoDocumentBase64String": "",
  "Metadata": {
    "Author": "",
    "EnableAdd": false,
    "EnableCopy": false,
    "EnableModify": false,
    "EnablePrinting": false,
    "Keywords": [],
    "OwnerPassword": "",
    "Subject": "",
    "Title": "",
    "UserPassword": ""
  },
  "Resources": {},
  "XmlDataDocumentBase64String": ""
}' |  \
  http POST {{baseUrl}}/api/pdf/xslfowithtransform \
  content-type:application/json
wget --quiet \
  --method POST \
  --header 'content-type: application/json' \
  --body-data '{\n  "FoDocumentBase64String": "",\n  "Metadata": {\n    "Author": "",\n    "EnableAdd": false,\n    "EnableCopy": false,\n    "EnableModify": false,\n    "EnablePrinting": false,\n    "Keywords": [],\n    "OwnerPassword": "",\n    "Subject": "",\n    "Title": "",\n    "UserPassword": ""\n  },\n  "Resources": {},\n  "XmlDataDocumentBase64String": ""\n}' \
  --output-document \
  - {{baseUrl}}/api/pdf/xslfowithtransform
import Foundation

let headers = ["content-type": "application/json"]
let parameters = [
  "FoDocumentBase64String": "",
  "Metadata": [
    "Author": "",
    "EnableAdd": false,
    "EnableCopy": false,
    "EnableModify": false,
    "EnablePrinting": false,
    "Keywords": [],
    "OwnerPassword": "",
    "Subject": "",
    "Title": "",
    "UserPassword": ""
  ],
  "Resources": [],
  "XmlDataDocumentBase64String": ""
] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/api/pdf/xslfowithtransform")! 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()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "pdfFileBase64String": "Base64 encoded pdf file content",
  "errorMessage": "If any error occured, info will be provided here"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "description": "Always empty in the public response, used for internal error transport to logs",
  "statusCode": 400,
  "errorMessage": "The error message provided to client"
}
POST Generate an image of to provided pdf file
{{baseUrl}}/api/pdf/pdftoimage
BODY json

{
  "Options": {
    "Height": 0,
    "HorizontalResolution": "",
    "ImageFormat": "",
    "JpegQuality": 0,
    "PageNumber": 0,
    "PngCompressionLevel": 0,
    "Transparent": false,
    "VerticalResolution": "",
    "Width": 0
  },
  "PdfFileBase64String": ""
}
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/api/pdf/pdftoimage");

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  \"Options\": {\n    \"Height\": 0,\n    \"HorizontalResolution\": \"\",\n    \"ImageFormat\": \"\",\n    \"JpegQuality\": 0,\n    \"PageNumber\": 0,\n    \"PngCompressionLevel\": 0,\n    \"Transparent\": false,\n    \"VerticalResolution\": \"\",\n    \"Width\": 0\n  },\n  \"PdfFileBase64String\": \"\"\n}");

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

(client/post "{{baseUrl}}/api/pdf/pdftoimage" {:content-type :json
                                                               :form-params {:Options {:Height 0
                                                                                       :HorizontalResolution ""
                                                                                       :ImageFormat ""
                                                                                       :JpegQuality 0
                                                                                       :PageNumber 0
                                                                                       :PngCompressionLevel 0
                                                                                       :Transparent false
                                                                                       :VerticalResolution ""
                                                                                       :Width 0}
                                                                             :PdfFileBase64String ""}})
require "http/client"

url = "{{baseUrl}}/api/pdf/pdftoimage"
headers = HTTP::Headers{
  "content-type" => "application/json"
}
reqBody = "{\n  \"Options\": {\n    \"Height\": 0,\n    \"HorizontalResolution\": \"\",\n    \"ImageFormat\": \"\",\n    \"JpegQuality\": 0,\n    \"PageNumber\": 0,\n    \"PngCompressionLevel\": 0,\n    \"Transparent\": false,\n    \"VerticalResolution\": \"\",\n    \"Width\": 0\n  },\n  \"PdfFileBase64String\": \"\"\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}}/api/pdf/pdftoimage"),
    Content = new StringContent("{\n  \"Options\": {\n    \"Height\": 0,\n    \"HorizontalResolution\": \"\",\n    \"ImageFormat\": \"\",\n    \"JpegQuality\": 0,\n    \"PageNumber\": 0,\n    \"PngCompressionLevel\": 0,\n    \"Transparent\": false,\n    \"VerticalResolution\": \"\",\n    \"Width\": 0\n  },\n  \"PdfFileBase64String\": \"\"\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}}/api/pdf/pdftoimage");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n  \"Options\": {\n    \"Height\": 0,\n    \"HorizontalResolution\": \"\",\n    \"ImageFormat\": \"\",\n    \"JpegQuality\": 0,\n    \"PageNumber\": 0,\n    \"PngCompressionLevel\": 0,\n    \"Transparent\": false,\n    \"VerticalResolution\": \"\",\n    \"Width\": 0\n  },\n  \"PdfFileBase64String\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main

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

func main() {

	url := "{{baseUrl}}/api/pdf/pdftoimage"

	payload := strings.NewReader("{\n  \"Options\": {\n    \"Height\": 0,\n    \"HorizontalResolution\": \"\",\n    \"ImageFormat\": \"\",\n    \"JpegQuality\": 0,\n    \"PageNumber\": 0,\n    \"PngCompressionLevel\": 0,\n    \"Transparent\": false,\n    \"VerticalResolution\": \"\",\n    \"Width\": 0\n  },\n  \"PdfFileBase64String\": \"\"\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/api/pdf/pdftoimage HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 267

{
  "Options": {
    "Height": 0,
    "HorizontalResolution": "",
    "ImageFormat": "",
    "JpegQuality": 0,
    "PageNumber": 0,
    "PngCompressionLevel": 0,
    "Transparent": false,
    "VerticalResolution": "",
    "Width": 0
  },
  "PdfFileBase64String": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/api/pdf/pdftoimage")
  .setHeader("content-type", "application/json")
  .setBody("{\n  \"Options\": {\n    \"Height\": 0,\n    \"HorizontalResolution\": \"\",\n    \"ImageFormat\": \"\",\n    \"JpegQuality\": 0,\n    \"PageNumber\": 0,\n    \"PngCompressionLevel\": 0,\n    \"Transparent\": false,\n    \"VerticalResolution\": \"\",\n    \"Width\": 0\n  },\n  \"PdfFileBase64String\": \"\"\n}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/api/pdf/pdftoimage"))
    .header("content-type", "application/json")
    .method("POST", HttpRequest.BodyPublishers.ofString("{\n  \"Options\": {\n    \"Height\": 0,\n    \"HorizontalResolution\": \"\",\n    \"ImageFormat\": \"\",\n    \"JpegQuality\": 0,\n    \"PageNumber\": 0,\n    \"PngCompressionLevel\": 0,\n    \"Transparent\": false,\n    \"VerticalResolution\": \"\",\n    \"Width\": 0\n  },\n  \"PdfFileBase64String\": \"\"\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  \"Options\": {\n    \"Height\": 0,\n    \"HorizontalResolution\": \"\",\n    \"ImageFormat\": \"\",\n    \"JpegQuality\": 0,\n    \"PageNumber\": 0,\n    \"PngCompressionLevel\": 0,\n    \"Transparent\": false,\n    \"VerticalResolution\": \"\",\n    \"Width\": 0\n  },\n  \"PdfFileBase64String\": \"\"\n}");
Request request = new Request.Builder()
  .url("{{baseUrl}}/api/pdf/pdftoimage")
  .post(body)
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/api/pdf/pdftoimage")
  .header("content-type", "application/json")
  .body("{\n  \"Options\": {\n    \"Height\": 0,\n    \"HorizontalResolution\": \"\",\n    \"ImageFormat\": \"\",\n    \"JpegQuality\": 0,\n    \"PageNumber\": 0,\n    \"PngCompressionLevel\": 0,\n    \"Transparent\": false,\n    \"VerticalResolution\": \"\",\n    \"Width\": 0\n  },\n  \"PdfFileBase64String\": \"\"\n}")
  .asString();
const data = JSON.stringify({
  Options: {
    Height: 0,
    HorizontalResolution: '',
    ImageFormat: '',
    JpegQuality: 0,
    PageNumber: 0,
    PngCompressionLevel: 0,
    Transparent: false,
    VerticalResolution: '',
    Width: 0
  },
  PdfFileBase64String: ''
});

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

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

xhr.open('POST', '{{baseUrl}}/api/pdf/pdftoimage');
xhr.setRequestHeader('content-type', 'application/json');

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

const options = {
  method: 'POST',
  url: '{{baseUrl}}/api/pdf/pdftoimage',
  headers: {'content-type': 'application/json'},
  data: {
    Options: {
      Height: 0,
      HorizontalResolution: '',
      ImageFormat: '',
      JpegQuality: 0,
      PageNumber: 0,
      PngCompressionLevel: 0,
      Transparent: false,
      VerticalResolution: '',
      Width: 0
    },
    PdfFileBase64String: ''
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/api/pdf/pdftoimage';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"Options":{"Height":0,"HorizontalResolution":"","ImageFormat":"","JpegQuality":0,"PageNumber":0,"PngCompressionLevel":0,"Transparent":false,"VerticalResolution":"","Width":0},"PdfFileBase64String":""}'
};

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}}/api/pdf/pdftoimage',
  method: 'POST',
  headers: {
    'content-type': 'application/json'
  },
  processData: false,
  data: '{\n  "Options": {\n    "Height": 0,\n    "HorizontalResolution": "",\n    "ImageFormat": "",\n    "JpegQuality": 0,\n    "PageNumber": 0,\n    "PngCompressionLevel": 0,\n    "Transparent": false,\n    "VerticalResolution": "",\n    "Width": 0\n  },\n  "PdfFileBase64String": ""\n}'
};

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

val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n  \"Options\": {\n    \"Height\": 0,\n    \"HorizontalResolution\": \"\",\n    \"ImageFormat\": \"\",\n    \"JpegQuality\": 0,\n    \"PageNumber\": 0,\n    \"PngCompressionLevel\": 0,\n    \"Transparent\": false,\n    \"VerticalResolution\": \"\",\n    \"Width\": 0\n  },\n  \"PdfFileBase64String\": \"\"\n}")
val request = Request.Builder()
  .url("{{baseUrl}}/api/pdf/pdftoimage")
  .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/api/pdf/pdftoimage',
  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({
  Options: {
    Height: 0,
    HorizontalResolution: '',
    ImageFormat: '',
    JpegQuality: 0,
    PageNumber: 0,
    PngCompressionLevel: 0,
    Transparent: false,
    VerticalResolution: '',
    Width: 0
  },
  PdfFileBase64String: ''
}));
req.end();
const request = require('request');

const options = {
  method: 'POST',
  url: '{{baseUrl}}/api/pdf/pdftoimage',
  headers: {'content-type': 'application/json'},
  body: {
    Options: {
      Height: 0,
      HorizontalResolution: '',
      ImageFormat: '',
      JpegQuality: 0,
      PageNumber: 0,
      PngCompressionLevel: 0,
      Transparent: false,
      VerticalResolution: '',
      Width: 0
    },
    PdfFileBase64String: ''
  },
  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}}/api/pdf/pdftoimage');

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

req.type('json');
req.send({
  Options: {
    Height: 0,
    HorizontalResolution: '',
    ImageFormat: '',
    JpegQuality: 0,
    PageNumber: 0,
    PngCompressionLevel: 0,
    Transparent: false,
    VerticalResolution: '',
    Width: 0
  },
  PdfFileBase64String: ''
});

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}}/api/pdf/pdftoimage',
  headers: {'content-type': 'application/json'},
  data: {
    Options: {
      Height: 0,
      HorizontalResolution: '',
      ImageFormat: '',
      JpegQuality: 0,
      PageNumber: 0,
      PngCompressionLevel: 0,
      Transparent: false,
      VerticalResolution: '',
      Width: 0
    },
    PdfFileBase64String: ''
  }
};

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

const url = '{{baseUrl}}/api/pdf/pdftoimage';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"Options":{"Height":0,"HorizontalResolution":"","ImageFormat":"","JpegQuality":0,"PageNumber":0,"PngCompressionLevel":0,"Transparent":false,"VerticalResolution":"","Width":0},"PdfFileBase64String":""}'
};

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 = @{ @"Options": @{ @"Height": @0, @"HorizontalResolution": @"", @"ImageFormat": @"", @"JpegQuality": @0, @"PageNumber": @0, @"PngCompressionLevel": @0, @"Transparent": @NO, @"VerticalResolution": @"", @"Width": @0 },
                              @"PdfFileBase64String": @"" };

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

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/api/pdf/pdftoimage"]
                                                       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}}/api/pdf/pdftoimage" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n  \"Options\": {\n    \"Height\": 0,\n    \"HorizontalResolution\": \"\",\n    \"ImageFormat\": \"\",\n    \"JpegQuality\": 0,\n    \"PageNumber\": 0,\n    \"PngCompressionLevel\": 0,\n    \"Transparent\": false,\n    \"VerticalResolution\": \"\",\n    \"Width\": 0\n  },\n  \"PdfFileBase64String\": \"\"\n}" in

Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/api/pdf/pdftoimage",
  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([
    'Options' => [
        'Height' => 0,
        'HorizontalResolution' => '',
        'ImageFormat' => '',
        'JpegQuality' => 0,
        'PageNumber' => 0,
        'PngCompressionLevel' => 0,
        'Transparent' => null,
        'VerticalResolution' => '',
        'Width' => 0
    ],
    'PdfFileBase64String' => ''
  ]),
  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}}/api/pdf/pdftoimage', [
  'body' => '{
  "Options": {
    "Height": 0,
    "HorizontalResolution": "",
    "ImageFormat": "",
    "JpegQuality": 0,
    "PageNumber": 0,
    "PngCompressionLevel": 0,
    "Transparent": false,
    "VerticalResolution": "",
    "Width": 0
  },
  "PdfFileBase64String": ""
}',
  'headers' => [
    'content-type' => 'application/json',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/api/pdf/pdftoimage');
$request->setMethod(HTTP_METH_POST);

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

$request->setContentType('application/json');
$request->setBody(json_encode([
  'Options' => [
    'Height' => 0,
    'HorizontalResolution' => '',
    'ImageFormat' => '',
    'JpegQuality' => 0,
    'PageNumber' => 0,
    'PngCompressionLevel' => 0,
    'Transparent' => null,
    'VerticalResolution' => '',
    'Width' => 0
  ],
  'PdfFileBase64String' => ''
]));

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

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
append(json_encode([
  'Options' => [
    'Height' => 0,
    'HorizontalResolution' => '',
    'ImageFormat' => '',
    'JpegQuality' => 0,
    'PageNumber' => 0,
    'PngCompressionLevel' => 0,
    'Transparent' => null,
    'VerticalResolution' => '',
    'Width' => 0
  ],
  'PdfFileBase64String' => ''
]));
$request->setRequestUrl('{{baseUrl}}/api/pdf/pdftoimage');
$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}}/api/pdf/pdftoimage' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "Options": {
    "Height": 0,
    "HorizontalResolution": "",
    "ImageFormat": "",
    "JpegQuality": 0,
    "PageNumber": 0,
    "PngCompressionLevel": 0,
    "Transparent": false,
    "VerticalResolution": "",
    "Width": 0
  },
  "PdfFileBase64String": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/api/pdf/pdftoimage' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "Options": {
    "Height": 0,
    "HorizontalResolution": "",
    "ImageFormat": "",
    "JpegQuality": 0,
    "PageNumber": 0,
    "PngCompressionLevel": 0,
    "Transparent": false,
    "VerticalResolution": "",
    "Width": 0
  },
  "PdfFileBase64String": ""
}'
import http.client

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

payload = "{\n  \"Options\": {\n    \"Height\": 0,\n    \"HorizontalResolution\": \"\",\n    \"ImageFormat\": \"\",\n    \"JpegQuality\": 0,\n    \"PageNumber\": 0,\n    \"PngCompressionLevel\": 0,\n    \"Transparent\": false,\n    \"VerticalResolution\": \"\",\n    \"Width\": 0\n  },\n  \"PdfFileBase64String\": \"\"\n}"

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

conn.request("POST", "/baseUrl/api/pdf/pdftoimage", payload, headers)

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

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

url = "{{baseUrl}}/api/pdf/pdftoimage"

payload = {
    "Options": {
        "Height": 0,
        "HorizontalResolution": "",
        "ImageFormat": "",
        "JpegQuality": 0,
        "PageNumber": 0,
        "PngCompressionLevel": 0,
        "Transparent": False,
        "VerticalResolution": "",
        "Width": 0
    },
    "PdfFileBase64String": ""
}
headers = {"content-type": "application/json"}

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

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

url <- "{{baseUrl}}/api/pdf/pdftoimage"

payload <- "{\n  \"Options\": {\n    \"Height\": 0,\n    \"HorizontalResolution\": \"\",\n    \"ImageFormat\": \"\",\n    \"JpegQuality\": 0,\n    \"PageNumber\": 0,\n    \"PngCompressionLevel\": 0,\n    \"Transparent\": false,\n    \"VerticalResolution\": \"\",\n    \"Width\": 0\n  },\n  \"PdfFileBase64String\": \"\"\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}}/api/pdf/pdftoimage")

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  \"Options\": {\n    \"Height\": 0,\n    \"HorizontalResolution\": \"\",\n    \"ImageFormat\": \"\",\n    \"JpegQuality\": 0,\n    \"PageNumber\": 0,\n    \"PngCompressionLevel\": 0,\n    \"Transparent\": false,\n    \"VerticalResolution\": \"\",\n    \"Width\": 0\n  },\n  \"PdfFileBase64String\": \"\"\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/api/pdf/pdftoimage') do |req|
  req.body = "{\n  \"Options\": {\n    \"Height\": 0,\n    \"HorizontalResolution\": \"\",\n    \"ImageFormat\": \"\",\n    \"JpegQuality\": 0,\n    \"PageNumber\": 0,\n    \"PngCompressionLevel\": 0,\n    \"Transparent\": false,\n    \"VerticalResolution\": \"\",\n    \"Width\": 0\n  },\n  \"PdfFileBase64String\": \"\"\n}"
end

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

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/api/pdf/pdftoimage";

    let payload = json!({
        "Options": json!({
            "Height": 0,
            "HorizontalResolution": "",
            "ImageFormat": "",
            "JpegQuality": 0,
            "PageNumber": 0,
            "PngCompressionLevel": 0,
            "Transparent": false,
            "VerticalResolution": "",
            "Width": 0
        }),
        "PdfFileBase64String": ""
    });

    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}}/api/pdf/pdftoimage \
  --header 'content-type: application/json' \
  --data '{
  "Options": {
    "Height": 0,
    "HorizontalResolution": "",
    "ImageFormat": "",
    "JpegQuality": 0,
    "PageNumber": 0,
    "PngCompressionLevel": 0,
    "Transparent": false,
    "VerticalResolution": "",
    "Width": 0
  },
  "PdfFileBase64String": ""
}'
echo '{
  "Options": {
    "Height": 0,
    "HorizontalResolution": "",
    "ImageFormat": "",
    "JpegQuality": 0,
    "PageNumber": 0,
    "PngCompressionLevel": 0,
    "Transparent": false,
    "VerticalResolution": "",
    "Width": 0
  },
  "PdfFileBase64String": ""
}' |  \
  http POST {{baseUrl}}/api/pdf/pdftoimage \
  content-type:application/json
wget --quiet \
  --method POST \
  --header 'content-type: application/json' \
  --body-data '{\n  "Options": {\n    "Height": 0,\n    "HorizontalResolution": "",\n    "ImageFormat": "",\n    "JpegQuality": 0,\n    "PageNumber": 0,\n    "PngCompressionLevel": 0,\n    "Transparent": false,\n    "VerticalResolution": "",\n    "Width": 0\n  },\n  "PdfFileBase64String": ""\n}' \
  --output-document \
  - {{baseUrl}}/api/pdf/pdftoimage
import Foundation

let headers = ["content-type": "application/json"]
let parameters = [
  "Options": [
    "Height": 0,
    "HorizontalResolution": "",
    "ImageFormat": "",
    "JpegQuality": 0,
    "PageNumber": 0,
    "PngCompressionLevel": 0,
    "Transparent": false,
    "VerticalResolution": "",
    "Width": 0
  ],
  "PdfFileBase64String": ""
] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/api/pdf/pdftoimage")! 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()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "imageBase64String": "Image file base64 encoded. This is a complete data uri, including media type that can be used directly as src on a img-tag e.g.",
  "errorMessage": "If any error occurred, information will be provided here"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "description": "Always empty in the public response, used for internal error transport to logs",
  "statusCode": 400,
  "errorMessage": "The error message provided to client"
}
POST Generate pdf file from url using the excellent tool wkhtmltopdf.
{{baseUrl}}/api/pdf/wkhtmltopdf
BODY json

{
  "HtmlBase64String": "",
  "Resources": {},
  "Url": "",
  "WkHtmlToPdfArguments": {}
}
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/api/pdf/wkhtmltopdf");

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  \"HtmlBase64String\": \"\",\n  \"Resources\": {},\n  \"Url\": \"\",\n  \"WkHtmlToPdfArguments\": {}\n}");

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

(client/post "{{baseUrl}}/api/pdf/wkhtmltopdf" {:content-type :json
                                                                :form-params {:HtmlBase64String ""
                                                                              :Resources {}
                                                                              :Url ""
                                                                              :WkHtmlToPdfArguments {}}})
require "http/client"

url = "{{baseUrl}}/api/pdf/wkhtmltopdf"
headers = HTTP::Headers{
  "content-type" => "application/json"
}
reqBody = "{\n  \"HtmlBase64String\": \"\",\n  \"Resources\": {},\n  \"Url\": \"\",\n  \"WkHtmlToPdfArguments\": {}\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}}/api/pdf/wkhtmltopdf"),
    Content = new StringContent("{\n  \"HtmlBase64String\": \"\",\n  \"Resources\": {},\n  \"Url\": \"\",\n  \"WkHtmlToPdfArguments\": {}\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}}/api/pdf/wkhtmltopdf");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n  \"HtmlBase64String\": \"\",\n  \"Resources\": {},\n  \"Url\": \"\",\n  \"WkHtmlToPdfArguments\": {}\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main

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

func main() {

	url := "{{baseUrl}}/api/pdf/wkhtmltopdf"

	payload := strings.NewReader("{\n  \"HtmlBase64String\": \"\",\n  \"Resources\": {},\n  \"Url\": \"\",\n  \"WkHtmlToPdfArguments\": {}\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/api/pdf/wkhtmltopdf HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 90

{
  "HtmlBase64String": "",
  "Resources": {},
  "Url": "",
  "WkHtmlToPdfArguments": {}
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/api/pdf/wkhtmltopdf")
  .setHeader("content-type", "application/json")
  .setBody("{\n  \"HtmlBase64String\": \"\",\n  \"Resources\": {},\n  \"Url\": \"\",\n  \"WkHtmlToPdfArguments\": {}\n}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/api/pdf/wkhtmltopdf"))
    .header("content-type", "application/json")
    .method("POST", HttpRequest.BodyPublishers.ofString("{\n  \"HtmlBase64String\": \"\",\n  \"Resources\": {},\n  \"Url\": \"\",\n  \"WkHtmlToPdfArguments\": {}\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  \"HtmlBase64String\": \"\",\n  \"Resources\": {},\n  \"Url\": \"\",\n  \"WkHtmlToPdfArguments\": {}\n}");
Request request = new Request.Builder()
  .url("{{baseUrl}}/api/pdf/wkhtmltopdf")
  .post(body)
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/api/pdf/wkhtmltopdf")
  .header("content-type", "application/json")
  .body("{\n  \"HtmlBase64String\": \"\",\n  \"Resources\": {},\n  \"Url\": \"\",\n  \"WkHtmlToPdfArguments\": {}\n}")
  .asString();
const data = JSON.stringify({
  HtmlBase64String: '',
  Resources: {},
  Url: '',
  WkHtmlToPdfArguments: {}
});

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

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

xhr.open('POST', '{{baseUrl}}/api/pdf/wkhtmltopdf');
xhr.setRequestHeader('content-type', 'application/json');

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

const options = {
  method: 'POST',
  url: '{{baseUrl}}/api/pdf/wkhtmltopdf',
  headers: {'content-type': 'application/json'},
  data: {HtmlBase64String: '', Resources: {}, Url: '', WkHtmlToPdfArguments: {}}
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/api/pdf/wkhtmltopdf';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"HtmlBase64String":"","Resources":{},"Url":"","WkHtmlToPdfArguments":{}}'
};

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}}/api/pdf/wkhtmltopdf',
  method: 'POST',
  headers: {
    'content-type': 'application/json'
  },
  processData: false,
  data: '{\n  "HtmlBase64String": "",\n  "Resources": {},\n  "Url": "",\n  "WkHtmlToPdfArguments": {}\n}'
};

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

val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n  \"HtmlBase64String\": \"\",\n  \"Resources\": {},\n  \"Url\": \"\",\n  \"WkHtmlToPdfArguments\": {}\n}")
val request = Request.Builder()
  .url("{{baseUrl}}/api/pdf/wkhtmltopdf")
  .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/api/pdf/wkhtmltopdf',
  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({HtmlBase64String: '', Resources: {}, Url: '', WkHtmlToPdfArguments: {}}));
req.end();
const request = require('request');

const options = {
  method: 'POST',
  url: '{{baseUrl}}/api/pdf/wkhtmltopdf',
  headers: {'content-type': 'application/json'},
  body: {HtmlBase64String: '', Resources: {}, Url: '', WkHtmlToPdfArguments: {}},
  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}}/api/pdf/wkhtmltopdf');

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

req.type('json');
req.send({
  HtmlBase64String: '',
  Resources: {},
  Url: '',
  WkHtmlToPdfArguments: {}
});

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}}/api/pdf/wkhtmltopdf',
  headers: {'content-type': 'application/json'},
  data: {HtmlBase64String: '', Resources: {}, Url: '', WkHtmlToPdfArguments: {}}
};

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

const url = '{{baseUrl}}/api/pdf/wkhtmltopdf';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"HtmlBase64String":"","Resources":{},"Url":"","WkHtmlToPdfArguments":{}}'
};

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 = @{ @"HtmlBase64String": @"",
                              @"Resources": @{  },
                              @"Url": @"",
                              @"WkHtmlToPdfArguments": @{  } };

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

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/api/pdf/wkhtmltopdf"]
                                                       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}}/api/pdf/wkhtmltopdf" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n  \"HtmlBase64String\": \"\",\n  \"Resources\": {},\n  \"Url\": \"\",\n  \"WkHtmlToPdfArguments\": {}\n}" in

Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/api/pdf/wkhtmltopdf",
  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([
    'HtmlBase64String' => '',
    'Resources' => [
        
    ],
    'Url' => '',
    'WkHtmlToPdfArguments' => [
        
    ]
  ]),
  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}}/api/pdf/wkhtmltopdf', [
  'body' => '{
  "HtmlBase64String": "",
  "Resources": {},
  "Url": "",
  "WkHtmlToPdfArguments": {}
}',
  'headers' => [
    'content-type' => 'application/json',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/api/pdf/wkhtmltopdf');
$request->setMethod(HTTP_METH_POST);

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

$request->setContentType('application/json');
$request->setBody(json_encode([
  'HtmlBase64String' => '',
  'Resources' => [
    
  ],
  'Url' => '',
  'WkHtmlToPdfArguments' => [
    
  ]
]));

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

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
append(json_encode([
  'HtmlBase64String' => '',
  'Resources' => [
    
  ],
  'Url' => '',
  'WkHtmlToPdfArguments' => [
    
  ]
]));
$request->setRequestUrl('{{baseUrl}}/api/pdf/wkhtmltopdf');
$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}}/api/pdf/wkhtmltopdf' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "HtmlBase64String": "",
  "Resources": {},
  "Url": "",
  "WkHtmlToPdfArguments": {}
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/api/pdf/wkhtmltopdf' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "HtmlBase64String": "",
  "Resources": {},
  "Url": "",
  "WkHtmlToPdfArguments": {}
}'
import http.client

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

payload = "{\n  \"HtmlBase64String\": \"\",\n  \"Resources\": {},\n  \"Url\": \"\",\n  \"WkHtmlToPdfArguments\": {}\n}"

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

conn.request("POST", "/baseUrl/api/pdf/wkhtmltopdf", payload, headers)

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

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

url = "{{baseUrl}}/api/pdf/wkhtmltopdf"

payload = {
    "HtmlBase64String": "",
    "Resources": {},
    "Url": "",
    "WkHtmlToPdfArguments": {}
}
headers = {"content-type": "application/json"}

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

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

url <- "{{baseUrl}}/api/pdf/wkhtmltopdf"

payload <- "{\n  \"HtmlBase64String\": \"\",\n  \"Resources\": {},\n  \"Url\": \"\",\n  \"WkHtmlToPdfArguments\": {}\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}}/api/pdf/wkhtmltopdf")

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  \"HtmlBase64String\": \"\",\n  \"Resources\": {},\n  \"Url\": \"\",\n  \"WkHtmlToPdfArguments\": {}\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/api/pdf/wkhtmltopdf') do |req|
  req.body = "{\n  \"HtmlBase64String\": \"\",\n  \"Resources\": {},\n  \"Url\": \"\",\n  \"WkHtmlToPdfArguments\": {}\n}"
end

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

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/api/pdf/wkhtmltopdf";

    let payload = json!({
        "HtmlBase64String": "",
        "Resources": json!({}),
        "Url": "",
        "WkHtmlToPdfArguments": json!({})
    });

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

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

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

    dbg!(results);
}
curl --request POST \
  --url {{baseUrl}}/api/pdf/wkhtmltopdf \
  --header 'content-type: application/json' \
  --data '{
  "HtmlBase64String": "",
  "Resources": {},
  "Url": "",
  "WkHtmlToPdfArguments": {}
}'
echo '{
  "HtmlBase64String": "",
  "Resources": {},
  "Url": "",
  "WkHtmlToPdfArguments": {}
}' |  \
  http POST {{baseUrl}}/api/pdf/wkhtmltopdf \
  content-type:application/json
wget --quiet \
  --method POST \
  --header 'content-type: application/json' \
  --body-data '{\n  "HtmlBase64String": "",\n  "Resources": {},\n  "Url": "",\n  "WkHtmlToPdfArguments": {}\n}' \
  --output-document \
  - {{baseUrl}}/api/pdf/wkhtmltopdf
import Foundation

let headers = ["content-type": "application/json"]
let parameters = [
  "HtmlBase64String": "",
  "Resources": [],
  "Url": "",
  "WkHtmlToPdfArguments": []
] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/api/pdf/wkhtmltopdf")! 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()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "pdfFileBase64String": "Base64 encoded pdf file content",
  "errorMessage": "If any error occured, info will be provided here"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "description": "Always empty in the public response, used for internal error transport to logs",
  "statusCode": 400,
  "errorMessage": "The error message provided to client"
}
POST Write text on a page in a pdf document.
{{baseUrl}}/api/pdf/pdfwritestring
BODY json

{
  "FontFileBase64String": "",
  "Options": {
    "Font": {
      "Name": "",
      "Size": "",
      "Style": 0
    },
    "PageNumber": 0,
    "Text": "",
    "TextColor": {
      "B": 0,
      "G": 0,
      "R": 0
    },
    "XOrigin": 0,
    "XPosition": "",
    "YOrigin": 0,
    "YPosition": ""
  },
  "PdfFileBase64String": ""
}
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/api/pdf/pdfwritestring");

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  \"FontFileBase64String\": \"\",\n  \"Options\": {\n    \"Font\": {\n      \"Name\": \"\",\n      \"Size\": \"\",\n      \"Style\": 0\n    },\n    \"PageNumber\": 0,\n    \"Text\": \"\",\n    \"TextColor\": {\n      \"B\": 0,\n      \"G\": 0,\n      \"R\": 0\n    },\n    \"XOrigin\": 0,\n    \"XPosition\": \"\",\n    \"YOrigin\": 0,\n    \"YPosition\": \"\"\n  },\n  \"PdfFileBase64String\": \"\"\n}");

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

(client/post "{{baseUrl}}/api/pdf/pdfwritestring" {:content-type :json
                                                                   :form-params {:FontFileBase64String ""
                                                                                 :Options {:Font {:Name ""
                                                                                                  :Size ""
                                                                                                  :Style 0}
                                                                                           :PageNumber 0
                                                                                           :Text ""
                                                                                           :TextColor {:B 0
                                                                                                       :G 0
                                                                                                       :R 0}
                                                                                           :XOrigin 0
                                                                                           :XPosition ""
                                                                                           :YOrigin 0
                                                                                           :YPosition ""}
                                                                                 :PdfFileBase64String ""}})
require "http/client"

url = "{{baseUrl}}/api/pdf/pdfwritestring"
headers = HTTP::Headers{
  "content-type" => "application/json"
}
reqBody = "{\n  \"FontFileBase64String\": \"\",\n  \"Options\": {\n    \"Font\": {\n      \"Name\": \"\",\n      \"Size\": \"\",\n      \"Style\": 0\n    },\n    \"PageNumber\": 0,\n    \"Text\": \"\",\n    \"TextColor\": {\n      \"B\": 0,\n      \"G\": 0,\n      \"R\": 0\n    },\n    \"XOrigin\": 0,\n    \"XPosition\": \"\",\n    \"YOrigin\": 0,\n    \"YPosition\": \"\"\n  },\n  \"PdfFileBase64String\": \"\"\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}}/api/pdf/pdfwritestring"),
    Content = new StringContent("{\n  \"FontFileBase64String\": \"\",\n  \"Options\": {\n    \"Font\": {\n      \"Name\": \"\",\n      \"Size\": \"\",\n      \"Style\": 0\n    },\n    \"PageNumber\": 0,\n    \"Text\": \"\",\n    \"TextColor\": {\n      \"B\": 0,\n      \"G\": 0,\n      \"R\": 0\n    },\n    \"XOrigin\": 0,\n    \"XPosition\": \"\",\n    \"YOrigin\": 0,\n    \"YPosition\": \"\"\n  },\n  \"PdfFileBase64String\": \"\"\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}}/api/pdf/pdfwritestring");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n  \"FontFileBase64String\": \"\",\n  \"Options\": {\n    \"Font\": {\n      \"Name\": \"\",\n      \"Size\": \"\",\n      \"Style\": 0\n    },\n    \"PageNumber\": 0,\n    \"Text\": \"\",\n    \"TextColor\": {\n      \"B\": 0,\n      \"G\": 0,\n      \"R\": 0\n    },\n    \"XOrigin\": 0,\n    \"XPosition\": \"\",\n    \"YOrigin\": 0,\n    \"YPosition\": \"\"\n  },\n  \"PdfFileBase64String\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main

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

func main() {

	url := "{{baseUrl}}/api/pdf/pdfwritestring"

	payload := strings.NewReader("{\n  \"FontFileBase64String\": \"\",\n  \"Options\": {\n    \"Font\": {\n      \"Name\": \"\",\n      \"Size\": \"\",\n      \"Style\": 0\n    },\n    \"PageNumber\": 0,\n    \"Text\": \"\",\n    \"TextColor\": {\n      \"B\": 0,\n      \"G\": 0,\n      \"R\": 0\n    },\n    \"XOrigin\": 0,\n    \"XPosition\": \"\",\n    \"YOrigin\": 0,\n    \"YPosition\": \"\"\n  },\n  \"PdfFileBase64String\": \"\"\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/api/pdf/pdfwritestring HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 336

{
  "FontFileBase64String": "",
  "Options": {
    "Font": {
      "Name": "",
      "Size": "",
      "Style": 0
    },
    "PageNumber": 0,
    "Text": "",
    "TextColor": {
      "B": 0,
      "G": 0,
      "R": 0
    },
    "XOrigin": 0,
    "XPosition": "",
    "YOrigin": 0,
    "YPosition": ""
  },
  "PdfFileBase64String": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/api/pdf/pdfwritestring")
  .setHeader("content-type", "application/json")
  .setBody("{\n  \"FontFileBase64String\": \"\",\n  \"Options\": {\n    \"Font\": {\n      \"Name\": \"\",\n      \"Size\": \"\",\n      \"Style\": 0\n    },\n    \"PageNumber\": 0,\n    \"Text\": \"\",\n    \"TextColor\": {\n      \"B\": 0,\n      \"G\": 0,\n      \"R\": 0\n    },\n    \"XOrigin\": 0,\n    \"XPosition\": \"\",\n    \"YOrigin\": 0,\n    \"YPosition\": \"\"\n  },\n  \"PdfFileBase64String\": \"\"\n}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/api/pdf/pdfwritestring"))
    .header("content-type", "application/json")
    .method("POST", HttpRequest.BodyPublishers.ofString("{\n  \"FontFileBase64String\": \"\",\n  \"Options\": {\n    \"Font\": {\n      \"Name\": \"\",\n      \"Size\": \"\",\n      \"Style\": 0\n    },\n    \"PageNumber\": 0,\n    \"Text\": \"\",\n    \"TextColor\": {\n      \"B\": 0,\n      \"G\": 0,\n      \"R\": 0\n    },\n    \"XOrigin\": 0,\n    \"XPosition\": \"\",\n    \"YOrigin\": 0,\n    \"YPosition\": \"\"\n  },\n  \"PdfFileBase64String\": \"\"\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  \"FontFileBase64String\": \"\",\n  \"Options\": {\n    \"Font\": {\n      \"Name\": \"\",\n      \"Size\": \"\",\n      \"Style\": 0\n    },\n    \"PageNumber\": 0,\n    \"Text\": \"\",\n    \"TextColor\": {\n      \"B\": 0,\n      \"G\": 0,\n      \"R\": 0\n    },\n    \"XOrigin\": 0,\n    \"XPosition\": \"\",\n    \"YOrigin\": 0,\n    \"YPosition\": \"\"\n  },\n  \"PdfFileBase64String\": \"\"\n}");
Request request = new Request.Builder()
  .url("{{baseUrl}}/api/pdf/pdfwritestring")
  .post(body)
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/api/pdf/pdfwritestring")
  .header("content-type", "application/json")
  .body("{\n  \"FontFileBase64String\": \"\",\n  \"Options\": {\n    \"Font\": {\n      \"Name\": \"\",\n      \"Size\": \"\",\n      \"Style\": 0\n    },\n    \"PageNumber\": 0,\n    \"Text\": \"\",\n    \"TextColor\": {\n      \"B\": 0,\n      \"G\": 0,\n      \"R\": 0\n    },\n    \"XOrigin\": 0,\n    \"XPosition\": \"\",\n    \"YOrigin\": 0,\n    \"YPosition\": \"\"\n  },\n  \"PdfFileBase64String\": \"\"\n}")
  .asString();
const data = JSON.stringify({
  FontFileBase64String: '',
  Options: {
    Font: {
      Name: '',
      Size: '',
      Style: 0
    },
    PageNumber: 0,
    Text: '',
    TextColor: {
      B: 0,
      G: 0,
      R: 0
    },
    XOrigin: 0,
    XPosition: '',
    YOrigin: 0,
    YPosition: ''
  },
  PdfFileBase64String: ''
});

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

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

xhr.open('POST', '{{baseUrl}}/api/pdf/pdfwritestring');
xhr.setRequestHeader('content-type', 'application/json');

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

const options = {
  method: 'POST',
  url: '{{baseUrl}}/api/pdf/pdfwritestring',
  headers: {'content-type': 'application/json'},
  data: {
    FontFileBase64String: '',
    Options: {
      Font: {Name: '', Size: '', Style: 0},
      PageNumber: 0,
      Text: '',
      TextColor: {B: 0, G: 0, R: 0},
      XOrigin: 0,
      XPosition: '',
      YOrigin: 0,
      YPosition: ''
    },
    PdfFileBase64String: ''
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/api/pdf/pdfwritestring';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"FontFileBase64String":"","Options":{"Font":{"Name":"","Size":"","Style":0},"PageNumber":0,"Text":"","TextColor":{"B":0,"G":0,"R":0},"XOrigin":0,"XPosition":"","YOrigin":0,"YPosition":""},"PdfFileBase64String":""}'
};

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}}/api/pdf/pdfwritestring',
  method: 'POST',
  headers: {
    'content-type': 'application/json'
  },
  processData: false,
  data: '{\n  "FontFileBase64String": "",\n  "Options": {\n    "Font": {\n      "Name": "",\n      "Size": "",\n      "Style": 0\n    },\n    "PageNumber": 0,\n    "Text": "",\n    "TextColor": {\n      "B": 0,\n      "G": 0,\n      "R": 0\n    },\n    "XOrigin": 0,\n    "XPosition": "",\n    "YOrigin": 0,\n    "YPosition": ""\n  },\n  "PdfFileBase64String": ""\n}'
};

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

val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n  \"FontFileBase64String\": \"\",\n  \"Options\": {\n    \"Font\": {\n      \"Name\": \"\",\n      \"Size\": \"\",\n      \"Style\": 0\n    },\n    \"PageNumber\": 0,\n    \"Text\": \"\",\n    \"TextColor\": {\n      \"B\": 0,\n      \"G\": 0,\n      \"R\": 0\n    },\n    \"XOrigin\": 0,\n    \"XPosition\": \"\",\n    \"YOrigin\": 0,\n    \"YPosition\": \"\"\n  },\n  \"PdfFileBase64String\": \"\"\n}")
val request = Request.Builder()
  .url("{{baseUrl}}/api/pdf/pdfwritestring")
  .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/api/pdf/pdfwritestring',
  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({
  FontFileBase64String: '',
  Options: {
    Font: {Name: '', Size: '', Style: 0},
    PageNumber: 0,
    Text: '',
    TextColor: {B: 0, G: 0, R: 0},
    XOrigin: 0,
    XPosition: '',
    YOrigin: 0,
    YPosition: ''
  },
  PdfFileBase64String: ''
}));
req.end();
const request = require('request');

const options = {
  method: 'POST',
  url: '{{baseUrl}}/api/pdf/pdfwritestring',
  headers: {'content-type': 'application/json'},
  body: {
    FontFileBase64String: '',
    Options: {
      Font: {Name: '', Size: '', Style: 0},
      PageNumber: 0,
      Text: '',
      TextColor: {B: 0, G: 0, R: 0},
      XOrigin: 0,
      XPosition: '',
      YOrigin: 0,
      YPosition: ''
    },
    PdfFileBase64String: ''
  },
  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}}/api/pdf/pdfwritestring');

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

req.type('json');
req.send({
  FontFileBase64String: '',
  Options: {
    Font: {
      Name: '',
      Size: '',
      Style: 0
    },
    PageNumber: 0,
    Text: '',
    TextColor: {
      B: 0,
      G: 0,
      R: 0
    },
    XOrigin: 0,
    XPosition: '',
    YOrigin: 0,
    YPosition: ''
  },
  PdfFileBase64String: ''
});

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}}/api/pdf/pdfwritestring',
  headers: {'content-type': 'application/json'},
  data: {
    FontFileBase64String: '',
    Options: {
      Font: {Name: '', Size: '', Style: 0},
      PageNumber: 0,
      Text: '',
      TextColor: {B: 0, G: 0, R: 0},
      XOrigin: 0,
      XPosition: '',
      YOrigin: 0,
      YPosition: ''
    },
    PdfFileBase64String: ''
  }
};

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

const url = '{{baseUrl}}/api/pdf/pdfwritestring';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"FontFileBase64String":"","Options":{"Font":{"Name":"","Size":"","Style":0},"PageNumber":0,"Text":"","TextColor":{"B":0,"G":0,"R":0},"XOrigin":0,"XPosition":"","YOrigin":0,"YPosition":""},"PdfFileBase64String":""}'
};

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 = @{ @"FontFileBase64String": @"",
                              @"Options": @{ @"Font": @{ @"Name": @"", @"Size": @"", @"Style": @0 }, @"PageNumber": @0, @"Text": @"", @"TextColor": @{ @"B": @0, @"G": @0, @"R": @0 }, @"XOrigin": @0, @"XPosition": @"", @"YOrigin": @0, @"YPosition": @"" },
                              @"PdfFileBase64String": @"" };

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

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/api/pdf/pdfwritestring"]
                                                       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}}/api/pdf/pdfwritestring" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n  \"FontFileBase64String\": \"\",\n  \"Options\": {\n    \"Font\": {\n      \"Name\": \"\",\n      \"Size\": \"\",\n      \"Style\": 0\n    },\n    \"PageNumber\": 0,\n    \"Text\": \"\",\n    \"TextColor\": {\n      \"B\": 0,\n      \"G\": 0,\n      \"R\": 0\n    },\n    \"XOrigin\": 0,\n    \"XPosition\": \"\",\n    \"YOrigin\": 0,\n    \"YPosition\": \"\"\n  },\n  \"PdfFileBase64String\": \"\"\n}" in

Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/api/pdf/pdfwritestring",
  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([
    'FontFileBase64String' => '',
    'Options' => [
        'Font' => [
                'Name' => '',
                'Size' => '',
                'Style' => 0
        ],
        'PageNumber' => 0,
        'Text' => '',
        'TextColor' => [
                'B' => 0,
                'G' => 0,
                'R' => 0
        ],
        'XOrigin' => 0,
        'XPosition' => '',
        'YOrigin' => 0,
        'YPosition' => ''
    ],
    'PdfFileBase64String' => ''
  ]),
  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}}/api/pdf/pdfwritestring', [
  'body' => '{
  "FontFileBase64String": "",
  "Options": {
    "Font": {
      "Name": "",
      "Size": "",
      "Style": 0
    },
    "PageNumber": 0,
    "Text": "",
    "TextColor": {
      "B": 0,
      "G": 0,
      "R": 0
    },
    "XOrigin": 0,
    "XPosition": "",
    "YOrigin": 0,
    "YPosition": ""
  },
  "PdfFileBase64String": ""
}',
  'headers' => [
    'content-type' => 'application/json',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/api/pdf/pdfwritestring');
$request->setMethod(HTTP_METH_POST);

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

$request->setContentType('application/json');
$request->setBody(json_encode([
  'FontFileBase64String' => '',
  'Options' => [
    'Font' => [
        'Name' => '',
        'Size' => '',
        'Style' => 0
    ],
    'PageNumber' => 0,
    'Text' => '',
    'TextColor' => [
        'B' => 0,
        'G' => 0,
        'R' => 0
    ],
    'XOrigin' => 0,
    'XPosition' => '',
    'YOrigin' => 0,
    'YPosition' => ''
  ],
  'PdfFileBase64String' => ''
]));

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

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
append(json_encode([
  'FontFileBase64String' => '',
  'Options' => [
    'Font' => [
        'Name' => '',
        'Size' => '',
        'Style' => 0
    ],
    'PageNumber' => 0,
    'Text' => '',
    'TextColor' => [
        'B' => 0,
        'G' => 0,
        'R' => 0
    ],
    'XOrigin' => 0,
    'XPosition' => '',
    'YOrigin' => 0,
    'YPosition' => ''
  ],
  'PdfFileBase64String' => ''
]));
$request->setRequestUrl('{{baseUrl}}/api/pdf/pdfwritestring');
$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}}/api/pdf/pdfwritestring' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "FontFileBase64String": "",
  "Options": {
    "Font": {
      "Name": "",
      "Size": "",
      "Style": 0
    },
    "PageNumber": 0,
    "Text": "",
    "TextColor": {
      "B": 0,
      "G": 0,
      "R": 0
    },
    "XOrigin": 0,
    "XPosition": "",
    "YOrigin": 0,
    "YPosition": ""
  },
  "PdfFileBase64String": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/api/pdf/pdfwritestring' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "FontFileBase64String": "",
  "Options": {
    "Font": {
      "Name": "",
      "Size": "",
      "Style": 0
    },
    "PageNumber": 0,
    "Text": "",
    "TextColor": {
      "B": 0,
      "G": 0,
      "R": 0
    },
    "XOrigin": 0,
    "XPosition": "",
    "YOrigin": 0,
    "YPosition": ""
  },
  "PdfFileBase64String": ""
}'
import http.client

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

payload = "{\n  \"FontFileBase64String\": \"\",\n  \"Options\": {\n    \"Font\": {\n      \"Name\": \"\",\n      \"Size\": \"\",\n      \"Style\": 0\n    },\n    \"PageNumber\": 0,\n    \"Text\": \"\",\n    \"TextColor\": {\n      \"B\": 0,\n      \"G\": 0,\n      \"R\": 0\n    },\n    \"XOrigin\": 0,\n    \"XPosition\": \"\",\n    \"YOrigin\": 0,\n    \"YPosition\": \"\"\n  },\n  \"PdfFileBase64String\": \"\"\n}"

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

conn.request("POST", "/baseUrl/api/pdf/pdfwritestring", payload, headers)

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

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

url = "{{baseUrl}}/api/pdf/pdfwritestring"

payload = {
    "FontFileBase64String": "",
    "Options": {
        "Font": {
            "Name": "",
            "Size": "",
            "Style": 0
        },
        "PageNumber": 0,
        "Text": "",
        "TextColor": {
            "B": 0,
            "G": 0,
            "R": 0
        },
        "XOrigin": 0,
        "XPosition": "",
        "YOrigin": 0,
        "YPosition": ""
    },
    "PdfFileBase64String": ""
}
headers = {"content-type": "application/json"}

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

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

url <- "{{baseUrl}}/api/pdf/pdfwritestring"

payload <- "{\n  \"FontFileBase64String\": \"\",\n  \"Options\": {\n    \"Font\": {\n      \"Name\": \"\",\n      \"Size\": \"\",\n      \"Style\": 0\n    },\n    \"PageNumber\": 0,\n    \"Text\": \"\",\n    \"TextColor\": {\n      \"B\": 0,\n      \"G\": 0,\n      \"R\": 0\n    },\n    \"XOrigin\": 0,\n    \"XPosition\": \"\",\n    \"YOrigin\": 0,\n    \"YPosition\": \"\"\n  },\n  \"PdfFileBase64String\": \"\"\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}}/api/pdf/pdfwritestring")

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  \"FontFileBase64String\": \"\",\n  \"Options\": {\n    \"Font\": {\n      \"Name\": \"\",\n      \"Size\": \"\",\n      \"Style\": 0\n    },\n    \"PageNumber\": 0,\n    \"Text\": \"\",\n    \"TextColor\": {\n      \"B\": 0,\n      \"G\": 0,\n      \"R\": 0\n    },\n    \"XOrigin\": 0,\n    \"XPosition\": \"\",\n    \"YOrigin\": 0,\n    \"YPosition\": \"\"\n  },\n  \"PdfFileBase64String\": \"\"\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/api/pdf/pdfwritestring') do |req|
  req.body = "{\n  \"FontFileBase64String\": \"\",\n  \"Options\": {\n    \"Font\": {\n      \"Name\": \"\",\n      \"Size\": \"\",\n      \"Style\": 0\n    },\n    \"PageNumber\": 0,\n    \"Text\": \"\",\n    \"TextColor\": {\n      \"B\": 0,\n      \"G\": 0,\n      \"R\": 0\n    },\n    \"XOrigin\": 0,\n    \"XPosition\": \"\",\n    \"YOrigin\": 0,\n    \"YPosition\": \"\"\n  },\n  \"PdfFileBase64String\": \"\"\n}"
end

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

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/api/pdf/pdfwritestring";

    let payload = json!({
        "FontFileBase64String": "",
        "Options": json!({
            "Font": json!({
                "Name": "",
                "Size": "",
                "Style": 0
            }),
            "PageNumber": 0,
            "Text": "",
            "TextColor": json!({
                "B": 0,
                "G": 0,
                "R": 0
            }),
            "XOrigin": 0,
            "XPosition": "",
            "YOrigin": 0,
            "YPosition": ""
        }),
        "PdfFileBase64String": ""
    });

    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}}/api/pdf/pdfwritestring \
  --header 'content-type: application/json' \
  --data '{
  "FontFileBase64String": "",
  "Options": {
    "Font": {
      "Name": "",
      "Size": "",
      "Style": 0
    },
    "PageNumber": 0,
    "Text": "",
    "TextColor": {
      "B": 0,
      "G": 0,
      "R": 0
    },
    "XOrigin": 0,
    "XPosition": "",
    "YOrigin": 0,
    "YPosition": ""
  },
  "PdfFileBase64String": ""
}'
echo '{
  "FontFileBase64String": "",
  "Options": {
    "Font": {
      "Name": "",
      "Size": "",
      "Style": 0
    },
    "PageNumber": 0,
    "Text": "",
    "TextColor": {
      "B": 0,
      "G": 0,
      "R": 0
    },
    "XOrigin": 0,
    "XPosition": "",
    "YOrigin": 0,
    "YPosition": ""
  },
  "PdfFileBase64String": ""
}' |  \
  http POST {{baseUrl}}/api/pdf/pdfwritestring \
  content-type:application/json
wget --quiet \
  --method POST \
  --header 'content-type: application/json' \
  --body-data '{\n  "FontFileBase64String": "",\n  "Options": {\n    "Font": {\n      "Name": "",\n      "Size": "",\n      "Style": 0\n    },\n    "PageNumber": 0,\n    "Text": "",\n    "TextColor": {\n      "B": 0,\n      "G": 0,\n      "R": 0\n    },\n    "XOrigin": 0,\n    "XPosition": "",\n    "YOrigin": 0,\n    "YPosition": ""\n  },\n  "PdfFileBase64String": ""\n}' \
  --output-document \
  - {{baseUrl}}/api/pdf/pdfwritestring
import Foundation

let headers = ["content-type": "application/json"]
let parameters = [
  "FontFileBase64String": "",
  "Options": [
    "Font": [
      "Name": "",
      "Size": "",
      "Style": 0
    ],
    "PageNumber": 0,
    "Text": "",
    "TextColor": [
      "B": 0,
      "G": 0,
      "R": 0
    ],
    "XOrigin": 0,
    "XPosition": "",
    "YOrigin": 0,
    "YPosition": ""
  ],
  "PdfFileBase64String": ""
] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/api/pdf/pdfwritestring")! 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()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "pdfFileBase64String": "Base64 encoded pdf file content",
  "errorMessage": "If any error occured, info will be provided here"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "description": "Always empty in the public response, used for internal error transport to logs",
  "statusCode": 400,
  "errorMessage": "The error message provided to client"
}