POST Consent notification (POST)
{{baseUrl}}/v0.5/consents/hiu/on-notify
HEADERS

Authorization
BODY json

{
  "acknowledgement": [
    {
      "consentId": "",
      "status": ""
    }
  ],
  "error": {
    "code": 0,
    "message": ""
  },
  "requestId": "",
  "resp": {
    "requestId": ""
  },
  "timestamp": ""
}
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v0.5/consents/hiu/on-notify");

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

curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\n}");

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

(client/post "{{baseUrl}}/v0.5/consents/hiu/on-notify" {:headers {:authorization ""}
                                                                        :content-type :json
                                                                        :form-params {:requestId "5f7a535d-a3fd-416b-b069-c97d021fbacd"}})
require "http/client"

url = "{{baseUrl}}/v0.5/consents/hiu/on-notify"
headers = HTTP::Headers{
  "authorization" => ""
  "content-type" => "application/json"
}
reqBody = "{\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\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}}/v0.5/consents/hiu/on-notify"),
    Headers =
    {
        { "authorization", "" },
    },
    Content = new StringContent("{\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\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}}/v0.5/consents/hiu/on-notify");
var request = new RestRequest("", Method.Post);
request.AddHeader("authorization", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main

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

func main() {

	url := "{{baseUrl}}/v0.5/consents/hiu/on-notify"

	payload := strings.NewReader("{\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\n}")

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

	req.Header.Add("authorization", "")
	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/v0.5/consents/hiu/on-notify HTTP/1.1
Authorization: 
Content-Type: application/json
Host: example.com
Content-Length: 57

{
  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v0.5/consents/hiu/on-notify")
  .setHeader("authorization", "")
  .setHeader("content-type", "application/json")
  .setBody("{\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\n}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/v0.5/consents/hiu/on-notify"))
    .header("authorization", "")
    .header("content-type", "application/json")
    .method("POST", HttpRequest.BodyPublishers.ofString("{\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\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  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\n}");
Request request = new Request.Builder()
  .url("{{baseUrl}}/v0.5/consents/hiu/on-notify")
  .post(body)
  .addHeader("authorization", "")
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v0.5/consents/hiu/on-notify")
  .header("authorization", "")
  .header("content-type", "application/json")
  .body("{\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\n}")
  .asString();
const data = JSON.stringify({
  requestId: '5f7a535d-a3fd-416b-b069-c97d021fbacd'
});

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

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

xhr.open('POST', '{{baseUrl}}/v0.5/consents/hiu/on-notify');
xhr.setRequestHeader('authorization', '');
xhr.setRequestHeader('content-type', 'application/json');

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

const options = {
  method: 'POST',
  url: '{{baseUrl}}/v0.5/consents/hiu/on-notify',
  headers: {authorization: '', 'content-type': 'application/json'},
  data: {requestId: '5f7a535d-a3fd-416b-b069-c97d021fbacd'}
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/v0.5/consents/hiu/on-notify';
const options = {
  method: 'POST',
  headers: {authorization: '', 'content-type': 'application/json'},
  body: '{"requestId":"5f7a535d-a3fd-416b-b069-c97d021fbacd"}'
};

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}}/v0.5/consents/hiu/on-notify',
  method: 'POST',
  headers: {
    authorization: '',
    'content-type': 'application/json'
  },
  processData: false,
  data: '{\n  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"\n}'
};

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

val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\n}")
val request = Request.Builder()
  .url("{{baseUrl}}/v0.5/consents/hiu/on-notify")
  .post(body)
  .addHeader("authorization", "")
  .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/v0.5/consents/hiu/on-notify',
  headers: {
    authorization: '',
    '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({requestId: '5f7a535d-a3fd-416b-b069-c97d021fbacd'}));
req.end();
const request = require('request');

const options = {
  method: 'POST',
  url: '{{baseUrl}}/v0.5/consents/hiu/on-notify',
  headers: {authorization: '', 'content-type': 'application/json'},
  body: {requestId: '5f7a535d-a3fd-416b-b069-c97d021fbacd'},
  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}}/v0.5/consents/hiu/on-notify');

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

req.type('json');
req.send({
  requestId: '5f7a535d-a3fd-416b-b069-c97d021fbacd'
});

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}}/v0.5/consents/hiu/on-notify',
  headers: {authorization: '', 'content-type': 'application/json'},
  data: {requestId: '5f7a535d-a3fd-416b-b069-c97d021fbacd'}
};

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

const url = '{{baseUrl}}/v0.5/consents/hiu/on-notify';
const options = {
  method: 'POST',
  headers: {authorization: '', 'content-type': 'application/json'},
  body: '{"requestId":"5f7a535d-a3fd-416b-b069-c97d021fbacd"}'
};

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

NSDictionary *headers = @{ @"authorization": @"",
                           @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"requestId": @"5f7a535d-a3fd-416b-b069-c97d021fbacd" };

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

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v0.5/consents/hiu/on-notify"]
                                                       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}}/v0.5/consents/hiu/on-notify" in
let headers = Header.add_list (Header.init ()) [
  ("authorization", "");
  ("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\n}" in

Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/v0.5/consents/hiu/on-notify",
  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([
    'requestId' => '5f7a535d-a3fd-416b-b069-c97d021fbacd'
  ]),
  CURLOPT_HTTPHEADER => [
    "authorization: ",
    "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}}/v0.5/consents/hiu/on-notify', [
  'body' => '{
  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"
}',
  'headers' => [
    'authorization' => '',
    'content-type' => 'application/json',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/v0.5/consents/hiu/on-notify');
$request->setMethod(HTTP_METH_POST);

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

$request->setContentType('application/json');
$request->setBody(json_encode([
  'requestId' => '5f7a535d-a3fd-416b-b069-c97d021fbacd'
]));

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

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
append(json_encode([
  'requestId' => '5f7a535d-a3fd-416b-b069-c97d021fbacd'
]));
$request->setRequestUrl('{{baseUrl}}/v0.5/consents/hiu/on-notify');
$request->setRequestMethod('POST');
$request->setBody($body);

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

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

echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v0.5/consents/hiu/on-notify' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"
}'
$headers=@{}
$headers.Add("authorization", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v0.5/consents/hiu/on-notify' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"
}'
import http.client

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

payload = "{\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\n}"

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

conn.request("POST", "/baseUrl/v0.5/consents/hiu/on-notify", payload, headers)

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

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

url = "{{baseUrl}}/v0.5/consents/hiu/on-notify"

payload = { "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd" }
headers = {
    "authorization": "",
    "content-type": "application/json"
}

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

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

url <- "{{baseUrl}}/v0.5/consents/hiu/on-notify"

payload <- "{\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\n}"

encode <- "json"

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

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

url = URI("{{baseUrl}}/v0.5/consents/hiu/on-notify")

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

request = Net::HTTP::Post.new(url)
request["authorization"] = ''
request["content-type"] = 'application/json'
request.body = "{\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\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/v0.5/consents/hiu/on-notify') do |req|
  req.headers['authorization'] = ''
  req.body = "{\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\n}"
end

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

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/v0.5/consents/hiu/on-notify";

    let payload = json!({"requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"});

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

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

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

    dbg!(results);
}
curl --request POST \
  --url {{baseUrl}}/v0.5/consents/hiu/on-notify \
  --header 'authorization: ' \
  --header 'content-type: application/json' \
  --data '{
  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"
}'
echo '{
  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"
}' |  \
  http POST {{baseUrl}}/v0.5/consents/hiu/on-notify \
  authorization:'' \
  content-type:application/json
wget --quiet \
  --method POST \
  --header 'authorization: ' \
  --header 'content-type: application/json' \
  --body-data '{\n  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"\n}' \
  --output-document \
  - {{baseUrl}}/v0.5/consents/hiu/on-notify
import Foundation

let headers = [
  "authorization": "",
  "content-type": "application/json"
]
let parameters = ["requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v0.5/consents/hiu/on-notify")! 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()
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v0.5/consents/hip/on-notify");

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

curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n  \"acknowledgement\": {\n    \"consentId\": \"\"\n  },\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\n}");

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

(client/post "{{baseUrl}}/v0.5/consents/hip/on-notify" {:headers {:authorization ""}
                                                                        :content-type :json
                                                                        :form-params {:acknowledgement {:consentId ""}
                                                                                      :requestId "5f7a535d-a3fd-416b-b069-c97d021fbacd"}})
require "http/client"

url = "{{baseUrl}}/v0.5/consents/hip/on-notify"
headers = HTTP::Headers{
  "authorization" => ""
  "content-type" => "application/json"
}
reqBody = "{\n  \"acknowledgement\": {\n    \"consentId\": \"\"\n  },\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\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}}/v0.5/consents/hip/on-notify"),
    Headers =
    {
        { "authorization", "" },
    },
    Content = new StringContent("{\n  \"acknowledgement\": {\n    \"consentId\": \"\"\n  },\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\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}}/v0.5/consents/hip/on-notify");
var request = new RestRequest("", Method.Post);
request.AddHeader("authorization", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n  \"acknowledgement\": {\n    \"consentId\": \"\"\n  },\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main

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

func main() {

	url := "{{baseUrl}}/v0.5/consents/hip/on-notify"

	payload := strings.NewReader("{\n  \"acknowledgement\": {\n    \"consentId\": \"\"\n  },\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\n}")

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

	req.Header.Add("authorization", "")
	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/v0.5/consents/hip/on-notify HTTP/1.1
Authorization: 
Content-Type: application/json
Host: example.com
Content-Length: 126

{
  "acknowledgement": {
    "consentId": ""
  },
  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v0.5/consents/hip/on-notify")
  .setHeader("authorization", "")
  .setHeader("content-type", "application/json")
  .setBody("{\n  \"acknowledgement\": {\n    \"consentId\": \"\"\n  },\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\n}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/v0.5/consents/hip/on-notify"))
    .header("authorization", "")
    .header("content-type", "application/json")
    .method("POST", HttpRequest.BodyPublishers.ofString("{\n  \"acknowledgement\": {\n    \"consentId\": \"\"\n  },\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\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  \"acknowledgement\": {\n    \"consentId\": \"\"\n  },\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\n}");
Request request = new Request.Builder()
  .url("{{baseUrl}}/v0.5/consents/hip/on-notify")
  .post(body)
  .addHeader("authorization", "")
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v0.5/consents/hip/on-notify")
  .header("authorization", "")
  .header("content-type", "application/json")
  .body("{\n  \"acknowledgement\": {\n    \"consentId\": \"\"\n  },\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\n}")
  .asString();
const data = JSON.stringify({
  acknowledgement: {
    consentId: ''
  },
  requestId: '5f7a535d-a3fd-416b-b069-c97d021fbacd'
});

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

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

xhr.open('POST', '{{baseUrl}}/v0.5/consents/hip/on-notify');
xhr.setRequestHeader('authorization', '');
xhr.setRequestHeader('content-type', 'application/json');

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

const options = {
  method: 'POST',
  url: '{{baseUrl}}/v0.5/consents/hip/on-notify',
  headers: {authorization: '', 'content-type': 'application/json'},
  data: {
    acknowledgement: {consentId: ''},
    requestId: '5f7a535d-a3fd-416b-b069-c97d021fbacd'
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/v0.5/consents/hip/on-notify';
const options = {
  method: 'POST',
  headers: {authorization: '', 'content-type': 'application/json'},
  body: '{"acknowledgement":{"consentId":""},"requestId":"5f7a535d-a3fd-416b-b069-c97d021fbacd"}'
};

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}}/v0.5/consents/hip/on-notify',
  method: 'POST',
  headers: {
    authorization: '',
    'content-type': 'application/json'
  },
  processData: false,
  data: '{\n  "acknowledgement": {\n    "consentId": ""\n  },\n  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"\n}'
};

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

val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n  \"acknowledgement\": {\n    \"consentId\": \"\"\n  },\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\n}")
val request = Request.Builder()
  .url("{{baseUrl}}/v0.5/consents/hip/on-notify")
  .post(body)
  .addHeader("authorization", "")
  .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/v0.5/consents/hip/on-notify',
  headers: {
    authorization: '',
    '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({
  acknowledgement: {consentId: ''},
  requestId: '5f7a535d-a3fd-416b-b069-c97d021fbacd'
}));
req.end();
const request = require('request');

const options = {
  method: 'POST',
  url: '{{baseUrl}}/v0.5/consents/hip/on-notify',
  headers: {authorization: '', 'content-type': 'application/json'},
  body: {
    acknowledgement: {consentId: ''},
    requestId: '5f7a535d-a3fd-416b-b069-c97d021fbacd'
  },
  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}}/v0.5/consents/hip/on-notify');

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

req.type('json');
req.send({
  acknowledgement: {
    consentId: ''
  },
  requestId: '5f7a535d-a3fd-416b-b069-c97d021fbacd'
});

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}}/v0.5/consents/hip/on-notify',
  headers: {authorization: '', 'content-type': 'application/json'},
  data: {
    acknowledgement: {consentId: ''},
    requestId: '5f7a535d-a3fd-416b-b069-c97d021fbacd'
  }
};

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

const url = '{{baseUrl}}/v0.5/consents/hip/on-notify';
const options = {
  method: 'POST',
  headers: {authorization: '', 'content-type': 'application/json'},
  body: '{"acknowledgement":{"consentId":""},"requestId":"5f7a535d-a3fd-416b-b069-c97d021fbacd"}'
};

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

NSDictionary *headers = @{ @"authorization": @"",
                           @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"acknowledgement": @{ @"consentId": @"" },
                              @"requestId": @"5f7a535d-a3fd-416b-b069-c97d021fbacd" };

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

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v0.5/consents/hip/on-notify"]
                                                       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}}/v0.5/consents/hip/on-notify" in
let headers = Header.add_list (Header.init ()) [
  ("authorization", "");
  ("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n  \"acknowledgement\": {\n    \"consentId\": \"\"\n  },\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\n}" in

Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/v0.5/consents/hip/on-notify",
  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([
    'acknowledgement' => [
        'consentId' => ''
    ],
    'requestId' => '5f7a535d-a3fd-416b-b069-c97d021fbacd'
  ]),
  CURLOPT_HTTPHEADER => [
    "authorization: ",
    "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}}/v0.5/consents/hip/on-notify', [
  'body' => '{
  "acknowledgement": {
    "consentId": ""
  },
  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"
}',
  'headers' => [
    'authorization' => '',
    'content-type' => 'application/json',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/v0.5/consents/hip/on-notify');
$request->setMethod(HTTP_METH_POST);

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

$request->setContentType('application/json');
$request->setBody(json_encode([
  'acknowledgement' => [
    'consentId' => ''
  ],
  'requestId' => '5f7a535d-a3fd-416b-b069-c97d021fbacd'
]));

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

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
append(json_encode([
  'acknowledgement' => [
    'consentId' => ''
  ],
  'requestId' => '5f7a535d-a3fd-416b-b069-c97d021fbacd'
]));
$request->setRequestUrl('{{baseUrl}}/v0.5/consents/hip/on-notify');
$request->setRequestMethod('POST');
$request->setBody($body);

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

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

echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v0.5/consents/hip/on-notify' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "acknowledgement": {
    "consentId": ""
  },
  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"
}'
$headers=@{}
$headers.Add("authorization", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v0.5/consents/hip/on-notify' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "acknowledgement": {
    "consentId": ""
  },
  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"
}'
import http.client

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

payload = "{\n  \"acknowledgement\": {\n    \"consentId\": \"\"\n  },\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\n}"

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

conn.request("POST", "/baseUrl/v0.5/consents/hip/on-notify", payload, headers)

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

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

url = "{{baseUrl}}/v0.5/consents/hip/on-notify"

payload = {
    "acknowledgement": { "consentId": "" },
    "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"
}
headers = {
    "authorization": "",
    "content-type": "application/json"
}

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

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

url <- "{{baseUrl}}/v0.5/consents/hip/on-notify"

payload <- "{\n  \"acknowledgement\": {\n    \"consentId\": \"\"\n  },\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\n}"

encode <- "json"

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

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

url = URI("{{baseUrl}}/v0.5/consents/hip/on-notify")

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

request = Net::HTTP::Post.new(url)
request["authorization"] = ''
request["content-type"] = 'application/json'
request.body = "{\n  \"acknowledgement\": {\n    \"consentId\": \"\"\n  },\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\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/v0.5/consents/hip/on-notify') do |req|
  req.headers['authorization'] = ''
  req.body = "{\n  \"acknowledgement\": {\n    \"consentId\": \"\"\n  },\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\n}"
end

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

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/v0.5/consents/hip/on-notify";

    let payload = json!({
        "acknowledgement": json!({"consentId": ""}),
        "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"
    });

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

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

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

    dbg!(results);
}
curl --request POST \
  --url {{baseUrl}}/v0.5/consents/hip/on-notify \
  --header 'authorization: ' \
  --header 'content-type: application/json' \
  --data '{
  "acknowledgement": {
    "consentId": ""
  },
  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"
}'
echo '{
  "acknowledgement": {
    "consentId": ""
  },
  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"
}' |  \
  http POST {{baseUrl}}/v0.5/consents/hip/on-notify \
  authorization:'' \
  content-type:application/json
wget --quiet \
  --method POST \
  --header 'authorization: ' \
  --header 'content-type: application/json' \
  --body-data '{\n  "acknowledgement": {\n    "consentId": ""\n  },\n  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"\n}' \
  --output-document \
  - {{baseUrl}}/v0.5/consents/hip/on-notify
import Foundation

let headers = [
  "authorization": "",
  "content-type": "application/json"
]
let parameters = [
  "acknowledgement": ["consentId": ""],
  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"
] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v0.5/consents/hip/on-notify")! 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()
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v0.5/consent-requests/init");

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

curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n  \"requestId\": \"499a5a4a-7dda-4f20-9b67-e24589627061\"\n}");

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

(client/post "{{baseUrl}}/v0.5/consent-requests/init" {:headers {:authorization ""}
                                                                       :content-type :json
                                                                       :form-params {:requestId "499a5a4a-7dda-4f20-9b67-e24589627061"}})
require "http/client"

url = "{{baseUrl}}/v0.5/consent-requests/init"
headers = HTTP::Headers{
  "authorization" => ""
  "content-type" => "application/json"
}
reqBody = "{\n  \"requestId\": \"499a5a4a-7dda-4f20-9b67-e24589627061\"\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}}/v0.5/consent-requests/init"),
    Headers =
    {
        { "authorization", "" },
    },
    Content = new StringContent("{\n  \"requestId\": \"499a5a4a-7dda-4f20-9b67-e24589627061\"\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}}/v0.5/consent-requests/init");
var request = new RestRequest("", Method.Post);
request.AddHeader("authorization", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n  \"requestId\": \"499a5a4a-7dda-4f20-9b67-e24589627061\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main

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

func main() {

	url := "{{baseUrl}}/v0.5/consent-requests/init"

	payload := strings.NewReader("{\n  \"requestId\": \"499a5a4a-7dda-4f20-9b67-e24589627061\"\n}")

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

	req.Header.Add("authorization", "")
	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/v0.5/consent-requests/init HTTP/1.1
Authorization: 
Content-Type: application/json
Host: example.com
Content-Length: 57

{
  "requestId": "499a5a4a-7dda-4f20-9b67-e24589627061"
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v0.5/consent-requests/init")
  .setHeader("authorization", "")
  .setHeader("content-type", "application/json")
  .setBody("{\n  \"requestId\": \"499a5a4a-7dda-4f20-9b67-e24589627061\"\n}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/v0.5/consent-requests/init"))
    .header("authorization", "")
    .header("content-type", "application/json")
    .method("POST", HttpRequest.BodyPublishers.ofString("{\n  \"requestId\": \"499a5a4a-7dda-4f20-9b67-e24589627061\"\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  \"requestId\": \"499a5a4a-7dda-4f20-9b67-e24589627061\"\n}");
Request request = new Request.Builder()
  .url("{{baseUrl}}/v0.5/consent-requests/init")
  .post(body)
  .addHeader("authorization", "")
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v0.5/consent-requests/init")
  .header("authorization", "")
  .header("content-type", "application/json")
  .body("{\n  \"requestId\": \"499a5a4a-7dda-4f20-9b67-e24589627061\"\n}")
  .asString();
const data = JSON.stringify({
  requestId: '499a5a4a-7dda-4f20-9b67-e24589627061'
});

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

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

xhr.open('POST', '{{baseUrl}}/v0.5/consent-requests/init');
xhr.setRequestHeader('authorization', '');
xhr.setRequestHeader('content-type', 'application/json');

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

const options = {
  method: 'POST',
  url: '{{baseUrl}}/v0.5/consent-requests/init',
  headers: {authorization: '', 'content-type': 'application/json'},
  data: {requestId: '499a5a4a-7dda-4f20-9b67-e24589627061'}
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/v0.5/consent-requests/init';
const options = {
  method: 'POST',
  headers: {authorization: '', 'content-type': 'application/json'},
  body: '{"requestId":"499a5a4a-7dda-4f20-9b67-e24589627061"}'
};

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}}/v0.5/consent-requests/init',
  method: 'POST',
  headers: {
    authorization: '',
    'content-type': 'application/json'
  },
  processData: false,
  data: '{\n  "requestId": "499a5a4a-7dda-4f20-9b67-e24589627061"\n}'
};

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

val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n  \"requestId\": \"499a5a4a-7dda-4f20-9b67-e24589627061\"\n}")
val request = Request.Builder()
  .url("{{baseUrl}}/v0.5/consent-requests/init")
  .post(body)
  .addHeader("authorization", "")
  .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/v0.5/consent-requests/init',
  headers: {
    authorization: '',
    '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({requestId: '499a5a4a-7dda-4f20-9b67-e24589627061'}));
req.end();
const request = require('request');

const options = {
  method: 'POST',
  url: '{{baseUrl}}/v0.5/consent-requests/init',
  headers: {authorization: '', 'content-type': 'application/json'},
  body: {requestId: '499a5a4a-7dda-4f20-9b67-e24589627061'},
  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}}/v0.5/consent-requests/init');

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

req.type('json');
req.send({
  requestId: '499a5a4a-7dda-4f20-9b67-e24589627061'
});

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}}/v0.5/consent-requests/init',
  headers: {authorization: '', 'content-type': 'application/json'},
  data: {requestId: '499a5a4a-7dda-4f20-9b67-e24589627061'}
};

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

const url = '{{baseUrl}}/v0.5/consent-requests/init';
const options = {
  method: 'POST',
  headers: {authorization: '', 'content-type': 'application/json'},
  body: '{"requestId":"499a5a4a-7dda-4f20-9b67-e24589627061"}'
};

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

NSDictionary *headers = @{ @"authorization": @"",
                           @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"requestId": @"499a5a4a-7dda-4f20-9b67-e24589627061" };

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

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v0.5/consent-requests/init"]
                                                       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}}/v0.5/consent-requests/init" in
let headers = Header.add_list (Header.init ()) [
  ("authorization", "");
  ("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n  \"requestId\": \"499a5a4a-7dda-4f20-9b67-e24589627061\"\n}" in

Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/v0.5/consent-requests/init",
  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([
    'requestId' => '499a5a4a-7dda-4f20-9b67-e24589627061'
  ]),
  CURLOPT_HTTPHEADER => [
    "authorization: ",
    "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}}/v0.5/consent-requests/init', [
  'body' => '{
  "requestId": "499a5a4a-7dda-4f20-9b67-e24589627061"
}',
  'headers' => [
    'authorization' => '',
    'content-type' => 'application/json',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/v0.5/consent-requests/init');
$request->setMethod(HTTP_METH_POST);

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

$request->setContentType('application/json');
$request->setBody(json_encode([
  'requestId' => '499a5a4a-7dda-4f20-9b67-e24589627061'
]));

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

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
append(json_encode([
  'requestId' => '499a5a4a-7dda-4f20-9b67-e24589627061'
]));
$request->setRequestUrl('{{baseUrl}}/v0.5/consent-requests/init');
$request->setRequestMethod('POST');
$request->setBody($body);

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

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

echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v0.5/consent-requests/init' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "requestId": "499a5a4a-7dda-4f20-9b67-e24589627061"
}'
$headers=@{}
$headers.Add("authorization", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v0.5/consent-requests/init' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "requestId": "499a5a4a-7dda-4f20-9b67-e24589627061"
}'
import http.client

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

payload = "{\n  \"requestId\": \"499a5a4a-7dda-4f20-9b67-e24589627061\"\n}"

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

conn.request("POST", "/baseUrl/v0.5/consent-requests/init", payload, headers)

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

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

url = "{{baseUrl}}/v0.5/consent-requests/init"

payload = { "requestId": "499a5a4a-7dda-4f20-9b67-e24589627061" }
headers = {
    "authorization": "",
    "content-type": "application/json"
}

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

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

url <- "{{baseUrl}}/v0.5/consent-requests/init"

payload <- "{\n  \"requestId\": \"499a5a4a-7dda-4f20-9b67-e24589627061\"\n}"

encode <- "json"

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

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

url = URI("{{baseUrl}}/v0.5/consent-requests/init")

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

request = Net::HTTP::Post.new(url)
request["authorization"] = ''
request["content-type"] = 'application/json'
request.body = "{\n  \"requestId\": \"499a5a4a-7dda-4f20-9b67-e24589627061\"\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/v0.5/consent-requests/init') do |req|
  req.headers['authorization'] = ''
  req.body = "{\n  \"requestId\": \"499a5a4a-7dda-4f20-9b67-e24589627061\"\n}"
end

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

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/v0.5/consent-requests/init";

    let payload = json!({"requestId": "499a5a4a-7dda-4f20-9b67-e24589627061"});

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

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

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

    dbg!(results);
}
curl --request POST \
  --url {{baseUrl}}/v0.5/consent-requests/init \
  --header 'authorization: ' \
  --header 'content-type: application/json' \
  --data '{
  "requestId": "499a5a4a-7dda-4f20-9b67-e24589627061"
}'
echo '{
  "requestId": "499a5a4a-7dda-4f20-9b67-e24589627061"
}' |  \
  http POST {{baseUrl}}/v0.5/consent-requests/init \
  authorization:'' \
  content-type:application/json
wget --quiet \
  --method POST \
  --header 'authorization: ' \
  --header 'content-type: application/json' \
  --body-data '{\n  "requestId": "499a5a4a-7dda-4f20-9b67-e24589627061"\n}' \
  --output-document \
  - {{baseUrl}}/v0.5/consent-requests/init
import Foundation

let headers = [
  "authorization": "",
  "content-type": "application/json"
]
let parameters = ["requestId": "499a5a4a-7dda-4f20-9b67-e24589627061"] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v0.5/consent-requests/init")! 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()
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v0.5/consents/fetch");

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

curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\n}");

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

(client/post "{{baseUrl}}/v0.5/consents/fetch" {:headers {:authorization ""}
                                                                :content-type :json
                                                                :form-params {:requestId "5f7a535d-a3fd-416b-b069-c97d021fbacd"}})
require "http/client"

url = "{{baseUrl}}/v0.5/consents/fetch"
headers = HTTP::Headers{
  "authorization" => ""
  "content-type" => "application/json"
}
reqBody = "{\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\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}}/v0.5/consents/fetch"),
    Headers =
    {
        { "authorization", "" },
    },
    Content = new StringContent("{\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\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}}/v0.5/consents/fetch");
var request = new RestRequest("", Method.Post);
request.AddHeader("authorization", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main

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

func main() {

	url := "{{baseUrl}}/v0.5/consents/fetch"

	payload := strings.NewReader("{\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\n}")

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

	req.Header.Add("authorization", "")
	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/v0.5/consents/fetch HTTP/1.1
Authorization: 
Content-Type: application/json
Host: example.com
Content-Length: 57

{
  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v0.5/consents/fetch")
  .setHeader("authorization", "")
  .setHeader("content-type", "application/json")
  .setBody("{\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\n}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/v0.5/consents/fetch"))
    .header("authorization", "")
    .header("content-type", "application/json")
    .method("POST", HttpRequest.BodyPublishers.ofString("{\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\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  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\n}");
Request request = new Request.Builder()
  .url("{{baseUrl}}/v0.5/consents/fetch")
  .post(body)
  .addHeader("authorization", "")
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v0.5/consents/fetch")
  .header("authorization", "")
  .header("content-type", "application/json")
  .body("{\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\n}")
  .asString();
const data = JSON.stringify({
  requestId: '5f7a535d-a3fd-416b-b069-c97d021fbacd'
});

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

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

xhr.open('POST', '{{baseUrl}}/v0.5/consents/fetch');
xhr.setRequestHeader('authorization', '');
xhr.setRequestHeader('content-type', 'application/json');

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

const options = {
  method: 'POST',
  url: '{{baseUrl}}/v0.5/consents/fetch',
  headers: {authorization: '', 'content-type': 'application/json'},
  data: {requestId: '5f7a535d-a3fd-416b-b069-c97d021fbacd'}
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/v0.5/consents/fetch';
const options = {
  method: 'POST',
  headers: {authorization: '', 'content-type': 'application/json'},
  body: '{"requestId":"5f7a535d-a3fd-416b-b069-c97d021fbacd"}'
};

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}}/v0.5/consents/fetch',
  method: 'POST',
  headers: {
    authorization: '',
    'content-type': 'application/json'
  },
  processData: false,
  data: '{\n  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"\n}'
};

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

val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\n}")
val request = Request.Builder()
  .url("{{baseUrl}}/v0.5/consents/fetch")
  .post(body)
  .addHeader("authorization", "")
  .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/v0.5/consents/fetch',
  headers: {
    authorization: '',
    '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({requestId: '5f7a535d-a3fd-416b-b069-c97d021fbacd'}));
req.end();
const request = require('request');

const options = {
  method: 'POST',
  url: '{{baseUrl}}/v0.5/consents/fetch',
  headers: {authorization: '', 'content-type': 'application/json'},
  body: {requestId: '5f7a535d-a3fd-416b-b069-c97d021fbacd'},
  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}}/v0.5/consents/fetch');

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

req.type('json');
req.send({
  requestId: '5f7a535d-a3fd-416b-b069-c97d021fbacd'
});

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}}/v0.5/consents/fetch',
  headers: {authorization: '', 'content-type': 'application/json'},
  data: {requestId: '5f7a535d-a3fd-416b-b069-c97d021fbacd'}
};

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

const url = '{{baseUrl}}/v0.5/consents/fetch';
const options = {
  method: 'POST',
  headers: {authorization: '', 'content-type': 'application/json'},
  body: '{"requestId":"5f7a535d-a3fd-416b-b069-c97d021fbacd"}'
};

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

NSDictionary *headers = @{ @"authorization": @"",
                           @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"requestId": @"5f7a535d-a3fd-416b-b069-c97d021fbacd" };

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

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v0.5/consents/fetch"]
                                                       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}}/v0.5/consents/fetch" in
let headers = Header.add_list (Header.init ()) [
  ("authorization", "");
  ("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\n}" in

Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/v0.5/consents/fetch",
  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([
    'requestId' => '5f7a535d-a3fd-416b-b069-c97d021fbacd'
  ]),
  CURLOPT_HTTPHEADER => [
    "authorization: ",
    "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}}/v0.5/consents/fetch', [
  'body' => '{
  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"
}',
  'headers' => [
    'authorization' => '',
    'content-type' => 'application/json',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/v0.5/consents/fetch');
$request->setMethod(HTTP_METH_POST);

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

$request->setContentType('application/json');
$request->setBody(json_encode([
  'requestId' => '5f7a535d-a3fd-416b-b069-c97d021fbacd'
]));

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

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
append(json_encode([
  'requestId' => '5f7a535d-a3fd-416b-b069-c97d021fbacd'
]));
$request->setRequestUrl('{{baseUrl}}/v0.5/consents/fetch');
$request->setRequestMethod('POST');
$request->setBody($body);

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

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

echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v0.5/consents/fetch' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"
}'
$headers=@{}
$headers.Add("authorization", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v0.5/consents/fetch' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"
}'
import http.client

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

payload = "{\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\n}"

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

conn.request("POST", "/baseUrl/v0.5/consents/fetch", payload, headers)

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

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

url = "{{baseUrl}}/v0.5/consents/fetch"

payload = { "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd" }
headers = {
    "authorization": "",
    "content-type": "application/json"
}

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

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

url <- "{{baseUrl}}/v0.5/consents/fetch"

payload <- "{\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\n}"

encode <- "json"

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

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

url = URI("{{baseUrl}}/v0.5/consents/fetch")

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

request = Net::HTTP::Post.new(url)
request["authorization"] = ''
request["content-type"] = 'application/json'
request.body = "{\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\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/v0.5/consents/fetch') do |req|
  req.headers['authorization'] = ''
  req.body = "{\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\n}"
end

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

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/v0.5/consents/fetch";

    let payload = json!({"requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"});

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

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

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

    dbg!(results);
}
curl --request POST \
  --url {{baseUrl}}/v0.5/consents/fetch \
  --header 'authorization: ' \
  --header 'content-type: application/json' \
  --data '{
  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"
}'
echo '{
  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"
}' |  \
  http POST {{baseUrl}}/v0.5/consents/fetch \
  authorization:'' \
  content-type:application/json
wget --quiet \
  --method POST \
  --header 'authorization: ' \
  --header 'content-type: application/json' \
  --body-data '{\n  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"\n}' \
  --output-document \
  - {{baseUrl}}/v0.5/consents/fetch
import Foundation

let headers = [
  "authorization": "",
  "content-type": "application/json"
]
let parameters = ["requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v0.5/consents/fetch")! 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()
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v0.5/consent-requests/status");

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

curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\n}");

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

(client/post "{{baseUrl}}/v0.5/consent-requests/status" {:headers {:authorization ""}
                                                                         :content-type :json
                                                                         :form-params {:requestId "5f7a535d-a3fd-416b-b069-c97d021fbacd"}})
require "http/client"

url = "{{baseUrl}}/v0.5/consent-requests/status"
headers = HTTP::Headers{
  "authorization" => ""
  "content-type" => "application/json"
}
reqBody = "{\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\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}}/v0.5/consent-requests/status"),
    Headers =
    {
        { "authorization", "" },
    },
    Content = new StringContent("{\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\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}}/v0.5/consent-requests/status");
var request = new RestRequest("", Method.Post);
request.AddHeader("authorization", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main

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

func main() {

	url := "{{baseUrl}}/v0.5/consent-requests/status"

	payload := strings.NewReader("{\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\n}")

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

	req.Header.Add("authorization", "")
	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/v0.5/consent-requests/status HTTP/1.1
Authorization: 
Content-Type: application/json
Host: example.com
Content-Length: 57

{
  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v0.5/consent-requests/status")
  .setHeader("authorization", "")
  .setHeader("content-type", "application/json")
  .setBody("{\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\n}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/v0.5/consent-requests/status"))
    .header("authorization", "")
    .header("content-type", "application/json")
    .method("POST", HttpRequest.BodyPublishers.ofString("{\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\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  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\n}");
Request request = new Request.Builder()
  .url("{{baseUrl}}/v0.5/consent-requests/status")
  .post(body)
  .addHeader("authorization", "")
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v0.5/consent-requests/status")
  .header("authorization", "")
  .header("content-type", "application/json")
  .body("{\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\n}")
  .asString();
const data = JSON.stringify({
  requestId: '5f7a535d-a3fd-416b-b069-c97d021fbacd'
});

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

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

xhr.open('POST', '{{baseUrl}}/v0.5/consent-requests/status');
xhr.setRequestHeader('authorization', '');
xhr.setRequestHeader('content-type', 'application/json');

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

const options = {
  method: 'POST',
  url: '{{baseUrl}}/v0.5/consent-requests/status',
  headers: {authorization: '', 'content-type': 'application/json'},
  data: {requestId: '5f7a535d-a3fd-416b-b069-c97d021fbacd'}
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/v0.5/consent-requests/status';
const options = {
  method: 'POST',
  headers: {authorization: '', 'content-type': 'application/json'},
  body: '{"requestId":"5f7a535d-a3fd-416b-b069-c97d021fbacd"}'
};

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}}/v0.5/consent-requests/status',
  method: 'POST',
  headers: {
    authorization: '',
    'content-type': 'application/json'
  },
  processData: false,
  data: '{\n  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"\n}'
};

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

val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\n}")
val request = Request.Builder()
  .url("{{baseUrl}}/v0.5/consent-requests/status")
  .post(body)
  .addHeader("authorization", "")
  .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/v0.5/consent-requests/status',
  headers: {
    authorization: '',
    '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({requestId: '5f7a535d-a3fd-416b-b069-c97d021fbacd'}));
req.end();
const request = require('request');

const options = {
  method: 'POST',
  url: '{{baseUrl}}/v0.5/consent-requests/status',
  headers: {authorization: '', 'content-type': 'application/json'},
  body: {requestId: '5f7a535d-a3fd-416b-b069-c97d021fbacd'},
  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}}/v0.5/consent-requests/status');

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

req.type('json');
req.send({
  requestId: '5f7a535d-a3fd-416b-b069-c97d021fbacd'
});

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}}/v0.5/consent-requests/status',
  headers: {authorization: '', 'content-type': 'application/json'},
  data: {requestId: '5f7a535d-a3fd-416b-b069-c97d021fbacd'}
};

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

const url = '{{baseUrl}}/v0.5/consent-requests/status';
const options = {
  method: 'POST',
  headers: {authorization: '', 'content-type': 'application/json'},
  body: '{"requestId":"5f7a535d-a3fd-416b-b069-c97d021fbacd"}'
};

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

NSDictionary *headers = @{ @"authorization": @"",
                           @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"requestId": @"5f7a535d-a3fd-416b-b069-c97d021fbacd" };

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

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v0.5/consent-requests/status"]
                                                       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}}/v0.5/consent-requests/status" in
let headers = Header.add_list (Header.init ()) [
  ("authorization", "");
  ("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\n}" in

Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/v0.5/consent-requests/status",
  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([
    'requestId' => '5f7a535d-a3fd-416b-b069-c97d021fbacd'
  ]),
  CURLOPT_HTTPHEADER => [
    "authorization: ",
    "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}}/v0.5/consent-requests/status', [
  'body' => '{
  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"
}',
  'headers' => [
    'authorization' => '',
    'content-type' => 'application/json',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/v0.5/consent-requests/status');
$request->setMethod(HTTP_METH_POST);

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

$request->setContentType('application/json');
$request->setBody(json_encode([
  'requestId' => '5f7a535d-a3fd-416b-b069-c97d021fbacd'
]));

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

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
append(json_encode([
  'requestId' => '5f7a535d-a3fd-416b-b069-c97d021fbacd'
]));
$request->setRequestUrl('{{baseUrl}}/v0.5/consent-requests/status');
$request->setRequestMethod('POST');
$request->setBody($body);

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

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

echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v0.5/consent-requests/status' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"
}'
$headers=@{}
$headers.Add("authorization", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v0.5/consent-requests/status' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"
}'
import http.client

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

payload = "{\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\n}"

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

conn.request("POST", "/baseUrl/v0.5/consent-requests/status", payload, headers)

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

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

url = "{{baseUrl}}/v0.5/consent-requests/status"

payload = { "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd" }
headers = {
    "authorization": "",
    "content-type": "application/json"
}

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

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

url <- "{{baseUrl}}/v0.5/consent-requests/status"

payload <- "{\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\n}"

encode <- "json"

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

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

url = URI("{{baseUrl}}/v0.5/consent-requests/status")

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

request = Net::HTTP::Post.new(url)
request["authorization"] = ''
request["content-type"] = 'application/json'
request.body = "{\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\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/v0.5/consent-requests/status') do |req|
  req.headers['authorization'] = ''
  req.body = "{\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\n}"
end

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

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/v0.5/consent-requests/status";

    let payload = json!({"requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"});

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

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

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

    dbg!(results);
}
curl --request POST \
  --url {{baseUrl}}/v0.5/consent-requests/status \
  --header 'authorization: ' \
  --header 'content-type: application/json' \
  --data '{
  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"
}'
echo '{
  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"
}' |  \
  http POST {{baseUrl}}/v0.5/consent-requests/status \
  authorization:'' \
  content-type:application/json
wget --quiet \
  --method POST \
  --header 'authorization: ' \
  --header 'content-type: application/json' \
  --body-data '{\n  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"\n}' \
  --output-document \
  - {{baseUrl}}/v0.5/consent-requests/status
import Foundation

let headers = [
  "authorization": "",
  "content-type": "application/json"
]
let parameters = ["requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v0.5/consent-requests/status")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

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

dataTask.resume()
POST Health information data request acknowledgement from HIP
{{baseUrl}}/v0.5/health-information/on-request
HEADERS

Authorization
BODY json

{
  "error": {
    "code": 0,
    "message": ""
  },
  "hiRequest": {
    "sessionStatus": "",
    "transactionId": ""
  },
  "requestId": "",
  "resp": {
    "requestId": ""
  },
  "timestamp": ""
}
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v0.5/health-information/on-request");

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

curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\n}");

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

(client/post "{{baseUrl}}/v0.5/health-information/on-request" {:headers {:authorization ""}
                                                                               :content-type :json
                                                                               :form-params {:requestId "5f7a535d-a3fd-416b-b069-c97d021fbacd"}})
require "http/client"

url = "{{baseUrl}}/v0.5/health-information/on-request"
headers = HTTP::Headers{
  "authorization" => ""
  "content-type" => "application/json"
}
reqBody = "{\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\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}}/v0.5/health-information/on-request"),
    Headers =
    {
        { "authorization", "" },
    },
    Content = new StringContent("{\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\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}}/v0.5/health-information/on-request");
var request = new RestRequest("", Method.Post);
request.AddHeader("authorization", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main

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

func main() {

	url := "{{baseUrl}}/v0.5/health-information/on-request"

	payload := strings.NewReader("{\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\n}")

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

	req.Header.Add("authorization", "")
	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/v0.5/health-information/on-request HTTP/1.1
Authorization: 
Content-Type: application/json
Host: example.com
Content-Length: 57

{
  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v0.5/health-information/on-request")
  .setHeader("authorization", "")
  .setHeader("content-type", "application/json")
  .setBody("{\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\n}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/v0.5/health-information/on-request"))
    .header("authorization", "")
    .header("content-type", "application/json")
    .method("POST", HttpRequest.BodyPublishers.ofString("{\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\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  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\n}");
Request request = new Request.Builder()
  .url("{{baseUrl}}/v0.5/health-information/on-request")
  .post(body)
  .addHeader("authorization", "")
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v0.5/health-information/on-request")
  .header("authorization", "")
  .header("content-type", "application/json")
  .body("{\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\n}")
  .asString();
const data = JSON.stringify({
  requestId: '5f7a535d-a3fd-416b-b069-c97d021fbacd'
});

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

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

xhr.open('POST', '{{baseUrl}}/v0.5/health-information/on-request');
xhr.setRequestHeader('authorization', '');
xhr.setRequestHeader('content-type', 'application/json');

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

const options = {
  method: 'POST',
  url: '{{baseUrl}}/v0.5/health-information/on-request',
  headers: {authorization: '', 'content-type': 'application/json'},
  data: {requestId: '5f7a535d-a3fd-416b-b069-c97d021fbacd'}
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/v0.5/health-information/on-request';
const options = {
  method: 'POST',
  headers: {authorization: '', 'content-type': 'application/json'},
  body: '{"requestId":"5f7a535d-a3fd-416b-b069-c97d021fbacd"}'
};

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}}/v0.5/health-information/on-request',
  method: 'POST',
  headers: {
    authorization: '',
    'content-type': 'application/json'
  },
  processData: false,
  data: '{\n  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"\n}'
};

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

val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\n}")
val request = Request.Builder()
  .url("{{baseUrl}}/v0.5/health-information/on-request")
  .post(body)
  .addHeader("authorization", "")
  .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/v0.5/health-information/on-request',
  headers: {
    authorization: '',
    '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({requestId: '5f7a535d-a3fd-416b-b069-c97d021fbacd'}));
req.end();
const request = require('request');

const options = {
  method: 'POST',
  url: '{{baseUrl}}/v0.5/health-information/on-request',
  headers: {authorization: '', 'content-type': 'application/json'},
  body: {requestId: '5f7a535d-a3fd-416b-b069-c97d021fbacd'},
  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}}/v0.5/health-information/on-request');

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

req.type('json');
req.send({
  requestId: '5f7a535d-a3fd-416b-b069-c97d021fbacd'
});

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}}/v0.5/health-information/on-request',
  headers: {authorization: '', 'content-type': 'application/json'},
  data: {requestId: '5f7a535d-a3fd-416b-b069-c97d021fbacd'}
};

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

const url = '{{baseUrl}}/v0.5/health-information/on-request';
const options = {
  method: 'POST',
  headers: {authorization: '', 'content-type': 'application/json'},
  body: '{"requestId":"5f7a535d-a3fd-416b-b069-c97d021fbacd"}'
};

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

NSDictionary *headers = @{ @"authorization": @"",
                           @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"requestId": @"5f7a535d-a3fd-416b-b069-c97d021fbacd" };

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

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v0.5/health-information/on-request"]
                                                       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}}/v0.5/health-information/on-request" in
let headers = Header.add_list (Header.init ()) [
  ("authorization", "");
  ("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\n}" in

Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/v0.5/health-information/on-request",
  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([
    'requestId' => '5f7a535d-a3fd-416b-b069-c97d021fbacd'
  ]),
  CURLOPT_HTTPHEADER => [
    "authorization: ",
    "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}}/v0.5/health-information/on-request', [
  'body' => '{
  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"
}',
  'headers' => [
    'authorization' => '',
    'content-type' => 'application/json',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/v0.5/health-information/on-request');
$request->setMethod(HTTP_METH_POST);

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

$request->setContentType('application/json');
$request->setBody(json_encode([
  'requestId' => '5f7a535d-a3fd-416b-b069-c97d021fbacd'
]));

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

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
append(json_encode([
  'requestId' => '5f7a535d-a3fd-416b-b069-c97d021fbacd'
]));
$request->setRequestUrl('{{baseUrl}}/v0.5/health-information/on-request');
$request->setRequestMethod('POST');
$request->setBody($body);

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

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

echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v0.5/health-information/on-request' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"
}'
$headers=@{}
$headers.Add("authorization", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v0.5/health-information/on-request' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"
}'
import http.client

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

payload = "{\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\n}"

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

conn.request("POST", "/baseUrl/v0.5/health-information/on-request", payload, headers)

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

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

url = "{{baseUrl}}/v0.5/health-information/on-request"

payload = { "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd" }
headers = {
    "authorization": "",
    "content-type": "application/json"
}

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

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

url <- "{{baseUrl}}/v0.5/health-information/on-request"

payload <- "{\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\n}"

encode <- "json"

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

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

url = URI("{{baseUrl}}/v0.5/health-information/on-request")

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

request = Net::HTTP::Post.new(url)
request["authorization"] = ''
request["content-type"] = 'application/json'
request.body = "{\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\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/v0.5/health-information/on-request') do |req|
  req.headers['authorization'] = ''
  req.body = "{\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\n}"
end

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

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/v0.5/health-information/on-request";

    let payload = json!({"requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"});

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

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

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

    dbg!(results);
}
curl --request POST \
  --url {{baseUrl}}/v0.5/health-information/on-request \
  --header 'authorization: ' \
  --header 'content-type: application/json' \
  --data '{
  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"
}'
echo '{
  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"
}' |  \
  http POST {{baseUrl}}/v0.5/health-information/on-request \
  authorization:'' \
  content-type:application/json
wget --quiet \
  --method POST \
  --header 'authorization: ' \
  --header 'content-type: application/json' \
  --body-data '{\n  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"\n}' \
  --output-document \
  - {{baseUrl}}/v0.5/health-information/on-request
import Foundation

let headers = [
  "authorization": "",
  "content-type": "application/json"
]
let parameters = ["requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v0.5/health-information/on-request")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

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

dataTask.resume()
POST Health information data request from HIU
{{baseUrl}}/v0.5/health-information/request
HEADERS

Authorization
BODY json

{
  "hiRequest": {
    "consent": {
      "id": ""
    },
    "dataPushUrl": "",
    "dateRange": {
      "from": "",
      "to": ""
    },
    "keyMaterial": {
      "cryptoAlg": "",
      "curve": "",
      "dhPublicKey": {
        "expiry": "",
        "keyValue": "",
        "parameters": ""
      },
      "nonce": ""
    }
  },
  "requestId": "",
  "timestamp": ""
}
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v0.5/health-information/request");

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

curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n  \"requestId\": \"a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d\"\n}");

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

(client/post "{{baseUrl}}/v0.5/health-information/request" {:headers {:authorization ""}
                                                                            :content-type :json
                                                                            :form-params {:requestId "a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d"}})
require "http/client"

url = "{{baseUrl}}/v0.5/health-information/request"
headers = HTTP::Headers{
  "authorization" => ""
  "content-type" => "application/json"
}
reqBody = "{\n  \"requestId\": \"a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d\"\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}}/v0.5/health-information/request"),
    Headers =
    {
        { "authorization", "" },
    },
    Content = new StringContent("{\n  \"requestId\": \"a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d\"\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}}/v0.5/health-information/request");
var request = new RestRequest("", Method.Post);
request.AddHeader("authorization", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n  \"requestId\": \"a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main

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

func main() {

	url := "{{baseUrl}}/v0.5/health-information/request"

	payload := strings.NewReader("{\n  \"requestId\": \"a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d\"\n}")

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

	req.Header.Add("authorization", "")
	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/v0.5/health-information/request HTTP/1.1
Authorization: 
Content-Type: application/json
Host: example.com
Content-Length: 58

{
  "requestId": "a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d"
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v0.5/health-information/request")
  .setHeader("authorization", "")
  .setHeader("content-type", "application/json")
  .setBody("{\n  \"requestId\": \"a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d\"\n}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/v0.5/health-information/request"))
    .header("authorization", "")
    .header("content-type", "application/json")
    .method("POST", HttpRequest.BodyPublishers.ofString("{\n  \"requestId\": \"a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d\"\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  \"requestId\": \"a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d\"\n}");
Request request = new Request.Builder()
  .url("{{baseUrl}}/v0.5/health-information/request")
  .post(body)
  .addHeader("authorization", "")
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v0.5/health-information/request")
  .header("authorization", "")
  .header("content-type", "application/json")
  .body("{\n  \"requestId\": \"a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d\"\n}")
  .asString();
const data = JSON.stringify({
  requestId: 'a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d'
});

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

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

xhr.open('POST', '{{baseUrl}}/v0.5/health-information/request');
xhr.setRequestHeader('authorization', '');
xhr.setRequestHeader('content-type', 'application/json');

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

const options = {
  method: 'POST',
  url: '{{baseUrl}}/v0.5/health-information/request',
  headers: {authorization: '', 'content-type': 'application/json'},
  data: {requestId: 'a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d'}
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/v0.5/health-information/request';
const options = {
  method: 'POST',
  headers: {authorization: '', 'content-type': 'application/json'},
  body: '{"requestId":"a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d"}'
};

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}}/v0.5/health-information/request',
  method: 'POST',
  headers: {
    authorization: '',
    'content-type': 'application/json'
  },
  processData: false,
  data: '{\n  "requestId": "a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d"\n}'
};

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

val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n  \"requestId\": \"a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d\"\n}")
val request = Request.Builder()
  .url("{{baseUrl}}/v0.5/health-information/request")
  .post(body)
  .addHeader("authorization", "")
  .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/v0.5/health-information/request',
  headers: {
    authorization: '',
    '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({requestId: 'a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d'}));
req.end();
const request = require('request');

const options = {
  method: 'POST',
  url: '{{baseUrl}}/v0.5/health-information/request',
  headers: {authorization: '', 'content-type': 'application/json'},
  body: {requestId: 'a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d'},
  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}}/v0.5/health-information/request');

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

req.type('json');
req.send({
  requestId: 'a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d'
});

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}}/v0.5/health-information/request',
  headers: {authorization: '', 'content-type': 'application/json'},
  data: {requestId: 'a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d'}
};

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

const url = '{{baseUrl}}/v0.5/health-information/request';
const options = {
  method: 'POST',
  headers: {authorization: '', 'content-type': 'application/json'},
  body: '{"requestId":"a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d"}'
};

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

NSDictionary *headers = @{ @"authorization": @"",
                           @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"requestId": @"a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d" };

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

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v0.5/health-information/request"]
                                                       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}}/v0.5/health-information/request" in
let headers = Header.add_list (Header.init ()) [
  ("authorization", "");
  ("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n  \"requestId\": \"a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d\"\n}" in

Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/v0.5/health-information/request",
  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([
    'requestId' => 'a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d'
  ]),
  CURLOPT_HTTPHEADER => [
    "authorization: ",
    "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}}/v0.5/health-information/request', [
  'body' => '{
  "requestId": "a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d"
}',
  'headers' => [
    'authorization' => '',
    'content-type' => 'application/json',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/v0.5/health-information/request');
$request->setMethod(HTTP_METH_POST);

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

$request->setContentType('application/json');
$request->setBody(json_encode([
  'requestId' => 'a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d'
]));

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

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
append(json_encode([
  'requestId' => 'a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d'
]));
$request->setRequestUrl('{{baseUrl}}/v0.5/health-information/request');
$request->setRequestMethod('POST');
$request->setBody($body);

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

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

echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v0.5/health-information/request' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "requestId": "a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d"
}'
$headers=@{}
$headers.Add("authorization", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v0.5/health-information/request' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "requestId": "a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d"
}'
import http.client

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

payload = "{\n  \"requestId\": \"a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d\"\n}"

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

conn.request("POST", "/baseUrl/v0.5/health-information/request", payload, headers)

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

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

url = "{{baseUrl}}/v0.5/health-information/request"

payload = { "requestId": "a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d" }
headers = {
    "authorization": "",
    "content-type": "application/json"
}

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

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

url <- "{{baseUrl}}/v0.5/health-information/request"

payload <- "{\n  \"requestId\": \"a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d\"\n}"

encode <- "json"

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

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

url = URI("{{baseUrl}}/v0.5/health-information/request")

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

request = Net::HTTP::Post.new(url)
request["authorization"] = ''
request["content-type"] = 'application/json'
request.body = "{\n  \"requestId\": \"a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d\"\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/v0.5/health-information/request') do |req|
  req.headers['authorization'] = ''
  req.body = "{\n  \"requestId\": \"a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d\"\n}"
end

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

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/v0.5/health-information/request";

    let payload = json!({"requestId": "a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d"});

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

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

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

    dbg!(results);
}
curl --request POST \
  --url {{baseUrl}}/v0.5/health-information/request \
  --header 'authorization: ' \
  --header 'content-type: application/json' \
  --data '{
  "requestId": "a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d"
}'
echo '{
  "requestId": "a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d"
}' |  \
  http POST {{baseUrl}}/v0.5/health-information/request \
  authorization:'' \
  content-type:application/json
wget --quiet \
  --method POST \
  --header 'authorization: ' \
  --header 'content-type: application/json' \
  --body-data '{\n  "requestId": "a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d"\n}' \
  --output-document \
  - {{baseUrl}}/v0.5/health-information/request
import Foundation

let headers = [
  "authorization": "",
  "content-type": "application/json"
]
let parameters = ["requestId": "a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d"] as [String : Any]

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

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

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

dataTask.resume()
POST Notifications corresponding to events during data flow
{{baseUrl}}/v0.5/health-information/notify
HEADERS

Authorization
BODY json

{
  "notification": {
    "consentId": "",
    "doneAt": "",
    "notifier": {
      "id": "",
      "type": ""
    },
    "statusNotification": {
      "hipId": "",
      "sessionStatus": "",
      "statusResponses": [
        {
          "careContextReference": "",
          "description": "",
          "hiStatus": ""
        }
      ]
    },
    "transactionId": ""
  },
  "requestId": "",
  "timestamp": ""
}
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v0.5/health-information/notify");

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

curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n  \"notification\": {\n    \"consentId\": \"a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d\",\n    \"transactionId\": \"a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d\"\n  },\n  \"requestId\": \"499a5a4a-7dda-4f20-9b67-e24589627061\"\n}");

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

(client/post "{{baseUrl}}/v0.5/health-information/notify" {:headers {:authorization ""}
                                                                           :content-type :json
                                                                           :form-params {:notification {:consentId "a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d"
                                                                                                        :transactionId "a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d"}
                                                                                         :requestId "499a5a4a-7dda-4f20-9b67-e24589627061"}})
require "http/client"

url = "{{baseUrl}}/v0.5/health-information/notify"
headers = HTTP::Headers{
  "authorization" => ""
  "content-type" => "application/json"
}
reqBody = "{\n  \"notification\": {\n    \"consentId\": \"a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d\",\n    \"transactionId\": \"a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d\"\n  },\n  \"requestId\": \"499a5a4a-7dda-4f20-9b67-e24589627061\"\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}}/v0.5/health-information/notify"),
    Headers =
    {
        { "authorization", "" },
    },
    Content = new StringContent("{\n  \"notification\": {\n    \"consentId\": \"a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d\",\n    \"transactionId\": \"a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d\"\n  },\n  \"requestId\": \"499a5a4a-7dda-4f20-9b67-e24589627061\"\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}}/v0.5/health-information/notify");
var request = new RestRequest("", Method.Post);
request.AddHeader("authorization", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n  \"notification\": {\n    \"consentId\": \"a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d\",\n    \"transactionId\": \"a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d\"\n  },\n  \"requestId\": \"499a5a4a-7dda-4f20-9b67-e24589627061\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main

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

func main() {

	url := "{{baseUrl}}/v0.5/health-information/notify"

	payload := strings.NewReader("{\n  \"notification\": {\n    \"consentId\": \"a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d\",\n    \"transactionId\": \"a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d\"\n  },\n  \"requestId\": \"499a5a4a-7dda-4f20-9b67-e24589627061\"\n}")

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

	req.Header.Add("authorization", "")
	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/v0.5/health-information/notify HTTP/1.1
Authorization: 
Content-Type: application/json
Host: example.com
Content-Length: 201

{
  "notification": {
    "consentId": "a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d",
    "transactionId": "a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d"
  },
  "requestId": "499a5a4a-7dda-4f20-9b67-e24589627061"
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v0.5/health-information/notify")
  .setHeader("authorization", "")
  .setHeader("content-type", "application/json")
  .setBody("{\n  \"notification\": {\n    \"consentId\": \"a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d\",\n    \"transactionId\": \"a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d\"\n  },\n  \"requestId\": \"499a5a4a-7dda-4f20-9b67-e24589627061\"\n}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/v0.5/health-information/notify"))
    .header("authorization", "")
    .header("content-type", "application/json")
    .method("POST", HttpRequest.BodyPublishers.ofString("{\n  \"notification\": {\n    \"consentId\": \"a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d\",\n    \"transactionId\": \"a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d\"\n  },\n  \"requestId\": \"499a5a4a-7dda-4f20-9b67-e24589627061\"\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  \"notification\": {\n    \"consentId\": \"a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d\",\n    \"transactionId\": \"a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d\"\n  },\n  \"requestId\": \"499a5a4a-7dda-4f20-9b67-e24589627061\"\n}");
Request request = new Request.Builder()
  .url("{{baseUrl}}/v0.5/health-information/notify")
  .post(body)
  .addHeader("authorization", "")
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v0.5/health-information/notify")
  .header("authorization", "")
  .header("content-type", "application/json")
  .body("{\n  \"notification\": {\n    \"consentId\": \"a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d\",\n    \"transactionId\": \"a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d\"\n  },\n  \"requestId\": \"499a5a4a-7dda-4f20-9b67-e24589627061\"\n}")
  .asString();
const data = JSON.stringify({
  notification: {
    consentId: 'a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d',
    transactionId: 'a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d'
  },
  requestId: '499a5a4a-7dda-4f20-9b67-e24589627061'
});

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

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

xhr.open('POST', '{{baseUrl}}/v0.5/health-information/notify');
xhr.setRequestHeader('authorization', '');
xhr.setRequestHeader('content-type', 'application/json');

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

const options = {
  method: 'POST',
  url: '{{baseUrl}}/v0.5/health-information/notify',
  headers: {authorization: '', 'content-type': 'application/json'},
  data: {
    notification: {
      consentId: 'a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d',
      transactionId: 'a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d'
    },
    requestId: '499a5a4a-7dda-4f20-9b67-e24589627061'
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/v0.5/health-information/notify';
const options = {
  method: 'POST',
  headers: {authorization: '', 'content-type': 'application/json'},
  body: '{"notification":{"consentId":"a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d","transactionId":"a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d"},"requestId":"499a5a4a-7dda-4f20-9b67-e24589627061"}'
};

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}}/v0.5/health-information/notify',
  method: 'POST',
  headers: {
    authorization: '',
    'content-type': 'application/json'
  },
  processData: false,
  data: '{\n  "notification": {\n    "consentId": "a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d",\n    "transactionId": "a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d"\n  },\n  "requestId": "499a5a4a-7dda-4f20-9b67-e24589627061"\n}'
};

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

val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n  \"notification\": {\n    \"consentId\": \"a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d\",\n    \"transactionId\": \"a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d\"\n  },\n  \"requestId\": \"499a5a4a-7dda-4f20-9b67-e24589627061\"\n}")
val request = Request.Builder()
  .url("{{baseUrl}}/v0.5/health-information/notify")
  .post(body)
  .addHeader("authorization", "")
  .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/v0.5/health-information/notify',
  headers: {
    authorization: '',
    '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({
  notification: {
    consentId: 'a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d',
    transactionId: 'a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d'
  },
  requestId: '499a5a4a-7dda-4f20-9b67-e24589627061'
}));
req.end();
const request = require('request');

const options = {
  method: 'POST',
  url: '{{baseUrl}}/v0.5/health-information/notify',
  headers: {authorization: '', 'content-type': 'application/json'},
  body: {
    notification: {
      consentId: 'a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d',
      transactionId: 'a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d'
    },
    requestId: '499a5a4a-7dda-4f20-9b67-e24589627061'
  },
  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}}/v0.5/health-information/notify');

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

req.type('json');
req.send({
  notification: {
    consentId: 'a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d',
    transactionId: 'a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d'
  },
  requestId: '499a5a4a-7dda-4f20-9b67-e24589627061'
});

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}}/v0.5/health-information/notify',
  headers: {authorization: '', 'content-type': 'application/json'},
  data: {
    notification: {
      consentId: 'a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d',
      transactionId: 'a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d'
    },
    requestId: '499a5a4a-7dda-4f20-9b67-e24589627061'
  }
};

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

const url = '{{baseUrl}}/v0.5/health-information/notify';
const options = {
  method: 'POST',
  headers: {authorization: '', 'content-type': 'application/json'},
  body: '{"notification":{"consentId":"a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d","transactionId":"a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d"},"requestId":"499a5a4a-7dda-4f20-9b67-e24589627061"}'
};

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

NSDictionary *headers = @{ @"authorization": @"",
                           @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"notification": @{ @"consentId": @"a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d", @"transactionId": @"a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d" },
                              @"requestId": @"499a5a4a-7dda-4f20-9b67-e24589627061" };

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

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v0.5/health-information/notify"]
                                                       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}}/v0.5/health-information/notify" in
let headers = Header.add_list (Header.init ()) [
  ("authorization", "");
  ("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n  \"notification\": {\n    \"consentId\": \"a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d\",\n    \"transactionId\": \"a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d\"\n  },\n  \"requestId\": \"499a5a4a-7dda-4f20-9b67-e24589627061\"\n}" in

Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/v0.5/health-information/notify",
  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([
    'notification' => [
        'consentId' => 'a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d',
        'transactionId' => 'a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d'
    ],
    'requestId' => '499a5a4a-7dda-4f20-9b67-e24589627061'
  ]),
  CURLOPT_HTTPHEADER => [
    "authorization: ",
    "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}}/v0.5/health-information/notify', [
  'body' => '{
  "notification": {
    "consentId": "a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d",
    "transactionId": "a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d"
  },
  "requestId": "499a5a4a-7dda-4f20-9b67-e24589627061"
}',
  'headers' => [
    'authorization' => '',
    'content-type' => 'application/json',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/v0.5/health-information/notify');
$request->setMethod(HTTP_METH_POST);

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

$request->setContentType('application/json');
$request->setBody(json_encode([
  'notification' => [
    'consentId' => 'a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d',
    'transactionId' => 'a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d'
  ],
  'requestId' => '499a5a4a-7dda-4f20-9b67-e24589627061'
]));

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

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
append(json_encode([
  'notification' => [
    'consentId' => 'a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d',
    'transactionId' => 'a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d'
  ],
  'requestId' => '499a5a4a-7dda-4f20-9b67-e24589627061'
]));
$request->setRequestUrl('{{baseUrl}}/v0.5/health-information/notify');
$request->setRequestMethod('POST');
$request->setBody($body);

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

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

echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v0.5/health-information/notify' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "notification": {
    "consentId": "a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d",
    "transactionId": "a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d"
  },
  "requestId": "499a5a4a-7dda-4f20-9b67-e24589627061"
}'
$headers=@{}
$headers.Add("authorization", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v0.5/health-information/notify' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "notification": {
    "consentId": "a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d",
    "transactionId": "a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d"
  },
  "requestId": "499a5a4a-7dda-4f20-9b67-e24589627061"
}'
import http.client

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

payload = "{\n  \"notification\": {\n    \"consentId\": \"a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d\",\n    \"transactionId\": \"a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d\"\n  },\n  \"requestId\": \"499a5a4a-7dda-4f20-9b67-e24589627061\"\n}"

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

conn.request("POST", "/baseUrl/v0.5/health-information/notify", payload, headers)

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

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

url = "{{baseUrl}}/v0.5/health-information/notify"

payload = {
    "notification": {
        "consentId": "a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d",
        "transactionId": "a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d"
    },
    "requestId": "499a5a4a-7dda-4f20-9b67-e24589627061"
}
headers = {
    "authorization": "",
    "content-type": "application/json"
}

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

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

url <- "{{baseUrl}}/v0.5/health-information/notify"

payload <- "{\n  \"notification\": {\n    \"consentId\": \"a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d\",\n    \"transactionId\": \"a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d\"\n  },\n  \"requestId\": \"499a5a4a-7dda-4f20-9b67-e24589627061\"\n}"

encode <- "json"

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

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

url = URI("{{baseUrl}}/v0.5/health-information/notify")

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

request = Net::HTTP::Post.new(url)
request["authorization"] = ''
request["content-type"] = 'application/json'
request.body = "{\n  \"notification\": {\n    \"consentId\": \"a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d\",\n    \"transactionId\": \"a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d\"\n  },\n  \"requestId\": \"499a5a4a-7dda-4f20-9b67-e24589627061\"\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/v0.5/health-information/notify') do |req|
  req.headers['authorization'] = ''
  req.body = "{\n  \"notification\": {\n    \"consentId\": \"a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d\",\n    \"transactionId\": \"a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d\"\n  },\n  \"requestId\": \"499a5a4a-7dda-4f20-9b67-e24589627061\"\n}"
end

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

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/v0.5/health-information/notify";

    let payload = json!({
        "notification": json!({
            "consentId": "a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d",
            "transactionId": "a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d"
        }),
        "requestId": "499a5a4a-7dda-4f20-9b67-e24589627061"
    });

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

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

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

    dbg!(results);
}
curl --request POST \
  --url {{baseUrl}}/v0.5/health-information/notify \
  --header 'authorization: ' \
  --header 'content-type: application/json' \
  --data '{
  "notification": {
    "consentId": "a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d",
    "transactionId": "a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d"
  },
  "requestId": "499a5a4a-7dda-4f20-9b67-e24589627061"
}'
echo '{
  "notification": {
    "consentId": "a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d",
    "transactionId": "a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d"
  },
  "requestId": "499a5a4a-7dda-4f20-9b67-e24589627061"
}' |  \
  http POST {{baseUrl}}/v0.5/health-information/notify \
  authorization:'' \
  content-type:application/json
wget --quiet \
  --method POST \
  --header 'authorization: ' \
  --header 'content-type: application/json' \
  --body-data '{\n  "notification": {\n    "consentId": "a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d",\n    "transactionId": "a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d"\n  },\n  "requestId": "499a5a4a-7dda-4f20-9b67-e24589627061"\n}' \
  --output-document \
  - {{baseUrl}}/v0.5/health-information/notify
import Foundation

let headers = [
  "authorization": "",
  "content-type": "application/json"
]
let parameters = [
  "notification": [
    "consentId": "a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d",
    "transactionId": "a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d"
  ],
  "requestId": "499a5a4a-7dda-4f20-9b67-e24589627061"
] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v0.5/health-information/notify")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

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

dataTask.resume()
POST Response to patient's account discovery request
{{baseUrl}}/v0.5/care-contexts/on-discover
HEADERS

Authorization
BODY json

{
  "error": {
    "code": 0,
    "message": ""
  },
  "patient": {
    "careContexts": [
      {
        "display": "",
        "referenceNumber": ""
      }
    ],
    "display": "",
    "matchedBy": [],
    "referenceNumber": ""
  },
  "requestId": "",
  "resp": {
    "requestId": ""
  },
  "timestamp": "",
  "transactionId": ""
}
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v0.5/care-contexts/on-discover");

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

curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\n}");

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

(client/post "{{baseUrl}}/v0.5/care-contexts/on-discover" {:headers {:authorization ""}
                                                                           :content-type :json
                                                                           :form-params {:requestId "5f7a535d-a3fd-416b-b069-c97d021fbacd"}})
require "http/client"

url = "{{baseUrl}}/v0.5/care-contexts/on-discover"
headers = HTTP::Headers{
  "authorization" => ""
  "content-type" => "application/json"
}
reqBody = "{\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\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}}/v0.5/care-contexts/on-discover"),
    Headers =
    {
        { "authorization", "" },
    },
    Content = new StringContent("{\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\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}}/v0.5/care-contexts/on-discover");
var request = new RestRequest("", Method.Post);
request.AddHeader("authorization", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main

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

func main() {

	url := "{{baseUrl}}/v0.5/care-contexts/on-discover"

	payload := strings.NewReader("{\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\n}")

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

	req.Header.Add("authorization", "")
	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/v0.5/care-contexts/on-discover HTTP/1.1
Authorization: 
Content-Type: application/json
Host: example.com
Content-Length: 57

{
  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v0.5/care-contexts/on-discover")
  .setHeader("authorization", "")
  .setHeader("content-type", "application/json")
  .setBody("{\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\n}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/v0.5/care-contexts/on-discover"))
    .header("authorization", "")
    .header("content-type", "application/json")
    .method("POST", HttpRequest.BodyPublishers.ofString("{\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\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  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\n}");
Request request = new Request.Builder()
  .url("{{baseUrl}}/v0.5/care-contexts/on-discover")
  .post(body)
  .addHeader("authorization", "")
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v0.5/care-contexts/on-discover")
  .header("authorization", "")
  .header("content-type", "application/json")
  .body("{\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\n}")
  .asString();
const data = JSON.stringify({
  requestId: '5f7a535d-a3fd-416b-b069-c97d021fbacd'
});

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

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

xhr.open('POST', '{{baseUrl}}/v0.5/care-contexts/on-discover');
xhr.setRequestHeader('authorization', '');
xhr.setRequestHeader('content-type', 'application/json');

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

const options = {
  method: 'POST',
  url: '{{baseUrl}}/v0.5/care-contexts/on-discover',
  headers: {authorization: '', 'content-type': 'application/json'},
  data: {requestId: '5f7a535d-a3fd-416b-b069-c97d021fbacd'}
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/v0.5/care-contexts/on-discover';
const options = {
  method: 'POST',
  headers: {authorization: '', 'content-type': 'application/json'},
  body: '{"requestId":"5f7a535d-a3fd-416b-b069-c97d021fbacd"}'
};

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}}/v0.5/care-contexts/on-discover',
  method: 'POST',
  headers: {
    authorization: '',
    'content-type': 'application/json'
  },
  processData: false,
  data: '{\n  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"\n}'
};

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

val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\n}")
val request = Request.Builder()
  .url("{{baseUrl}}/v0.5/care-contexts/on-discover")
  .post(body)
  .addHeader("authorization", "")
  .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/v0.5/care-contexts/on-discover',
  headers: {
    authorization: '',
    '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({requestId: '5f7a535d-a3fd-416b-b069-c97d021fbacd'}));
req.end();
const request = require('request');

const options = {
  method: 'POST',
  url: '{{baseUrl}}/v0.5/care-contexts/on-discover',
  headers: {authorization: '', 'content-type': 'application/json'},
  body: {requestId: '5f7a535d-a3fd-416b-b069-c97d021fbacd'},
  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}}/v0.5/care-contexts/on-discover');

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

req.type('json');
req.send({
  requestId: '5f7a535d-a3fd-416b-b069-c97d021fbacd'
});

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}}/v0.5/care-contexts/on-discover',
  headers: {authorization: '', 'content-type': 'application/json'},
  data: {requestId: '5f7a535d-a3fd-416b-b069-c97d021fbacd'}
};

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

const url = '{{baseUrl}}/v0.5/care-contexts/on-discover';
const options = {
  method: 'POST',
  headers: {authorization: '', 'content-type': 'application/json'},
  body: '{"requestId":"5f7a535d-a3fd-416b-b069-c97d021fbacd"}'
};

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

NSDictionary *headers = @{ @"authorization": @"",
                           @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"requestId": @"5f7a535d-a3fd-416b-b069-c97d021fbacd" };

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

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v0.5/care-contexts/on-discover"]
                                                       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}}/v0.5/care-contexts/on-discover" in
let headers = Header.add_list (Header.init ()) [
  ("authorization", "");
  ("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\n}" in

Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/v0.5/care-contexts/on-discover",
  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([
    'requestId' => '5f7a535d-a3fd-416b-b069-c97d021fbacd'
  ]),
  CURLOPT_HTTPHEADER => [
    "authorization: ",
    "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}}/v0.5/care-contexts/on-discover', [
  'body' => '{
  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"
}',
  'headers' => [
    'authorization' => '',
    'content-type' => 'application/json',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/v0.5/care-contexts/on-discover');
$request->setMethod(HTTP_METH_POST);

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

$request->setContentType('application/json');
$request->setBody(json_encode([
  'requestId' => '5f7a535d-a3fd-416b-b069-c97d021fbacd'
]));

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

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
append(json_encode([
  'requestId' => '5f7a535d-a3fd-416b-b069-c97d021fbacd'
]));
$request->setRequestUrl('{{baseUrl}}/v0.5/care-contexts/on-discover');
$request->setRequestMethod('POST');
$request->setBody($body);

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

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

echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v0.5/care-contexts/on-discover' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"
}'
$headers=@{}
$headers.Add("authorization", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v0.5/care-contexts/on-discover' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"
}'
import http.client

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

payload = "{\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\n}"

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

conn.request("POST", "/baseUrl/v0.5/care-contexts/on-discover", payload, headers)

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

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

url = "{{baseUrl}}/v0.5/care-contexts/on-discover"

payload = { "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd" }
headers = {
    "authorization": "",
    "content-type": "application/json"
}

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

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

url <- "{{baseUrl}}/v0.5/care-contexts/on-discover"

payload <- "{\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\n}"

encode <- "json"

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

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

url = URI("{{baseUrl}}/v0.5/care-contexts/on-discover")

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

request = Net::HTTP::Post.new(url)
request["authorization"] = ''
request["content-type"] = 'application/json'
request.body = "{\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\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/v0.5/care-contexts/on-discover') do |req|
  req.headers['authorization'] = ''
  req.body = "{\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\n}"
end

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

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/v0.5/care-contexts/on-discover";

    let payload = json!({"requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"});

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

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

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

    dbg!(results);
}
curl --request POST \
  --url {{baseUrl}}/v0.5/care-contexts/on-discover \
  --header 'authorization: ' \
  --header 'content-type: application/json' \
  --data '{
  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"
}'
echo '{
  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"
}' |  \
  http POST {{baseUrl}}/v0.5/care-contexts/on-discover \
  authorization:'' \
  content-type:application/json
wget --quiet \
  --method POST \
  --header 'authorization: ' \
  --header 'content-type: application/json' \
  --body-data '{\n  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"\n}' \
  --output-document \
  - {{baseUrl}}/v0.5/care-contexts/on-discover
import Foundation

let headers = [
  "authorization": "",
  "content-type": "application/json"
]
let parameters = ["requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v0.5/care-contexts/on-discover")! 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()
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v0.5/patients/find");

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

curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\n}");

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

(client/post "{{baseUrl}}/v0.5/patients/find" {:headers {:authorization ""}
                                                               :content-type :json
                                                               :form-params {:requestId "5f7a535d-a3fd-416b-b069-c97d021fbacd"}})
require "http/client"

url = "{{baseUrl}}/v0.5/patients/find"
headers = HTTP::Headers{
  "authorization" => ""
  "content-type" => "application/json"
}
reqBody = "{\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\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}}/v0.5/patients/find"),
    Headers =
    {
        { "authorization", "" },
    },
    Content = new StringContent("{\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\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}}/v0.5/patients/find");
var request = new RestRequest("", Method.Post);
request.AddHeader("authorization", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main

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

func main() {

	url := "{{baseUrl}}/v0.5/patients/find"

	payload := strings.NewReader("{\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\n}")

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

	req.Header.Add("authorization", "")
	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/v0.5/patients/find HTTP/1.1
Authorization: 
Content-Type: application/json
Host: example.com
Content-Length: 57

{
  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v0.5/patients/find")
  .setHeader("authorization", "")
  .setHeader("content-type", "application/json")
  .setBody("{\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\n}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/v0.5/patients/find"))
    .header("authorization", "")
    .header("content-type", "application/json")
    .method("POST", HttpRequest.BodyPublishers.ofString("{\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\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  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\n}");
Request request = new Request.Builder()
  .url("{{baseUrl}}/v0.5/patients/find")
  .post(body)
  .addHeader("authorization", "")
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v0.5/patients/find")
  .header("authorization", "")
  .header("content-type", "application/json")
  .body("{\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\n}")
  .asString();
const data = JSON.stringify({
  requestId: '5f7a535d-a3fd-416b-b069-c97d021fbacd'
});

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

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

xhr.open('POST', '{{baseUrl}}/v0.5/patients/find');
xhr.setRequestHeader('authorization', '');
xhr.setRequestHeader('content-type', 'application/json');

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

const options = {
  method: 'POST',
  url: '{{baseUrl}}/v0.5/patients/find',
  headers: {authorization: '', 'content-type': 'application/json'},
  data: {requestId: '5f7a535d-a3fd-416b-b069-c97d021fbacd'}
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/v0.5/patients/find';
const options = {
  method: 'POST',
  headers: {authorization: '', 'content-type': 'application/json'},
  body: '{"requestId":"5f7a535d-a3fd-416b-b069-c97d021fbacd"}'
};

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}}/v0.5/patients/find',
  method: 'POST',
  headers: {
    authorization: '',
    'content-type': 'application/json'
  },
  processData: false,
  data: '{\n  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"\n}'
};

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

val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\n}")
val request = Request.Builder()
  .url("{{baseUrl}}/v0.5/patients/find")
  .post(body)
  .addHeader("authorization", "")
  .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/v0.5/patients/find',
  headers: {
    authorization: '',
    '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({requestId: '5f7a535d-a3fd-416b-b069-c97d021fbacd'}));
req.end();
const request = require('request');

const options = {
  method: 'POST',
  url: '{{baseUrl}}/v0.5/patients/find',
  headers: {authorization: '', 'content-type': 'application/json'},
  body: {requestId: '5f7a535d-a3fd-416b-b069-c97d021fbacd'},
  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}}/v0.5/patients/find');

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

req.type('json');
req.send({
  requestId: '5f7a535d-a3fd-416b-b069-c97d021fbacd'
});

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}}/v0.5/patients/find',
  headers: {authorization: '', 'content-type': 'application/json'},
  data: {requestId: '5f7a535d-a3fd-416b-b069-c97d021fbacd'}
};

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

const url = '{{baseUrl}}/v0.5/patients/find';
const options = {
  method: 'POST',
  headers: {authorization: '', 'content-type': 'application/json'},
  body: '{"requestId":"5f7a535d-a3fd-416b-b069-c97d021fbacd"}'
};

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

NSDictionary *headers = @{ @"authorization": @"",
                           @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"requestId": @"5f7a535d-a3fd-416b-b069-c97d021fbacd" };

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

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v0.5/patients/find"]
                                                       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}}/v0.5/patients/find" in
let headers = Header.add_list (Header.init ()) [
  ("authorization", "");
  ("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\n}" in

Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/v0.5/patients/find",
  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([
    'requestId' => '5f7a535d-a3fd-416b-b069-c97d021fbacd'
  ]),
  CURLOPT_HTTPHEADER => [
    "authorization: ",
    "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}}/v0.5/patients/find', [
  'body' => '{
  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"
}',
  'headers' => [
    'authorization' => '',
    'content-type' => 'application/json',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/v0.5/patients/find');
$request->setMethod(HTTP_METH_POST);

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

$request->setContentType('application/json');
$request->setBody(json_encode([
  'requestId' => '5f7a535d-a3fd-416b-b069-c97d021fbacd'
]));

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

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
append(json_encode([
  'requestId' => '5f7a535d-a3fd-416b-b069-c97d021fbacd'
]));
$request->setRequestUrl('{{baseUrl}}/v0.5/patients/find');
$request->setRequestMethod('POST');
$request->setBody($body);

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

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

echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v0.5/patients/find' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"
}'
$headers=@{}
$headers.Add("authorization", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v0.5/patients/find' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"
}'
import http.client

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

payload = "{\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\n}"

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

conn.request("POST", "/baseUrl/v0.5/patients/find", payload, headers)

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

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

url = "{{baseUrl}}/v0.5/patients/find"

payload = { "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd" }
headers = {
    "authorization": "",
    "content-type": "application/json"
}

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

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

url <- "{{baseUrl}}/v0.5/patients/find"

payload <- "{\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\n}"

encode <- "json"

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

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

url = URI("{{baseUrl}}/v0.5/patients/find")

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

request = Net::HTTP::Post.new(url)
request["authorization"] = ''
request["content-type"] = 'application/json'
request.body = "{\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\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/v0.5/patients/find') do |req|
  req.headers['authorization'] = ''
  req.body = "{\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\n}"
end

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

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/v0.5/patients/find";

    let payload = json!({"requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"});

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

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

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

    dbg!(results);
}
curl --request POST \
  --url {{baseUrl}}/v0.5/patients/find \
  --header 'authorization: ' \
  --header 'content-type: application/json' \
  --data '{
  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"
}'
echo '{
  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"
}' |  \
  http POST {{baseUrl}}/v0.5/patients/find \
  authorization:'' \
  content-type:application/json
wget --quiet \
  --method POST \
  --header 'authorization: ' \
  --header 'content-type: application/json' \
  --body-data '{\n  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"\n}' \
  --output-document \
  - {{baseUrl}}/v0.5/patients/find
import Foundation

let headers = [
  "authorization": "",
  "content-type": "application/json"
]
let parameters = ["requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v0.5/patients/find")! 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()
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v0.5/links/link/add-contexts");

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

curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\n}");

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

(client/post "{{baseUrl}}/v0.5/links/link/add-contexts" {:headers {:authorization ""}
                                                                         :content-type :json
                                                                         :form-params {:requestId "5f7a535d-a3fd-416b-b069-c97d021fbacd"}})
require "http/client"

url = "{{baseUrl}}/v0.5/links/link/add-contexts"
headers = HTTP::Headers{
  "authorization" => ""
  "content-type" => "application/json"
}
reqBody = "{\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\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}}/v0.5/links/link/add-contexts"),
    Headers =
    {
        { "authorization", "" },
    },
    Content = new StringContent("{\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\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}}/v0.5/links/link/add-contexts");
var request = new RestRequest("", Method.Post);
request.AddHeader("authorization", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main

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

func main() {

	url := "{{baseUrl}}/v0.5/links/link/add-contexts"

	payload := strings.NewReader("{\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\n}")

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

	req.Header.Add("authorization", "")
	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/v0.5/links/link/add-contexts HTTP/1.1
Authorization: 
Content-Type: application/json
Host: example.com
Content-Length: 57

{
  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v0.5/links/link/add-contexts")
  .setHeader("authorization", "")
  .setHeader("content-type", "application/json")
  .setBody("{\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\n}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/v0.5/links/link/add-contexts"))
    .header("authorization", "")
    .header("content-type", "application/json")
    .method("POST", HttpRequest.BodyPublishers.ofString("{\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\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  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\n}");
Request request = new Request.Builder()
  .url("{{baseUrl}}/v0.5/links/link/add-contexts")
  .post(body)
  .addHeader("authorization", "")
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v0.5/links/link/add-contexts")
  .header("authorization", "")
  .header("content-type", "application/json")
  .body("{\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\n}")
  .asString();
const data = JSON.stringify({
  requestId: '5f7a535d-a3fd-416b-b069-c97d021fbacd'
});

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

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

xhr.open('POST', '{{baseUrl}}/v0.5/links/link/add-contexts');
xhr.setRequestHeader('authorization', '');
xhr.setRequestHeader('content-type', 'application/json');

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

const options = {
  method: 'POST',
  url: '{{baseUrl}}/v0.5/links/link/add-contexts',
  headers: {authorization: '', 'content-type': 'application/json'},
  data: {requestId: '5f7a535d-a3fd-416b-b069-c97d021fbacd'}
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/v0.5/links/link/add-contexts';
const options = {
  method: 'POST',
  headers: {authorization: '', 'content-type': 'application/json'},
  body: '{"requestId":"5f7a535d-a3fd-416b-b069-c97d021fbacd"}'
};

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}}/v0.5/links/link/add-contexts',
  method: 'POST',
  headers: {
    authorization: '',
    'content-type': 'application/json'
  },
  processData: false,
  data: '{\n  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"\n}'
};

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

val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\n}")
val request = Request.Builder()
  .url("{{baseUrl}}/v0.5/links/link/add-contexts")
  .post(body)
  .addHeader("authorization", "")
  .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/v0.5/links/link/add-contexts',
  headers: {
    authorization: '',
    '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({requestId: '5f7a535d-a3fd-416b-b069-c97d021fbacd'}));
req.end();
const request = require('request');

const options = {
  method: 'POST',
  url: '{{baseUrl}}/v0.5/links/link/add-contexts',
  headers: {authorization: '', 'content-type': 'application/json'},
  body: {requestId: '5f7a535d-a3fd-416b-b069-c97d021fbacd'},
  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}}/v0.5/links/link/add-contexts');

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

req.type('json');
req.send({
  requestId: '5f7a535d-a3fd-416b-b069-c97d021fbacd'
});

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}}/v0.5/links/link/add-contexts',
  headers: {authorization: '', 'content-type': 'application/json'},
  data: {requestId: '5f7a535d-a3fd-416b-b069-c97d021fbacd'}
};

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

const url = '{{baseUrl}}/v0.5/links/link/add-contexts';
const options = {
  method: 'POST',
  headers: {authorization: '', 'content-type': 'application/json'},
  body: '{"requestId":"5f7a535d-a3fd-416b-b069-c97d021fbacd"}'
};

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

NSDictionary *headers = @{ @"authorization": @"",
                           @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"requestId": @"5f7a535d-a3fd-416b-b069-c97d021fbacd" };

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

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v0.5/links/link/add-contexts"]
                                                       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}}/v0.5/links/link/add-contexts" in
let headers = Header.add_list (Header.init ()) [
  ("authorization", "");
  ("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\n}" in

Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/v0.5/links/link/add-contexts",
  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([
    'requestId' => '5f7a535d-a3fd-416b-b069-c97d021fbacd'
  ]),
  CURLOPT_HTTPHEADER => [
    "authorization: ",
    "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}}/v0.5/links/link/add-contexts', [
  'body' => '{
  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"
}',
  'headers' => [
    'authorization' => '',
    'content-type' => 'application/json',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/v0.5/links/link/add-contexts');
$request->setMethod(HTTP_METH_POST);

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

$request->setContentType('application/json');
$request->setBody(json_encode([
  'requestId' => '5f7a535d-a3fd-416b-b069-c97d021fbacd'
]));

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

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
append(json_encode([
  'requestId' => '5f7a535d-a3fd-416b-b069-c97d021fbacd'
]));
$request->setRequestUrl('{{baseUrl}}/v0.5/links/link/add-contexts');
$request->setRequestMethod('POST');
$request->setBody($body);

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

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

echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v0.5/links/link/add-contexts' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"
}'
$headers=@{}
$headers.Add("authorization", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v0.5/links/link/add-contexts' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"
}'
import http.client

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

payload = "{\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\n}"

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

conn.request("POST", "/baseUrl/v0.5/links/link/add-contexts", payload, headers)

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

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

url = "{{baseUrl}}/v0.5/links/link/add-contexts"

payload = { "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd" }
headers = {
    "authorization": "",
    "content-type": "application/json"
}

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

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

url <- "{{baseUrl}}/v0.5/links/link/add-contexts"

payload <- "{\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\n}"

encode <- "json"

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

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

url = URI("{{baseUrl}}/v0.5/links/link/add-contexts")

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

request = Net::HTTP::Post.new(url)
request["authorization"] = ''
request["content-type"] = 'application/json'
request.body = "{\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\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/v0.5/links/link/add-contexts') do |req|
  req.headers['authorization'] = ''
  req.body = "{\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\n}"
end

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

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/v0.5/links/link/add-contexts";

    let payload = json!({"requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"});

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

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

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

    dbg!(results);
}
curl --request POST \
  --url {{baseUrl}}/v0.5/links/link/add-contexts \
  --header 'authorization: ' \
  --header 'content-type: application/json' \
  --data '{
  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"
}'
echo '{
  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"
}' |  \
  http POST {{baseUrl}}/v0.5/links/link/add-contexts \
  authorization:'' \
  content-type:application/json
wget --quiet \
  --method POST \
  --header 'authorization: ' \
  --header 'content-type: application/json' \
  --body-data '{\n  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"\n}' \
  --output-document \
  - {{baseUrl}}/v0.5/links/link/add-contexts
import Foundation

let headers = [
  "authorization": "",
  "content-type": "application/json"
]
let parameters = ["requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v0.5/links/link/add-contexts")! 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()
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v0.5/links/link/on-init");

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

curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\",\n  \"transactionId\": \"a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d\"\n}");

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

(client/post "{{baseUrl}}/v0.5/links/link/on-init" {:headers {:authorization ""}
                                                                    :content-type :json
                                                                    :form-params {:requestId "5f7a535d-a3fd-416b-b069-c97d021fbacd"
                                                                                  :transactionId "a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d"}})
require "http/client"

url = "{{baseUrl}}/v0.5/links/link/on-init"
headers = HTTP::Headers{
  "authorization" => ""
  "content-type" => "application/json"
}
reqBody = "{\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\",\n  \"transactionId\": \"a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d\"\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}}/v0.5/links/link/on-init"),
    Headers =
    {
        { "authorization", "" },
    },
    Content = new StringContent("{\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\",\n  \"transactionId\": \"a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d\"\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}}/v0.5/links/link/on-init");
var request = new RestRequest("", Method.Post);
request.AddHeader("authorization", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\",\n  \"transactionId\": \"a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main

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

func main() {

	url := "{{baseUrl}}/v0.5/links/link/on-init"

	payload := strings.NewReader("{\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\",\n  \"transactionId\": \"a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d\"\n}")

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

	req.Header.Add("authorization", "")
	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/v0.5/links/link/on-init HTTP/1.1
Authorization: 
Content-Type: application/json
Host: example.com
Content-Length: 117

{
  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd",
  "transactionId": "a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d"
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v0.5/links/link/on-init")
  .setHeader("authorization", "")
  .setHeader("content-type", "application/json")
  .setBody("{\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\",\n  \"transactionId\": \"a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d\"\n}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/v0.5/links/link/on-init"))
    .header("authorization", "")
    .header("content-type", "application/json")
    .method("POST", HttpRequest.BodyPublishers.ofString("{\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\",\n  \"transactionId\": \"a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d\"\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  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\",\n  \"transactionId\": \"a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d\"\n}");
Request request = new Request.Builder()
  .url("{{baseUrl}}/v0.5/links/link/on-init")
  .post(body)
  .addHeader("authorization", "")
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v0.5/links/link/on-init")
  .header("authorization", "")
  .header("content-type", "application/json")
  .body("{\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\",\n  \"transactionId\": \"a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d\"\n}")
  .asString();
const data = JSON.stringify({
  requestId: '5f7a535d-a3fd-416b-b069-c97d021fbacd',
  transactionId: 'a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d'
});

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

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

xhr.open('POST', '{{baseUrl}}/v0.5/links/link/on-init');
xhr.setRequestHeader('authorization', '');
xhr.setRequestHeader('content-type', 'application/json');

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

const options = {
  method: 'POST',
  url: '{{baseUrl}}/v0.5/links/link/on-init',
  headers: {authorization: '', 'content-type': 'application/json'},
  data: {
    requestId: '5f7a535d-a3fd-416b-b069-c97d021fbacd',
    transactionId: 'a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d'
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/v0.5/links/link/on-init';
const options = {
  method: 'POST',
  headers: {authorization: '', 'content-type': 'application/json'},
  body: '{"requestId":"5f7a535d-a3fd-416b-b069-c97d021fbacd","transactionId":"a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d"}'
};

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}}/v0.5/links/link/on-init',
  method: 'POST',
  headers: {
    authorization: '',
    'content-type': 'application/json'
  },
  processData: false,
  data: '{\n  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd",\n  "transactionId": "a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d"\n}'
};

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

val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\",\n  \"transactionId\": \"a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d\"\n}")
val request = Request.Builder()
  .url("{{baseUrl}}/v0.5/links/link/on-init")
  .post(body)
  .addHeader("authorization", "")
  .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/v0.5/links/link/on-init',
  headers: {
    authorization: '',
    '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({
  requestId: '5f7a535d-a3fd-416b-b069-c97d021fbacd',
  transactionId: 'a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d'
}));
req.end();
const request = require('request');

const options = {
  method: 'POST',
  url: '{{baseUrl}}/v0.5/links/link/on-init',
  headers: {authorization: '', 'content-type': 'application/json'},
  body: {
    requestId: '5f7a535d-a3fd-416b-b069-c97d021fbacd',
    transactionId: 'a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d'
  },
  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}}/v0.5/links/link/on-init');

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

req.type('json');
req.send({
  requestId: '5f7a535d-a3fd-416b-b069-c97d021fbacd',
  transactionId: 'a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d'
});

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}}/v0.5/links/link/on-init',
  headers: {authorization: '', 'content-type': 'application/json'},
  data: {
    requestId: '5f7a535d-a3fd-416b-b069-c97d021fbacd',
    transactionId: 'a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d'
  }
};

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

const url = '{{baseUrl}}/v0.5/links/link/on-init';
const options = {
  method: 'POST',
  headers: {authorization: '', 'content-type': 'application/json'},
  body: '{"requestId":"5f7a535d-a3fd-416b-b069-c97d021fbacd","transactionId":"a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d"}'
};

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

NSDictionary *headers = @{ @"authorization": @"",
                           @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"requestId": @"5f7a535d-a3fd-416b-b069-c97d021fbacd",
                              @"transactionId": @"a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d" };

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

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v0.5/links/link/on-init"]
                                                       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}}/v0.5/links/link/on-init" in
let headers = Header.add_list (Header.init ()) [
  ("authorization", "");
  ("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\",\n  \"transactionId\": \"a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d\"\n}" in

Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/v0.5/links/link/on-init",
  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([
    'requestId' => '5f7a535d-a3fd-416b-b069-c97d021fbacd',
    'transactionId' => 'a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d'
  ]),
  CURLOPT_HTTPHEADER => [
    "authorization: ",
    "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}}/v0.5/links/link/on-init', [
  'body' => '{
  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd",
  "transactionId": "a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d"
}',
  'headers' => [
    'authorization' => '',
    'content-type' => 'application/json',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/v0.5/links/link/on-init');
$request->setMethod(HTTP_METH_POST);

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

$request->setContentType('application/json');
$request->setBody(json_encode([
  'requestId' => '5f7a535d-a3fd-416b-b069-c97d021fbacd',
  'transactionId' => 'a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d'
]));

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

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
append(json_encode([
  'requestId' => '5f7a535d-a3fd-416b-b069-c97d021fbacd',
  'transactionId' => 'a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d'
]));
$request->setRequestUrl('{{baseUrl}}/v0.5/links/link/on-init');
$request->setRequestMethod('POST');
$request->setBody($body);

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

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

echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v0.5/links/link/on-init' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd",
  "transactionId": "a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d"
}'
$headers=@{}
$headers.Add("authorization", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v0.5/links/link/on-init' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd",
  "transactionId": "a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d"
}'
import http.client

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

payload = "{\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\",\n  \"transactionId\": \"a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d\"\n}"

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

conn.request("POST", "/baseUrl/v0.5/links/link/on-init", payload, headers)

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

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

url = "{{baseUrl}}/v0.5/links/link/on-init"

payload = {
    "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd",
    "transactionId": "a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d"
}
headers = {
    "authorization": "",
    "content-type": "application/json"
}

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

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

url <- "{{baseUrl}}/v0.5/links/link/on-init"

payload <- "{\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\",\n  \"transactionId\": \"a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d\"\n}"

encode <- "json"

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

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

url = URI("{{baseUrl}}/v0.5/links/link/on-init")

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

request = Net::HTTP::Post.new(url)
request["authorization"] = ''
request["content-type"] = 'application/json'
request.body = "{\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\",\n  \"transactionId\": \"a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d\"\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/v0.5/links/link/on-init') do |req|
  req.headers['authorization'] = ''
  req.body = "{\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\",\n  \"transactionId\": \"a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d\"\n}"
end

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

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/v0.5/links/link/on-init";

    let payload = json!({
        "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd",
        "transactionId": "a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d"
    });

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

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

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

    dbg!(results);
}
curl --request POST \
  --url {{baseUrl}}/v0.5/links/link/on-init \
  --header 'authorization: ' \
  --header 'content-type: application/json' \
  --data '{
  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd",
  "transactionId": "a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d"
}'
echo '{
  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd",
  "transactionId": "a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d"
}' |  \
  http POST {{baseUrl}}/v0.5/links/link/on-init \
  authorization:'' \
  content-type:application/json
wget --quiet \
  --method POST \
  --header 'authorization: ' \
  --header 'content-type: application/json' \
  --body-data '{\n  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd",\n  "transactionId": "a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d"\n}' \
  --output-document \
  - {{baseUrl}}/v0.5/links/link/on-init
import Foundation

let headers = [
  "authorization": "",
  "content-type": "application/json"
]
let parameters = [
  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd",
  "transactionId": "a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d"
] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v0.5/links/link/on-init")! 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()
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v0.5/links/link/on-confirm");

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

curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\n}");

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

(client/post "{{baseUrl}}/v0.5/links/link/on-confirm" {:headers {:authorization ""}
                                                                       :content-type :json
                                                                       :form-params {:requestId "5f7a535d-a3fd-416b-b069-c97d021fbacd"}})
require "http/client"

url = "{{baseUrl}}/v0.5/links/link/on-confirm"
headers = HTTP::Headers{
  "authorization" => ""
  "content-type" => "application/json"
}
reqBody = "{\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\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}}/v0.5/links/link/on-confirm"),
    Headers =
    {
        { "authorization", "" },
    },
    Content = new StringContent("{\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\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}}/v0.5/links/link/on-confirm");
var request = new RestRequest("", Method.Post);
request.AddHeader("authorization", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main

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

func main() {

	url := "{{baseUrl}}/v0.5/links/link/on-confirm"

	payload := strings.NewReader("{\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\n}")

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

	req.Header.Add("authorization", "")
	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/v0.5/links/link/on-confirm HTTP/1.1
Authorization: 
Content-Type: application/json
Host: example.com
Content-Length: 57

{
  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v0.5/links/link/on-confirm")
  .setHeader("authorization", "")
  .setHeader("content-type", "application/json")
  .setBody("{\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\n}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/v0.5/links/link/on-confirm"))
    .header("authorization", "")
    .header("content-type", "application/json")
    .method("POST", HttpRequest.BodyPublishers.ofString("{\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\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  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\n}");
Request request = new Request.Builder()
  .url("{{baseUrl}}/v0.5/links/link/on-confirm")
  .post(body)
  .addHeader("authorization", "")
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v0.5/links/link/on-confirm")
  .header("authorization", "")
  .header("content-type", "application/json")
  .body("{\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\n}")
  .asString();
const data = JSON.stringify({
  requestId: '5f7a535d-a3fd-416b-b069-c97d021fbacd'
});

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

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

xhr.open('POST', '{{baseUrl}}/v0.5/links/link/on-confirm');
xhr.setRequestHeader('authorization', '');
xhr.setRequestHeader('content-type', 'application/json');

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

const options = {
  method: 'POST',
  url: '{{baseUrl}}/v0.5/links/link/on-confirm',
  headers: {authorization: '', 'content-type': 'application/json'},
  data: {requestId: '5f7a535d-a3fd-416b-b069-c97d021fbacd'}
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/v0.5/links/link/on-confirm';
const options = {
  method: 'POST',
  headers: {authorization: '', 'content-type': 'application/json'},
  body: '{"requestId":"5f7a535d-a3fd-416b-b069-c97d021fbacd"}'
};

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}}/v0.5/links/link/on-confirm',
  method: 'POST',
  headers: {
    authorization: '',
    'content-type': 'application/json'
  },
  processData: false,
  data: '{\n  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"\n}'
};

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

val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\n}")
val request = Request.Builder()
  .url("{{baseUrl}}/v0.5/links/link/on-confirm")
  .post(body)
  .addHeader("authorization", "")
  .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/v0.5/links/link/on-confirm',
  headers: {
    authorization: '',
    '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({requestId: '5f7a535d-a3fd-416b-b069-c97d021fbacd'}));
req.end();
const request = require('request');

const options = {
  method: 'POST',
  url: '{{baseUrl}}/v0.5/links/link/on-confirm',
  headers: {authorization: '', 'content-type': 'application/json'},
  body: {requestId: '5f7a535d-a3fd-416b-b069-c97d021fbacd'},
  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}}/v0.5/links/link/on-confirm');

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

req.type('json');
req.send({
  requestId: '5f7a535d-a3fd-416b-b069-c97d021fbacd'
});

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}}/v0.5/links/link/on-confirm',
  headers: {authorization: '', 'content-type': 'application/json'},
  data: {requestId: '5f7a535d-a3fd-416b-b069-c97d021fbacd'}
};

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

const url = '{{baseUrl}}/v0.5/links/link/on-confirm';
const options = {
  method: 'POST',
  headers: {authorization: '', 'content-type': 'application/json'},
  body: '{"requestId":"5f7a535d-a3fd-416b-b069-c97d021fbacd"}'
};

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

NSDictionary *headers = @{ @"authorization": @"",
                           @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"requestId": @"5f7a535d-a3fd-416b-b069-c97d021fbacd" };

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

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v0.5/links/link/on-confirm"]
                                                       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}}/v0.5/links/link/on-confirm" in
let headers = Header.add_list (Header.init ()) [
  ("authorization", "");
  ("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\n}" in

Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/v0.5/links/link/on-confirm",
  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([
    'requestId' => '5f7a535d-a3fd-416b-b069-c97d021fbacd'
  ]),
  CURLOPT_HTTPHEADER => [
    "authorization: ",
    "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}}/v0.5/links/link/on-confirm', [
  'body' => '{
  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"
}',
  'headers' => [
    'authorization' => '',
    'content-type' => 'application/json',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/v0.5/links/link/on-confirm');
$request->setMethod(HTTP_METH_POST);

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

$request->setContentType('application/json');
$request->setBody(json_encode([
  'requestId' => '5f7a535d-a3fd-416b-b069-c97d021fbacd'
]));

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

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
append(json_encode([
  'requestId' => '5f7a535d-a3fd-416b-b069-c97d021fbacd'
]));
$request->setRequestUrl('{{baseUrl}}/v0.5/links/link/on-confirm');
$request->setRequestMethod('POST');
$request->setBody($body);

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

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

echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v0.5/links/link/on-confirm' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"
}'
$headers=@{}
$headers.Add("authorization", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v0.5/links/link/on-confirm' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"
}'
import http.client

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

payload = "{\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\n}"

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

conn.request("POST", "/baseUrl/v0.5/links/link/on-confirm", payload, headers)

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

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

url = "{{baseUrl}}/v0.5/links/link/on-confirm"

payload = { "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd" }
headers = {
    "authorization": "",
    "content-type": "application/json"
}

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

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

url <- "{{baseUrl}}/v0.5/links/link/on-confirm"

payload <- "{\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\n}"

encode <- "json"

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

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

url = URI("{{baseUrl}}/v0.5/links/link/on-confirm")

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

request = Net::HTTP::Post.new(url)
request["authorization"] = ''
request["content-type"] = 'application/json'
request.body = "{\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\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/v0.5/links/link/on-confirm') do |req|
  req.headers['authorization'] = ''
  req.body = "{\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\n}"
end

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

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/v0.5/links/link/on-confirm";

    let payload = json!({"requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"});

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

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

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

    dbg!(results);
}
curl --request POST \
  --url {{baseUrl}}/v0.5/links/link/on-confirm \
  --header 'authorization: ' \
  --header 'content-type: application/json' \
  --data '{
  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"
}'
echo '{
  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"
}' |  \
  http POST {{baseUrl}}/v0.5/links/link/on-confirm \
  authorization:'' \
  content-type:application/json
wget --quiet \
  --method POST \
  --header 'authorization: ' \
  --header 'content-type: application/json' \
  --body-data '{\n  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"\n}' \
  --output-document \
  - {{baseUrl}}/v0.5/links/link/on-confirm
import Foundation

let headers = [
  "authorization": "",
  "content-type": "application/json"
]
let parameters = ["requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v0.5/links/link/on-confirm")! 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()
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v0.5/heartbeat");

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

(client/get "{{baseUrl}}/v0.5/heartbeat")
require "http/client"

url = "{{baseUrl}}/v0.5/heartbeat"

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

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

func main() {

	url := "{{baseUrl}}/v0.5/heartbeat"

	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/v0.5/heartbeat HTTP/1.1
Host: example.com

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

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

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

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

const options = {method: 'GET', url: '{{baseUrl}}/v0.5/heartbeat'};

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

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

val request = Request.Builder()
  .url("{{baseUrl}}/v0.5/heartbeat")
  .get()
  .build()

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

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

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

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

const req = unirest('GET', '{{baseUrl}}/v0.5/heartbeat');

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}}/v0.5/heartbeat'};

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

const url = '{{baseUrl}}/v0.5/heartbeat';
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}}/v0.5/heartbeat"]
                                                       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}}/v0.5/heartbeat" in

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

echo $response->getBody();
setUrl('{{baseUrl}}/v0.5/heartbeat');
$request->setMethod(HTTP_METH_GET);

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

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

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

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

conn.request("GET", "/baseUrl/v0.5/heartbeat")

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

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

url = "{{baseUrl}}/v0.5/heartbeat"

response = requests.get(url)

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

url <- "{{baseUrl}}/v0.5/heartbeat"

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

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

url = URI("{{baseUrl}}/v0.5/heartbeat")

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/v0.5/heartbeat') do |req|
end

puts response.status
puts response.body
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/v0.5/heartbeat";

    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}}/v0.5/heartbeat
http GET {{baseUrl}}/v0.5/heartbeat
wget --quiet \
  --method GET \
  --output-document \
  - {{baseUrl}}/v0.5/heartbeat
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v0.5/heartbeat")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"

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

dataTask.resume()
POST Response to patient's share profile request
{{baseUrl}}/v0.5/patients/profile/on-share
HEADERS

Authorization
BODY json

{
  "acknowledgement": {
    "healthId": "",
    "status": ""
  },
  "error": {
    "code": 0,
    "message": ""
  },
  "requestId": "",
  "resp": {
    "requestId": ""
  },
  "timestamp": ""
}
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v0.5/patients/profile/on-share");

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

curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n  \"acknowledgement\": {\n    \"healthId\": \"@\"\n  },\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\n}");

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

(client/post "{{baseUrl}}/v0.5/patients/profile/on-share" {:headers {:authorization ""}
                                                                           :content-type :json
                                                                           :form-params {:acknowledgement {:healthId "@"}
                                                                                         :requestId "5f7a535d-a3fd-416b-b069-c97d021fbacd"}})
require "http/client"

url = "{{baseUrl}}/v0.5/patients/profile/on-share"
headers = HTTP::Headers{
  "authorization" => ""
  "content-type" => "application/json"
}
reqBody = "{\n  \"acknowledgement\": {\n    \"healthId\": \"@\"\n  },\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\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}}/v0.5/patients/profile/on-share"),
    Headers =
    {
        { "authorization", "" },
    },
    Content = new StringContent("{\n  \"acknowledgement\": {\n    \"healthId\": \"@\"\n  },\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\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}}/v0.5/patients/profile/on-share");
var request = new RestRequest("", Method.Post);
request.AddHeader("authorization", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n  \"acknowledgement\": {\n    \"healthId\": \"@\"\n  },\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main

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

func main() {

	url := "{{baseUrl}}/v0.5/patients/profile/on-share"

	payload := strings.NewReader("{\n  \"acknowledgement\": {\n    \"healthId\": \"@\"\n  },\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\n}")

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

	req.Header.Add("authorization", "")
	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/v0.5/patients/profile/on-share HTTP/1.1
Authorization: 
Content-Type: application/json
Host: example.com
Content-Length: 123

{
  "acknowledgement": {
    "healthId": "@"
  },
  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v0.5/patients/profile/on-share")
  .setHeader("authorization", "")
  .setHeader("content-type", "application/json")
  .setBody("{\n  \"acknowledgement\": {\n    \"healthId\": \"@\"\n  },\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\n}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/v0.5/patients/profile/on-share"))
    .header("authorization", "")
    .header("content-type", "application/json")
    .method("POST", HttpRequest.BodyPublishers.ofString("{\n  \"acknowledgement\": {\n    \"healthId\": \"@\"\n  },\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\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  \"acknowledgement\": {\n    \"healthId\": \"@\"\n  },\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\n}");
Request request = new Request.Builder()
  .url("{{baseUrl}}/v0.5/patients/profile/on-share")
  .post(body)
  .addHeader("authorization", "")
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v0.5/patients/profile/on-share")
  .header("authorization", "")
  .header("content-type", "application/json")
  .body("{\n  \"acknowledgement\": {\n    \"healthId\": \"@\"\n  },\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\n}")
  .asString();
const data = JSON.stringify({
  acknowledgement: {
    healthId: '@'
  },
  requestId: '5f7a535d-a3fd-416b-b069-c97d021fbacd'
});

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

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

xhr.open('POST', '{{baseUrl}}/v0.5/patients/profile/on-share');
xhr.setRequestHeader('authorization', '');
xhr.setRequestHeader('content-type', 'application/json');

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

const options = {
  method: 'POST',
  url: '{{baseUrl}}/v0.5/patients/profile/on-share',
  headers: {authorization: '', 'content-type': 'application/json'},
  data: {
    acknowledgement: {healthId: '@'},
    requestId: '5f7a535d-a3fd-416b-b069-c97d021fbacd'
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/v0.5/patients/profile/on-share';
const options = {
  method: 'POST',
  headers: {authorization: '', 'content-type': 'application/json'},
  body: '{"acknowledgement":{"healthId":"@"},"requestId":"5f7a535d-a3fd-416b-b069-c97d021fbacd"}'
};

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}}/v0.5/patients/profile/on-share',
  method: 'POST',
  headers: {
    authorization: '',
    'content-type': 'application/json'
  },
  processData: false,
  data: '{\n  "acknowledgement": {\n    "healthId": "@"\n  },\n  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"\n}'
};

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

val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n  \"acknowledgement\": {\n    \"healthId\": \"@\"\n  },\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\n}")
val request = Request.Builder()
  .url("{{baseUrl}}/v0.5/patients/profile/on-share")
  .post(body)
  .addHeader("authorization", "")
  .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/v0.5/patients/profile/on-share',
  headers: {
    authorization: '',
    '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({
  acknowledgement: {healthId: '@'},
  requestId: '5f7a535d-a3fd-416b-b069-c97d021fbacd'
}));
req.end();
const request = require('request');

const options = {
  method: 'POST',
  url: '{{baseUrl}}/v0.5/patients/profile/on-share',
  headers: {authorization: '', 'content-type': 'application/json'},
  body: {
    acknowledgement: {healthId: '@'},
    requestId: '5f7a535d-a3fd-416b-b069-c97d021fbacd'
  },
  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}}/v0.5/patients/profile/on-share');

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

req.type('json');
req.send({
  acknowledgement: {
    healthId: '@'
  },
  requestId: '5f7a535d-a3fd-416b-b069-c97d021fbacd'
});

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}}/v0.5/patients/profile/on-share',
  headers: {authorization: '', 'content-type': 'application/json'},
  data: {
    acknowledgement: {healthId: '@'},
    requestId: '5f7a535d-a3fd-416b-b069-c97d021fbacd'
  }
};

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

const url = '{{baseUrl}}/v0.5/patients/profile/on-share';
const options = {
  method: 'POST',
  headers: {authorization: '', 'content-type': 'application/json'},
  body: '{"acknowledgement":{"healthId":"@"},"requestId":"5f7a535d-a3fd-416b-b069-c97d021fbacd"}'
};

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

NSDictionary *headers = @{ @"authorization": @"",
                           @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"acknowledgement": @{ @"healthId": @"@" },
                              @"requestId": @"5f7a535d-a3fd-416b-b069-c97d021fbacd" };

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

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v0.5/patients/profile/on-share"]
                                                       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}}/v0.5/patients/profile/on-share" in
let headers = Header.add_list (Header.init ()) [
  ("authorization", "");
  ("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n  \"acknowledgement\": {\n    \"healthId\": \"@\"\n  },\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\n}" in

Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/v0.5/patients/profile/on-share",
  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([
    'acknowledgement' => [
        'healthId' => '@'
    ],
    'requestId' => '5f7a535d-a3fd-416b-b069-c97d021fbacd'
  ]),
  CURLOPT_HTTPHEADER => [
    "authorization: ",
    "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}}/v0.5/patients/profile/on-share', [
  'body' => '{
  "acknowledgement": {
    "healthId": "@"
  },
  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"
}',
  'headers' => [
    'authorization' => '',
    'content-type' => 'application/json',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/v0.5/patients/profile/on-share');
$request->setMethod(HTTP_METH_POST);

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

$request->setContentType('application/json');
$request->setBody(json_encode([
  'acknowledgement' => [
    'healthId' => '@'
  ],
  'requestId' => '5f7a535d-a3fd-416b-b069-c97d021fbacd'
]));

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

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
append(json_encode([
  'acknowledgement' => [
    'healthId' => '@'
  ],
  'requestId' => '5f7a535d-a3fd-416b-b069-c97d021fbacd'
]));
$request->setRequestUrl('{{baseUrl}}/v0.5/patients/profile/on-share');
$request->setRequestMethod('POST');
$request->setBody($body);

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

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

echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v0.5/patients/profile/on-share' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "acknowledgement": {
    "healthId": "@"
  },
  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"
}'
$headers=@{}
$headers.Add("authorization", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v0.5/patients/profile/on-share' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "acknowledgement": {
    "healthId": "@"
  },
  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"
}'
import http.client

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

payload = "{\n  \"acknowledgement\": {\n    \"healthId\": \"@\"\n  },\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\n}"

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

conn.request("POST", "/baseUrl/v0.5/patients/profile/on-share", payload, headers)

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

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

url = "{{baseUrl}}/v0.5/patients/profile/on-share"

payload = {
    "acknowledgement": { "healthId": "@" },
    "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"
}
headers = {
    "authorization": "",
    "content-type": "application/json"
}

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

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

url <- "{{baseUrl}}/v0.5/patients/profile/on-share"

payload <- "{\n  \"acknowledgement\": {\n    \"healthId\": \"@\"\n  },\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\n}"

encode <- "json"

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

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

url = URI("{{baseUrl}}/v0.5/patients/profile/on-share")

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

request = Net::HTTP::Post.new(url)
request["authorization"] = ''
request["content-type"] = 'application/json'
request.body = "{\n  \"acknowledgement\": {\n    \"healthId\": \"@\"\n  },\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\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/v0.5/patients/profile/on-share') do |req|
  req.headers['authorization'] = ''
  req.body = "{\n  \"acknowledgement\": {\n    \"healthId\": \"@\"\n  },\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\n}"
end

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

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/v0.5/patients/profile/on-share";

    let payload = json!({
        "acknowledgement": json!({"healthId": "@"}),
        "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"
    });

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

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

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

    dbg!(results);
}
curl --request POST \
  --url {{baseUrl}}/v0.5/patients/profile/on-share \
  --header 'authorization: ' \
  --header 'content-type: application/json' \
  --data '{
  "acknowledgement": {
    "healthId": "@"
  },
  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"
}'
echo '{
  "acknowledgement": {
    "healthId": "@"
  },
  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"
}' |  \
  http POST {{baseUrl}}/v0.5/patients/profile/on-share \
  authorization:'' \
  content-type:application/json
wget --quiet \
  --method POST \
  --header 'authorization: ' \
  --header 'content-type: application/json' \
  --body-data '{\n  "acknowledgement": {\n    "healthId": "@"\n  },\n  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"\n}' \
  --output-document \
  - {{baseUrl}}/v0.5/patients/profile/on-share
import Foundation

let headers = [
  "authorization": "",
  "content-type": "application/json"
]
let parameters = [
  "acknowledgement": ["healthId": "@"],
  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"
] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v0.5/patients/profile/on-share")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

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

dataTask.resume()
POST Callback API for -subscription-requests-hiu-notify to acknowledge receipt of notification.
{{baseUrl}}/v0.5/subscription-requests/hiu/on-notify
HEADERS

Authorization
BODY json

{
  "acknowledgement": {
    "status": "",
    "subscriptionRequestId": ""
  },
  "error": {
    "code": 0,
    "message": ""
  },
  "requestId": "",
  "resp": {
    "requestId": ""
  },
  "timestamp": ""
}
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v0.5/subscription-requests/hiu/on-notify");

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

curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n  \"acknowledgement\": {\n    \"subscriptionRequestId\": \"subscription Id\"\n  },\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\n}");

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

(client/post "{{baseUrl}}/v0.5/subscription-requests/hiu/on-notify" {:headers {:authorization ""}
                                                                                     :content-type :json
                                                                                     :form-params {:acknowledgement {:subscriptionRequestId "subscription Id"}
                                                                                                   :requestId "5f7a535d-a3fd-416b-b069-c97d021fbacd"}})
require "http/client"

url = "{{baseUrl}}/v0.5/subscription-requests/hiu/on-notify"
headers = HTTP::Headers{
  "authorization" => ""
  "content-type" => "application/json"
}
reqBody = "{\n  \"acknowledgement\": {\n    \"subscriptionRequestId\": \"subscription Id\"\n  },\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\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}}/v0.5/subscription-requests/hiu/on-notify"),
    Headers =
    {
        { "authorization", "" },
    },
    Content = new StringContent("{\n  \"acknowledgement\": {\n    \"subscriptionRequestId\": \"subscription Id\"\n  },\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\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}}/v0.5/subscription-requests/hiu/on-notify");
var request = new RestRequest("", Method.Post);
request.AddHeader("authorization", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n  \"acknowledgement\": {\n    \"subscriptionRequestId\": \"subscription Id\"\n  },\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main

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

func main() {

	url := "{{baseUrl}}/v0.5/subscription-requests/hiu/on-notify"

	payload := strings.NewReader("{\n  \"acknowledgement\": {\n    \"subscriptionRequestId\": \"subscription Id\"\n  },\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\n}")

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

	req.Header.Add("authorization", "")
	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/v0.5/subscription-requests/hiu/on-notify HTTP/1.1
Authorization: 
Content-Type: application/json
Host: example.com
Content-Length: 132

{
  "acknowledgement": {
    "subscriptionRequestId": "subscription Id"
  },
  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v0.5/subscription-requests/hiu/on-notify")
  .setHeader("authorization", "")
  .setHeader("content-type", "application/json")
  .setBody("{\n  \"acknowledgement\": {\n    \"subscriptionRequestId\": \"subscription Id\"\n  },\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\n}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/v0.5/subscription-requests/hiu/on-notify"))
    .header("authorization", "")
    .header("content-type", "application/json")
    .method("POST", HttpRequest.BodyPublishers.ofString("{\n  \"acknowledgement\": {\n    \"subscriptionRequestId\": \"subscription Id\"\n  },\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\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  \"acknowledgement\": {\n    \"subscriptionRequestId\": \"subscription Id\"\n  },\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\n}");
Request request = new Request.Builder()
  .url("{{baseUrl}}/v0.5/subscription-requests/hiu/on-notify")
  .post(body)
  .addHeader("authorization", "")
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v0.5/subscription-requests/hiu/on-notify")
  .header("authorization", "")
  .header("content-type", "application/json")
  .body("{\n  \"acknowledgement\": {\n    \"subscriptionRequestId\": \"subscription Id\"\n  },\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\n}")
  .asString();
const data = JSON.stringify({
  acknowledgement: {
    subscriptionRequestId: 'subscription Id'
  },
  requestId: '5f7a535d-a3fd-416b-b069-c97d021fbacd'
});

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

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

xhr.open('POST', '{{baseUrl}}/v0.5/subscription-requests/hiu/on-notify');
xhr.setRequestHeader('authorization', '');
xhr.setRequestHeader('content-type', 'application/json');

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

const options = {
  method: 'POST',
  url: '{{baseUrl}}/v0.5/subscription-requests/hiu/on-notify',
  headers: {authorization: '', 'content-type': 'application/json'},
  data: {
    acknowledgement: {subscriptionRequestId: 'subscription Id'},
    requestId: '5f7a535d-a3fd-416b-b069-c97d021fbacd'
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/v0.5/subscription-requests/hiu/on-notify';
const options = {
  method: 'POST',
  headers: {authorization: '', 'content-type': 'application/json'},
  body: '{"acknowledgement":{"subscriptionRequestId":"subscription Id"},"requestId":"5f7a535d-a3fd-416b-b069-c97d021fbacd"}'
};

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}}/v0.5/subscription-requests/hiu/on-notify',
  method: 'POST',
  headers: {
    authorization: '',
    'content-type': 'application/json'
  },
  processData: false,
  data: '{\n  "acknowledgement": {\n    "subscriptionRequestId": "subscription Id"\n  },\n  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"\n}'
};

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

val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n  \"acknowledgement\": {\n    \"subscriptionRequestId\": \"subscription Id\"\n  },\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\n}")
val request = Request.Builder()
  .url("{{baseUrl}}/v0.5/subscription-requests/hiu/on-notify")
  .post(body)
  .addHeader("authorization", "")
  .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/v0.5/subscription-requests/hiu/on-notify',
  headers: {
    authorization: '',
    '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({
  acknowledgement: {subscriptionRequestId: 'subscription Id'},
  requestId: '5f7a535d-a3fd-416b-b069-c97d021fbacd'
}));
req.end();
const request = require('request');

const options = {
  method: 'POST',
  url: '{{baseUrl}}/v0.5/subscription-requests/hiu/on-notify',
  headers: {authorization: '', 'content-type': 'application/json'},
  body: {
    acknowledgement: {subscriptionRequestId: 'subscription Id'},
    requestId: '5f7a535d-a3fd-416b-b069-c97d021fbacd'
  },
  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}}/v0.5/subscription-requests/hiu/on-notify');

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

req.type('json');
req.send({
  acknowledgement: {
    subscriptionRequestId: 'subscription Id'
  },
  requestId: '5f7a535d-a3fd-416b-b069-c97d021fbacd'
});

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}}/v0.5/subscription-requests/hiu/on-notify',
  headers: {authorization: '', 'content-type': 'application/json'},
  data: {
    acknowledgement: {subscriptionRequestId: 'subscription Id'},
    requestId: '5f7a535d-a3fd-416b-b069-c97d021fbacd'
  }
};

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

const url = '{{baseUrl}}/v0.5/subscription-requests/hiu/on-notify';
const options = {
  method: 'POST',
  headers: {authorization: '', 'content-type': 'application/json'},
  body: '{"acknowledgement":{"subscriptionRequestId":"subscription Id"},"requestId":"5f7a535d-a3fd-416b-b069-c97d021fbacd"}'
};

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

NSDictionary *headers = @{ @"authorization": @"",
                           @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"acknowledgement": @{ @"subscriptionRequestId": @"subscription Id" },
                              @"requestId": @"5f7a535d-a3fd-416b-b069-c97d021fbacd" };

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

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v0.5/subscription-requests/hiu/on-notify"]
                                                       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}}/v0.5/subscription-requests/hiu/on-notify" in
let headers = Header.add_list (Header.init ()) [
  ("authorization", "");
  ("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n  \"acknowledgement\": {\n    \"subscriptionRequestId\": \"subscription Id\"\n  },\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\n}" in

Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/v0.5/subscription-requests/hiu/on-notify",
  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([
    'acknowledgement' => [
        'subscriptionRequestId' => 'subscription Id'
    ],
    'requestId' => '5f7a535d-a3fd-416b-b069-c97d021fbacd'
  ]),
  CURLOPT_HTTPHEADER => [
    "authorization: ",
    "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}}/v0.5/subscription-requests/hiu/on-notify', [
  'body' => '{
  "acknowledgement": {
    "subscriptionRequestId": "subscription Id"
  },
  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"
}',
  'headers' => [
    'authorization' => '',
    'content-type' => 'application/json',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/v0.5/subscription-requests/hiu/on-notify');
$request->setMethod(HTTP_METH_POST);

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

$request->setContentType('application/json');
$request->setBody(json_encode([
  'acknowledgement' => [
    'subscriptionRequestId' => 'subscription Id'
  ],
  'requestId' => '5f7a535d-a3fd-416b-b069-c97d021fbacd'
]));

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

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
append(json_encode([
  'acknowledgement' => [
    'subscriptionRequestId' => 'subscription Id'
  ],
  'requestId' => '5f7a535d-a3fd-416b-b069-c97d021fbacd'
]));
$request->setRequestUrl('{{baseUrl}}/v0.5/subscription-requests/hiu/on-notify');
$request->setRequestMethod('POST');
$request->setBody($body);

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

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

echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v0.5/subscription-requests/hiu/on-notify' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "acknowledgement": {
    "subscriptionRequestId": "subscription Id"
  },
  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"
}'
$headers=@{}
$headers.Add("authorization", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v0.5/subscription-requests/hiu/on-notify' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "acknowledgement": {
    "subscriptionRequestId": "subscription Id"
  },
  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"
}'
import http.client

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

payload = "{\n  \"acknowledgement\": {\n    \"subscriptionRequestId\": \"subscription Id\"\n  },\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\n}"

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

conn.request("POST", "/baseUrl/v0.5/subscription-requests/hiu/on-notify", payload, headers)

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

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

url = "{{baseUrl}}/v0.5/subscription-requests/hiu/on-notify"

payload = {
    "acknowledgement": { "subscriptionRequestId": "subscription Id" },
    "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"
}
headers = {
    "authorization": "",
    "content-type": "application/json"
}

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

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

url <- "{{baseUrl}}/v0.5/subscription-requests/hiu/on-notify"

payload <- "{\n  \"acknowledgement\": {\n    \"subscriptionRequestId\": \"subscription Id\"\n  },\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\n}"

encode <- "json"

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

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

url = URI("{{baseUrl}}/v0.5/subscription-requests/hiu/on-notify")

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

request = Net::HTTP::Post.new(url)
request["authorization"] = ''
request["content-type"] = 'application/json'
request.body = "{\n  \"acknowledgement\": {\n    \"subscriptionRequestId\": \"subscription Id\"\n  },\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\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/v0.5/subscription-requests/hiu/on-notify') do |req|
  req.headers['authorization'] = ''
  req.body = "{\n  \"acknowledgement\": {\n    \"subscriptionRequestId\": \"subscription Id\"\n  },\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\n}"
end

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

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/v0.5/subscription-requests/hiu/on-notify";

    let payload = json!({
        "acknowledgement": json!({"subscriptionRequestId": "subscription Id"}),
        "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"
    });

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

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

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

    dbg!(results);
}
curl --request POST \
  --url {{baseUrl}}/v0.5/subscription-requests/hiu/on-notify \
  --header 'authorization: ' \
  --header 'content-type: application/json' \
  --data '{
  "acknowledgement": {
    "subscriptionRequestId": "subscription Id"
  },
  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"
}'
echo '{
  "acknowledgement": {
    "subscriptionRequestId": "subscription Id"
  },
  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"
}' |  \
  http POST {{baseUrl}}/v0.5/subscription-requests/hiu/on-notify \
  authorization:'' \
  content-type:application/json
wget --quiet \
  --method POST \
  --header 'authorization: ' \
  --header 'content-type: application/json' \
  --body-data '{\n  "acknowledgement": {\n    "subscriptionRequestId": "subscription Id"\n  },\n  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"\n}' \
  --output-document \
  - {{baseUrl}}/v0.5/subscription-requests/hiu/on-notify
import Foundation

let headers = [
  "authorization": "",
  "content-type": "application/json"
]
let parameters = [
  "acknowledgement": ["subscriptionRequestId": "subscription Id"],
  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"
] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v0.5/subscription-requests/hiu/on-notify")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

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

dataTask.resume()
POST Callback API for -subscriptions-hiu-notify to acknowledge receipt of notification.
{{baseUrl}}/v0.5/subscriptions/hiu/on-notify
HEADERS

Authorization
BODY json

{
  "acknowledgement": {
    "eventId": "",
    "status": ""
  },
  "error": {
    "code": 0,
    "message": ""
  },
  "requestId": "",
  "resp": {
    "requestId": ""
  },
  "timestamp": ""
}
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v0.5/subscriptions/hiu/on-notify");

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

curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n  \"acknowledgement\": {\n    \"eventId\": \"subscription event Id\"\n  },\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\n}");

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

(client/post "{{baseUrl}}/v0.5/subscriptions/hiu/on-notify" {:headers {:authorization ""}
                                                                             :content-type :json
                                                                             :form-params {:acknowledgement {:eventId "subscription event Id"}
                                                                                           :requestId "5f7a535d-a3fd-416b-b069-c97d021fbacd"}})
require "http/client"

url = "{{baseUrl}}/v0.5/subscriptions/hiu/on-notify"
headers = HTTP::Headers{
  "authorization" => ""
  "content-type" => "application/json"
}
reqBody = "{\n  \"acknowledgement\": {\n    \"eventId\": \"subscription event Id\"\n  },\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\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}}/v0.5/subscriptions/hiu/on-notify"),
    Headers =
    {
        { "authorization", "" },
    },
    Content = new StringContent("{\n  \"acknowledgement\": {\n    \"eventId\": \"subscription event Id\"\n  },\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\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}}/v0.5/subscriptions/hiu/on-notify");
var request = new RestRequest("", Method.Post);
request.AddHeader("authorization", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n  \"acknowledgement\": {\n    \"eventId\": \"subscription event Id\"\n  },\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main

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

func main() {

	url := "{{baseUrl}}/v0.5/subscriptions/hiu/on-notify"

	payload := strings.NewReader("{\n  \"acknowledgement\": {\n    \"eventId\": \"subscription event Id\"\n  },\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\n}")

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

	req.Header.Add("authorization", "")
	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/v0.5/subscriptions/hiu/on-notify HTTP/1.1
Authorization: 
Content-Type: application/json
Host: example.com
Content-Length: 124

{
  "acknowledgement": {
    "eventId": "subscription event Id"
  },
  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v0.5/subscriptions/hiu/on-notify")
  .setHeader("authorization", "")
  .setHeader("content-type", "application/json")
  .setBody("{\n  \"acknowledgement\": {\n    \"eventId\": \"subscription event Id\"\n  },\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\n}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/v0.5/subscriptions/hiu/on-notify"))
    .header("authorization", "")
    .header("content-type", "application/json")
    .method("POST", HttpRequest.BodyPublishers.ofString("{\n  \"acknowledgement\": {\n    \"eventId\": \"subscription event Id\"\n  },\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\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  \"acknowledgement\": {\n    \"eventId\": \"subscription event Id\"\n  },\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\n}");
Request request = new Request.Builder()
  .url("{{baseUrl}}/v0.5/subscriptions/hiu/on-notify")
  .post(body)
  .addHeader("authorization", "")
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v0.5/subscriptions/hiu/on-notify")
  .header("authorization", "")
  .header("content-type", "application/json")
  .body("{\n  \"acknowledgement\": {\n    \"eventId\": \"subscription event Id\"\n  },\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\n}")
  .asString();
const data = JSON.stringify({
  acknowledgement: {
    eventId: 'subscription event Id'
  },
  requestId: '5f7a535d-a3fd-416b-b069-c97d021fbacd'
});

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

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

xhr.open('POST', '{{baseUrl}}/v0.5/subscriptions/hiu/on-notify');
xhr.setRequestHeader('authorization', '');
xhr.setRequestHeader('content-type', 'application/json');

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

const options = {
  method: 'POST',
  url: '{{baseUrl}}/v0.5/subscriptions/hiu/on-notify',
  headers: {authorization: '', 'content-type': 'application/json'},
  data: {
    acknowledgement: {eventId: 'subscription event Id'},
    requestId: '5f7a535d-a3fd-416b-b069-c97d021fbacd'
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/v0.5/subscriptions/hiu/on-notify';
const options = {
  method: 'POST',
  headers: {authorization: '', 'content-type': 'application/json'},
  body: '{"acknowledgement":{"eventId":"subscription event Id"},"requestId":"5f7a535d-a3fd-416b-b069-c97d021fbacd"}'
};

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}}/v0.5/subscriptions/hiu/on-notify',
  method: 'POST',
  headers: {
    authorization: '',
    'content-type': 'application/json'
  },
  processData: false,
  data: '{\n  "acknowledgement": {\n    "eventId": "subscription event Id"\n  },\n  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"\n}'
};

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

val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n  \"acknowledgement\": {\n    \"eventId\": \"subscription event Id\"\n  },\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\n}")
val request = Request.Builder()
  .url("{{baseUrl}}/v0.5/subscriptions/hiu/on-notify")
  .post(body)
  .addHeader("authorization", "")
  .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/v0.5/subscriptions/hiu/on-notify',
  headers: {
    authorization: '',
    '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({
  acknowledgement: {eventId: 'subscription event Id'},
  requestId: '5f7a535d-a3fd-416b-b069-c97d021fbacd'
}));
req.end();
const request = require('request');

const options = {
  method: 'POST',
  url: '{{baseUrl}}/v0.5/subscriptions/hiu/on-notify',
  headers: {authorization: '', 'content-type': 'application/json'},
  body: {
    acknowledgement: {eventId: 'subscription event Id'},
    requestId: '5f7a535d-a3fd-416b-b069-c97d021fbacd'
  },
  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}}/v0.5/subscriptions/hiu/on-notify');

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

req.type('json');
req.send({
  acknowledgement: {
    eventId: 'subscription event Id'
  },
  requestId: '5f7a535d-a3fd-416b-b069-c97d021fbacd'
});

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}}/v0.5/subscriptions/hiu/on-notify',
  headers: {authorization: '', 'content-type': 'application/json'},
  data: {
    acknowledgement: {eventId: 'subscription event Id'},
    requestId: '5f7a535d-a3fd-416b-b069-c97d021fbacd'
  }
};

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

const url = '{{baseUrl}}/v0.5/subscriptions/hiu/on-notify';
const options = {
  method: 'POST',
  headers: {authorization: '', 'content-type': 'application/json'},
  body: '{"acknowledgement":{"eventId":"subscription event Id"},"requestId":"5f7a535d-a3fd-416b-b069-c97d021fbacd"}'
};

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

NSDictionary *headers = @{ @"authorization": @"",
                           @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"acknowledgement": @{ @"eventId": @"subscription event Id" },
                              @"requestId": @"5f7a535d-a3fd-416b-b069-c97d021fbacd" };

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

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v0.5/subscriptions/hiu/on-notify"]
                                                       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}}/v0.5/subscriptions/hiu/on-notify" in
let headers = Header.add_list (Header.init ()) [
  ("authorization", "");
  ("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n  \"acknowledgement\": {\n    \"eventId\": \"subscription event Id\"\n  },\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\n}" in

Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/v0.5/subscriptions/hiu/on-notify",
  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([
    'acknowledgement' => [
        'eventId' => 'subscription event Id'
    ],
    'requestId' => '5f7a535d-a3fd-416b-b069-c97d021fbacd'
  ]),
  CURLOPT_HTTPHEADER => [
    "authorization: ",
    "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}}/v0.5/subscriptions/hiu/on-notify', [
  'body' => '{
  "acknowledgement": {
    "eventId": "subscription event Id"
  },
  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"
}',
  'headers' => [
    'authorization' => '',
    'content-type' => 'application/json',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/v0.5/subscriptions/hiu/on-notify');
$request->setMethod(HTTP_METH_POST);

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

$request->setContentType('application/json');
$request->setBody(json_encode([
  'acknowledgement' => [
    'eventId' => 'subscription event Id'
  ],
  'requestId' => '5f7a535d-a3fd-416b-b069-c97d021fbacd'
]));

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

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
append(json_encode([
  'acknowledgement' => [
    'eventId' => 'subscription event Id'
  ],
  'requestId' => '5f7a535d-a3fd-416b-b069-c97d021fbacd'
]));
$request->setRequestUrl('{{baseUrl}}/v0.5/subscriptions/hiu/on-notify');
$request->setRequestMethod('POST');
$request->setBody($body);

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

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

echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v0.5/subscriptions/hiu/on-notify' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "acknowledgement": {
    "eventId": "subscription event Id"
  },
  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"
}'
$headers=@{}
$headers.Add("authorization", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v0.5/subscriptions/hiu/on-notify' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "acknowledgement": {
    "eventId": "subscription event Id"
  },
  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"
}'
import http.client

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

payload = "{\n  \"acknowledgement\": {\n    \"eventId\": \"subscription event Id\"\n  },\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\n}"

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

conn.request("POST", "/baseUrl/v0.5/subscriptions/hiu/on-notify", payload, headers)

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

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

url = "{{baseUrl}}/v0.5/subscriptions/hiu/on-notify"

payload = {
    "acknowledgement": { "eventId": "subscription event Id" },
    "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"
}
headers = {
    "authorization": "",
    "content-type": "application/json"
}

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

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

url <- "{{baseUrl}}/v0.5/subscriptions/hiu/on-notify"

payload <- "{\n  \"acknowledgement\": {\n    \"eventId\": \"subscription event Id\"\n  },\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\n}"

encode <- "json"

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

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

url = URI("{{baseUrl}}/v0.5/subscriptions/hiu/on-notify")

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

request = Net::HTTP::Post.new(url)
request["authorization"] = ''
request["content-type"] = 'application/json'
request.body = "{\n  \"acknowledgement\": {\n    \"eventId\": \"subscription event Id\"\n  },\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\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/v0.5/subscriptions/hiu/on-notify') do |req|
  req.headers['authorization'] = ''
  req.body = "{\n  \"acknowledgement\": {\n    \"eventId\": \"subscription event Id\"\n  },\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\n}"
end

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

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/v0.5/subscriptions/hiu/on-notify";

    let payload = json!({
        "acknowledgement": json!({"eventId": "subscription event Id"}),
        "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"
    });

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

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

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

    dbg!(results);
}
curl --request POST \
  --url {{baseUrl}}/v0.5/subscriptions/hiu/on-notify \
  --header 'authorization: ' \
  --header 'content-type: application/json' \
  --data '{
  "acknowledgement": {
    "eventId": "subscription event Id"
  },
  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"
}'
echo '{
  "acknowledgement": {
    "eventId": "subscription event Id"
  },
  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"
}' |  \
  http POST {{baseUrl}}/v0.5/subscriptions/hiu/on-notify \
  authorization:'' \
  content-type:application/json
wget --quiet \
  --method POST \
  --header 'authorization: ' \
  --header 'content-type: application/json' \
  --body-data '{\n  "acknowledgement": {\n    "eventId": "subscription event Id"\n  },\n  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"\n}' \
  --output-document \
  - {{baseUrl}}/v0.5/subscriptions/hiu/on-notify
import Foundation

let headers = [
  "authorization": "",
  "content-type": "application/json"
]
let parameters = [
  "acknowledgement": ["eventId": "subscription event Id"],
  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"
] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v0.5/subscriptions/hiu/on-notify")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

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

dataTask.resume()
POST Request for subscription
{{baseUrl}}/v0.5/subscription-requests/cm/init
HEADERS

Authorization
BODY json

{
  "requestId": "",
  "subscription": {
    "categories": [],
    "hips": [
      {
        "id": ""
      }
    ],
    "hiu": {},
    "patient": {
      "id": ""
    },
    "period": {
      "from": "",
      "to": ""
    },
    "purpose": {
      "code": "",
      "refUri": "",
      "text": ""
    }
  },
  "timestamp": ""
}
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v0.5/subscription-requests/cm/init");

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

curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n  \"requestId\": \"499a5a4a-7dda-4f20-9b67-e24589627061\"\n}");

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

(client/post "{{baseUrl}}/v0.5/subscription-requests/cm/init" {:headers {:authorization ""}
                                                                               :content-type :json
                                                                               :form-params {:requestId "499a5a4a-7dda-4f20-9b67-e24589627061"}})
require "http/client"

url = "{{baseUrl}}/v0.5/subscription-requests/cm/init"
headers = HTTP::Headers{
  "authorization" => ""
  "content-type" => "application/json"
}
reqBody = "{\n  \"requestId\": \"499a5a4a-7dda-4f20-9b67-e24589627061\"\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}}/v0.5/subscription-requests/cm/init"),
    Headers =
    {
        { "authorization", "" },
    },
    Content = new StringContent("{\n  \"requestId\": \"499a5a4a-7dda-4f20-9b67-e24589627061\"\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}}/v0.5/subscription-requests/cm/init");
var request = new RestRequest("", Method.Post);
request.AddHeader("authorization", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n  \"requestId\": \"499a5a4a-7dda-4f20-9b67-e24589627061\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main

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

func main() {

	url := "{{baseUrl}}/v0.5/subscription-requests/cm/init"

	payload := strings.NewReader("{\n  \"requestId\": \"499a5a4a-7dda-4f20-9b67-e24589627061\"\n}")

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

	req.Header.Add("authorization", "")
	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/v0.5/subscription-requests/cm/init HTTP/1.1
Authorization: 
Content-Type: application/json
Host: example.com
Content-Length: 57

{
  "requestId": "499a5a4a-7dda-4f20-9b67-e24589627061"
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v0.5/subscription-requests/cm/init")
  .setHeader("authorization", "")
  .setHeader("content-type", "application/json")
  .setBody("{\n  \"requestId\": \"499a5a4a-7dda-4f20-9b67-e24589627061\"\n}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/v0.5/subscription-requests/cm/init"))
    .header("authorization", "")
    .header("content-type", "application/json")
    .method("POST", HttpRequest.BodyPublishers.ofString("{\n  \"requestId\": \"499a5a4a-7dda-4f20-9b67-e24589627061\"\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  \"requestId\": \"499a5a4a-7dda-4f20-9b67-e24589627061\"\n}");
Request request = new Request.Builder()
  .url("{{baseUrl}}/v0.5/subscription-requests/cm/init")
  .post(body)
  .addHeader("authorization", "")
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v0.5/subscription-requests/cm/init")
  .header("authorization", "")
  .header("content-type", "application/json")
  .body("{\n  \"requestId\": \"499a5a4a-7dda-4f20-9b67-e24589627061\"\n}")
  .asString();
const data = JSON.stringify({
  requestId: '499a5a4a-7dda-4f20-9b67-e24589627061'
});

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

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

xhr.open('POST', '{{baseUrl}}/v0.5/subscription-requests/cm/init');
xhr.setRequestHeader('authorization', '');
xhr.setRequestHeader('content-type', 'application/json');

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

const options = {
  method: 'POST',
  url: '{{baseUrl}}/v0.5/subscription-requests/cm/init',
  headers: {authorization: '', 'content-type': 'application/json'},
  data: {requestId: '499a5a4a-7dda-4f20-9b67-e24589627061'}
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/v0.5/subscription-requests/cm/init';
const options = {
  method: 'POST',
  headers: {authorization: '', 'content-type': 'application/json'},
  body: '{"requestId":"499a5a4a-7dda-4f20-9b67-e24589627061"}'
};

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}}/v0.5/subscription-requests/cm/init',
  method: 'POST',
  headers: {
    authorization: '',
    'content-type': 'application/json'
  },
  processData: false,
  data: '{\n  "requestId": "499a5a4a-7dda-4f20-9b67-e24589627061"\n}'
};

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

val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n  \"requestId\": \"499a5a4a-7dda-4f20-9b67-e24589627061\"\n}")
val request = Request.Builder()
  .url("{{baseUrl}}/v0.5/subscription-requests/cm/init")
  .post(body)
  .addHeader("authorization", "")
  .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/v0.5/subscription-requests/cm/init',
  headers: {
    authorization: '',
    '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({requestId: '499a5a4a-7dda-4f20-9b67-e24589627061'}));
req.end();
const request = require('request');

const options = {
  method: 'POST',
  url: '{{baseUrl}}/v0.5/subscription-requests/cm/init',
  headers: {authorization: '', 'content-type': 'application/json'},
  body: {requestId: '499a5a4a-7dda-4f20-9b67-e24589627061'},
  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}}/v0.5/subscription-requests/cm/init');

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

req.type('json');
req.send({
  requestId: '499a5a4a-7dda-4f20-9b67-e24589627061'
});

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}}/v0.5/subscription-requests/cm/init',
  headers: {authorization: '', 'content-type': 'application/json'},
  data: {requestId: '499a5a4a-7dda-4f20-9b67-e24589627061'}
};

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

const url = '{{baseUrl}}/v0.5/subscription-requests/cm/init';
const options = {
  method: 'POST',
  headers: {authorization: '', 'content-type': 'application/json'},
  body: '{"requestId":"499a5a4a-7dda-4f20-9b67-e24589627061"}'
};

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

NSDictionary *headers = @{ @"authorization": @"",
                           @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"requestId": @"499a5a4a-7dda-4f20-9b67-e24589627061" };

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

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v0.5/subscription-requests/cm/init"]
                                                       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}}/v0.5/subscription-requests/cm/init" in
let headers = Header.add_list (Header.init ()) [
  ("authorization", "");
  ("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n  \"requestId\": \"499a5a4a-7dda-4f20-9b67-e24589627061\"\n}" in

Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/v0.5/subscription-requests/cm/init",
  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([
    'requestId' => '499a5a4a-7dda-4f20-9b67-e24589627061'
  ]),
  CURLOPT_HTTPHEADER => [
    "authorization: ",
    "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}}/v0.5/subscription-requests/cm/init', [
  'body' => '{
  "requestId": "499a5a4a-7dda-4f20-9b67-e24589627061"
}',
  'headers' => [
    'authorization' => '',
    'content-type' => 'application/json',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/v0.5/subscription-requests/cm/init');
$request->setMethod(HTTP_METH_POST);

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

$request->setContentType('application/json');
$request->setBody(json_encode([
  'requestId' => '499a5a4a-7dda-4f20-9b67-e24589627061'
]));

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

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
append(json_encode([
  'requestId' => '499a5a4a-7dda-4f20-9b67-e24589627061'
]));
$request->setRequestUrl('{{baseUrl}}/v0.5/subscription-requests/cm/init');
$request->setRequestMethod('POST');
$request->setBody($body);

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

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

echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v0.5/subscription-requests/cm/init' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "requestId": "499a5a4a-7dda-4f20-9b67-e24589627061"
}'
$headers=@{}
$headers.Add("authorization", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v0.5/subscription-requests/cm/init' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "requestId": "499a5a4a-7dda-4f20-9b67-e24589627061"
}'
import http.client

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

payload = "{\n  \"requestId\": \"499a5a4a-7dda-4f20-9b67-e24589627061\"\n}"

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

conn.request("POST", "/baseUrl/v0.5/subscription-requests/cm/init", payload, headers)

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

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

url = "{{baseUrl}}/v0.5/subscription-requests/cm/init"

payload = { "requestId": "499a5a4a-7dda-4f20-9b67-e24589627061" }
headers = {
    "authorization": "",
    "content-type": "application/json"
}

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

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

url <- "{{baseUrl}}/v0.5/subscription-requests/cm/init"

payload <- "{\n  \"requestId\": \"499a5a4a-7dda-4f20-9b67-e24589627061\"\n}"

encode <- "json"

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

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

url = URI("{{baseUrl}}/v0.5/subscription-requests/cm/init")

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

request = Net::HTTP::Post.new(url)
request["authorization"] = ''
request["content-type"] = 'application/json'
request.body = "{\n  \"requestId\": \"499a5a4a-7dda-4f20-9b67-e24589627061\"\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/v0.5/subscription-requests/cm/init') do |req|
  req.headers['authorization'] = ''
  req.body = "{\n  \"requestId\": \"499a5a4a-7dda-4f20-9b67-e24589627061\"\n}"
end

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

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/v0.5/subscription-requests/cm/init";

    let payload = json!({"requestId": "499a5a4a-7dda-4f20-9b67-e24589627061"});

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

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

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

    dbg!(results);
}
curl --request POST \
  --url {{baseUrl}}/v0.5/subscription-requests/cm/init \
  --header 'authorization: ' \
  --header 'content-type: application/json' \
  --data '{
  "requestId": "499a5a4a-7dda-4f20-9b67-e24589627061"
}'
echo '{
  "requestId": "499a5a4a-7dda-4f20-9b67-e24589627061"
}' |  \
  http POST {{baseUrl}}/v0.5/subscription-requests/cm/init \
  authorization:'' \
  content-type:application/json
wget --quiet \
  --method POST \
  --header 'authorization: ' \
  --header 'content-type: application/json' \
  --body-data '{\n  "requestId": "499a5a4a-7dda-4f20-9b67-e24589627061"\n}' \
  --output-document \
  - {{baseUrl}}/v0.5/subscription-requests/cm/init
import Foundation

let headers = [
  "authorization": "",
  "content-type": "application/json"
]
let parameters = ["requestId": "499a5a4a-7dda-4f20-9b67-e24589627061"] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v0.5/subscription-requests/cm/init")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

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

dataTask.resume()
POST Confirmation request sending token, otp or other authentication details from HIP-HIU for confirmation
{{baseUrl}}/v0.5/users/auth/confirm
HEADERS

Authorization
BODY json

{
  "credential": {
    "authCode": "",
    "demographic": {
      "dateOfBirth": "",
      "gender": "",
      "identifier": {
        "type": "",
        "value": ""
      },
      "name": ""
    }
  },
  "requestId": "",
  "timestamp": "",
  "transactionId": ""
}
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v0.5/users/auth/confirm");

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

curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\n}");

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

(client/post "{{baseUrl}}/v0.5/users/auth/confirm" {:headers {:authorization ""}
                                                                    :content-type :json
                                                                    :form-params {:requestId "5f7a535d-a3fd-416b-b069-c97d021fbacd"}})
require "http/client"

url = "{{baseUrl}}/v0.5/users/auth/confirm"
headers = HTTP::Headers{
  "authorization" => ""
  "content-type" => "application/json"
}
reqBody = "{\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\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}}/v0.5/users/auth/confirm"),
    Headers =
    {
        { "authorization", "" },
    },
    Content = new StringContent("{\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\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}}/v0.5/users/auth/confirm");
var request = new RestRequest("", Method.Post);
request.AddHeader("authorization", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main

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

func main() {

	url := "{{baseUrl}}/v0.5/users/auth/confirm"

	payload := strings.NewReader("{\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\n}")

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

	req.Header.Add("authorization", "")
	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/v0.5/users/auth/confirm HTTP/1.1
Authorization: 
Content-Type: application/json
Host: example.com
Content-Length: 57

{
  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v0.5/users/auth/confirm")
  .setHeader("authorization", "")
  .setHeader("content-type", "application/json")
  .setBody("{\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\n}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/v0.5/users/auth/confirm"))
    .header("authorization", "")
    .header("content-type", "application/json")
    .method("POST", HttpRequest.BodyPublishers.ofString("{\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\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  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\n}");
Request request = new Request.Builder()
  .url("{{baseUrl}}/v0.5/users/auth/confirm")
  .post(body)
  .addHeader("authorization", "")
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v0.5/users/auth/confirm")
  .header("authorization", "")
  .header("content-type", "application/json")
  .body("{\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\n}")
  .asString();
const data = JSON.stringify({
  requestId: '5f7a535d-a3fd-416b-b069-c97d021fbacd'
});

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

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

xhr.open('POST', '{{baseUrl}}/v0.5/users/auth/confirm');
xhr.setRequestHeader('authorization', '');
xhr.setRequestHeader('content-type', 'application/json');

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

const options = {
  method: 'POST',
  url: '{{baseUrl}}/v0.5/users/auth/confirm',
  headers: {authorization: '', 'content-type': 'application/json'},
  data: {requestId: '5f7a535d-a3fd-416b-b069-c97d021fbacd'}
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/v0.5/users/auth/confirm';
const options = {
  method: 'POST',
  headers: {authorization: '', 'content-type': 'application/json'},
  body: '{"requestId":"5f7a535d-a3fd-416b-b069-c97d021fbacd"}'
};

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}}/v0.5/users/auth/confirm',
  method: 'POST',
  headers: {
    authorization: '',
    'content-type': 'application/json'
  },
  processData: false,
  data: '{\n  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"\n}'
};

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

val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\n}")
val request = Request.Builder()
  .url("{{baseUrl}}/v0.5/users/auth/confirm")
  .post(body)
  .addHeader("authorization", "")
  .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/v0.5/users/auth/confirm',
  headers: {
    authorization: '',
    '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({requestId: '5f7a535d-a3fd-416b-b069-c97d021fbacd'}));
req.end();
const request = require('request');

const options = {
  method: 'POST',
  url: '{{baseUrl}}/v0.5/users/auth/confirm',
  headers: {authorization: '', 'content-type': 'application/json'},
  body: {requestId: '5f7a535d-a3fd-416b-b069-c97d021fbacd'},
  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}}/v0.5/users/auth/confirm');

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

req.type('json');
req.send({
  requestId: '5f7a535d-a3fd-416b-b069-c97d021fbacd'
});

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}}/v0.5/users/auth/confirm',
  headers: {authorization: '', 'content-type': 'application/json'},
  data: {requestId: '5f7a535d-a3fd-416b-b069-c97d021fbacd'}
};

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

const url = '{{baseUrl}}/v0.5/users/auth/confirm';
const options = {
  method: 'POST',
  headers: {authorization: '', 'content-type': 'application/json'},
  body: '{"requestId":"5f7a535d-a3fd-416b-b069-c97d021fbacd"}'
};

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

NSDictionary *headers = @{ @"authorization": @"",
                           @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"requestId": @"5f7a535d-a3fd-416b-b069-c97d021fbacd" };

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

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v0.5/users/auth/confirm"]
                                                       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}}/v0.5/users/auth/confirm" in
let headers = Header.add_list (Header.init ()) [
  ("authorization", "");
  ("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\n}" in

Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/v0.5/users/auth/confirm",
  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([
    'requestId' => '5f7a535d-a3fd-416b-b069-c97d021fbacd'
  ]),
  CURLOPT_HTTPHEADER => [
    "authorization: ",
    "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}}/v0.5/users/auth/confirm', [
  'body' => '{
  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"
}',
  'headers' => [
    'authorization' => '',
    'content-type' => 'application/json',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/v0.5/users/auth/confirm');
$request->setMethod(HTTP_METH_POST);

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

$request->setContentType('application/json');
$request->setBody(json_encode([
  'requestId' => '5f7a535d-a3fd-416b-b069-c97d021fbacd'
]));

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

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
append(json_encode([
  'requestId' => '5f7a535d-a3fd-416b-b069-c97d021fbacd'
]));
$request->setRequestUrl('{{baseUrl}}/v0.5/users/auth/confirm');
$request->setRequestMethod('POST');
$request->setBody($body);

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

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

echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v0.5/users/auth/confirm' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"
}'
$headers=@{}
$headers.Add("authorization", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v0.5/users/auth/confirm' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"
}'
import http.client

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

payload = "{\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\n}"

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

conn.request("POST", "/baseUrl/v0.5/users/auth/confirm", payload, headers)

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

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

url = "{{baseUrl}}/v0.5/users/auth/confirm"

payload = { "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd" }
headers = {
    "authorization": "",
    "content-type": "application/json"
}

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

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

url <- "{{baseUrl}}/v0.5/users/auth/confirm"

payload <- "{\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\n}"

encode <- "json"

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

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

url = URI("{{baseUrl}}/v0.5/users/auth/confirm")

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

request = Net::HTTP::Post.new(url)
request["authorization"] = ''
request["content-type"] = 'application/json'
request.body = "{\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\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/v0.5/users/auth/confirm') do |req|
  req.headers['authorization'] = ''
  req.body = "{\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\n}"
end

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

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/v0.5/users/auth/confirm";

    let payload = json!({"requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"});

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

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

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

    dbg!(results);
}
curl --request POST \
  --url {{baseUrl}}/v0.5/users/auth/confirm \
  --header 'authorization: ' \
  --header 'content-type: application/json' \
  --data '{
  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"
}'
echo '{
  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"
}' |  \
  http POST {{baseUrl}}/v0.5/users/auth/confirm \
  authorization:'' \
  content-type:application/json
wget --quiet \
  --method POST \
  --header 'authorization: ' \
  --header 'content-type: application/json' \
  --body-data '{\n  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"\n}' \
  --output-document \
  - {{baseUrl}}/v0.5/users/auth/confirm
import Foundation

let headers = [
  "authorization": "",
  "content-type": "application/json"
]
let parameters = ["requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v0.5/users/auth/confirm")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

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

dataTask.resume()
POST Get a patient's authentication modes relevant to specified purpose
{{baseUrl}}/v0.5/users/auth/fetch-modes
HEADERS

Authorization
BODY json

{
  "query": {
    "id": "",
    "purpose": "",
    "requester": {
      "id": "",
      "type": ""
    }
  },
  "requestId": "",
  "timestamp": ""
}
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v0.5/users/auth/fetch-modes");

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

curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n  \"query\": {\n    \"id\": \"hinapatel79@ndhm\"\n  },\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\n}");

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

(client/post "{{baseUrl}}/v0.5/users/auth/fetch-modes" {:headers {:authorization ""}
                                                                        :content-type :json
                                                                        :form-params {:query {:id "hinapatel79@ndhm"}
                                                                                      :requestId "5f7a535d-a3fd-416b-b069-c97d021fbacd"}})
require "http/client"

url = "{{baseUrl}}/v0.5/users/auth/fetch-modes"
headers = HTTP::Headers{
  "authorization" => ""
  "content-type" => "application/json"
}
reqBody = "{\n  \"query\": {\n    \"id\": \"hinapatel79@ndhm\"\n  },\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\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}}/v0.5/users/auth/fetch-modes"),
    Headers =
    {
        { "authorization", "" },
    },
    Content = new StringContent("{\n  \"query\": {\n    \"id\": \"hinapatel79@ndhm\"\n  },\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\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}}/v0.5/users/auth/fetch-modes");
var request = new RestRequest("", Method.Post);
request.AddHeader("authorization", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n  \"query\": {\n    \"id\": \"hinapatel79@ndhm\"\n  },\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main

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

func main() {

	url := "{{baseUrl}}/v0.5/users/auth/fetch-modes"

	payload := strings.NewReader("{\n  \"query\": {\n    \"id\": \"hinapatel79@ndhm\"\n  },\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\n}")

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

	req.Header.Add("authorization", "")
	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/v0.5/users/auth/fetch-modes HTTP/1.1
Authorization: 
Content-Type: application/json
Host: example.com
Content-Length: 104

{
  "query": {
    "id": "hinapatel79@ndhm"
  },
  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v0.5/users/auth/fetch-modes")
  .setHeader("authorization", "")
  .setHeader("content-type", "application/json")
  .setBody("{\n  \"query\": {\n    \"id\": \"hinapatel79@ndhm\"\n  },\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\n}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/v0.5/users/auth/fetch-modes"))
    .header("authorization", "")
    .header("content-type", "application/json")
    .method("POST", HttpRequest.BodyPublishers.ofString("{\n  \"query\": {\n    \"id\": \"hinapatel79@ndhm\"\n  },\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\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  \"query\": {\n    \"id\": \"hinapatel79@ndhm\"\n  },\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\n}");
Request request = new Request.Builder()
  .url("{{baseUrl}}/v0.5/users/auth/fetch-modes")
  .post(body)
  .addHeader("authorization", "")
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v0.5/users/auth/fetch-modes")
  .header("authorization", "")
  .header("content-type", "application/json")
  .body("{\n  \"query\": {\n    \"id\": \"hinapatel79@ndhm\"\n  },\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\n}")
  .asString();
const data = JSON.stringify({
  query: {
    id: 'hinapatel79@ndhm'
  },
  requestId: '5f7a535d-a3fd-416b-b069-c97d021fbacd'
});

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

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

xhr.open('POST', '{{baseUrl}}/v0.5/users/auth/fetch-modes');
xhr.setRequestHeader('authorization', '');
xhr.setRequestHeader('content-type', 'application/json');

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

const options = {
  method: 'POST',
  url: '{{baseUrl}}/v0.5/users/auth/fetch-modes',
  headers: {authorization: '', 'content-type': 'application/json'},
  data: {
    query: {id: 'hinapatel79@ndhm'},
    requestId: '5f7a535d-a3fd-416b-b069-c97d021fbacd'
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/v0.5/users/auth/fetch-modes';
const options = {
  method: 'POST',
  headers: {authorization: '', 'content-type': 'application/json'},
  body: '{"query":{"id":"hinapatel79@ndhm"},"requestId":"5f7a535d-a3fd-416b-b069-c97d021fbacd"}'
};

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}}/v0.5/users/auth/fetch-modes',
  method: 'POST',
  headers: {
    authorization: '',
    'content-type': 'application/json'
  },
  processData: false,
  data: '{\n  "query": {\n    "id": "hinapatel79@ndhm"\n  },\n  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"\n}'
};

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

val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n  \"query\": {\n    \"id\": \"hinapatel79@ndhm\"\n  },\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\n}")
val request = Request.Builder()
  .url("{{baseUrl}}/v0.5/users/auth/fetch-modes")
  .post(body)
  .addHeader("authorization", "")
  .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/v0.5/users/auth/fetch-modes',
  headers: {
    authorization: '',
    '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({
  query: {id: 'hinapatel79@ndhm'},
  requestId: '5f7a535d-a3fd-416b-b069-c97d021fbacd'
}));
req.end();
const request = require('request');

const options = {
  method: 'POST',
  url: '{{baseUrl}}/v0.5/users/auth/fetch-modes',
  headers: {authorization: '', 'content-type': 'application/json'},
  body: {
    query: {id: 'hinapatel79@ndhm'},
    requestId: '5f7a535d-a3fd-416b-b069-c97d021fbacd'
  },
  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}}/v0.5/users/auth/fetch-modes');

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

req.type('json');
req.send({
  query: {
    id: 'hinapatel79@ndhm'
  },
  requestId: '5f7a535d-a3fd-416b-b069-c97d021fbacd'
});

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}}/v0.5/users/auth/fetch-modes',
  headers: {authorization: '', 'content-type': 'application/json'},
  data: {
    query: {id: 'hinapatel79@ndhm'},
    requestId: '5f7a535d-a3fd-416b-b069-c97d021fbacd'
  }
};

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

const url = '{{baseUrl}}/v0.5/users/auth/fetch-modes';
const options = {
  method: 'POST',
  headers: {authorization: '', 'content-type': 'application/json'},
  body: '{"query":{"id":"hinapatel79@ndhm"},"requestId":"5f7a535d-a3fd-416b-b069-c97d021fbacd"}'
};

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

NSDictionary *headers = @{ @"authorization": @"",
                           @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"query": @{ @"id": @"hinapatel79@ndhm" },
                              @"requestId": @"5f7a535d-a3fd-416b-b069-c97d021fbacd" };

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

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v0.5/users/auth/fetch-modes"]
                                                       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}}/v0.5/users/auth/fetch-modes" in
let headers = Header.add_list (Header.init ()) [
  ("authorization", "");
  ("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n  \"query\": {\n    \"id\": \"hinapatel79@ndhm\"\n  },\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\n}" in

Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/v0.5/users/auth/fetch-modes",
  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([
    'query' => [
        'id' => 'hinapatel79@ndhm'
    ],
    'requestId' => '5f7a535d-a3fd-416b-b069-c97d021fbacd'
  ]),
  CURLOPT_HTTPHEADER => [
    "authorization: ",
    "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}}/v0.5/users/auth/fetch-modes', [
  'body' => '{
  "query": {
    "id": "hinapatel79@ndhm"
  },
  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"
}',
  'headers' => [
    'authorization' => '',
    'content-type' => 'application/json',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/v0.5/users/auth/fetch-modes');
$request->setMethod(HTTP_METH_POST);

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

$request->setContentType('application/json');
$request->setBody(json_encode([
  'query' => [
    'id' => 'hinapatel79@ndhm'
  ],
  'requestId' => '5f7a535d-a3fd-416b-b069-c97d021fbacd'
]));

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

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
append(json_encode([
  'query' => [
    'id' => 'hinapatel79@ndhm'
  ],
  'requestId' => '5f7a535d-a3fd-416b-b069-c97d021fbacd'
]));
$request->setRequestUrl('{{baseUrl}}/v0.5/users/auth/fetch-modes');
$request->setRequestMethod('POST');
$request->setBody($body);

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

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

echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v0.5/users/auth/fetch-modes' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "query": {
    "id": "hinapatel79@ndhm"
  },
  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"
}'
$headers=@{}
$headers.Add("authorization", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v0.5/users/auth/fetch-modes' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "query": {
    "id": "hinapatel79@ndhm"
  },
  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"
}'
import http.client

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

payload = "{\n  \"query\": {\n    \"id\": \"hinapatel79@ndhm\"\n  },\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\n}"

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

conn.request("POST", "/baseUrl/v0.5/users/auth/fetch-modes", payload, headers)

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

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

url = "{{baseUrl}}/v0.5/users/auth/fetch-modes"

payload = {
    "query": { "id": "hinapatel79@ndhm" },
    "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"
}
headers = {
    "authorization": "",
    "content-type": "application/json"
}

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

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

url <- "{{baseUrl}}/v0.5/users/auth/fetch-modes"

payload <- "{\n  \"query\": {\n    \"id\": \"hinapatel79@ndhm\"\n  },\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\n}"

encode <- "json"

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

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

url = URI("{{baseUrl}}/v0.5/users/auth/fetch-modes")

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

request = Net::HTTP::Post.new(url)
request["authorization"] = ''
request["content-type"] = 'application/json'
request.body = "{\n  \"query\": {\n    \"id\": \"hinapatel79@ndhm\"\n  },\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\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/v0.5/users/auth/fetch-modes') do |req|
  req.headers['authorization'] = ''
  req.body = "{\n  \"query\": {\n    \"id\": \"hinapatel79@ndhm\"\n  },\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\n}"
end

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

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/v0.5/users/auth/fetch-modes";

    let payload = json!({
        "query": json!({"id": "hinapatel79@ndhm"}),
        "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"
    });

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

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

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

    dbg!(results);
}
curl --request POST \
  --url {{baseUrl}}/v0.5/users/auth/fetch-modes \
  --header 'authorization: ' \
  --header 'content-type: application/json' \
  --data '{
  "query": {
    "id": "hinapatel79@ndhm"
  },
  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"
}'
echo '{
  "query": {
    "id": "hinapatel79@ndhm"
  },
  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"
}' |  \
  http POST {{baseUrl}}/v0.5/users/auth/fetch-modes \
  authorization:'' \
  content-type:application/json
wget --quiet \
  --method POST \
  --header 'authorization: ' \
  --header 'content-type: application/json' \
  --body-data '{\n  "query": {\n    "id": "hinapatel79@ndhm"\n  },\n  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"\n}' \
  --output-document \
  - {{baseUrl}}/v0.5/users/auth/fetch-modes
import Foundation

let headers = [
  "authorization": "",
  "content-type": "application/json"
]
let parameters = [
  "query": ["id": "hinapatel79@ndhm"],
  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"
] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v0.5/users/auth/fetch-modes")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

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

dataTask.resume()
POST Initialize authentication from HIP
{{baseUrl}}/v0.5/users/auth/init
HEADERS

Authorization
BODY json

{
  "query": {
    "authMode": "",
    "id": "",
    "purpose": "",
    "requester": {
      "id": "",
      "type": ""
    }
  },
  "requestId": "",
  "timestamp": ""
}
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v0.5/users/auth/init");

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

curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n  \"query\": {\n    \"id\": \"hinapatel@ndhm\"\n  },\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\n}");

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

(client/post "{{baseUrl}}/v0.5/users/auth/init" {:headers {:authorization ""}
                                                                 :content-type :json
                                                                 :form-params {:query {:id "hinapatel@ndhm"}
                                                                               :requestId "5f7a535d-a3fd-416b-b069-c97d021fbacd"}})
require "http/client"

url = "{{baseUrl}}/v0.5/users/auth/init"
headers = HTTP::Headers{
  "authorization" => ""
  "content-type" => "application/json"
}
reqBody = "{\n  \"query\": {\n    \"id\": \"hinapatel@ndhm\"\n  },\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\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}}/v0.5/users/auth/init"),
    Headers =
    {
        { "authorization", "" },
    },
    Content = new StringContent("{\n  \"query\": {\n    \"id\": \"hinapatel@ndhm\"\n  },\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\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}}/v0.5/users/auth/init");
var request = new RestRequest("", Method.Post);
request.AddHeader("authorization", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n  \"query\": {\n    \"id\": \"hinapatel@ndhm\"\n  },\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main

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

func main() {

	url := "{{baseUrl}}/v0.5/users/auth/init"

	payload := strings.NewReader("{\n  \"query\": {\n    \"id\": \"hinapatel@ndhm\"\n  },\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\n}")

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

	req.Header.Add("authorization", "")
	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/v0.5/users/auth/init HTTP/1.1
Authorization: 
Content-Type: application/json
Host: example.com
Content-Length: 102

{
  "query": {
    "id": "hinapatel@ndhm"
  },
  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v0.5/users/auth/init")
  .setHeader("authorization", "")
  .setHeader("content-type", "application/json")
  .setBody("{\n  \"query\": {\n    \"id\": \"hinapatel@ndhm\"\n  },\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\n}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/v0.5/users/auth/init"))
    .header("authorization", "")
    .header("content-type", "application/json")
    .method("POST", HttpRequest.BodyPublishers.ofString("{\n  \"query\": {\n    \"id\": \"hinapatel@ndhm\"\n  },\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\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  \"query\": {\n    \"id\": \"hinapatel@ndhm\"\n  },\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\n}");
Request request = new Request.Builder()
  .url("{{baseUrl}}/v0.5/users/auth/init")
  .post(body)
  .addHeader("authorization", "")
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v0.5/users/auth/init")
  .header("authorization", "")
  .header("content-type", "application/json")
  .body("{\n  \"query\": {\n    \"id\": \"hinapatel@ndhm\"\n  },\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\n}")
  .asString();
const data = JSON.stringify({
  query: {
    id: 'hinapatel@ndhm'
  },
  requestId: '5f7a535d-a3fd-416b-b069-c97d021fbacd'
});

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

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

xhr.open('POST', '{{baseUrl}}/v0.5/users/auth/init');
xhr.setRequestHeader('authorization', '');
xhr.setRequestHeader('content-type', 'application/json');

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

const options = {
  method: 'POST',
  url: '{{baseUrl}}/v0.5/users/auth/init',
  headers: {authorization: '', 'content-type': 'application/json'},
  data: {
    query: {id: 'hinapatel@ndhm'},
    requestId: '5f7a535d-a3fd-416b-b069-c97d021fbacd'
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/v0.5/users/auth/init';
const options = {
  method: 'POST',
  headers: {authorization: '', 'content-type': 'application/json'},
  body: '{"query":{"id":"hinapatel@ndhm"},"requestId":"5f7a535d-a3fd-416b-b069-c97d021fbacd"}'
};

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}}/v0.5/users/auth/init',
  method: 'POST',
  headers: {
    authorization: '',
    'content-type': 'application/json'
  },
  processData: false,
  data: '{\n  "query": {\n    "id": "hinapatel@ndhm"\n  },\n  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"\n}'
};

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

val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n  \"query\": {\n    \"id\": \"hinapatel@ndhm\"\n  },\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\n}")
val request = Request.Builder()
  .url("{{baseUrl}}/v0.5/users/auth/init")
  .post(body)
  .addHeader("authorization", "")
  .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/v0.5/users/auth/init',
  headers: {
    authorization: '',
    '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({
  query: {id: 'hinapatel@ndhm'},
  requestId: '5f7a535d-a3fd-416b-b069-c97d021fbacd'
}));
req.end();
const request = require('request');

const options = {
  method: 'POST',
  url: '{{baseUrl}}/v0.5/users/auth/init',
  headers: {authorization: '', 'content-type': 'application/json'},
  body: {
    query: {id: 'hinapatel@ndhm'},
    requestId: '5f7a535d-a3fd-416b-b069-c97d021fbacd'
  },
  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}}/v0.5/users/auth/init');

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

req.type('json');
req.send({
  query: {
    id: 'hinapatel@ndhm'
  },
  requestId: '5f7a535d-a3fd-416b-b069-c97d021fbacd'
});

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}}/v0.5/users/auth/init',
  headers: {authorization: '', 'content-type': 'application/json'},
  data: {
    query: {id: 'hinapatel@ndhm'},
    requestId: '5f7a535d-a3fd-416b-b069-c97d021fbacd'
  }
};

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

const url = '{{baseUrl}}/v0.5/users/auth/init';
const options = {
  method: 'POST',
  headers: {authorization: '', 'content-type': 'application/json'},
  body: '{"query":{"id":"hinapatel@ndhm"},"requestId":"5f7a535d-a3fd-416b-b069-c97d021fbacd"}'
};

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

NSDictionary *headers = @{ @"authorization": @"",
                           @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"query": @{ @"id": @"hinapatel@ndhm" },
                              @"requestId": @"5f7a535d-a3fd-416b-b069-c97d021fbacd" };

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

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v0.5/users/auth/init"]
                                                       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}}/v0.5/users/auth/init" in
let headers = Header.add_list (Header.init ()) [
  ("authorization", "");
  ("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n  \"query\": {\n    \"id\": \"hinapatel@ndhm\"\n  },\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\n}" in

Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/v0.5/users/auth/init",
  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([
    'query' => [
        'id' => 'hinapatel@ndhm'
    ],
    'requestId' => '5f7a535d-a3fd-416b-b069-c97d021fbacd'
  ]),
  CURLOPT_HTTPHEADER => [
    "authorization: ",
    "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}}/v0.5/users/auth/init', [
  'body' => '{
  "query": {
    "id": "hinapatel@ndhm"
  },
  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"
}',
  'headers' => [
    'authorization' => '',
    'content-type' => 'application/json',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/v0.5/users/auth/init');
$request->setMethod(HTTP_METH_POST);

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

$request->setContentType('application/json');
$request->setBody(json_encode([
  'query' => [
    'id' => 'hinapatel@ndhm'
  ],
  'requestId' => '5f7a535d-a3fd-416b-b069-c97d021fbacd'
]));

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

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
append(json_encode([
  'query' => [
    'id' => 'hinapatel@ndhm'
  ],
  'requestId' => '5f7a535d-a3fd-416b-b069-c97d021fbacd'
]));
$request->setRequestUrl('{{baseUrl}}/v0.5/users/auth/init');
$request->setRequestMethod('POST');
$request->setBody($body);

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

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

echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v0.5/users/auth/init' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "query": {
    "id": "hinapatel@ndhm"
  },
  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"
}'
$headers=@{}
$headers.Add("authorization", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v0.5/users/auth/init' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "query": {
    "id": "hinapatel@ndhm"
  },
  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"
}'
import http.client

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

payload = "{\n  \"query\": {\n    \"id\": \"hinapatel@ndhm\"\n  },\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\n}"

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

conn.request("POST", "/baseUrl/v0.5/users/auth/init", payload, headers)

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

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

url = "{{baseUrl}}/v0.5/users/auth/init"

payload = {
    "query": { "id": "hinapatel@ndhm" },
    "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"
}
headers = {
    "authorization": "",
    "content-type": "application/json"
}

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

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

url <- "{{baseUrl}}/v0.5/users/auth/init"

payload <- "{\n  \"query\": {\n    \"id\": \"hinapatel@ndhm\"\n  },\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\n}"

encode <- "json"

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

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

url = URI("{{baseUrl}}/v0.5/users/auth/init")

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

request = Net::HTTP::Post.new(url)
request["authorization"] = ''
request["content-type"] = 'application/json'
request.body = "{\n  \"query\": {\n    \"id\": \"hinapatel@ndhm\"\n  },\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\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/v0.5/users/auth/init') do |req|
  req.headers['authorization'] = ''
  req.body = "{\n  \"query\": {\n    \"id\": \"hinapatel@ndhm\"\n  },\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\n}"
end

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

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/v0.5/users/auth/init";

    let payload = json!({
        "query": json!({"id": "hinapatel@ndhm"}),
        "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"
    });

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

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

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

    dbg!(results);
}
curl --request POST \
  --url {{baseUrl}}/v0.5/users/auth/init \
  --header 'authorization: ' \
  --header 'content-type: application/json' \
  --data '{
  "query": {
    "id": "hinapatel@ndhm"
  },
  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"
}'
echo '{
  "query": {
    "id": "hinapatel@ndhm"
  },
  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"
}' |  \
  http POST {{baseUrl}}/v0.5/users/auth/init \
  authorization:'' \
  content-type:application/json
wget --quiet \
  --method POST \
  --header 'authorization: ' \
  --header 'content-type: application/json' \
  --body-data '{\n  "query": {\n    "id": "hinapatel@ndhm"\n  },\n  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"\n}' \
  --output-document \
  - {{baseUrl}}/v0.5/users/auth/init
import Foundation

let headers = [
  "authorization": "",
  "content-type": "application/json"
]
let parameters = [
  "query": ["id": "hinapatel@ndhm"],
  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"
] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v0.5/users/auth/init")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

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

dataTask.resume()
POST callback API from HIU-HIPs as acknowledgement of auth notification (in case of DIRECT auth)
{{baseUrl}}/v0.5/users/auth/on-notify
HEADERS

Authorization
BODY json

{
  "acknowledgement": {
    "status": ""
  },
  "error": {
    "code": 0,
    "message": ""
  },
  "requestId": "",
  "resp": {
    "requestId": ""
  },
  "timestamp": ""
}
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v0.5/users/auth/on-notify");

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

curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\n}");

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

(client/post "{{baseUrl}}/v0.5/users/auth/on-notify" {:headers {:authorization ""}
                                                                      :content-type :json
                                                                      :form-params {:requestId "5f7a535d-a3fd-416b-b069-c97d021fbacd"}})
require "http/client"

url = "{{baseUrl}}/v0.5/users/auth/on-notify"
headers = HTTP::Headers{
  "authorization" => ""
  "content-type" => "application/json"
}
reqBody = "{\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\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}}/v0.5/users/auth/on-notify"),
    Headers =
    {
        { "authorization", "" },
    },
    Content = new StringContent("{\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\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}}/v0.5/users/auth/on-notify");
var request = new RestRequest("", Method.Post);
request.AddHeader("authorization", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main

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

func main() {

	url := "{{baseUrl}}/v0.5/users/auth/on-notify"

	payload := strings.NewReader("{\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\n}")

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

	req.Header.Add("authorization", "")
	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/v0.5/users/auth/on-notify HTTP/1.1
Authorization: 
Content-Type: application/json
Host: example.com
Content-Length: 57

{
  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v0.5/users/auth/on-notify")
  .setHeader("authorization", "")
  .setHeader("content-type", "application/json")
  .setBody("{\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\n}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/v0.5/users/auth/on-notify"))
    .header("authorization", "")
    .header("content-type", "application/json")
    .method("POST", HttpRequest.BodyPublishers.ofString("{\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\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  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\n}");
Request request = new Request.Builder()
  .url("{{baseUrl}}/v0.5/users/auth/on-notify")
  .post(body)
  .addHeader("authorization", "")
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v0.5/users/auth/on-notify")
  .header("authorization", "")
  .header("content-type", "application/json")
  .body("{\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\n}")
  .asString();
const data = JSON.stringify({
  requestId: '5f7a535d-a3fd-416b-b069-c97d021fbacd'
});

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

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

xhr.open('POST', '{{baseUrl}}/v0.5/users/auth/on-notify');
xhr.setRequestHeader('authorization', '');
xhr.setRequestHeader('content-type', 'application/json');

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

const options = {
  method: 'POST',
  url: '{{baseUrl}}/v0.5/users/auth/on-notify',
  headers: {authorization: '', 'content-type': 'application/json'},
  data: {requestId: '5f7a535d-a3fd-416b-b069-c97d021fbacd'}
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/v0.5/users/auth/on-notify';
const options = {
  method: 'POST',
  headers: {authorization: '', 'content-type': 'application/json'},
  body: '{"requestId":"5f7a535d-a3fd-416b-b069-c97d021fbacd"}'
};

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}}/v0.5/users/auth/on-notify',
  method: 'POST',
  headers: {
    authorization: '',
    'content-type': 'application/json'
  },
  processData: false,
  data: '{\n  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"\n}'
};

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

val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\n}")
val request = Request.Builder()
  .url("{{baseUrl}}/v0.5/users/auth/on-notify")
  .post(body)
  .addHeader("authorization", "")
  .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/v0.5/users/auth/on-notify',
  headers: {
    authorization: '',
    '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({requestId: '5f7a535d-a3fd-416b-b069-c97d021fbacd'}));
req.end();
const request = require('request');

const options = {
  method: 'POST',
  url: '{{baseUrl}}/v0.5/users/auth/on-notify',
  headers: {authorization: '', 'content-type': 'application/json'},
  body: {requestId: '5f7a535d-a3fd-416b-b069-c97d021fbacd'},
  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}}/v0.5/users/auth/on-notify');

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

req.type('json');
req.send({
  requestId: '5f7a535d-a3fd-416b-b069-c97d021fbacd'
});

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}}/v0.5/users/auth/on-notify',
  headers: {authorization: '', 'content-type': 'application/json'},
  data: {requestId: '5f7a535d-a3fd-416b-b069-c97d021fbacd'}
};

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

const url = '{{baseUrl}}/v0.5/users/auth/on-notify';
const options = {
  method: 'POST',
  headers: {authorization: '', 'content-type': 'application/json'},
  body: '{"requestId":"5f7a535d-a3fd-416b-b069-c97d021fbacd"}'
};

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

NSDictionary *headers = @{ @"authorization": @"",
                           @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"requestId": @"5f7a535d-a3fd-416b-b069-c97d021fbacd" };

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

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v0.5/users/auth/on-notify"]
                                                       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}}/v0.5/users/auth/on-notify" in
let headers = Header.add_list (Header.init ()) [
  ("authorization", "");
  ("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\n}" in

Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/v0.5/users/auth/on-notify",
  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([
    'requestId' => '5f7a535d-a3fd-416b-b069-c97d021fbacd'
  ]),
  CURLOPT_HTTPHEADER => [
    "authorization: ",
    "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}}/v0.5/users/auth/on-notify', [
  'body' => '{
  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"
}',
  'headers' => [
    'authorization' => '',
    'content-type' => 'application/json',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/v0.5/users/auth/on-notify');
$request->setMethod(HTTP_METH_POST);

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

$request->setContentType('application/json');
$request->setBody(json_encode([
  'requestId' => '5f7a535d-a3fd-416b-b069-c97d021fbacd'
]));

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

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
append(json_encode([
  'requestId' => '5f7a535d-a3fd-416b-b069-c97d021fbacd'
]));
$request->setRequestUrl('{{baseUrl}}/v0.5/users/auth/on-notify');
$request->setRequestMethod('POST');
$request->setBody($body);

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

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

echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v0.5/users/auth/on-notify' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"
}'
$headers=@{}
$headers.Add("authorization", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v0.5/users/auth/on-notify' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"
}'
import http.client

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

payload = "{\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\n}"

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

conn.request("POST", "/baseUrl/v0.5/users/auth/on-notify", payload, headers)

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

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

url = "{{baseUrl}}/v0.5/users/auth/on-notify"

payload = { "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd" }
headers = {
    "authorization": "",
    "content-type": "application/json"
}

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

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

url <- "{{baseUrl}}/v0.5/users/auth/on-notify"

payload <- "{\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\n}"

encode <- "json"

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

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

url = URI("{{baseUrl}}/v0.5/users/auth/on-notify")

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

request = Net::HTTP::Post.new(url)
request["authorization"] = ''
request["content-type"] = 'application/json'
request.body = "{\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\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/v0.5/users/auth/on-notify') do |req|
  req.headers['authorization'] = ''
  req.body = "{\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\n}"
end

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

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/v0.5/users/auth/on-notify";

    let payload = json!({"requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"});

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

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

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

    dbg!(results);
}
curl --request POST \
  --url {{baseUrl}}/v0.5/users/auth/on-notify \
  --header 'authorization: ' \
  --header 'content-type: application/json' \
  --data '{
  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"
}'
echo '{
  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"
}' |  \
  http POST {{baseUrl}}/v0.5/users/auth/on-notify \
  authorization:'' \
  content-type:application/json
wget --quiet \
  --method POST \
  --header 'authorization: ' \
  --header 'content-type: application/json' \
  --body-data '{\n  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"\n}' \
  --output-document \
  - {{baseUrl}}/v0.5/users/auth/on-notify
import Foundation

let headers = [
  "authorization": "",
  "content-type": "application/json"
]
let parameters = ["requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v0.5/users/auth/on-notify")! 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()