POST Acknowledgment response for SMS notification sent to patient by HIP
{{baseUrl}}/v0.5/patients/sms/on-notify
HEADERS

Authorization
X-HIP-ID
BODY json

{
  "error": {
    "code": 0,
    "message": ""
  },
  "requestId": "",
  "resp": {
    "requestId": ""
  },
  "status": "",
  "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/sms/on-notify");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: ");
headers = curl_slist_append(headers, "x-hip-id: ");
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/sms/on-notify" {:headers {:authorization ""
                                                                                  :x-hip-id ""}
                                                                        :content-type :json
                                                                        :form-params {:requestId "5f7a535d-a3fd-416b-b069-c97d021fbacd"}})
require "http/client"

url = "{{baseUrl}}/v0.5/patients/sms/on-notify"
headers = HTTP::Headers{
  "authorization" => ""
  "x-hip-id" => ""
  "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/sms/on-notify"),
    Headers =
    {
        { "authorization", "" },
        { "x-hip-id", "" },
    },
    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/sms/on-notify");
var request = new RestRequest("", Method.Post);
request.AddHeader("authorization", "");
request.AddHeader("x-hip-id", "");
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/sms/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("x-hip-id", "")
	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/sms/on-notify HTTP/1.1
Authorization: 
X-Hip-Id: 
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/sms/on-notify")
  .setHeader("authorization", "")
  .setHeader("x-hip-id", "")
  .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/sms/on-notify"))
    .header("authorization", "")
    .header("x-hip-id", "")
    .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/sms/on-notify")
  .post(body)
  .addHeader("authorization", "")
  .addHeader("x-hip-id", "")
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v0.5/patients/sms/on-notify")
  .header("authorization", "")
  .header("x-hip-id", "")
  .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/sms/on-notify');
xhr.setRequestHeader('authorization', '');
xhr.setRequestHeader('x-hip-id', '');
xhr.setRequestHeader('content-type', 'application/json');

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

const options = {
  method: 'POST',
  url: '{{baseUrl}}/v0.5/patients/sms/on-notify',
  headers: {authorization: '', 'x-hip-id': '', '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/sms/on-notify';
const options = {
  method: 'POST',
  headers: {authorization: '', 'x-hip-id': '', '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/sms/on-notify',
  method: 'POST',
  headers: {
    authorization: '',
    'x-hip-id': '',
    '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/sms/on-notify")
  .post(body)
  .addHeader("authorization", "")
  .addHeader("x-hip-id", "")
  .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/sms/on-notify',
  headers: {
    authorization: '',
    'x-hip-id': '',
    '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/sms/on-notify',
  headers: {authorization: '', 'x-hip-id': '', '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/sms/on-notify');

req.headers({
  authorization: '',
  'x-hip-id': '',
  '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/sms/on-notify',
  headers: {authorization: '', 'x-hip-id': '', '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/sms/on-notify';
const options = {
  method: 'POST',
  headers: {authorization: '', 'x-hip-id': '', '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": @"",
                           @"x-hip-id": @"",
                           @"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/sms/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/patients/sms/on-notify" in
let headers = Header.add_list (Header.init ()) [
  ("authorization", "");
  ("x-hip-id", "");
  ("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/sms/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",
    "x-hip-id: "
  ],
]);

$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/sms/on-notify', [
  'body' => '{
  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"
}',
  'headers' => [
    'authorization' => '',
    'content-type' => 'application/json',
    'x-hip-id' => '',
  ],
]);

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

$request->setHeaders([
  'authorization' => '',
  'x-hip-id' => '',
  '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/sms/on-notify');
$request->setRequestMethod('POST');
$request->setBody($body);

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

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

echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "")
$headers.Add("x-hip-id", "")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v0.5/patients/sms/on-notify' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"
}'
$headers=@{}
$headers.Add("authorization", "")
$headers.Add("x-hip-id", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v0.5/patients/sms/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': "",
    'x-hip-id': "",
    'content-type': "application/json"
}

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

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

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

url = "{{baseUrl}}/v0.5/patients/sms/on-notify"

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

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

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

url <- "{{baseUrl}}/v0.5/patients/sms/on-notify"

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

encode <- "json"

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

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

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

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

request = Net::HTTP::Post.new(url)
request["authorization"] = ''
request["x-hip-id"] = ''
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/sms/on-notify') do |req|
  req.headers['authorization'] = ''
  req.headers['x-hip-id'] = ''
  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/sms/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("x-hip-id", "".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/sms/on-notify \
  --header 'authorization: ' \
  --header 'content-type: application/json' \
  --header 'x-hip-id: ' \
  --data '{
  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"
}'
echo '{
  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"
}' |  \
  http POST {{baseUrl}}/v0.5/patients/sms/on-notify \
  authorization:'' \
  content-type:application/json \
  x-hip-id:''
wget --quiet \
  --method POST \
  --header 'authorization: ' \
  --header 'x-hip-id: ' \
  --header 'content-type: application/json' \
  --body-data '{\n  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"\n}' \
  --output-document \
  - {{baseUrl}}/v0.5/patients/sms/on-notify
import Foundation

let headers = [
  "authorization": "",
  "x-hip-id": "",
  "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/sms/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/hiu/notify");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: ");
headers = curl_slist_append(headers, "x-hiu-id: ");
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    \"consentRequestId\": \"\"\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/hiu/notify" {:headers {:authorization ""
                                                                               :x-hiu-id ""}
                                                                     :content-type :json
                                                                     :form-params {:notification {:consentRequestId ""}
                                                                                   :requestId "5f7a535d-a3fd-416b-b069-c97d021fbacd"}})
require "http/client"

url = "{{baseUrl}}/v0.5/consents/hiu/notify"
headers = HTTP::Headers{
  "authorization" => ""
  "x-hiu-id" => ""
  "content-type" => "application/json"
}
reqBody = "{\n  \"notification\": {\n    \"consentRequestId\": \"\"\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/hiu/notify"),
    Headers =
    {
        { "authorization", "" },
        { "x-hiu-id", "" },
    },
    Content = new StringContent("{\n  \"notification\": {\n    \"consentRequestId\": \"\"\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/hiu/notify");
var request = new RestRequest("", Method.Post);
request.AddHeader("authorization", "");
request.AddHeader("x-hiu-id", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n  \"notification\": {\n    \"consentRequestId\": \"\"\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/hiu/notify"

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

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

	req.Header.Add("authorization", "")
	req.Header.Add("x-hiu-id", "")
	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/notify HTTP/1.1
Authorization: 
X-Hiu-Id: 
Content-Type: application/json
Host: example.com
Content-Length: 129

{
  "notification": {
    "consentRequestId": ""
  },
  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v0.5/consents/hiu/notify")
  .setHeader("authorization", "")
  .setHeader("x-hiu-id", "")
  .setHeader("content-type", "application/json")
  .setBody("{\n  \"notification\": {\n    \"consentRequestId\": \"\"\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/hiu/notify"))
    .header("authorization", "")
    .header("x-hiu-id", "")
    .header("content-type", "application/json")
    .method("POST", HttpRequest.BodyPublishers.ofString("{\n  \"notification\": {\n    \"consentRequestId\": \"\"\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  \"notification\": {\n    \"consentRequestId\": \"\"\n  },\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\n}");
Request request = new Request.Builder()
  .url("{{baseUrl}}/v0.5/consents/hiu/notify")
  .post(body)
  .addHeader("authorization", "")
  .addHeader("x-hiu-id", "")
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v0.5/consents/hiu/notify")
  .header("authorization", "")
  .header("x-hiu-id", "")
  .header("content-type", "application/json")
  .body("{\n  \"notification\": {\n    \"consentRequestId\": \"\"\n  },\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\n}")
  .asString();
const data = JSON.stringify({
  notification: {
    consentRequestId: ''
  },
  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/notify');
xhr.setRequestHeader('authorization', '');
xhr.setRequestHeader('x-hiu-id', '');
xhr.setRequestHeader('content-type', 'application/json');

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

const options = {
  method: 'POST',
  url: '{{baseUrl}}/v0.5/consents/hiu/notify',
  headers: {authorization: '', 'x-hiu-id': '', 'content-type': 'application/json'},
  data: {
    notification: {consentRequestId: ''},
    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/notify';
const options = {
  method: 'POST',
  headers: {authorization: '', 'x-hiu-id': '', 'content-type': 'application/json'},
  body: '{"notification":{"consentRequestId":""},"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/notify',
  method: 'POST',
  headers: {
    authorization: '',
    'x-hiu-id': '',
    'content-type': 'application/json'
  },
  processData: false,
  data: '{\n  "notification": {\n    "consentRequestId": ""\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  \"notification\": {\n    \"consentRequestId\": \"\"\n  },\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\n}")
val request = Request.Builder()
  .url("{{baseUrl}}/v0.5/consents/hiu/notify")
  .post(body)
  .addHeader("authorization", "")
  .addHeader("x-hiu-id", "")
  .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/notify',
  headers: {
    authorization: '',
    'x-hiu-id': '',
    '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: {consentRequestId: ''},
  requestId: '5f7a535d-a3fd-416b-b069-c97d021fbacd'
}));
req.end();
const request = require('request');

const options = {
  method: 'POST',
  url: '{{baseUrl}}/v0.5/consents/hiu/notify',
  headers: {authorization: '', 'x-hiu-id': '', 'content-type': 'application/json'},
  body: {
    notification: {consentRequestId: ''},
    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/notify');

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

req.type('json');
req.send({
  notification: {
    consentRequestId: ''
  },
  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/notify',
  headers: {authorization: '', 'x-hiu-id': '', 'content-type': 'application/json'},
  data: {
    notification: {consentRequestId: ''},
    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/notify';
const options = {
  method: 'POST',
  headers: {authorization: '', 'x-hiu-id': '', 'content-type': 'application/json'},
  body: '{"notification":{"consentRequestId":""},"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": @"",
                           @"x-hiu-id": @"",
                           @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"notification": @{ @"consentRequestId": @"" },
                              @"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/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/notify" in
let headers = Header.add_list (Header.init ()) [
  ("authorization", "");
  ("x-hiu-id", "");
  ("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n  \"notification\": {\n    \"consentRequestId\": \"\"\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/hiu/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' => [
        'consentRequestId' => ''
    ],
    'requestId' => '5f7a535d-a3fd-416b-b069-c97d021fbacd'
  ]),
  CURLOPT_HTTPHEADER => [
    "authorization: ",
    "content-type: application/json",
    "x-hiu-id: "
  ],
]);

$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/notify', [
  'body' => '{
  "notification": {
    "consentRequestId": ""
  },
  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"
}',
  'headers' => [
    'authorization' => '',
    'content-type' => 'application/json',
    'x-hiu-id' => '',
  ],
]);

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

encode <- "json"

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

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

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

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

request = Net::HTTP::Post.new(url)
request["authorization"] = ''
request["x-hiu-id"] = ''
request["content-type"] = 'application/json'
request.body = "{\n  \"notification\": {\n    \"consentRequestId\": \"\"\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/hiu/notify') do |req|
  req.headers['authorization'] = ''
  req.headers['x-hiu-id'] = ''
  req.body = "{\n  \"notification\": {\n    \"consentRequestId\": \"\"\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/hiu/notify";

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

    let mut headers = reqwest::header::HeaderMap::new();
    headers.insert("authorization", "".parse().unwrap());
    headers.insert("x-hiu-id", "".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/notify \
  --header 'authorization: ' \
  --header 'content-type: application/json' \
  --header 'x-hiu-id: ' \
  --data '{
  "notification": {
    "consentRequestId": ""
  },
  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"
}'
echo '{
  "notification": {
    "consentRequestId": ""
  },
  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"
}' |  \
  http POST {{baseUrl}}/v0.5/consents/hiu/notify \
  authorization:'' \
  content-type:application/json \
  x-hiu-id:''
wget --quiet \
  --method POST \
  --header 'authorization: ' \
  --header 'x-hiu-id: ' \
  --header 'content-type: application/json' \
  --body-data '{\n  "notification": {\n    "consentRequestId": ""\n  },\n  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"\n}' \
  --output-document \
  - {{baseUrl}}/v0.5/consents/hiu/notify
import Foundation

let headers = [
  "authorization": "",
  "x-hiu-id": "",
  "content-type": "application/json"
]
let parameters = [
  "notification": ["consentRequestId": ""],
  "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/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/hiu/on-notify");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: ");
headers = curl_slist_append(headers, "x-cm-id: ");
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 ""
                                                                                  :x-cm-id ""}
                                                                        :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" => ""
  "x-cm-id" => ""
  "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", "" },
        { "x-cm-id", "" },
    },
    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("x-cm-id", "");
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("x-cm-id", "")
	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: 
X-Cm-Id: 
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("x-cm-id", "")
  .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("x-cm-id", "")
    .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("x-cm-id", "")
  .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("x-cm-id", "")
  .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('x-cm-id', '');
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: '', 'x-cm-id': '', '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: '', 'x-cm-id': '', '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: '',
    'x-cm-id': '',
    '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("x-cm-id", "")
  .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: '',
    'x-cm-id': '',
    '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: '', 'x-cm-id': '', '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: '',
  'x-cm-id': '',
  '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: '', 'x-cm-id': '', '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: '', 'x-cm-id': '', '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": @"",
                           @"x-cm-id": @"",
                           @"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", "");
  ("x-cm-id", "");
  ("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",
    "x-cm-id: "
  ],
]);

$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',
    'x-cm-id' => '',
  ],
]);

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

$request->setHeaders([
  'authorization' => '',
  'x-cm-id' => '',
  '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' => '',
  'x-cm-id' => '',
  'content-type' => 'application/json'
]);

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

echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "")
$headers.Add("x-cm-id", "")
$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("x-cm-id", "")
$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': "",
    'x-cm-id': "",
    '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": "",
    "x-cm-id": "",
    "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' = '', 'x-cm-id' = ''), 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["x-cm-id"] = ''
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.headers['x-cm-id'] = ''
  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("x-cm-id", "".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' \
  --header 'x-cm-id: ' \
  --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 \
  x-cm-id:''
wget --quiet \
  --method POST \
  --header 'authorization: ' \
  --header 'x-cm-id: ' \
  --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": "",
  "x-cm-id": "",
  "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()
POST Consent notification (POST)
{{baseUrl}}/v0.5/consents/hip/on-notify
HEADERS

Authorization
X-CM-ID
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/hip/on-notify");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: ");
headers = curl_slist_append(headers, "x-cm-id: ");
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 ""
                                                                                  :x-cm-id ""}
                                                                        :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" => ""
  "x-cm-id" => ""
  "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", "" },
        { "x-cm-id", "" },
    },
    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("x-cm-id", "");
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("x-cm-id", "")
	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: 
X-Cm-Id: 
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("x-cm-id", "")
  .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("x-cm-id", "")
    .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("x-cm-id", "")
  .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("x-cm-id", "")
  .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('x-cm-id', '');
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: '', 'x-cm-id': '', '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: '', 'x-cm-id': '', '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: '',
    'x-cm-id': '',
    '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("x-cm-id", "")
  .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: '',
    'x-cm-id': '',
    '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: '', 'x-cm-id': '', '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: '',
  'x-cm-id': '',
  '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: '', 'x-cm-id': '', '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: '', 'x-cm-id': '', '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": @"",
                           @"x-cm-id": @"",
                           @"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", "");
  ("x-cm-id", "");
  ("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",
    "x-cm-id: "
  ],
]);

$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',
    'x-cm-id' => '',
  ],
]);

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

$request->setHeaders([
  'authorization' => '',
  'x-cm-id' => '',
  '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' => '',
  'x-cm-id' => '',
  'content-type' => 'application/json'
]);

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

echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "")
$headers.Add("x-cm-id", "")
$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("x-cm-id", "")
$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': "",
    'x-cm-id': "",
    '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": "",
    "x-cm-id": "",
    "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' = '', 'x-cm-id' = ''), 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["x-cm-id"] = ''
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.headers['x-cm-id'] = ''
  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("x-cm-id", "".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' \
  --header 'x-cm-id: ' \
  --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 \
  x-cm-id:''
wget --quiet \
  --method POST \
  --header 'authorization: ' \
  --header 'x-cm-id: ' \
  --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": "",
  "x-cm-id": "",
  "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/consents/hip/notify");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: ");
headers = curl_slist_append(headers, "x-hip-id: ");
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    \"signature\": \"Signature of CM as defined in W3C standards; Base64 encoded\"\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/notify" {:headers {:authorization ""
                                                                               :x-hip-id ""}
                                                                     :content-type :json
                                                                     :form-params {:notification {:signature "Signature of CM as defined in W3C standards; Base64 encoded"}
                                                                                   :requestId "5f7a535d-a3fd-416b-b069-c97d021fbacd"}})
require "http/client"

url = "{{baseUrl}}/v0.5/consents/hip/notify"
headers = HTTP::Headers{
  "authorization" => ""
  "x-hip-id" => ""
  "content-type" => "application/json"
}
reqBody = "{\n  \"notification\": {\n    \"signature\": \"Signature of CM as defined in W3C standards; Base64 encoded\"\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/notify"),
    Headers =
    {
        { "authorization", "" },
        { "x-hip-id", "" },
    },
    Content = new StringContent("{\n  \"notification\": {\n    \"signature\": \"Signature of CM as defined in W3C standards; Base64 encoded\"\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/notify");
var request = new RestRequest("", Method.Post);
request.AddHeader("authorization", "");
request.AddHeader("x-hip-id", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n  \"notification\": {\n    \"signature\": \"Signature of CM as defined in W3C standards; Base64 encoded\"\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/notify"

	payload := strings.NewReader("{\n  \"notification\": {\n    \"signature\": \"Signature of CM as defined in W3C standards; Base64 encoded\"\n  },\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\n}")

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

	req.Header.Add("authorization", "")
	req.Header.Add("x-hip-id", "")
	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/notify HTTP/1.1
Authorization: 
X-Hip-Id: 
Content-Type: application/json
Host: example.com
Content-Length: 161

{
  "notification": {
    "signature": "Signature of CM as defined in W3C standards; Base64 encoded"
  },
  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v0.5/consents/hip/notify")
  .setHeader("authorization", "")
  .setHeader("x-hip-id", "")
  .setHeader("content-type", "application/json")
  .setBody("{\n  \"notification\": {\n    \"signature\": \"Signature of CM as defined in W3C standards; Base64 encoded\"\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/notify"))
    .header("authorization", "")
    .header("x-hip-id", "")
    .header("content-type", "application/json")
    .method("POST", HttpRequest.BodyPublishers.ofString("{\n  \"notification\": {\n    \"signature\": \"Signature of CM as defined in W3C standards; Base64 encoded\"\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  \"notification\": {\n    \"signature\": \"Signature of CM as defined in W3C standards; Base64 encoded\"\n  },\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\n}");
Request request = new Request.Builder()
  .url("{{baseUrl}}/v0.5/consents/hip/notify")
  .post(body)
  .addHeader("authorization", "")
  .addHeader("x-hip-id", "")
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v0.5/consents/hip/notify")
  .header("authorization", "")
  .header("x-hip-id", "")
  .header("content-type", "application/json")
  .body("{\n  \"notification\": {\n    \"signature\": \"Signature of CM as defined in W3C standards; Base64 encoded\"\n  },\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\n}")
  .asString();
const data = JSON.stringify({
  notification: {
    signature: 'Signature of CM as defined in W3C standards; Base64 encoded'
  },
  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/notify');
xhr.setRequestHeader('authorization', '');
xhr.setRequestHeader('x-hip-id', '');
xhr.setRequestHeader('content-type', 'application/json');

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

const options = {
  method: 'POST',
  url: '{{baseUrl}}/v0.5/consents/hip/notify',
  headers: {authorization: '', 'x-hip-id': '', 'content-type': 'application/json'},
  data: {
    notification: {signature: 'Signature of CM as defined in W3C standards; Base64 encoded'},
    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/notify';
const options = {
  method: 'POST',
  headers: {authorization: '', 'x-hip-id': '', 'content-type': 'application/json'},
  body: '{"notification":{"signature":"Signature of CM as defined in W3C standards; Base64 encoded"},"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/notify',
  method: 'POST',
  headers: {
    authorization: '',
    'x-hip-id': '',
    'content-type': 'application/json'
  },
  processData: false,
  data: '{\n  "notification": {\n    "signature": "Signature of CM as defined in W3C standards; Base64 encoded"\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  \"notification\": {\n    \"signature\": \"Signature of CM as defined in W3C standards; Base64 encoded\"\n  },\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\n}")
val request = Request.Builder()
  .url("{{baseUrl}}/v0.5/consents/hip/notify")
  .post(body)
  .addHeader("authorization", "")
  .addHeader("x-hip-id", "")
  .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/notify',
  headers: {
    authorization: '',
    'x-hip-id': '',
    '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: {signature: 'Signature of CM as defined in W3C standards; Base64 encoded'},
  requestId: '5f7a535d-a3fd-416b-b069-c97d021fbacd'
}));
req.end();
const request = require('request');

const options = {
  method: 'POST',
  url: '{{baseUrl}}/v0.5/consents/hip/notify',
  headers: {authorization: '', 'x-hip-id': '', 'content-type': 'application/json'},
  body: {
    notification: {signature: 'Signature of CM as defined in W3C standards; Base64 encoded'},
    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/notify');

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

req.type('json');
req.send({
  notification: {
    signature: 'Signature of CM as defined in W3C standards; Base64 encoded'
  },
  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/notify',
  headers: {authorization: '', 'x-hip-id': '', 'content-type': 'application/json'},
  data: {
    notification: {signature: 'Signature of CM as defined in W3C standards; Base64 encoded'},
    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/notify';
const options = {
  method: 'POST',
  headers: {authorization: '', 'x-hip-id': '', 'content-type': 'application/json'},
  body: '{"notification":{"signature":"Signature of CM as defined in W3C standards; Base64 encoded"},"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": @"",
                           @"x-hip-id": @"",
                           @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"notification": @{ @"signature": @"Signature of CM as defined in W3C standards; Base64 encoded" },
                              @"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/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/notify" in
let headers = Header.add_list (Header.init ()) [
  ("authorization", "");
  ("x-hip-id", "");
  ("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n  \"notification\": {\n    \"signature\": \"Signature of CM as defined in W3C standards; Base64 encoded\"\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/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' => [
        'signature' => 'Signature of CM as defined in W3C standards; Base64 encoded'
    ],
    'requestId' => '5f7a535d-a3fd-416b-b069-c97d021fbacd'
  ]),
  CURLOPT_HTTPHEADER => [
    "authorization: ",
    "content-type: application/json",
    "x-hip-id: "
  ],
]);

$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/notify', [
  'body' => '{
  "notification": {
    "signature": "Signature of CM as defined in W3C standards; Base64 encoded"
  },
  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"
}',
  'headers' => [
    'authorization' => '',
    'content-type' => 'application/json',
    'x-hip-id' => '',
  ],
]);

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

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

$request->setContentType('application/json');
$request->setBody(json_encode([
  'notification' => [
    'signature' => 'Signature of CM as defined in W3C standards; Base64 encoded'
  ],
  'requestId' => '5f7a535d-a3fd-416b-b069-c97d021fbacd'
]));

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

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
append(json_encode([
  'notification' => [
    'signature' => 'Signature of CM as defined in W3C standards; Base64 encoded'
  ],
  'requestId' => '5f7a535d-a3fd-416b-b069-c97d021fbacd'
]));
$request->setRequestUrl('{{baseUrl}}/v0.5/consents/hip/notify');
$request->setRequestMethod('POST');
$request->setBody($body);

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

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

echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "")
$headers.Add("x-hip-id", "")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v0.5/consents/hip/notify' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "notification": {
    "signature": "Signature of CM as defined in W3C standards; Base64 encoded"
  },
  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"
}'
$headers=@{}
$headers.Add("authorization", "")
$headers.Add("x-hip-id", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v0.5/consents/hip/notify' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "notification": {
    "signature": "Signature of CM as defined in W3C standards; Base64 encoded"
  },
  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"
}'
import http.client

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

payload = "{\n  \"notification\": {\n    \"signature\": \"Signature of CM as defined in W3C standards; Base64 encoded\"\n  },\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\n}"

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

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

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

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

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

payload = {
    "notification": { "signature": "Signature of CM as defined in W3C standards; Base64 encoded" },
    "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"
}
headers = {
    "authorization": "",
    "x-hip-id": "",
    "content-type": "application/json"
}

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

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

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

payload <- "{\n  \"notification\": {\n    \"signature\": \"Signature of CM as defined in W3C standards; Base64 encoded\"\n  },\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\n}"

encode <- "json"

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

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

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

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

request = Net::HTTP::Post.new(url)
request["authorization"] = ''
request["x-hip-id"] = ''
request["content-type"] = 'application/json'
request.body = "{\n  \"notification\": {\n    \"signature\": \"Signature of CM as defined in W3C standards; Base64 encoded\"\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/notify') do |req|
  req.headers['authorization'] = ''
  req.headers['x-hip-id'] = ''
  req.body = "{\n  \"notification\": {\n    \"signature\": \"Signature of CM as defined in W3C standards; Base64 encoded\"\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/notify";

    let payload = json!({
        "notification": json!({"signature": "Signature of CM as defined in W3C standards; Base64 encoded"}),
        "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"
    });

    let mut headers = reqwest::header::HeaderMap::new();
    headers.insert("authorization", "".parse().unwrap());
    headers.insert("x-hip-id", "".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/notify \
  --header 'authorization: ' \
  --header 'content-type: application/json' \
  --header 'x-hip-id: ' \
  --data '{
  "notification": {
    "signature": "Signature of CM as defined in W3C standards; Base64 encoded"
  },
  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"
}'
echo '{
  "notification": {
    "signature": "Signature of CM as defined in W3C standards; Base64 encoded"
  },
  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"
}' |  \
  http POST {{baseUrl}}/v0.5/consents/hip/notify \
  authorization:'' \
  content-type:application/json \
  x-hip-id:''
wget --quiet \
  --method POST \
  --header 'authorization: ' \
  --header 'x-hip-id: ' \
  --header 'content-type: application/json' \
  --body-data '{\n  "notification": {\n    "signature": "Signature of CM as defined in W3C standards; Base64 encoded"\n  },\n  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"\n}' \
  --output-document \
  - {{baseUrl}}/v0.5/consents/hip/notify
import Foundation

let headers = [
  "authorization": "",
  "x-hip-id": "",
  "content-type": "application/json"
]
let parameters = [
  "notification": ["signature": "Signature of CM as defined in W3C standards; Base64 encoded"],
  "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/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, "x-cm-id: ");
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 ""
                                                                                 :x-cm-id ""}
                                                                       :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" => ""
  "x-cm-id" => ""
  "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", "" },
        { "x-cm-id", "" },
    },
    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("x-cm-id", "");
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("x-cm-id", "")
	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: 
X-Cm-Id: 
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("x-cm-id", "")
  .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("x-cm-id", "")
    .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("x-cm-id", "")
  .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("x-cm-id", "")
  .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('x-cm-id', '');
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: '', 'x-cm-id': '', '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: '', 'x-cm-id': '', '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: '',
    'x-cm-id': '',
    '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("x-cm-id", "")
  .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: '',
    'x-cm-id': '',
    '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: '', 'x-cm-id': '', '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: '',
  'x-cm-id': '',
  '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: '', 'x-cm-id': '', '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: '', 'x-cm-id': '', '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": @"",
                           @"x-cm-id": @"",
                           @"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", "");
  ("x-cm-id", "");
  ("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",
    "x-cm-id: "
  ],
]);

$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',
    'x-cm-id' => '',
  ],
]);

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

$request->setHeaders([
  'authorization' => '',
  'x-cm-id' => '',
  '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' => '',
  'x-cm-id' => '',
  'content-type' => 'application/json'
]);

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

echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "")
$headers.Add("x-cm-id", "")
$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("x-cm-id", "")
$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': "",
    'x-cm-id': "",
    '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": "",
    "x-cm-id": "",
    "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' = '', 'x-cm-id' = ''), 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["x-cm-id"] = ''
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.headers['x-cm-id'] = ''
  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("x-cm-id", "".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' \
  --header 'x-cm-id: ' \
  --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 \
  x-cm-id:''
wget --quiet \
  --method POST \
  --header 'authorization: ' \
  --header 'x-cm-id: ' \
  --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": "",
  "x-cm-id": "",
  "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, "x-cm-id: ");
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 ""
                                                                          :x-cm-id ""}
                                                                :content-type :json
                                                                :form-params {:requestId "5f7a535d-a3fd-416b-b069-c97d021fbacd"}})
require "http/client"

url = "{{baseUrl}}/v0.5/consents/fetch"
headers = HTTP::Headers{
  "authorization" => ""
  "x-cm-id" => ""
  "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", "" },
        { "x-cm-id", "" },
    },
    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("x-cm-id", "");
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("x-cm-id", "")
	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: 
X-Cm-Id: 
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("x-cm-id", "")
  .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("x-cm-id", "")
    .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("x-cm-id", "")
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v0.5/consents/fetch")
  .header("authorization", "")
  .header("x-cm-id", "")
  .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('x-cm-id', '');
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: '', 'x-cm-id': '', '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: '', 'x-cm-id': '', '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: '',
    'x-cm-id': '',
    '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("x-cm-id", "")
  .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: '',
    'x-cm-id': '',
    '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: '', 'x-cm-id': '', '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: '',
  'x-cm-id': '',
  '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: '', 'x-cm-id': '', '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: '', 'x-cm-id': '', '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": @"",
                           @"x-cm-id": @"",
                           @"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", "");
  ("x-cm-id", "");
  ("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",
    "x-cm-id: "
  ],
]);

$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',
    'x-cm-id' => '',
  ],
]);

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

$request->setHeaders([
  'authorization' => '',
  'x-cm-id' => '',
  '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' => '',
  'x-cm-id' => '',
  'content-type' => 'application/json'
]);

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

echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "")
$headers.Add("x-cm-id", "")
$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("x-cm-id", "")
$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': "",
    'x-cm-id': "",
    '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": "",
    "x-cm-id": "",
    "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' = '', 'x-cm-id' = ''), 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["x-cm-id"] = ''
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.headers['x-cm-id'] = ''
  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("x-cm-id", "".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' \
  --header 'x-cm-id: ' \
  --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 \
  x-cm-id:''
wget --quiet \
  --method POST \
  --header 'authorization: ' \
  --header 'x-cm-id: ' \
  --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": "",
  "x-cm-id": "",
  "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, "x-cm-id: ");
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 ""
                                                                                   :x-cm-id ""}
                                                                         :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" => ""
  "x-cm-id" => ""
  "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", "" },
        { "x-cm-id", "" },
    },
    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("x-cm-id", "");
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("x-cm-id", "")
	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: 
X-Cm-Id: 
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("x-cm-id", "")
  .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("x-cm-id", "")
    .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("x-cm-id", "")
  .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("x-cm-id", "")
  .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('x-cm-id', '');
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: '', 'x-cm-id': '', '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: '', 'x-cm-id': '', '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: '',
    'x-cm-id': '',
    '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("x-cm-id", "")
  .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: '',
    'x-cm-id': '',
    '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: '', 'x-cm-id': '', '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: '',
  'x-cm-id': '',
  '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: '', 'x-cm-id': '', '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: '', 'x-cm-id': '', '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": @"",
                           @"x-cm-id": @"",
                           @"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", "");
  ("x-cm-id", "");
  ("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",
    "x-cm-id: "
  ],
]);

$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',
    'x-cm-id' => '',
  ],
]);

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

$request->setHeaders([
  'authorization' => '',
  'x-cm-id' => '',
  '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' => '',
  'x-cm-id' => '',
  'content-type' => 'application/json'
]);

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

echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "")
$headers.Add("x-cm-id", "")
$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("x-cm-id", "")
$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': "",
    'x-cm-id': "",
    '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": "",
    "x-cm-id": "",
    "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' = '', 'x-cm-id' = ''), 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["x-cm-id"] = ''
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.headers['x-cm-id'] = ''
  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("x-cm-id", "".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' \
  --header 'x-cm-id: ' \
  --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 \
  x-cm-id:''
wget --quiet \
  --method POST \
  --header 'authorization: ' \
  --header 'x-cm-id: ' \
  --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": "",
  "x-cm-id": "",
  "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()
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/on-init");

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

curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n  \"consentRequest\": {\n    \"id\": \"f29f0e59-8388-4698-9fe6-05db67aeac46\"\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/consent-requests/on-init" {:headers {:authorization ""
                                                                                    :x-hiu-id ""}
                                                                          :content-type :json
                                                                          :form-params {:consentRequest {:id "f29f0e59-8388-4698-9fe6-05db67aeac46"}
                                                                                        :requestId "5f7a535d-a3fd-416b-b069-c97d021fbacd"}})
require "http/client"

url = "{{baseUrl}}/v0.5/consent-requests/on-init"
headers = HTTP::Headers{
  "authorization" => ""
  "x-hiu-id" => ""
  "content-type" => "application/json"
}
reqBody = "{\n  \"consentRequest\": {\n    \"id\": \"f29f0e59-8388-4698-9fe6-05db67aeac46\"\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/consent-requests/on-init"),
    Headers =
    {
        { "authorization", "" },
        { "x-hiu-id", "" },
    },
    Content = new StringContent("{\n  \"consentRequest\": {\n    \"id\": \"f29f0e59-8388-4698-9fe6-05db67aeac46\"\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/consent-requests/on-init");
var request = new RestRequest("", Method.Post);
request.AddHeader("authorization", "");
request.AddHeader("x-hiu-id", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n  \"consentRequest\": {\n    \"id\": \"f29f0e59-8388-4698-9fe6-05db67aeac46\"\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/consent-requests/on-init"

	payload := strings.NewReader("{\n  \"consentRequest\": {\n    \"id\": \"f29f0e59-8388-4698-9fe6-05db67aeac46\"\n  },\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\n}")

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

	req.Header.Add("authorization", "")
	req.Header.Add("x-hiu-id", "")
	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/on-init HTTP/1.1
Authorization: 
X-Hiu-Id: 
Content-Type: application/json
Host: example.com
Content-Length: 133

{
  "consentRequest": {
    "id": "f29f0e59-8388-4698-9fe6-05db67aeac46"
  },
  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v0.5/consent-requests/on-init")
  .setHeader("authorization", "")
  .setHeader("x-hiu-id", "")
  .setHeader("content-type", "application/json")
  .setBody("{\n  \"consentRequest\": {\n    \"id\": \"f29f0e59-8388-4698-9fe6-05db67aeac46\"\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/consent-requests/on-init"))
    .header("authorization", "")
    .header("x-hiu-id", "")
    .header("content-type", "application/json")
    .method("POST", HttpRequest.BodyPublishers.ofString("{\n  \"consentRequest\": {\n    \"id\": \"f29f0e59-8388-4698-9fe6-05db67aeac46\"\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  \"consentRequest\": {\n    \"id\": \"f29f0e59-8388-4698-9fe6-05db67aeac46\"\n  },\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\n}");
Request request = new Request.Builder()
  .url("{{baseUrl}}/v0.5/consent-requests/on-init")
  .post(body)
  .addHeader("authorization", "")
  .addHeader("x-hiu-id", "")
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v0.5/consent-requests/on-init")
  .header("authorization", "")
  .header("x-hiu-id", "")
  .header("content-type", "application/json")
  .body("{\n  \"consentRequest\": {\n    \"id\": \"f29f0e59-8388-4698-9fe6-05db67aeac46\"\n  },\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\n}")
  .asString();
const data = JSON.stringify({
  consentRequest: {
    id: 'f29f0e59-8388-4698-9fe6-05db67aeac46'
  },
  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/on-init');
xhr.setRequestHeader('authorization', '');
xhr.setRequestHeader('x-hiu-id', '');
xhr.setRequestHeader('content-type', 'application/json');

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

const options = {
  method: 'POST',
  url: '{{baseUrl}}/v0.5/consent-requests/on-init',
  headers: {authorization: '', 'x-hiu-id': '', 'content-type': 'application/json'},
  data: {
    consentRequest: {id: 'f29f0e59-8388-4698-9fe6-05db67aeac46'},
    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/on-init';
const options = {
  method: 'POST',
  headers: {authorization: '', 'x-hiu-id': '', 'content-type': 'application/json'},
  body: '{"consentRequest":{"id":"f29f0e59-8388-4698-9fe6-05db67aeac46"},"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/on-init',
  method: 'POST',
  headers: {
    authorization: '',
    'x-hiu-id': '',
    'content-type': 'application/json'
  },
  processData: false,
  data: '{\n  "consentRequest": {\n    "id": "f29f0e59-8388-4698-9fe6-05db67aeac46"\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  \"consentRequest\": {\n    \"id\": \"f29f0e59-8388-4698-9fe6-05db67aeac46\"\n  },\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\n}")
val request = Request.Builder()
  .url("{{baseUrl}}/v0.5/consent-requests/on-init")
  .post(body)
  .addHeader("authorization", "")
  .addHeader("x-hiu-id", "")
  .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/on-init',
  headers: {
    authorization: '',
    'x-hiu-id': '',
    '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({
  consentRequest: {id: 'f29f0e59-8388-4698-9fe6-05db67aeac46'},
  requestId: '5f7a535d-a3fd-416b-b069-c97d021fbacd'
}));
req.end();
const request = require('request');

const options = {
  method: 'POST',
  url: '{{baseUrl}}/v0.5/consent-requests/on-init',
  headers: {authorization: '', 'x-hiu-id': '', 'content-type': 'application/json'},
  body: {
    consentRequest: {id: 'f29f0e59-8388-4698-9fe6-05db67aeac46'},
    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/on-init');

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

req.type('json');
req.send({
  consentRequest: {
    id: 'f29f0e59-8388-4698-9fe6-05db67aeac46'
  },
  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/on-init',
  headers: {authorization: '', 'x-hiu-id': '', 'content-type': 'application/json'},
  data: {
    consentRequest: {id: 'f29f0e59-8388-4698-9fe6-05db67aeac46'},
    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/on-init';
const options = {
  method: 'POST',
  headers: {authorization: '', 'x-hiu-id': '', 'content-type': 'application/json'},
  body: '{"consentRequest":{"id":"f29f0e59-8388-4698-9fe6-05db67aeac46"},"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": @"",
                           @"x-hiu-id": @"",
                           @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"consentRequest": @{ @"id": @"f29f0e59-8388-4698-9fe6-05db67aeac46" },
                              @"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/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/consent-requests/on-init" in
let headers = Header.add_list (Header.init ()) [
  ("authorization", "");
  ("x-hiu-id", "");
  ("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n  \"consentRequest\": {\n    \"id\": \"f29f0e59-8388-4698-9fe6-05db67aeac46\"\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/consent-requests/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([
    'consentRequest' => [
        'id' => 'f29f0e59-8388-4698-9fe6-05db67aeac46'
    ],
    'requestId' => '5f7a535d-a3fd-416b-b069-c97d021fbacd'
  ]),
  CURLOPT_HTTPHEADER => [
    "authorization: ",
    "content-type: application/json",
    "x-hiu-id: "
  ],
]);

$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/on-init', [
  'body' => '{
  "consentRequest": {
    "id": "f29f0e59-8388-4698-9fe6-05db67aeac46"
  },
  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"
}',
  'headers' => [
    'authorization' => '',
    'content-type' => 'application/json',
    'x-hiu-id' => '',
  ],
]);

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

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

$request->setContentType('application/json');
$request->setBody(json_encode([
  'consentRequest' => [
    'id' => 'f29f0e59-8388-4698-9fe6-05db67aeac46'
  ],
  'requestId' => '5f7a535d-a3fd-416b-b069-c97d021fbacd'
]));

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

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
append(json_encode([
  'consentRequest' => [
    'id' => 'f29f0e59-8388-4698-9fe6-05db67aeac46'
  ],
  'requestId' => '5f7a535d-a3fd-416b-b069-c97d021fbacd'
]));
$request->setRequestUrl('{{baseUrl}}/v0.5/consent-requests/on-init');
$request->setRequestMethod('POST');
$request->setBody($body);

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

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

echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "")
$headers.Add("x-hiu-id", "")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v0.5/consent-requests/on-init' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "consentRequest": {
    "id": "f29f0e59-8388-4698-9fe6-05db67aeac46"
  },
  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"
}'
$headers=@{}
$headers.Add("authorization", "")
$headers.Add("x-hiu-id", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v0.5/consent-requests/on-init' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "consentRequest": {
    "id": "f29f0e59-8388-4698-9fe6-05db67aeac46"
  },
  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"
}'
import http.client

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

payload = "{\n  \"consentRequest\": {\n    \"id\": \"f29f0e59-8388-4698-9fe6-05db67aeac46\"\n  },\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\n}"

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

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

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

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

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

payload = {
    "consentRequest": { "id": "f29f0e59-8388-4698-9fe6-05db67aeac46" },
    "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"
}
headers = {
    "authorization": "",
    "x-hiu-id": "",
    "content-type": "application/json"
}

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

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

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

payload <- "{\n  \"consentRequest\": {\n    \"id\": \"f29f0e59-8388-4698-9fe6-05db67aeac46\"\n  },\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\n}"

encode <- "json"

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

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

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

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

request = Net::HTTP::Post.new(url)
request["authorization"] = ''
request["x-hiu-id"] = ''
request["content-type"] = 'application/json'
request.body = "{\n  \"consentRequest\": {\n    \"id\": \"f29f0e59-8388-4698-9fe6-05db67aeac46\"\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/consent-requests/on-init') do |req|
  req.headers['authorization'] = ''
  req.headers['x-hiu-id'] = ''
  req.body = "{\n  \"consentRequest\": {\n    \"id\": \"f29f0e59-8388-4698-9fe6-05db67aeac46\"\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/consent-requests/on-init";

    let payload = json!({
        "consentRequest": json!({"id": "f29f0e59-8388-4698-9fe6-05db67aeac46"}),
        "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"
    });

    let mut headers = reqwest::header::HeaderMap::new();
    headers.insert("authorization", "".parse().unwrap());
    headers.insert("x-hiu-id", "".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/on-init \
  --header 'authorization: ' \
  --header 'content-type: application/json' \
  --header 'x-hiu-id: ' \
  --data '{
  "consentRequest": {
    "id": "f29f0e59-8388-4698-9fe6-05db67aeac46"
  },
  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"
}'
echo '{
  "consentRequest": {
    "id": "f29f0e59-8388-4698-9fe6-05db67aeac46"
  },
  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"
}' |  \
  http POST {{baseUrl}}/v0.5/consent-requests/on-init \
  authorization:'' \
  content-type:application/json \
  x-hiu-id:''
wget --quiet \
  --method POST \
  --header 'authorization: ' \
  --header 'x-hiu-id: ' \
  --header 'content-type: application/json' \
  --body-data '{\n  "consentRequest": {\n    "id": "f29f0e59-8388-4698-9fe6-05db67aeac46"\n  },\n  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"\n}' \
  --output-document \
  - {{baseUrl}}/v0.5/consent-requests/on-init
import Foundation

let headers = [
  "authorization": "",
  "x-hiu-id": "",
  "content-type": "application/json"
]
let parameters = [
  "consentRequest": ["id": "f29f0e59-8388-4698-9fe6-05db67aeac46"],
  "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/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/consent-requests/on-status");

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

curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n  \"consentRequest\": {\n    \"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/consent-requests/on-status" {:headers {:authorization ""
                                                                                      :x-hiu-id ""}
                                                                            :content-type :json
                                                                            :form-params {:consentRequest {:id ""}
                                                                                          :requestId "5f7a535d-a3fd-416b-b069-c97d021fbacd"}})
require "http/client"

url = "{{baseUrl}}/v0.5/consent-requests/on-status"
headers = HTTP::Headers{
  "authorization" => ""
  "x-hiu-id" => ""
  "content-type" => "application/json"
}
reqBody = "{\n  \"consentRequest\": {\n    \"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/consent-requests/on-status"),
    Headers =
    {
        { "authorization", "" },
        { "x-hiu-id", "" },
    },
    Content = new StringContent("{\n  \"consentRequest\": {\n    \"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/consent-requests/on-status");
var request = new RestRequest("", Method.Post);
request.AddHeader("authorization", "");
request.AddHeader("x-hiu-id", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n  \"consentRequest\": {\n    \"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/consent-requests/on-status"

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

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

	req.Header.Add("authorization", "")
	req.Header.Add("x-hiu-id", "")
	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/on-status HTTP/1.1
Authorization: 
X-Hiu-Id: 
Content-Type: application/json
Host: example.com
Content-Length: 117

{
  "consentRequest": {
    "id": ""
  },
  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v0.5/consent-requests/on-status")
  .setHeader("authorization", "")
  .setHeader("x-hiu-id", "")
  .setHeader("content-type", "application/json")
  .setBody("{\n  \"consentRequest\": {\n    \"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/consent-requests/on-status"))
    .header("authorization", "")
    .header("x-hiu-id", "")
    .header("content-type", "application/json")
    .method("POST", HttpRequest.BodyPublishers.ofString("{\n  \"consentRequest\": {\n    \"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  \"consentRequest\": {\n    \"id\": \"\"\n  },\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\n}");
Request request = new Request.Builder()
  .url("{{baseUrl}}/v0.5/consent-requests/on-status")
  .post(body)
  .addHeader("authorization", "")
  .addHeader("x-hiu-id", "")
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v0.5/consent-requests/on-status")
  .header("authorization", "")
  .header("x-hiu-id", "")
  .header("content-type", "application/json")
  .body("{\n  \"consentRequest\": {\n    \"id\": \"\"\n  },\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\n}")
  .asString();
const data = JSON.stringify({
  consentRequest: {
    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/consent-requests/on-status');
xhr.setRequestHeader('authorization', '');
xhr.setRequestHeader('x-hiu-id', '');
xhr.setRequestHeader('content-type', 'application/json');

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

const options = {
  method: 'POST',
  url: '{{baseUrl}}/v0.5/consent-requests/on-status',
  headers: {authorization: '', 'x-hiu-id': '', 'content-type': 'application/json'},
  data: {
    consentRequest: {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/consent-requests/on-status';
const options = {
  method: 'POST',
  headers: {authorization: '', 'x-hiu-id': '', 'content-type': 'application/json'},
  body: '{"consentRequest":{"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/consent-requests/on-status',
  method: 'POST',
  headers: {
    authorization: '',
    'x-hiu-id': '',
    'content-type': 'application/json'
  },
  processData: false,
  data: '{\n  "consentRequest": {\n    "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  \"consentRequest\": {\n    \"id\": \"\"\n  },\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\n}")
val request = Request.Builder()
  .url("{{baseUrl}}/v0.5/consent-requests/on-status")
  .post(body)
  .addHeader("authorization", "")
  .addHeader("x-hiu-id", "")
  .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/on-status',
  headers: {
    authorization: '',
    'x-hiu-id': '',
    '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({
  consentRequest: {id: ''},
  requestId: '5f7a535d-a3fd-416b-b069-c97d021fbacd'
}));
req.end();
const request = require('request');

const options = {
  method: 'POST',
  url: '{{baseUrl}}/v0.5/consent-requests/on-status',
  headers: {authorization: '', 'x-hiu-id': '', 'content-type': 'application/json'},
  body: {
    consentRequest: {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/consent-requests/on-status');

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

req.type('json');
req.send({
  consentRequest: {
    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/consent-requests/on-status',
  headers: {authorization: '', 'x-hiu-id': '', 'content-type': 'application/json'},
  data: {
    consentRequest: {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/consent-requests/on-status';
const options = {
  method: 'POST',
  headers: {authorization: '', 'x-hiu-id': '', 'content-type': 'application/json'},
  body: '{"consentRequest":{"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": @"",
                           @"x-hiu-id": @"",
                           @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"consentRequest": @{ @"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/consent-requests/on-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/on-status" in
let headers = Header.add_list (Header.init ()) [
  ("authorization", "");
  ("x-hiu-id", "");
  ("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n  \"consentRequest\": {\n    \"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/consent-requests/on-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([
    'consentRequest' => [
        'id' => ''
    ],
    'requestId' => '5f7a535d-a3fd-416b-b069-c97d021fbacd'
  ]),
  CURLOPT_HTTPHEADER => [
    "authorization: ",
    "content-type: application/json",
    "x-hiu-id: "
  ],
]);

$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/on-status', [
  'body' => '{
  "consentRequest": {
    "id": ""
  },
  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"
}',
  'headers' => [
    'authorization' => '',
    'content-type' => 'application/json',
    'x-hiu-id' => '',
  ],
]);

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

encode <- "json"

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

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

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

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

request = Net::HTTP::Post.new(url)
request["authorization"] = ''
request["x-hiu-id"] = ''
request["content-type"] = 'application/json'
request.body = "{\n  \"consentRequest\": {\n    \"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/consent-requests/on-status') do |req|
  req.headers['authorization'] = ''
  req.headers['x-hiu-id'] = ''
  req.body = "{\n  \"consentRequest\": {\n    \"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/consent-requests/on-status";

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

    let mut headers = reqwest::header::HeaderMap::new();
    headers.insert("authorization", "".parse().unwrap());
    headers.insert("x-hiu-id", "".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/on-status \
  --header 'authorization: ' \
  --header 'content-type: application/json' \
  --header 'x-hiu-id: ' \
  --data '{
  "consentRequest": {
    "id": ""
  },
  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"
}'
echo '{
  "consentRequest": {
    "id": ""
  },
  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"
}' |  \
  http POST {{baseUrl}}/v0.5/consent-requests/on-status \
  authorization:'' \
  content-type:application/json \
  x-hiu-id:''
wget --quiet \
  --method POST \
  --header 'authorization: ' \
  --header 'x-hiu-id: ' \
  --header 'content-type: application/json' \
  --body-data '{\n  "consentRequest": {\n    "id": ""\n  },\n  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"\n}' \
  --output-document \
  - {{baseUrl}}/v0.5/consent-requests/on-status
import Foundation

let headers = [
  "authorization": "",
  "x-hiu-id": "",
  "content-type": "application/json"
]
let parameters = [
  "consentRequest": ["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/consent-requests/on-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()
Examples
REQUEST

CURL *hnd = curl_easy_init();

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

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

curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n  \"consent\": {\n    \"signature\": \"Signature of CM as defined in W3C standards; Base64 encoded\"\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/on-fetch" {:headers {:authorization ""
                                                                             :x-hiu-id ""}
                                                                   :content-type :json
                                                                   :form-params {:consent {:signature "Signature of CM as defined in W3C standards; Base64 encoded"}
                                                                                 :requestId "5f7a535d-a3fd-416b-b069-c97d021fbacd"}})
require "http/client"

url = "{{baseUrl}}/v0.5/consents/on-fetch"
headers = HTTP::Headers{
  "authorization" => ""
  "x-hiu-id" => ""
  "content-type" => "application/json"
}
reqBody = "{\n  \"consent\": {\n    \"signature\": \"Signature of CM as defined in W3C standards; Base64 encoded\"\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/on-fetch"),
    Headers =
    {
        { "authorization", "" },
        { "x-hiu-id", "" },
    },
    Content = new StringContent("{\n  \"consent\": {\n    \"signature\": \"Signature of CM as defined in W3C standards; Base64 encoded\"\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/on-fetch");
var request = new RestRequest("", Method.Post);
request.AddHeader("authorization", "");
request.AddHeader("x-hiu-id", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n  \"consent\": {\n    \"signature\": \"Signature of CM as defined in W3C standards; Base64 encoded\"\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/on-fetch"

	payload := strings.NewReader("{\n  \"consent\": {\n    \"signature\": \"Signature of CM as defined in W3C standards; Base64 encoded\"\n  },\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\n}")

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

	req.Header.Add("authorization", "")
	req.Header.Add("x-hiu-id", "")
	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/on-fetch HTTP/1.1
Authorization: 
X-Hiu-Id: 
Content-Type: application/json
Host: example.com
Content-Length: 156

{
  "consent": {
    "signature": "Signature of CM as defined in W3C standards; Base64 encoded"
  },
  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v0.5/consents/on-fetch")
  .setHeader("authorization", "")
  .setHeader("x-hiu-id", "")
  .setHeader("content-type", "application/json")
  .setBody("{\n  \"consent\": {\n    \"signature\": \"Signature of CM as defined in W3C standards; Base64 encoded\"\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/on-fetch"))
    .header("authorization", "")
    .header("x-hiu-id", "")
    .header("content-type", "application/json")
    .method("POST", HttpRequest.BodyPublishers.ofString("{\n  \"consent\": {\n    \"signature\": \"Signature of CM as defined in W3C standards; Base64 encoded\"\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  \"consent\": {\n    \"signature\": \"Signature of CM as defined in W3C standards; Base64 encoded\"\n  },\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\n}");
Request request = new Request.Builder()
  .url("{{baseUrl}}/v0.5/consents/on-fetch")
  .post(body)
  .addHeader("authorization", "")
  .addHeader("x-hiu-id", "")
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v0.5/consents/on-fetch")
  .header("authorization", "")
  .header("x-hiu-id", "")
  .header("content-type", "application/json")
  .body("{\n  \"consent\": {\n    \"signature\": \"Signature of CM as defined in W3C standards; Base64 encoded\"\n  },\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\n}")
  .asString();
const data = JSON.stringify({
  consent: {
    signature: 'Signature of CM as defined in W3C standards; Base64 encoded'
  },
  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/on-fetch');
xhr.setRequestHeader('authorization', '');
xhr.setRequestHeader('x-hiu-id', '');
xhr.setRequestHeader('content-type', 'application/json');

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

const options = {
  method: 'POST',
  url: '{{baseUrl}}/v0.5/consents/on-fetch',
  headers: {authorization: '', 'x-hiu-id': '', 'content-type': 'application/json'},
  data: {
    consent: {signature: 'Signature of CM as defined in W3C standards; Base64 encoded'},
    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/on-fetch';
const options = {
  method: 'POST',
  headers: {authorization: '', 'x-hiu-id': '', 'content-type': 'application/json'},
  body: '{"consent":{"signature":"Signature of CM as defined in W3C standards; Base64 encoded"},"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/on-fetch',
  method: 'POST',
  headers: {
    authorization: '',
    'x-hiu-id': '',
    'content-type': 'application/json'
  },
  processData: false,
  data: '{\n  "consent": {\n    "signature": "Signature of CM as defined in W3C standards; Base64 encoded"\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  \"consent\": {\n    \"signature\": \"Signature of CM as defined in W3C standards; Base64 encoded\"\n  },\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\n}")
val request = Request.Builder()
  .url("{{baseUrl}}/v0.5/consents/on-fetch")
  .post(body)
  .addHeader("authorization", "")
  .addHeader("x-hiu-id", "")
  .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/on-fetch',
  headers: {
    authorization: '',
    'x-hiu-id': '',
    '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({
  consent: {signature: 'Signature of CM as defined in W3C standards; Base64 encoded'},
  requestId: '5f7a535d-a3fd-416b-b069-c97d021fbacd'
}));
req.end();
const request = require('request');

const options = {
  method: 'POST',
  url: '{{baseUrl}}/v0.5/consents/on-fetch',
  headers: {authorization: '', 'x-hiu-id': '', 'content-type': 'application/json'},
  body: {
    consent: {signature: 'Signature of CM as defined in W3C standards; Base64 encoded'},
    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/on-fetch');

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

req.type('json');
req.send({
  consent: {
    signature: 'Signature of CM as defined in W3C standards; Base64 encoded'
  },
  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/on-fetch',
  headers: {authorization: '', 'x-hiu-id': '', 'content-type': 'application/json'},
  data: {
    consent: {signature: 'Signature of CM as defined in W3C standards; Base64 encoded'},
    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/on-fetch';
const options = {
  method: 'POST',
  headers: {authorization: '', 'x-hiu-id': '', 'content-type': 'application/json'},
  body: '{"consent":{"signature":"Signature of CM as defined in W3C standards; Base64 encoded"},"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": @"",
                           @"x-hiu-id": @"",
                           @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"consent": @{ @"signature": @"Signature of CM as defined in W3C standards; Base64 encoded" },
                              @"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/on-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/on-fetch" in
let headers = Header.add_list (Header.init ()) [
  ("authorization", "");
  ("x-hiu-id", "");
  ("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n  \"consent\": {\n    \"signature\": \"Signature of CM as defined in W3C standards; Base64 encoded\"\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/on-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([
    'consent' => [
        'signature' => 'Signature of CM as defined in W3C standards; Base64 encoded'
    ],
    'requestId' => '5f7a535d-a3fd-416b-b069-c97d021fbacd'
  ]),
  CURLOPT_HTTPHEADER => [
    "authorization: ",
    "content-type: application/json",
    "x-hiu-id: "
  ],
]);

$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/on-fetch', [
  'body' => '{
  "consent": {
    "signature": "Signature of CM as defined in W3C standards; Base64 encoded"
  },
  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"
}',
  'headers' => [
    'authorization' => '',
    'content-type' => 'application/json',
    'x-hiu-id' => '',
  ],
]);

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

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

$request->setContentType('application/json');
$request->setBody(json_encode([
  'consent' => [
    'signature' => 'Signature of CM as defined in W3C standards; Base64 encoded'
  ],
  'requestId' => '5f7a535d-a3fd-416b-b069-c97d021fbacd'
]));

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

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
append(json_encode([
  'consent' => [
    'signature' => 'Signature of CM as defined in W3C standards; Base64 encoded'
  ],
  'requestId' => '5f7a535d-a3fd-416b-b069-c97d021fbacd'
]));
$request->setRequestUrl('{{baseUrl}}/v0.5/consents/on-fetch');
$request->setRequestMethod('POST');
$request->setBody($body);

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

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

echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "")
$headers.Add("x-hiu-id", "")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v0.5/consents/on-fetch' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "consent": {
    "signature": "Signature of CM as defined in W3C standards; Base64 encoded"
  },
  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"
}'
$headers=@{}
$headers.Add("authorization", "")
$headers.Add("x-hiu-id", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v0.5/consents/on-fetch' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "consent": {
    "signature": "Signature of CM as defined in W3C standards; Base64 encoded"
  },
  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"
}'
import http.client

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

payload = "{\n  \"consent\": {\n    \"signature\": \"Signature of CM as defined in W3C standards; Base64 encoded\"\n  },\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\n}"

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

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

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

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

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

payload = {
    "consent": { "signature": "Signature of CM as defined in W3C standards; Base64 encoded" },
    "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"
}
headers = {
    "authorization": "",
    "x-hiu-id": "",
    "content-type": "application/json"
}

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

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

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

payload <- "{\n  \"consent\": {\n    \"signature\": \"Signature of CM as defined in W3C standards; Base64 encoded\"\n  },\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\n}"

encode <- "json"

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

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

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

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

request = Net::HTTP::Post.new(url)
request["authorization"] = ''
request["x-hiu-id"] = ''
request["content-type"] = 'application/json'
request.body = "{\n  \"consent\": {\n    \"signature\": \"Signature of CM as defined in W3C standards; Base64 encoded\"\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/on-fetch') do |req|
  req.headers['authorization'] = ''
  req.headers['x-hiu-id'] = ''
  req.body = "{\n  \"consent\": {\n    \"signature\": \"Signature of CM as defined in W3C standards; Base64 encoded\"\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/on-fetch";

    let payload = json!({
        "consent": json!({"signature": "Signature of CM as defined in W3C standards; Base64 encoded"}),
        "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"
    });

    let mut headers = reqwest::header::HeaderMap::new();
    headers.insert("authorization", "".parse().unwrap());
    headers.insert("x-hiu-id", "".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/on-fetch \
  --header 'authorization: ' \
  --header 'content-type: application/json' \
  --header 'x-hiu-id: ' \
  --data '{
  "consent": {
    "signature": "Signature of CM as defined in W3C standards; Base64 encoded"
  },
  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"
}'
echo '{
  "consent": {
    "signature": "Signature of CM as defined in W3C standards; Base64 encoded"
  },
  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"
}' |  \
  http POST {{baseUrl}}/v0.5/consents/on-fetch \
  authorization:'' \
  content-type:application/json \
  x-hiu-id:''
wget --quiet \
  --method POST \
  --header 'authorization: ' \
  --header 'x-hiu-id: ' \
  --header 'content-type: application/json' \
  --body-data '{\n  "consent": {\n    "signature": "Signature of CM as defined in W3C standards; Base64 encoded"\n  },\n  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"\n}' \
  --output-document \
  - {{baseUrl}}/v0.5/consents/on-fetch
import Foundation

let headers = [
  "authorization": "",
  "x-hiu-id": "",
  "content-type": "application/json"
]
let parameters = [
  "consent": ["signature": "Signature of CM as defined in W3C standards; Base64 encoded"],
  "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/on-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()
POST Health information data request (1)
{{baseUrl}}/v0.5/health-information/hip/on-request
HEADERS

Authorization
X-CM-ID
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/hip/on-request");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: ");
headers = curl_slist_append(headers, "x-cm-id: ");
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/hip/on-request" {:headers {:authorization ""
                                                                                             :x-cm-id ""}
                                                                                   :content-type :json
                                                                                   :form-params {:requestId "5f7a535d-a3fd-416b-b069-c97d021fbacd"}})
require "http/client"

url = "{{baseUrl}}/v0.5/health-information/hip/on-request"
headers = HTTP::Headers{
  "authorization" => ""
  "x-cm-id" => ""
  "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/hip/on-request"),
    Headers =
    {
        { "authorization", "" },
        { "x-cm-id", "" },
    },
    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/hip/on-request");
var request = new RestRequest("", Method.Post);
request.AddHeader("authorization", "");
request.AddHeader("x-cm-id", "");
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/hip/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("x-cm-id", "")
	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/hip/on-request HTTP/1.1
Authorization: 
X-Cm-Id: 
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/hip/on-request")
  .setHeader("authorization", "")
  .setHeader("x-cm-id", "")
  .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/hip/on-request"))
    .header("authorization", "")
    .header("x-cm-id", "")
    .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/hip/on-request")
  .post(body)
  .addHeader("authorization", "")
  .addHeader("x-cm-id", "")
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v0.5/health-information/hip/on-request")
  .header("authorization", "")
  .header("x-cm-id", "")
  .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/hip/on-request');
xhr.setRequestHeader('authorization', '');
xhr.setRequestHeader('x-cm-id', '');
xhr.setRequestHeader('content-type', 'application/json');

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

const options = {
  method: 'POST',
  url: '{{baseUrl}}/v0.5/health-information/hip/on-request',
  headers: {authorization: '', 'x-cm-id': '', '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/hip/on-request';
const options = {
  method: 'POST',
  headers: {authorization: '', 'x-cm-id': '', '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/hip/on-request',
  method: 'POST',
  headers: {
    authorization: '',
    'x-cm-id': '',
    '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/hip/on-request")
  .post(body)
  .addHeader("authorization", "")
  .addHeader("x-cm-id", "")
  .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/hip/on-request',
  headers: {
    authorization: '',
    'x-cm-id': '',
    '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/hip/on-request',
  headers: {authorization: '', 'x-cm-id': '', '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/hip/on-request');

req.headers({
  authorization: '',
  'x-cm-id': '',
  '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/hip/on-request',
  headers: {authorization: '', 'x-cm-id': '', '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/hip/on-request';
const options = {
  method: 'POST',
  headers: {authorization: '', 'x-cm-id': '', '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": @"",
                           @"x-cm-id": @"",
                           @"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/hip/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/hip/on-request" in
let headers = Header.add_list (Header.init ()) [
  ("authorization", "");
  ("x-cm-id", "");
  ("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/hip/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",
    "x-cm-id: "
  ],
]);

$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/hip/on-request', [
  'body' => '{
  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"
}',
  'headers' => [
    'authorization' => '',
    'content-type' => 'application/json',
    'x-cm-id' => '',
  ],
]);

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

$request->setHeaders([
  'authorization' => '',
  'x-cm-id' => '',
  '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/hip/on-request');
$request->setRequestMethod('POST');
$request->setBody($body);

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

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

echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "")
$headers.Add("x-cm-id", "")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v0.5/health-information/hip/on-request' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"
}'
$headers=@{}
$headers.Add("authorization", "")
$headers.Add("x-cm-id", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v0.5/health-information/hip/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': "",
    'x-cm-id': "",
    'content-type': "application/json"
}

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

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

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

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

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

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

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

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

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

encode <- "json"

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

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

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

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

request = Net::HTTP::Post.new(url)
request["authorization"] = ''
request["x-cm-id"] = ''
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/hip/on-request') do |req|
  req.headers['authorization'] = ''
  req.headers['x-cm-id'] = ''
  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/hip/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("x-cm-id", "".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/hip/on-request \
  --header 'authorization: ' \
  --header 'content-type: application/json' \
  --header 'x-cm-id: ' \
  --data '{
  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"
}'
echo '{
  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"
}' |  \
  http POST {{baseUrl}}/v0.5/health-information/hip/on-request \
  authorization:'' \
  content-type:application/json \
  x-cm-id:''
wget --quiet \
  --method POST \
  --header 'authorization: ' \
  --header 'x-cm-id: ' \
  --header 'content-type: application/json' \
  --body-data '{\n  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"\n}' \
  --output-document \
  - {{baseUrl}}/v0.5/health-information/hip/on-request
import Foundation

let headers = [
  "authorization": "",
  "x-cm-id": "",
  "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/hip/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 (2)
{{baseUrl}}/v0.5/health-information/hip/request
HEADERS

Authorization
X-HIP-ID
BODY json

{
  "hiRequest": {
    "consent": {
      "id": ""
    },
    "dataPushUrl": "",
    "dateRange": {
      "from": "",
      "to": ""
    },
    "keyMaterial": {
      "cryptoAlg": "",
      "curve": "",
      "dhPublicKey": {
        "expiry": "",
        "keyValue": "",
        "parameters": ""
      },
      "nonce": ""
    }
  },
  "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/health-information/hip/request");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: ");
headers = curl_slist_append(headers, "x-hip-id: ");
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  \"transactionId\": \"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/hip/request" {:headers {:authorization ""
                                                                                          :x-hip-id ""}
                                                                                :content-type :json
                                                                                :form-params {:requestId "a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d"
                                                                                              :transactionId "a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d"}})
require "http/client"

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

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

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

	req.Header.Add("authorization", "")
	req.Header.Add("x-hip-id", "")
	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/hip/request HTTP/1.1
Authorization: 
X-Hip-Id: 
Content-Type: application/json
Host: example.com
Content-Length: 118

{
  "requestId": "a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d",
  "transactionId": "a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d"
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v0.5/health-information/hip/request")
  .setHeader("authorization", "")
  .setHeader("x-hip-id", "")
  .setHeader("content-type", "application/json")
  .setBody("{\n  \"requestId\": \"a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d\",\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/health-information/hip/request"))
    .header("authorization", "")
    .header("x-hip-id", "")
    .header("content-type", "application/json")
    .method("POST", HttpRequest.BodyPublishers.ofString("{\n  \"requestId\": \"a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d\",\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\": \"a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d\",\n  \"transactionId\": \"a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d\"\n}");
Request request = new Request.Builder()
  .url("{{baseUrl}}/v0.5/health-information/hip/request")
  .post(body)
  .addHeader("authorization", "")
  .addHeader("x-hip-id", "")
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v0.5/health-information/hip/request")
  .header("authorization", "")
  .header("x-hip-id", "")
  .header("content-type", "application/json")
  .body("{\n  \"requestId\": \"a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d\",\n  \"transactionId\": \"a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d\"\n}")
  .asString();
const data = JSON.stringify({
  requestId: 'a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d',
  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/health-information/hip/request');
xhr.setRequestHeader('authorization', '');
xhr.setRequestHeader('x-hip-id', '');
xhr.setRequestHeader('content-type', 'application/json');

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

const options = {
  method: 'POST',
  url: '{{baseUrl}}/v0.5/health-information/hip/request',
  headers: {authorization: '', 'x-hip-id': '', 'content-type': 'application/json'},
  data: {
    requestId: 'a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d',
    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/health-information/hip/request';
const options = {
  method: 'POST',
  headers: {authorization: '', 'x-hip-id': '', 'content-type': 'application/json'},
  body: '{"requestId":"a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d","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/health-information/hip/request',
  method: 'POST',
  headers: {
    authorization: '',
    'x-hip-id': '',
    'content-type': 'application/json'
  },
  processData: false,
  data: '{\n  "requestId": "a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d",\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\": \"a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d\",\n  \"transactionId\": \"a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d\"\n}")
val request = Request.Builder()
  .url("{{baseUrl}}/v0.5/health-information/hip/request")
  .post(body)
  .addHeader("authorization", "")
  .addHeader("x-hip-id", "")
  .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/hip/request',
  headers: {
    authorization: '',
    'x-hip-id': '',
    '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',
  transactionId: 'a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d'
}));
req.end();
const request = require('request');

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

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

req.type('json');
req.send({
  requestId: 'a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d',
  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/health-information/hip/request',
  headers: {authorization: '', 'x-hip-id': '', 'content-type': 'application/json'},
  data: {
    requestId: 'a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d',
    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/health-information/hip/request';
const options = {
  method: 'POST',
  headers: {authorization: '', 'x-hip-id': '', 'content-type': 'application/json'},
  body: '{"requestId":"a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d","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": @"",
                           @"x-hip-id": @"",
                           @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"requestId": @"a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d",
                              @"transactionId": @"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/hip/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/hip/request" in
let headers = Header.add_list (Header.init ()) [
  ("authorization", "");
  ("x-hip-id", "");
  ("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n  \"requestId\": \"a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d\",\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/health-information/hip/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',
    'transactionId' => 'a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d'
  ]),
  CURLOPT_HTTPHEADER => [
    "authorization: ",
    "content-type: application/json",
    "x-hip-id: "
  ],
]);

$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/hip/request', [
  'body' => '{
  "requestId": "a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d",
  "transactionId": "a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d"
}',
  'headers' => [
    'authorization' => '',
    'content-type' => 'application/json',
    'x-hip-id' => '',
  ],
]);

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

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

$request->setContentType('application/json');
$request->setBody(json_encode([
  'requestId' => 'a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d',
  'transactionId' => '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',
  'transactionId' => 'a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d'
]));
$request->setRequestUrl('{{baseUrl}}/v0.5/health-information/hip/request');
$request->setRequestMethod('POST');
$request->setBody($body);

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

encode <- "json"

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

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

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

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

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

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

    let mut headers = reqwest::header::HeaderMap::new();
    headers.insert("authorization", "".parse().unwrap());
    headers.insert("x-hip-id", "".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/hip/request \
  --header 'authorization: ' \
  --header 'content-type: application/json' \
  --header 'x-hip-id: ' \
  --data '{
  "requestId": "a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d",
  "transactionId": "a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d"
}'
echo '{
  "requestId": "a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d",
  "transactionId": "a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d"
}' |  \
  http POST {{baseUrl}}/v0.5/health-information/hip/request \
  authorization:'' \
  content-type:application/json \
  x-hip-id:''
wget --quiet \
  --method POST \
  --header 'authorization: ' \
  --header 'x-hip-id: ' \
  --header 'content-type: application/json' \
  --body-data '{\n  "requestId": "a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d",\n  "transactionId": "a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d"\n}' \
  --output-document \
  - {{baseUrl}}/v0.5/health-information/hip/request
import Foundation

let headers = [
  "authorization": "",
  "x-hip-id": "",
  "content-type": "application/json"
]
let parameters = [
  "requestId": "a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d",
  "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/health-information/hip/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 (POST)
{{baseUrl}}/v0.5/health-information/cm/request
HEADERS

Authorization
X-CM-ID
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/cm/request");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: ");
headers = curl_slist_append(headers, "x-cm-id: ");
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/cm/request" {:headers {:authorization ""
                                                                                         :x-cm-id ""}
                                                                               :content-type :json
                                                                               :form-params {:requestId "a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d"}})
require "http/client"

url = "{{baseUrl}}/v0.5/health-information/cm/request"
headers = HTTP::Headers{
  "authorization" => ""
  "x-cm-id" => ""
  "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/cm/request"),
    Headers =
    {
        { "authorization", "" },
        { "x-cm-id", "" },
    },
    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/cm/request");
var request = new RestRequest("", Method.Post);
request.AddHeader("authorization", "");
request.AddHeader("x-cm-id", "");
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/cm/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("x-cm-id", "")
	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/cm/request HTTP/1.1
Authorization: 
X-Cm-Id: 
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/cm/request")
  .setHeader("authorization", "")
  .setHeader("x-cm-id", "")
  .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/cm/request"))
    .header("authorization", "")
    .header("x-cm-id", "")
    .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/cm/request")
  .post(body)
  .addHeader("authorization", "")
  .addHeader("x-cm-id", "")
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v0.5/health-information/cm/request")
  .header("authorization", "")
  .header("x-cm-id", "")
  .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/cm/request');
xhr.setRequestHeader('authorization', '');
xhr.setRequestHeader('x-cm-id', '');
xhr.setRequestHeader('content-type', 'application/json');

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

const options = {
  method: 'POST',
  url: '{{baseUrl}}/v0.5/health-information/cm/request',
  headers: {authorization: '', 'x-cm-id': '', '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/cm/request';
const options = {
  method: 'POST',
  headers: {authorization: '', 'x-cm-id': '', '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/cm/request',
  method: 'POST',
  headers: {
    authorization: '',
    'x-cm-id': '',
    '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/cm/request")
  .post(body)
  .addHeader("authorization", "")
  .addHeader("x-cm-id", "")
  .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/cm/request',
  headers: {
    authorization: '',
    'x-cm-id': '',
    '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/cm/request',
  headers: {authorization: '', 'x-cm-id': '', '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/cm/request');

req.headers({
  authorization: '',
  'x-cm-id': '',
  '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/cm/request',
  headers: {authorization: '', 'x-cm-id': '', '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/cm/request';
const options = {
  method: 'POST',
  headers: {authorization: '', 'x-cm-id': '', '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": @"",
                           @"x-cm-id": @"",
                           @"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/cm/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/cm/request" in
let headers = Header.add_list (Header.init ()) [
  ("authorization", "");
  ("x-cm-id", "");
  ("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/cm/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",
    "x-cm-id: "
  ],
]);

$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/cm/request', [
  'body' => '{
  "requestId": "a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d"
}',
  'headers' => [
    'authorization' => '',
    'content-type' => 'application/json',
    'x-cm-id' => '',
  ],
]);

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

$request->setHeaders([
  'authorization' => '',
  'x-cm-id' => '',
  '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/cm/request');
$request->setRequestMethod('POST');
$request->setBody($body);

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

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

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

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

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

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

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

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

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

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

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

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

encode <- "json"

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

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

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

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

request = Net::HTTP::Post.new(url)
request["authorization"] = ''
request["x-cm-id"] = ''
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/cm/request') do |req|
  req.headers['authorization'] = ''
  req.headers['x-cm-id'] = ''
  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/cm/request";

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

    let mut headers = reqwest::header::HeaderMap::new();
    headers.insert("authorization", "".parse().unwrap());
    headers.insert("x-cm-id", "".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/cm/request \
  --header 'authorization: ' \
  --header 'content-type: application/json' \
  --header 'x-cm-id: ' \
  --data '{
  "requestId": "a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d"
}'
echo '{
  "requestId": "a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d"
}' |  \
  http POST {{baseUrl}}/v0.5/health-information/cm/request \
  authorization:'' \
  content-type:application/json \
  x-cm-id:''
wget --quiet \
  --method POST \
  --header 'authorization: ' \
  --header 'x-cm-id: ' \
  --header 'content-type: application/json' \
  --body-data '{\n  "requestId": "a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d"\n}' \
  --output-document \
  - {{baseUrl}}/v0.5/health-information/cm/request
import Foundation

let headers = [
  "authorization": "",
  "x-cm-id": "",
  "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/cm/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
{{baseUrl}}/v0.5/health-information/cm/on-request
HEADERS

Authorization
X-HIU-ID
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/cm/on-request");

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

curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n  \"hiRequest\": {\n    \"transactionId\": \"a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d\"\n  },\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/cm/on-request" {:headers {:authorization ""
                                                                                            :x-hiu-id ""}
                                                                                  :content-type :json
                                                                                  :form-params {:hiRequest {:transactionId "a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d"}
                                                                                                :requestId "a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d"}})
require "http/client"

url = "{{baseUrl}}/v0.5/health-information/cm/on-request"
headers = HTTP::Headers{
  "authorization" => ""
  "x-hiu-id" => ""
  "content-type" => "application/json"
}
reqBody = "{\n  \"hiRequest\": {\n    \"transactionId\": \"a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d\"\n  },\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/cm/on-request"),
    Headers =
    {
        { "authorization", "" },
        { "x-hiu-id", "" },
    },
    Content = new StringContent("{\n  \"hiRequest\": {\n    \"transactionId\": \"a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d\"\n  },\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/cm/on-request");
var request = new RestRequest("", Method.Post);
request.AddHeader("authorization", "");
request.AddHeader("x-hiu-id", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n  \"hiRequest\": {\n    \"transactionId\": \"a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d\"\n  },\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/cm/on-request"

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

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

	req.Header.Add("authorization", "")
	req.Header.Add("x-hiu-id", "")
	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/cm/on-request HTTP/1.1
Authorization: 
X-Hiu-Id: 
Content-Type: application/json
Host: example.com
Content-Length: 141

{
  "hiRequest": {
    "transactionId": "a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d"
  },
  "requestId": "a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d"
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v0.5/health-information/cm/on-request")
  .setHeader("authorization", "")
  .setHeader("x-hiu-id", "")
  .setHeader("content-type", "application/json")
  .setBody("{\n  \"hiRequest\": {\n    \"transactionId\": \"a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d\"\n  },\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/cm/on-request"))
    .header("authorization", "")
    .header("x-hiu-id", "")
    .header("content-type", "application/json")
    .method("POST", HttpRequest.BodyPublishers.ofString("{\n  \"hiRequest\": {\n    \"transactionId\": \"a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d\"\n  },\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  \"hiRequest\": {\n    \"transactionId\": \"a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d\"\n  },\n  \"requestId\": \"a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d\"\n}");
Request request = new Request.Builder()
  .url("{{baseUrl}}/v0.5/health-information/cm/on-request")
  .post(body)
  .addHeader("authorization", "")
  .addHeader("x-hiu-id", "")
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v0.5/health-information/cm/on-request")
  .header("authorization", "")
  .header("x-hiu-id", "")
  .header("content-type", "application/json")
  .body("{\n  \"hiRequest\": {\n    \"transactionId\": \"a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d\"\n  },\n  \"requestId\": \"a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d\"\n}")
  .asString();
const data = JSON.stringify({
  hiRequest: {
    transactionId: 'a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d'
  },
  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/cm/on-request');
xhr.setRequestHeader('authorization', '');
xhr.setRequestHeader('x-hiu-id', '');
xhr.setRequestHeader('content-type', 'application/json');

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

const options = {
  method: 'POST',
  url: '{{baseUrl}}/v0.5/health-information/cm/on-request',
  headers: {authorization: '', 'x-hiu-id': '', 'content-type': 'application/json'},
  data: {
    hiRequest: {transactionId: 'a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d'},
    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/cm/on-request';
const options = {
  method: 'POST',
  headers: {authorization: '', 'x-hiu-id': '', 'content-type': 'application/json'},
  body: '{"hiRequest":{"transactionId":"a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d"},"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/cm/on-request',
  method: 'POST',
  headers: {
    authorization: '',
    'x-hiu-id': '',
    'content-type': 'application/json'
  },
  processData: false,
  data: '{\n  "hiRequest": {\n    "transactionId": "a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d"\n  },\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  \"hiRequest\": {\n    \"transactionId\": \"a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d\"\n  },\n  \"requestId\": \"a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d\"\n}")
val request = Request.Builder()
  .url("{{baseUrl}}/v0.5/health-information/cm/on-request")
  .post(body)
  .addHeader("authorization", "")
  .addHeader("x-hiu-id", "")
  .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/cm/on-request',
  headers: {
    authorization: '',
    'x-hiu-id': '',
    '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({
  hiRequest: {transactionId: 'a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d'},
  requestId: 'a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d'
}));
req.end();
const request = require('request');

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

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

req.type('json');
req.send({
  hiRequest: {
    transactionId: 'a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d'
  },
  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/cm/on-request',
  headers: {authorization: '', 'x-hiu-id': '', 'content-type': 'application/json'},
  data: {
    hiRequest: {transactionId: 'a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d'},
    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/cm/on-request';
const options = {
  method: 'POST',
  headers: {authorization: '', 'x-hiu-id': '', 'content-type': 'application/json'},
  body: '{"hiRequest":{"transactionId":"a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d"},"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": @"",
                           @"x-hiu-id": @"",
                           @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"hiRequest": @{ @"transactionId": @"a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d" },
                              @"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/cm/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/cm/on-request" in
let headers = Header.add_list (Header.init ()) [
  ("authorization", "");
  ("x-hiu-id", "");
  ("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n  \"hiRequest\": {\n    \"transactionId\": \"a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d\"\n  },\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/cm/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([
    'hiRequest' => [
        'transactionId' => 'a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d'
    ],
    'requestId' => 'a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d'
  ]),
  CURLOPT_HTTPHEADER => [
    "authorization: ",
    "content-type: application/json",
    "x-hiu-id: "
  ],
]);

$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/cm/on-request', [
  'body' => '{
  "hiRequest": {
    "transactionId": "a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d"
  },
  "requestId": "a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d"
}',
  'headers' => [
    'authorization' => '',
    'content-type' => 'application/json',
    'x-hiu-id' => '',
  ],
]);

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

encode <- "json"

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

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

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

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

request = Net::HTTP::Post.new(url)
request["authorization"] = ''
request["x-hiu-id"] = ''
request["content-type"] = 'application/json'
request.body = "{\n  \"hiRequest\": {\n    \"transactionId\": \"a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d\"\n  },\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/cm/on-request') do |req|
  req.headers['authorization'] = ''
  req.headers['x-hiu-id'] = ''
  req.body = "{\n  \"hiRequest\": {\n    \"transactionId\": \"a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d\"\n  },\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/cm/on-request";

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

    let mut headers = reqwest::header::HeaderMap::new();
    headers.insert("authorization", "".parse().unwrap());
    headers.insert("x-hiu-id", "".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/cm/on-request \
  --header 'authorization: ' \
  --header 'content-type: application/json' \
  --header 'x-hiu-id: ' \
  --data '{
  "hiRequest": {
    "transactionId": "a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d"
  },
  "requestId": "a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d"
}'
echo '{
  "hiRequest": {
    "transactionId": "a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d"
  },
  "requestId": "a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d"
}' |  \
  http POST {{baseUrl}}/v0.5/health-information/cm/on-request \
  authorization:'' \
  content-type:application/json \
  x-hiu-id:''
wget --quiet \
  --method POST \
  --header 'authorization: ' \
  --header 'x-hiu-id: ' \
  --header 'content-type: application/json' \
  --body-data '{\n  "hiRequest": {\n    "transactionId": "a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d"\n  },\n  "requestId": "a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d"\n}' \
  --output-document \
  - {{baseUrl}}/v0.5/health-information/cm/on-request
import Foundation

let headers = [
  "authorization": "",
  "x-hiu-id": "",
  "content-type": "application/json"
]
let parameters = [
  "hiRequest": ["transactionId": "a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d"],
  "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/cm/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 Notifications corresponding to events during data flow
{{baseUrl}}/v0.5/health-information/notify
HEADERS

Authorization
X-CM-ID
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, "x-cm-id: ");
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 ""
                                                                                     :x-cm-id ""}
                                                                           :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" => ""
  "x-cm-id" => ""
  "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", "" },
        { "x-cm-id", "" },
    },
    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("x-cm-id", "");
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("x-cm-id", "")
	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: 
X-Cm-Id: 
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("x-cm-id", "")
  .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("x-cm-id", "")
    .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("x-cm-id", "")
  .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("x-cm-id", "")
  .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('x-cm-id', '');
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: '', 'x-cm-id': '', '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: '', 'x-cm-id': '', '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: '',
    'x-cm-id': '',
    '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("x-cm-id", "")
  .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: '',
    'x-cm-id': '',
    '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: '', 'x-cm-id': '', '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: '',
  'x-cm-id': '',
  '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: '', 'x-cm-id': '', '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: '', 'x-cm-id': '', '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": @"",
                           @"x-cm-id": @"",
                           @"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", "");
  ("x-cm-id", "");
  ("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",
    "x-cm-id: "
  ],
]);

$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',
    'x-cm-id' => '',
  ],
]);

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

$request->setHeaders([
  'authorization' => '',
  'x-cm-id' => '',
  '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' => '',
  'x-cm-id' => '',
  'content-type' => 'application/json'
]);

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

echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "")
$headers.Add("x-cm-id", "")
$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("x-cm-id", "")
$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': "",
    'x-cm-id': "",
    '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": "",
    "x-cm-id": "",
    "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' = '', 'x-cm-id' = ''), 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["x-cm-id"] = ''
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.headers['x-cm-id'] = ''
  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("x-cm-id", "".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' \
  --header 'x-cm-id: ' \
  --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 \
  x-cm-id:''
wget --quiet \
  --method POST \
  --header 'authorization: ' \
  --header 'x-cm-id: ' \
  --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": "",
  "x-cm-id": "",
  "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 Discover patient's accounts
{{baseUrl}}/v0.5/care-contexts/discover
HEADERS

Authorization
X-HIP-ID
BODY json

{
  "patient": {
    "gender": "",
    "id": "",
    "name": "",
    "unverifiedIdentifiers": [
      {
        "type": "",
        "value": ""
      }
    ],
    "verifiedIdentifiers": [
      {}
    ],
    "yearOfBirth": 0
  },
  "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/discover");

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

curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n  \"patient\": {\n    \"id\": \"@\",\n    \"name\": \"chandler bing\",\n    \"yearOfBirth\": 2000\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/care-contexts/discover" {:headers {:authorization ""
                                                                                  :x-hip-id ""}
                                                                        :content-type :json
                                                                        :form-params {:patient {:id "@"
                                                                                                :name "chandler bing"
                                                                                                :yearOfBirth 2000}
                                                                                      :requestId "499a5a4a-7dda-4f20-9b67-e24589627061"}})
require "http/client"

url = "{{baseUrl}}/v0.5/care-contexts/discover"
headers = HTTP::Headers{
  "authorization" => ""
  "x-hip-id" => ""
  "content-type" => "application/json"
}
reqBody = "{\n  \"patient\": {\n    \"id\": \"@\",\n    \"name\": \"chandler bing\",\n    \"yearOfBirth\": 2000\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/care-contexts/discover"),
    Headers =
    {
        { "authorization", "" },
        { "x-hip-id", "" },
    },
    Content = new StringContent("{\n  \"patient\": {\n    \"id\": \"@\",\n    \"name\": \"chandler bing\",\n    \"yearOfBirth\": 2000\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/care-contexts/discover");
var request = new RestRequest("", Method.Post);
request.AddHeader("authorization", "");
request.AddHeader("x-hip-id", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n  \"patient\": {\n    \"id\": \"@\",\n    \"name\": \"chandler bing\",\n    \"yearOfBirth\": 2000\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/care-contexts/discover"

	payload := strings.NewReader("{\n  \"patient\": {\n    \"id\": \"@\",\n    \"name\": \"chandler bing\",\n    \"yearOfBirth\": 2000\n  },\n  \"requestId\": \"499a5a4a-7dda-4f20-9b67-e24589627061\"\n}")

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

	req.Header.Add("authorization", "")
	req.Header.Add("x-hip-id", "")
	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/discover HTTP/1.1
Authorization: 
X-Hip-Id: 
Content-Type: application/json
Host: example.com
Content-Length: 177

{
  "patient": {
    "id": "@",
    "name": "chandler bing",
    "yearOfBirth": 2000
  },
  "requestId": "499a5a4a-7dda-4f20-9b67-e24589627061"
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v0.5/care-contexts/discover")
  .setHeader("authorization", "")
  .setHeader("x-hip-id", "")
  .setHeader("content-type", "application/json")
  .setBody("{\n  \"patient\": {\n    \"id\": \"@\",\n    \"name\": \"chandler bing\",\n    \"yearOfBirth\": 2000\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/care-contexts/discover"))
    .header("authorization", "")
    .header("x-hip-id", "")
    .header("content-type", "application/json")
    .method("POST", HttpRequest.BodyPublishers.ofString("{\n  \"patient\": {\n    \"id\": \"@\",\n    \"name\": \"chandler bing\",\n    \"yearOfBirth\": 2000\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  \"patient\": {\n    \"id\": \"@\",\n    \"name\": \"chandler bing\",\n    \"yearOfBirth\": 2000\n  },\n  \"requestId\": \"499a5a4a-7dda-4f20-9b67-e24589627061\"\n}");
Request request = new Request.Builder()
  .url("{{baseUrl}}/v0.5/care-contexts/discover")
  .post(body)
  .addHeader("authorization", "")
  .addHeader("x-hip-id", "")
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v0.5/care-contexts/discover")
  .header("authorization", "")
  .header("x-hip-id", "")
  .header("content-type", "application/json")
  .body("{\n  \"patient\": {\n    \"id\": \"@\",\n    \"name\": \"chandler bing\",\n    \"yearOfBirth\": 2000\n  },\n  \"requestId\": \"499a5a4a-7dda-4f20-9b67-e24589627061\"\n}")
  .asString();
const data = JSON.stringify({
  patient: {
    id: '@',
    name: 'chandler bing',
    yearOfBirth: 2000
  },
  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/care-contexts/discover');
xhr.setRequestHeader('authorization', '');
xhr.setRequestHeader('x-hip-id', '');
xhr.setRequestHeader('content-type', 'application/json');

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

const options = {
  method: 'POST',
  url: '{{baseUrl}}/v0.5/care-contexts/discover',
  headers: {authorization: '', 'x-hip-id': '', 'content-type': 'application/json'},
  data: {
    patient: {
      id: '@',
      name: 'chandler bing',
      yearOfBirth: 2000
    },
    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/care-contexts/discover';
const options = {
  method: 'POST',
  headers: {authorization: '', 'x-hip-id': '', 'content-type': 'application/json'},
  body: '{"patient":{"id":"@","name":"chandler bing","yearOfBirth":2000},"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/care-contexts/discover',
  method: 'POST',
  headers: {
    authorization: '',
    'x-hip-id': '',
    'content-type': 'application/json'
  },
  processData: false,
  data: '{\n  "patient": {\n    "id": "@",\n    "name": "chandler bing",\n    "yearOfBirth": 2000\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  \"patient\": {\n    \"id\": \"@\",\n    \"name\": \"chandler bing\",\n    \"yearOfBirth\": 2000\n  },\n  \"requestId\": \"499a5a4a-7dda-4f20-9b67-e24589627061\"\n}")
val request = Request.Builder()
  .url("{{baseUrl}}/v0.5/care-contexts/discover")
  .post(body)
  .addHeader("authorization", "")
  .addHeader("x-hip-id", "")
  .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/discover',
  headers: {
    authorization: '',
    'x-hip-id': '',
    '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({
  patient: {
    id: '@',
    name: 'chandler bing',
    yearOfBirth: 2000
  },
  requestId: '499a5a4a-7dda-4f20-9b67-e24589627061'
}));
req.end();
const request = require('request');

const options = {
  method: 'POST',
  url: '{{baseUrl}}/v0.5/care-contexts/discover',
  headers: {authorization: '', 'x-hip-id': '', 'content-type': 'application/json'},
  body: {
    patient: {
      id: '@',
      name: 'chandler bing',
      yearOfBirth: 2000
    },
    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/care-contexts/discover');

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

req.type('json');
req.send({
  patient: {
    id: '@',
    name: 'chandler bing',
    yearOfBirth: 2000
  },
  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/care-contexts/discover',
  headers: {authorization: '', 'x-hip-id': '', 'content-type': 'application/json'},
  data: {
    patient: {
      id: '@',
      name: 'chandler bing',
      yearOfBirth: 2000
    },
    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/care-contexts/discover';
const options = {
  method: 'POST',
  headers: {authorization: '', 'x-hip-id': '', 'content-type': 'application/json'},
  body: '{"patient":{"id":"@","name":"chandler bing","yearOfBirth":2000},"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": @"",
                           @"x-hip-id": @"",
                           @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"patient": @{ @"id": @"@", @"name": @"chandler bing", @"yearOfBirth": @2000 },
                              @"requestId": @"499a5a4a-7dda-4f20-9b67-e24589627061" };

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

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v0.5/care-contexts/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/discover" in
let headers = Header.add_list (Header.init ()) [
  ("authorization", "");
  ("x-hip-id", "");
  ("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n  \"patient\": {\n    \"id\": \"@\",\n    \"name\": \"chandler bing\",\n    \"yearOfBirth\": 2000\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/care-contexts/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([
    'patient' => [
        'id' => '@',
        'name' => 'chandler bing',
        'yearOfBirth' => 2000
    ],
    'requestId' => '499a5a4a-7dda-4f20-9b67-e24589627061'
  ]),
  CURLOPT_HTTPHEADER => [
    "authorization: ",
    "content-type: application/json",
    "x-hip-id: "
  ],
]);

$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/discover', [
  'body' => '{
  "patient": {
    "id": "@",
    "name": "chandler bing",
    "yearOfBirth": 2000
  },
  "requestId": "499a5a4a-7dda-4f20-9b67-e24589627061"
}',
  'headers' => [
    'authorization' => '',
    'content-type' => 'application/json',
    'x-hip-id' => '',
  ],
]);

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

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

$request->setContentType('application/json');
$request->setBody(json_encode([
  'patient' => [
    'id' => '@',
    'name' => 'chandler bing',
    'yearOfBirth' => 2000
  ],
  'requestId' => '499a5a4a-7dda-4f20-9b67-e24589627061'
]));

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

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
append(json_encode([
  'patient' => [
    'id' => '@',
    'name' => 'chandler bing',
    'yearOfBirth' => 2000
  ],
  'requestId' => '499a5a4a-7dda-4f20-9b67-e24589627061'
]));
$request->setRequestUrl('{{baseUrl}}/v0.5/care-contexts/discover');
$request->setRequestMethod('POST');
$request->setBody($body);

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

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

echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "")
$headers.Add("x-hip-id", "")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v0.5/care-contexts/discover' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "patient": {
    "id": "@",
    "name": "chandler bing",
    "yearOfBirth": 2000
  },
  "requestId": "499a5a4a-7dda-4f20-9b67-e24589627061"
}'
$headers=@{}
$headers.Add("authorization", "")
$headers.Add("x-hip-id", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v0.5/care-contexts/discover' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "patient": {
    "id": "@",
    "name": "chandler bing",
    "yearOfBirth": 2000
  },
  "requestId": "499a5a4a-7dda-4f20-9b67-e24589627061"
}'
import http.client

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

payload = "{\n  \"patient\": {\n    \"id\": \"@\",\n    \"name\": \"chandler bing\",\n    \"yearOfBirth\": 2000\n  },\n  \"requestId\": \"499a5a4a-7dda-4f20-9b67-e24589627061\"\n}"

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

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

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

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

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

payload = {
    "patient": {
        "id": "@",
        "name": "chandler bing",
        "yearOfBirth": 2000
    },
    "requestId": "499a5a4a-7dda-4f20-9b67-e24589627061"
}
headers = {
    "authorization": "",
    "x-hip-id": "",
    "content-type": "application/json"
}

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

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

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

payload <- "{\n  \"patient\": {\n    \"id\": \"@\",\n    \"name\": \"chandler bing\",\n    \"yearOfBirth\": 2000\n  },\n  \"requestId\": \"499a5a4a-7dda-4f20-9b67-e24589627061\"\n}"

encode <- "json"

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

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

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

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

request = Net::HTTP::Post.new(url)
request["authorization"] = ''
request["x-hip-id"] = ''
request["content-type"] = 'application/json'
request.body = "{\n  \"patient\": {\n    \"id\": \"@\",\n    \"name\": \"chandler bing\",\n    \"yearOfBirth\": 2000\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/care-contexts/discover') do |req|
  req.headers['authorization'] = ''
  req.headers['x-hip-id'] = ''
  req.body = "{\n  \"patient\": {\n    \"id\": \"@\",\n    \"name\": \"chandler bing\",\n    \"yearOfBirth\": 2000\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/care-contexts/discover";

    let payload = json!({
        "patient": json!({
            "id": "@",
            "name": "chandler bing",
            "yearOfBirth": 2000
        }),
        "requestId": "499a5a4a-7dda-4f20-9b67-e24589627061"
    });

    let mut headers = reqwest::header::HeaderMap::new();
    headers.insert("authorization", "".parse().unwrap());
    headers.insert("x-hip-id", "".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/discover \
  --header 'authorization: ' \
  --header 'content-type: application/json' \
  --header 'x-hip-id: ' \
  --data '{
  "patient": {
    "id": "@",
    "name": "chandler bing",
    "yearOfBirth": 2000
  },
  "requestId": "499a5a4a-7dda-4f20-9b67-e24589627061"
}'
echo '{
  "patient": {
    "id": "@",
    "name": "chandler bing",
    "yearOfBirth": 2000
  },
  "requestId": "499a5a4a-7dda-4f20-9b67-e24589627061"
}' |  \
  http POST {{baseUrl}}/v0.5/care-contexts/discover \
  authorization:'' \
  content-type:application/json \
  x-hip-id:''
wget --quiet \
  --method POST \
  --header 'authorization: ' \
  --header 'x-hip-id: ' \
  --header 'content-type: application/json' \
  --body-data '{\n  "patient": {\n    "id": "@",\n    "name": "chandler bing",\n    "yearOfBirth": 2000\n  },\n  "requestId": "499a5a4a-7dda-4f20-9b67-e24589627061"\n}' \
  --output-document \
  - {{baseUrl}}/v0.5/care-contexts/discover
import Foundation

let headers = [
  "authorization": "",
  "x-hip-id": "",
  "content-type": "application/json"
]
let parameters = [
  "patient": [
    "id": "@",
    "name": "chandler bing",
    "yearOfBirth": 2000
  ],
  "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/care-contexts/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()
POST Response to patient's account discovery request
{{baseUrl}}/v0.5/care-contexts/on-discover
HEADERS

Authorization
X-CM-ID
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, "x-cm-id: ");
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 ""
                                                                                     :x-cm-id ""}
                                                                           :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" => ""
  "x-cm-id" => ""
  "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", "" },
        { "x-cm-id", "" },
    },
    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("x-cm-id", "");
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("x-cm-id", "")
	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: 
X-Cm-Id: 
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("x-cm-id", "")
  .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("x-cm-id", "")
    .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("x-cm-id", "")
  .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("x-cm-id", "")
  .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('x-cm-id', '');
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: '', 'x-cm-id': '', '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: '', 'x-cm-id': '', '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: '',
    'x-cm-id': '',
    '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("x-cm-id", "")
  .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: '',
    'x-cm-id': '',
    '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: '', 'x-cm-id': '', '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: '',
  'x-cm-id': '',
  '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: '', 'x-cm-id': '', '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: '', 'x-cm-id': '', '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": @"",
                           @"x-cm-id": @"",
                           @"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", "");
  ("x-cm-id", "");
  ("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",
    "x-cm-id: "
  ],
]);

$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',
    'x-cm-id' => '',
  ],
]);

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

$request->setHeaders([
  'authorization' => '',
  'x-cm-id' => '',
  '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' => '',
  'x-cm-id' => '',
  'content-type' => 'application/json'
]);

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

echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "")
$headers.Add("x-cm-id", "")
$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("x-cm-id", "")
$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': "",
    'x-cm-id': "",
    '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": "",
    "x-cm-id": "",
    "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' = '', 'x-cm-id' = ''), 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["x-cm-id"] = ''
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.headers['x-cm-id'] = ''
  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("x-cm-id", "".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' \
  --header 'x-cm-id: ' \
  --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 \
  x-cm-id:''
wget --quiet \
  --method POST \
  --header 'authorization: ' \
  --header 'x-cm-id: ' \
  --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": "",
  "x-cm-id": "",
  "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()
POST API for HIP to send SMS notifications to patients
{{baseUrl}}/v0.5/patients/sms/notify
HEADERS

Authorization
X-CM-ID
BODY json

{
  "notification": {
    "careContextInfo": "",
    "deeplinkUrl": "",
    "hip": {
      "id": "",
      "name": ""
    },
    "phoneNo": "",
    "receiverName": ""
  },
  "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/sms/notify");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: ");
headers = curl_slist_append(headers, "x-cm-id: ");
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    \"careContextInfo\": \"X-Ray on 22nd Dec\",\n    \"deeplinkUrl\": \"https://link.to.health.records/ (Optional)\",\n    \"phoneNo\": \"+91-9999999999\",\n    \"receiverName\": \"Ramesh Singh (Optional)\"\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/sms/notify" {:headers {:authorization ""
                                                                               :x-cm-id ""}
                                                                     :content-type :json
                                                                     :form-params {:notification {:careContextInfo "X-Ray on 22nd Dec"
                                                                                                  :deeplinkUrl "https://link.to.health.records/ (Optional)"
                                                                                                  :phoneNo "+91-9999999999"
                                                                                                  :receiverName "Ramesh Singh (Optional)"}
                                                                                   :requestId "5f7a535d-a3fd-416b-b069-c97d021fbacd"}})
require "http/client"

url = "{{baseUrl}}/v0.5/patients/sms/notify"
headers = HTTP::Headers{
  "authorization" => ""
  "x-cm-id" => ""
  "content-type" => "application/json"
}
reqBody = "{\n  \"notification\": {\n    \"careContextInfo\": \"X-Ray on 22nd Dec\",\n    \"deeplinkUrl\": \"https://link.to.health.records/ (Optional)\",\n    \"phoneNo\": \"+91-9999999999\",\n    \"receiverName\": \"Ramesh Singh (Optional)\"\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/sms/notify"),
    Headers =
    {
        { "authorization", "" },
        { "x-cm-id", "" },
    },
    Content = new StringContent("{\n  \"notification\": {\n    \"careContextInfo\": \"X-Ray on 22nd Dec\",\n    \"deeplinkUrl\": \"https://link.to.health.records/ (Optional)\",\n    \"phoneNo\": \"+91-9999999999\",\n    \"receiverName\": \"Ramesh Singh (Optional)\"\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/sms/notify");
var request = new RestRequest("", Method.Post);
request.AddHeader("authorization", "");
request.AddHeader("x-cm-id", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n  \"notification\": {\n    \"careContextInfo\": \"X-Ray on 22nd Dec\",\n    \"deeplinkUrl\": \"https://link.to.health.records/ (Optional)\",\n    \"phoneNo\": \"+91-9999999999\",\n    \"receiverName\": \"Ramesh Singh (Optional)\"\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/sms/notify"

	payload := strings.NewReader("{\n  \"notification\": {\n    \"careContextInfo\": \"X-Ray on 22nd Dec\",\n    \"deeplinkUrl\": \"https://link.to.health.records/ (Optional)\",\n    \"phoneNo\": \"+91-9999999999\",\n    \"receiverName\": \"Ramesh Singh (Optional)\"\n  },\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\n}")

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

	req.Header.Add("authorization", "")
	req.Header.Add("x-cm-id", "")
	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/sms/notify HTTP/1.1
Authorization: 
X-Cm-Id: 
Content-Type: application/json
Host: example.com
Content-Length: 270

{
  "notification": {
    "careContextInfo": "X-Ray on 22nd Dec",
    "deeplinkUrl": "https://link.to.health.records/ (Optional)",
    "phoneNo": "+91-9999999999",
    "receiverName": "Ramesh Singh (Optional)"
  },
  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v0.5/patients/sms/notify")
  .setHeader("authorization", "")
  .setHeader("x-cm-id", "")
  .setHeader("content-type", "application/json")
  .setBody("{\n  \"notification\": {\n    \"careContextInfo\": \"X-Ray on 22nd Dec\",\n    \"deeplinkUrl\": \"https://link.to.health.records/ (Optional)\",\n    \"phoneNo\": \"+91-9999999999\",\n    \"receiverName\": \"Ramesh Singh (Optional)\"\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/sms/notify"))
    .header("authorization", "")
    .header("x-cm-id", "")
    .header("content-type", "application/json")
    .method("POST", HttpRequest.BodyPublishers.ofString("{\n  \"notification\": {\n    \"careContextInfo\": \"X-Ray on 22nd Dec\",\n    \"deeplinkUrl\": \"https://link.to.health.records/ (Optional)\",\n    \"phoneNo\": \"+91-9999999999\",\n    \"receiverName\": \"Ramesh Singh (Optional)\"\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  \"notification\": {\n    \"careContextInfo\": \"X-Ray on 22nd Dec\",\n    \"deeplinkUrl\": \"https://link.to.health.records/ (Optional)\",\n    \"phoneNo\": \"+91-9999999999\",\n    \"receiverName\": \"Ramesh Singh (Optional)\"\n  },\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\n}");
Request request = new Request.Builder()
  .url("{{baseUrl}}/v0.5/patients/sms/notify")
  .post(body)
  .addHeader("authorization", "")
  .addHeader("x-cm-id", "")
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v0.5/patients/sms/notify")
  .header("authorization", "")
  .header("x-cm-id", "")
  .header("content-type", "application/json")
  .body("{\n  \"notification\": {\n    \"careContextInfo\": \"X-Ray on 22nd Dec\",\n    \"deeplinkUrl\": \"https://link.to.health.records/ (Optional)\",\n    \"phoneNo\": \"+91-9999999999\",\n    \"receiverName\": \"Ramesh Singh (Optional)\"\n  },\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\n}")
  .asString();
const data = JSON.stringify({
  notification: {
    careContextInfo: 'X-Ray on 22nd Dec',
    deeplinkUrl: 'https://link.to.health.records/ (Optional)',
    phoneNo: '+91-9999999999',
    receiverName: 'Ramesh Singh (Optional)'
  },
  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/sms/notify');
xhr.setRequestHeader('authorization', '');
xhr.setRequestHeader('x-cm-id', '');
xhr.setRequestHeader('content-type', 'application/json');

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

const options = {
  method: 'POST',
  url: '{{baseUrl}}/v0.5/patients/sms/notify',
  headers: {authorization: '', 'x-cm-id': '', 'content-type': 'application/json'},
  data: {
    notification: {
      careContextInfo: 'X-Ray on 22nd Dec',
      deeplinkUrl: 'https://link.to.health.records/ (Optional)',
      phoneNo: '+91-9999999999',
      receiverName: 'Ramesh Singh (Optional)'
    },
    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/sms/notify';
const options = {
  method: 'POST',
  headers: {authorization: '', 'x-cm-id': '', 'content-type': 'application/json'},
  body: '{"notification":{"careContextInfo":"X-Ray on 22nd Dec","deeplinkUrl":"https://link.to.health.records/ (Optional)","phoneNo":"+91-9999999999","receiverName":"Ramesh Singh (Optional)"},"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/sms/notify',
  method: 'POST',
  headers: {
    authorization: '',
    'x-cm-id': '',
    'content-type': 'application/json'
  },
  processData: false,
  data: '{\n  "notification": {\n    "careContextInfo": "X-Ray on 22nd Dec",\n    "deeplinkUrl": "https://link.to.health.records/ (Optional)",\n    "phoneNo": "+91-9999999999",\n    "receiverName": "Ramesh Singh (Optional)"\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  \"notification\": {\n    \"careContextInfo\": \"X-Ray on 22nd Dec\",\n    \"deeplinkUrl\": \"https://link.to.health.records/ (Optional)\",\n    \"phoneNo\": \"+91-9999999999\",\n    \"receiverName\": \"Ramesh Singh (Optional)\"\n  },\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\n}")
val request = Request.Builder()
  .url("{{baseUrl}}/v0.5/patients/sms/notify")
  .post(body)
  .addHeader("authorization", "")
  .addHeader("x-cm-id", "")
  .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/sms/notify',
  headers: {
    authorization: '',
    'x-cm-id': '',
    '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: {
    careContextInfo: 'X-Ray on 22nd Dec',
    deeplinkUrl: 'https://link.to.health.records/ (Optional)',
    phoneNo: '+91-9999999999',
    receiverName: 'Ramesh Singh (Optional)'
  },
  requestId: '5f7a535d-a3fd-416b-b069-c97d021fbacd'
}));
req.end();
const request = require('request');

const options = {
  method: 'POST',
  url: '{{baseUrl}}/v0.5/patients/sms/notify',
  headers: {authorization: '', 'x-cm-id': '', 'content-type': 'application/json'},
  body: {
    notification: {
      careContextInfo: 'X-Ray on 22nd Dec',
      deeplinkUrl: 'https://link.to.health.records/ (Optional)',
      phoneNo: '+91-9999999999',
      receiverName: 'Ramesh Singh (Optional)'
    },
    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/sms/notify');

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

req.type('json');
req.send({
  notification: {
    careContextInfo: 'X-Ray on 22nd Dec',
    deeplinkUrl: 'https://link.to.health.records/ (Optional)',
    phoneNo: '+91-9999999999',
    receiverName: 'Ramesh Singh (Optional)'
  },
  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/sms/notify',
  headers: {authorization: '', 'x-cm-id': '', 'content-type': 'application/json'},
  data: {
    notification: {
      careContextInfo: 'X-Ray on 22nd Dec',
      deeplinkUrl: 'https://link.to.health.records/ (Optional)',
      phoneNo: '+91-9999999999',
      receiverName: 'Ramesh Singh (Optional)'
    },
    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/sms/notify';
const options = {
  method: 'POST',
  headers: {authorization: '', 'x-cm-id': '', 'content-type': 'application/json'},
  body: '{"notification":{"careContextInfo":"X-Ray on 22nd Dec","deeplinkUrl":"https://link.to.health.records/ (Optional)","phoneNo":"+91-9999999999","receiverName":"Ramesh Singh (Optional)"},"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": @"",
                           @"x-cm-id": @"",
                           @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"notification": @{ @"careContextInfo": @"X-Ray on 22nd Dec", @"deeplinkUrl": @"https://link.to.health.records/ (Optional)", @"phoneNo": @"+91-9999999999", @"receiverName": @"Ramesh Singh (Optional)" },
                              @"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/sms/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/patients/sms/notify" in
let headers = Header.add_list (Header.init ()) [
  ("authorization", "");
  ("x-cm-id", "");
  ("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n  \"notification\": {\n    \"careContextInfo\": \"X-Ray on 22nd Dec\",\n    \"deeplinkUrl\": \"https://link.to.health.records/ (Optional)\",\n    \"phoneNo\": \"+91-9999999999\",\n    \"receiverName\": \"Ramesh Singh (Optional)\"\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/sms/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' => [
        'careContextInfo' => 'X-Ray on 22nd Dec',
        'deeplinkUrl' => 'https://link.to.health.records/ (Optional)',
        'phoneNo' => '+91-9999999999',
        'receiverName' => 'Ramesh Singh (Optional)'
    ],
    'requestId' => '5f7a535d-a3fd-416b-b069-c97d021fbacd'
  ]),
  CURLOPT_HTTPHEADER => [
    "authorization: ",
    "content-type: application/json",
    "x-cm-id: "
  ],
]);

$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/sms/notify', [
  'body' => '{
  "notification": {
    "careContextInfo": "X-Ray on 22nd Dec",
    "deeplinkUrl": "https://link.to.health.records/ (Optional)",
    "phoneNo": "+91-9999999999",
    "receiverName": "Ramesh Singh (Optional)"
  },
  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"
}',
  'headers' => [
    'authorization' => '',
    'content-type' => 'application/json',
    'x-cm-id' => '',
  ],
]);

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

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

$request->setContentType('application/json');
$request->setBody(json_encode([
  'notification' => [
    'careContextInfo' => 'X-Ray on 22nd Dec',
    'deeplinkUrl' => 'https://link.to.health.records/ (Optional)',
    'phoneNo' => '+91-9999999999',
    'receiverName' => 'Ramesh Singh (Optional)'
  ],
  'requestId' => '5f7a535d-a3fd-416b-b069-c97d021fbacd'
]));

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

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
append(json_encode([
  'notification' => [
    'careContextInfo' => 'X-Ray on 22nd Dec',
    'deeplinkUrl' => 'https://link.to.health.records/ (Optional)',
    'phoneNo' => '+91-9999999999',
    'receiverName' => 'Ramesh Singh (Optional)'
  ],
  'requestId' => '5f7a535d-a3fd-416b-b069-c97d021fbacd'
]));
$request->setRequestUrl('{{baseUrl}}/v0.5/patients/sms/notify');
$request->setRequestMethod('POST');
$request->setBody($body);

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

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

echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "")
$headers.Add("x-cm-id", "")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v0.5/patients/sms/notify' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "notification": {
    "careContextInfo": "X-Ray on 22nd Dec",
    "deeplinkUrl": "https://link.to.health.records/ (Optional)",
    "phoneNo": "+91-9999999999",
    "receiverName": "Ramesh Singh (Optional)"
  },
  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"
}'
$headers=@{}
$headers.Add("authorization", "")
$headers.Add("x-cm-id", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v0.5/patients/sms/notify' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "notification": {
    "careContextInfo": "X-Ray on 22nd Dec",
    "deeplinkUrl": "https://link.to.health.records/ (Optional)",
    "phoneNo": "+91-9999999999",
    "receiverName": "Ramesh Singh (Optional)"
  },
  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"
}'
import http.client

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

payload = "{\n  \"notification\": {\n    \"careContextInfo\": \"X-Ray on 22nd Dec\",\n    \"deeplinkUrl\": \"https://link.to.health.records/ (Optional)\",\n    \"phoneNo\": \"+91-9999999999\",\n    \"receiverName\": \"Ramesh Singh (Optional)\"\n  },\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\n}"

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

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

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

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

url = "{{baseUrl}}/v0.5/patients/sms/notify"

payload = {
    "notification": {
        "careContextInfo": "X-Ray on 22nd Dec",
        "deeplinkUrl": "https://link.to.health.records/ (Optional)",
        "phoneNo": "+91-9999999999",
        "receiverName": "Ramesh Singh (Optional)"
    },
    "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"
}
headers = {
    "authorization": "",
    "x-cm-id": "",
    "content-type": "application/json"
}

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

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

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

payload <- "{\n  \"notification\": {\n    \"careContextInfo\": \"X-Ray on 22nd Dec\",\n    \"deeplinkUrl\": \"https://link.to.health.records/ (Optional)\",\n    \"phoneNo\": \"+91-9999999999\",\n    \"receiverName\": \"Ramesh Singh (Optional)\"\n  },\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\n}"

encode <- "json"

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

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

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

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

request = Net::HTTP::Post.new(url)
request["authorization"] = ''
request["x-cm-id"] = ''
request["content-type"] = 'application/json'
request.body = "{\n  \"notification\": {\n    \"careContextInfo\": \"X-Ray on 22nd Dec\",\n    \"deeplinkUrl\": \"https://link.to.health.records/ (Optional)\",\n    \"phoneNo\": \"+91-9999999999\",\n    \"receiverName\": \"Ramesh Singh (Optional)\"\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/sms/notify') do |req|
  req.headers['authorization'] = ''
  req.headers['x-cm-id'] = ''
  req.body = "{\n  \"notification\": {\n    \"careContextInfo\": \"X-Ray on 22nd Dec\",\n    \"deeplinkUrl\": \"https://link.to.health.records/ (Optional)\",\n    \"phoneNo\": \"+91-9999999999\",\n    \"receiverName\": \"Ramesh Singh (Optional)\"\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/sms/notify";

    let payload = json!({
        "notification": json!({
            "careContextInfo": "X-Ray on 22nd Dec",
            "deeplinkUrl": "https://link.to.health.records/ (Optional)",
            "phoneNo": "+91-9999999999",
            "receiverName": "Ramesh Singh (Optional)"
        }),
        "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"
    });

    let mut headers = reqwest::header::HeaderMap::new();
    headers.insert("authorization", "".parse().unwrap());
    headers.insert("x-cm-id", "".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/sms/notify \
  --header 'authorization: ' \
  --header 'content-type: application/json' \
  --header 'x-cm-id: ' \
  --data '{
  "notification": {
    "careContextInfo": "X-Ray on 22nd Dec",
    "deeplinkUrl": "https://link.to.health.records/ (Optional)",
    "phoneNo": "+91-9999999999",
    "receiverName": "Ramesh Singh (Optional)"
  },
  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"
}'
echo '{
  "notification": {
    "careContextInfo": "X-Ray on 22nd Dec",
    "deeplinkUrl": "https://link.to.health.records/ (Optional)",
    "phoneNo": "+91-9999999999",
    "receiverName": "Ramesh Singh (Optional)"
  },
  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"
}' |  \
  http POST {{baseUrl}}/v0.5/patients/sms/notify \
  authorization:'' \
  content-type:application/json \
  x-cm-id:''
wget --quiet \
  --method POST \
  --header 'authorization: ' \
  --header 'x-cm-id: ' \
  --header 'content-type: application/json' \
  --body-data '{\n  "notification": {\n    "careContextInfo": "X-Ray on 22nd Dec",\n    "deeplinkUrl": "https://link.to.health.records/ (Optional)",\n    "phoneNo": "+91-9999999999",\n    "receiverName": "Ramesh Singh (Optional)"\n  },\n  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"\n}' \
  --output-document \
  - {{baseUrl}}/v0.5/patients/sms/notify
import Foundation

let headers = [
  "authorization": "",
  "x-cm-id": "",
  "content-type": "application/json"
]
let parameters = [
  "notification": [
    "careContextInfo": "X-Ray on 22nd Dec",
    "deeplinkUrl": "https://link.to.health.records/ (Optional)",
    "phoneNo": "+91-9999999999",
    "receiverName": "Ramesh Singh (Optional)"
  ],
  "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/sms/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/patients/on-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  \"patient\": {\n    \"id\": \"hinapatel79@ndhm\",\n    \"name\": \"Hina Patel\"\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/on-find" {:headers {:authorization ""}
                                                                  :content-type :json
                                                                  :form-params {:patient {:id "hinapatel79@ndhm"
                                                                                          :name "Hina Patel"}
                                                                                :requestId "5f7a535d-a3fd-416b-b069-c97d021fbacd"}})
require "http/client"

url = "{{baseUrl}}/v0.5/patients/on-find"
headers = HTTP::Headers{
  "authorization" => ""
  "content-type" => "application/json"
}
reqBody = "{\n  \"patient\": {\n    \"id\": \"hinapatel79@ndhm\",\n    \"name\": \"Hina Patel\"\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/on-find"),
    Headers =
    {
        { "authorization", "" },
    },
    Content = new StringContent("{\n  \"patient\": {\n    \"id\": \"hinapatel79@ndhm\",\n    \"name\": \"Hina Patel\"\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/on-find");
var request = new RestRequest("", Method.Post);
request.AddHeader("authorization", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n  \"patient\": {\n    \"id\": \"hinapatel79@ndhm\",\n    \"name\": \"Hina Patel\"\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/on-find"

	payload := strings.NewReader("{\n  \"patient\": {\n    \"id\": \"hinapatel79@ndhm\",\n    \"name\": \"Hina Patel\"\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/on-find HTTP/1.1
Authorization: 
Content-Type: application/json
Host: example.com
Content-Length: 132

{
  "patient": {
    "id": "hinapatel79@ndhm",
    "name": "Hina Patel"
  },
  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v0.5/patients/on-find")
  .setHeader("authorization", "")
  .setHeader("content-type", "application/json")
  .setBody("{\n  \"patient\": {\n    \"id\": \"hinapatel79@ndhm\",\n    \"name\": \"Hina Patel\"\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/on-find"))
    .header("authorization", "")
    .header("content-type", "application/json")
    .method("POST", HttpRequest.BodyPublishers.ofString("{\n  \"patient\": {\n    \"id\": \"hinapatel79@ndhm\",\n    \"name\": \"Hina Patel\"\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  \"patient\": {\n    \"id\": \"hinapatel79@ndhm\",\n    \"name\": \"Hina Patel\"\n  },\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\n}");
Request request = new Request.Builder()
  .url("{{baseUrl}}/v0.5/patients/on-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/on-find")
  .header("authorization", "")
  .header("content-type", "application/json")
  .body("{\n  \"patient\": {\n    \"id\": \"hinapatel79@ndhm\",\n    \"name\": \"Hina Patel\"\n  },\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\n}")
  .asString();
const data = JSON.stringify({
  patient: {
    id: 'hinapatel79@ndhm',
    name: 'Hina Patel'
  },
  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/on-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/on-find',
  headers: {authorization: '', 'content-type': 'application/json'},
  data: {
    patient: {id: 'hinapatel79@ndhm', name: 'Hina Patel'},
    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/on-find';
const options = {
  method: 'POST',
  headers: {authorization: '', 'content-type': 'application/json'},
  body: '{"patient":{"id":"hinapatel79@ndhm","name":"Hina Patel"},"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/on-find',
  method: 'POST',
  headers: {
    authorization: '',
    'content-type': 'application/json'
  },
  processData: false,
  data: '{\n  "patient": {\n    "id": "hinapatel79@ndhm",\n    "name": "Hina Patel"\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  \"patient\": {\n    \"id\": \"hinapatel79@ndhm\",\n    \"name\": \"Hina Patel\"\n  },\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\n}")
val request = Request.Builder()
  .url("{{baseUrl}}/v0.5/patients/on-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/on-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({
  patient: {id: 'hinapatel79@ndhm', name: 'Hina Patel'},
  requestId: '5f7a535d-a3fd-416b-b069-c97d021fbacd'
}));
req.end();
const request = require('request');

const options = {
  method: 'POST',
  url: '{{baseUrl}}/v0.5/patients/on-find',
  headers: {authorization: '', 'content-type': 'application/json'},
  body: {
    patient: {id: 'hinapatel79@ndhm', name: 'Hina Patel'},
    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/on-find');

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

req.type('json');
req.send({
  patient: {
    id: 'hinapatel79@ndhm',
    name: 'Hina Patel'
  },
  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/on-find',
  headers: {authorization: '', 'content-type': 'application/json'},
  data: {
    patient: {id: 'hinapatel79@ndhm', name: 'Hina Patel'},
    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/on-find';
const options = {
  method: 'POST',
  headers: {authorization: '', 'content-type': 'application/json'},
  body: '{"patient":{"id":"hinapatel79@ndhm","name":"Hina Patel"},"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 = @{ @"patient": @{ @"id": @"hinapatel79@ndhm", @"name": @"Hina Patel" },
                              @"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/on-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/on-find" in
let headers = Header.add_list (Header.init ()) [
  ("authorization", "");
  ("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n  \"patient\": {\n    \"id\": \"hinapatel79@ndhm\",\n    \"name\": \"Hina Patel\"\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/on-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([
    'patient' => [
        'id' => 'hinapatel79@ndhm',
        'name' => 'Hina Patel'
    ],
    '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/on-find', [
  'body' => '{
  "patient": {
    "id": "hinapatel79@ndhm",
    "name": "Hina Patel"
  },
  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"
}',
  'headers' => [
    'authorization' => '',
    'content-type' => 'application/json',
  ],
]);

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

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

$request->setContentType('application/json');
$request->setBody(json_encode([
  'patient' => [
    'id' => 'hinapatel79@ndhm',
    'name' => 'Hina Patel'
  ],
  'requestId' => '5f7a535d-a3fd-416b-b069-c97d021fbacd'
]));

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

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
append(json_encode([
  'patient' => [
    'id' => 'hinapatel79@ndhm',
    'name' => 'Hina Patel'
  ],
  'requestId' => '5f7a535d-a3fd-416b-b069-c97d021fbacd'
]));
$request->setRequestUrl('{{baseUrl}}/v0.5/patients/on-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/on-find' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "patient": {
    "id": "hinapatel79@ndhm",
    "name": "Hina Patel"
  },
  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"
}'
$headers=@{}
$headers.Add("authorization", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v0.5/patients/on-find' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "patient": {
    "id": "hinapatel79@ndhm",
    "name": "Hina Patel"
  },
  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"
}'
import http.client

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

payload = "{\n  \"patient\": {\n    \"id\": \"hinapatel79@ndhm\",\n    \"name\": \"Hina Patel\"\n  },\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\n}"

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

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

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

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

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

payload = {
    "patient": {
        "id": "hinapatel79@ndhm",
        "name": "Hina Patel"
    },
    "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/on-find"

payload <- "{\n  \"patient\": {\n    \"id\": \"hinapatel79@ndhm\",\n    \"name\": \"Hina Patel\"\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/on-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  \"patient\": {\n    \"id\": \"hinapatel79@ndhm\",\n    \"name\": \"Hina Patel\"\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/on-find') do |req|
  req.headers['authorization'] = ''
  req.body = "{\n  \"patient\": {\n    \"id\": \"hinapatel79@ndhm\",\n    \"name\": \"Hina Patel\"\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/on-find";

    let payload = json!({
        "patient": json!({
            "id": "hinapatel79@ndhm",
            "name": "Hina Patel"
        }),
        "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/on-find \
  --header 'authorization: ' \
  --header 'content-type: application/json' \
  --data '{
  "patient": {
    "id": "hinapatel79@ndhm",
    "name": "Hina Patel"
  },
  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"
}'
echo '{
  "patient": {
    "id": "hinapatel79@ndhm",
    "name": "Hina Patel"
  },
  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"
}' |  \
  http POST {{baseUrl}}/v0.5/patients/on-find \
  authorization:'' \
  content-type:application/json
wget --quiet \
  --method POST \
  --header 'authorization: ' \
  --header 'content-type: application/json' \
  --body-data '{\n  "patient": {\n    "id": "hinapatel79@ndhm",\n    "name": "Hina Patel"\n  },\n  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"\n}' \
  --output-document \
  - {{baseUrl}}/v0.5/patients/on-find
import Foundation

let headers = [
  "authorization": "",
  "content-type": "application/json"
]
let parameters = [
  "patient": [
    "id": "hinapatel79@ndhm",
    "name": "Hina Patel"
  ],
  "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/on-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/patients/find");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: ");
headers = curl_slist_append(headers, "x-cm-id: ");
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 ""
                                                                         :x-cm-id ""}
                                                               :content-type :json
                                                               :form-params {:requestId "5f7a535d-a3fd-416b-b069-c97d021fbacd"}})
require "http/client"

url = "{{baseUrl}}/v0.5/patients/find"
headers = HTTP::Headers{
  "authorization" => ""
  "x-cm-id" => ""
  "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", "" },
        { "x-cm-id", "" },
    },
    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("x-cm-id", "");
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("x-cm-id", "")
	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: 
X-Cm-Id: 
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("x-cm-id", "")
  .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("x-cm-id", "")
    .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("x-cm-id", "")
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v0.5/patients/find")
  .header("authorization", "")
  .header("x-cm-id", "")
  .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('x-cm-id', '');
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: '', 'x-cm-id': '', '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: '', 'x-cm-id': '', '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: '',
    'x-cm-id': '',
    '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("x-cm-id", "")
  .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: '',
    'x-cm-id': '',
    '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: '', 'x-cm-id': '', '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: '',
  'x-cm-id': '',
  '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: '', 'x-cm-id': '', '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: '', 'x-cm-id': '', '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": @"",
                           @"x-cm-id": @"",
                           @"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", "");
  ("x-cm-id", "");
  ("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",
    "x-cm-id: "
  ],
]);

$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',
    'x-cm-id' => '',
  ],
]);

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

$request->setHeaders([
  'authorization' => '',
  'x-cm-id' => '',
  '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' => '',
  'x-cm-id' => '',
  'content-type' => 'application/json'
]);

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

echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "")
$headers.Add("x-cm-id", "")
$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("x-cm-id", "")
$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': "",
    'x-cm-id': "",
    '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": "",
    "x-cm-id": "",
    "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' = '', 'x-cm-id' = ''), 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["x-cm-id"] = ''
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.headers['x-cm-id'] = ''
  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("x-cm-id", "".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' \
  --header 'x-cm-id: ' \
  --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 \
  x-cm-id:''
wget --quiet \
  --method POST \
  --header 'authorization: ' \
  --header 'x-cm-id: ' \
  --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": "",
  "x-cm-id": "",
  "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, "x-cm-id: ");
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 ""
                                                                                   :x-cm-id ""}
                                                                         :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" => ""
  "x-cm-id" => ""
  "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", "" },
        { "x-cm-id", "" },
    },
    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("x-cm-id", "");
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("x-cm-id", "")
	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: 
X-Cm-Id: 
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("x-cm-id", "")
  .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("x-cm-id", "")
    .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("x-cm-id", "")
  .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("x-cm-id", "")
  .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('x-cm-id', '');
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: '', 'x-cm-id': '', '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: '', 'x-cm-id': '', '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: '',
    'x-cm-id': '',
    '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("x-cm-id", "")
  .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: '',
    'x-cm-id': '',
    '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: '', 'x-cm-id': '', '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: '',
  'x-cm-id': '',
  '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: '', 'x-cm-id': '', '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: '', 'x-cm-id': '', '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": @"",
                           @"x-cm-id": @"",
                           @"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", "");
  ("x-cm-id", "");
  ("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",
    "x-cm-id: "
  ],
]);

$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',
    'x-cm-id' => '',
  ],
]);

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

$request->setHeaders([
  'authorization' => '',
  'x-cm-id' => '',
  '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' => '',
  'x-cm-id' => '',
  'content-type' => 'application/json'
]);

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

echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "")
$headers.Add("x-cm-id", "")
$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("x-cm-id", "")
$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': "",
    'x-cm-id': "",
    '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": "",
    "x-cm-id": "",
    "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' = '', 'x-cm-id' = ''), 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["x-cm-id"] = ''
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.headers['x-cm-id'] = ''
  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("x-cm-id", "".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' \
  --header 'x-cm-id: ' \
  --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 \
  x-cm-id:''
wget --quiet \
  --method POST \
  --header 'authorization: ' \
  --header 'x-cm-id: ' \
  --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": "",
  "x-cm-id": "",
  "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/init");

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

curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n  \"patient\": {\n    \"id\": \"hinapatel79@ndhm\",\n    \"referenceNumber\": \"TMH-PUID-001\"\n  }\n}");

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

(client/post "{{baseUrl}}/v0.5/links/link/init" {:headers {:authorization ""
                                                                           :x-hip-id ""}
                                                                 :content-type :json
                                                                 :form-params {:patient {:id "hinapatel79@ndhm"
                                                                                         :referenceNumber "TMH-PUID-001"}}})
require "http/client"

url = "{{baseUrl}}/v0.5/links/link/init"
headers = HTTP::Headers{
  "authorization" => ""
  "x-hip-id" => ""
  "content-type" => "application/json"
}
reqBody = "{\n  \"patient\": {\n    \"id\": \"hinapatel79@ndhm\",\n    \"referenceNumber\": \"TMH-PUID-001\"\n  }\n}"

response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
    Method = HttpMethod.Post,
    RequestUri = new Uri("{{baseUrl}}/v0.5/links/link/init"),
    Headers =
    {
        { "authorization", "" },
        { "x-hip-id", "" },
    },
    Content = new StringContent("{\n  \"patient\": {\n    \"id\": \"hinapatel79@ndhm\",\n    \"referenceNumber\": \"TMH-PUID-001\"\n  }\n}")
    {
        Headers =
        {
            ContentType = new MediaTypeHeaderValue("application/json")
        }
    }
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v0.5/links/link/init");
var request = new RestRequest("", Method.Post);
request.AddHeader("authorization", "");
request.AddHeader("x-hip-id", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n  \"patient\": {\n    \"id\": \"hinapatel79@ndhm\",\n    \"referenceNumber\": \"TMH-PUID-001\"\n  }\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main

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

func main() {

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

	payload := strings.NewReader("{\n  \"patient\": {\n    \"id\": \"hinapatel79@ndhm\",\n    \"referenceNumber\": \"TMH-PUID-001\"\n  }\n}")

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

	req.Header.Add("authorization", "")
	req.Header.Add("x-hip-id", "")
	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/init HTTP/1.1
Authorization: 
X-Hip-Id: 
Content-Type: application/json
Host: example.com
Content-Length: 90

{
  "patient": {
    "id": "hinapatel79@ndhm",
    "referenceNumber": "TMH-PUID-001"
  }
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v0.5/links/link/init")
  .setHeader("authorization", "")
  .setHeader("x-hip-id", "")
  .setHeader("content-type", "application/json")
  .setBody("{\n  \"patient\": {\n    \"id\": \"hinapatel79@ndhm\",\n    \"referenceNumber\": \"TMH-PUID-001\"\n  }\n}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/v0.5/links/link/init"))
    .header("authorization", "")
    .header("x-hip-id", "")
    .header("content-type", "application/json")
    .method("POST", HttpRequest.BodyPublishers.ofString("{\n  \"patient\": {\n    \"id\": \"hinapatel79@ndhm\",\n    \"referenceNumber\": \"TMH-PUID-001\"\n  }\n}"))
    .build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();

MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n  \"patient\": {\n    \"id\": \"hinapatel79@ndhm\",\n    \"referenceNumber\": \"TMH-PUID-001\"\n  }\n}");
Request request = new Request.Builder()
  .url("{{baseUrl}}/v0.5/links/link/init")
  .post(body)
  .addHeader("authorization", "")
  .addHeader("x-hip-id", "")
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v0.5/links/link/init")
  .header("authorization", "")
  .header("x-hip-id", "")
  .header("content-type", "application/json")
  .body("{\n  \"patient\": {\n    \"id\": \"hinapatel79@ndhm\",\n    \"referenceNumber\": \"TMH-PUID-001\"\n  }\n}")
  .asString();
const data = JSON.stringify({
  patient: {
    id: 'hinapatel79@ndhm',
    referenceNumber: 'TMH-PUID-001'
  }
});

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/init');
xhr.setRequestHeader('authorization', '');
xhr.setRequestHeader('x-hip-id', '');
xhr.setRequestHeader('content-type', 'application/json');

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

const options = {
  method: 'POST',
  url: '{{baseUrl}}/v0.5/links/link/init',
  headers: {authorization: '', 'x-hip-id': '', 'content-type': 'application/json'},
  data: {patient: {id: 'hinapatel79@ndhm', referenceNumber: 'TMH-PUID-001'}}
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/v0.5/links/link/init';
const options = {
  method: 'POST',
  headers: {authorization: '', 'x-hip-id': '', 'content-type': 'application/json'},
  body: '{"patient":{"id":"hinapatel79@ndhm","referenceNumber":"TMH-PUID-001"}}'
};

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/init',
  method: 'POST',
  headers: {
    authorization: '',
    'x-hip-id': '',
    'content-type': 'application/json'
  },
  processData: false,
  data: '{\n  "patient": {\n    "id": "hinapatel79@ndhm",\n    "referenceNumber": "TMH-PUID-001"\n  }\n}'
};

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

val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n  \"patient\": {\n    \"id\": \"hinapatel79@ndhm\",\n    \"referenceNumber\": \"TMH-PUID-001\"\n  }\n}")
val request = Request.Builder()
  .url("{{baseUrl}}/v0.5/links/link/init")
  .post(body)
  .addHeader("authorization", "")
  .addHeader("x-hip-id", "")
  .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/init',
  headers: {
    authorization: '',
    'x-hip-id': '',
    '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({patient: {id: 'hinapatel79@ndhm', referenceNumber: 'TMH-PUID-001'}}));
req.end();
const request = require('request');

const options = {
  method: 'POST',
  url: '{{baseUrl}}/v0.5/links/link/init',
  headers: {authorization: '', 'x-hip-id': '', 'content-type': 'application/json'},
  body: {patient: {id: 'hinapatel79@ndhm', referenceNumber: 'TMH-PUID-001'}},
  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/init');

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

req.type('json');
req.send({
  patient: {
    id: 'hinapatel79@ndhm',
    referenceNumber: 'TMH-PUID-001'
  }
});

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/init',
  headers: {authorization: '', 'x-hip-id': '', 'content-type': 'application/json'},
  data: {patient: {id: 'hinapatel79@ndhm', referenceNumber: 'TMH-PUID-001'}}
};

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/init';
const options = {
  method: 'POST',
  headers: {authorization: '', 'x-hip-id': '', 'content-type': 'application/json'},
  body: '{"patient":{"id":"hinapatel79@ndhm","referenceNumber":"TMH-PUID-001"}}'
};

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

NSDictionary *headers = @{ @"authorization": @"",
                           @"x-hip-id": @"",
                           @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"patient": @{ @"id": @"hinapatel79@ndhm", @"referenceNumber": @"TMH-PUID-001" } };

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

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v0.5/links/link/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/init" in
let headers = Header.add_list (Header.init ()) [
  ("authorization", "");
  ("x-hip-id", "");
  ("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n  \"patient\": {\n    \"id\": \"hinapatel79@ndhm\",\n    \"referenceNumber\": \"TMH-PUID-001\"\n  }\n}" in

Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/v0.5/links/link/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([
    'patient' => [
        'id' => 'hinapatel79@ndhm',
        'referenceNumber' => 'TMH-PUID-001'
    ]
  ]),
  CURLOPT_HTTPHEADER => [
    "authorization: ",
    "content-type: application/json",
    "x-hip-id: "
  ],
]);

$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/init', [
  'body' => '{
  "patient": {
    "id": "hinapatel79@ndhm",
    "referenceNumber": "TMH-PUID-001"
  }
}',
  'headers' => [
    'authorization' => '',
    'content-type' => 'application/json',
    'x-hip-id' => '',
  ],
]);

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

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

$request->setContentType('application/json');
$request->setBody(json_encode([
  'patient' => [
    'id' => 'hinapatel79@ndhm',
    'referenceNumber' => 'TMH-PUID-001'
  ]
]));

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

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
append(json_encode([
  'patient' => [
    'id' => 'hinapatel79@ndhm',
    'referenceNumber' => 'TMH-PUID-001'
  ]
]));
$request->setRequestUrl('{{baseUrl}}/v0.5/links/link/init');
$request->setRequestMethod('POST');
$request->setBody($body);

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

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

echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "")
$headers.Add("x-hip-id", "")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v0.5/links/link/init' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "patient": {
    "id": "hinapatel79@ndhm",
    "referenceNumber": "TMH-PUID-001"
  }
}'
$headers=@{}
$headers.Add("authorization", "")
$headers.Add("x-hip-id", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v0.5/links/link/init' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "patient": {
    "id": "hinapatel79@ndhm",
    "referenceNumber": "TMH-PUID-001"
  }
}'
import http.client

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

payload = "{\n  \"patient\": {\n    \"id\": \"hinapatel79@ndhm\",\n    \"referenceNumber\": \"TMH-PUID-001\"\n  }\n}"

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

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

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

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

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

payload = { "patient": {
        "id": "hinapatel79@ndhm",
        "referenceNumber": "TMH-PUID-001"
    } }
headers = {
    "authorization": "",
    "x-hip-id": "",
    "content-type": "application/json"
}

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

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

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

payload <- "{\n  \"patient\": {\n    \"id\": \"hinapatel79@ndhm\",\n    \"referenceNumber\": \"TMH-PUID-001\"\n  }\n}"

encode <- "json"

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

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

url = URI("{{baseUrl}}/v0.5/links/link/init")

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

request = Net::HTTP::Post.new(url)
request["authorization"] = ''
request["x-hip-id"] = ''
request["content-type"] = 'application/json'
request.body = "{\n  \"patient\": {\n    \"id\": \"hinapatel79@ndhm\",\n    \"referenceNumber\": \"TMH-PUID-001\"\n  }\n}"

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

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

response = conn.post('/baseUrl/v0.5/links/link/init') do |req|
  req.headers['authorization'] = ''
  req.headers['x-hip-id'] = ''
  req.body = "{\n  \"patient\": {\n    \"id\": \"hinapatel79@ndhm\",\n    \"referenceNumber\": \"TMH-PUID-001\"\n  }\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/init";

    let payload = json!({"patient": json!({
            "id": "hinapatel79@ndhm",
            "referenceNumber": "TMH-PUID-001"
        })});

    let mut headers = reqwest::header::HeaderMap::new();
    headers.insert("authorization", "".parse().unwrap());
    headers.insert("x-hip-id", "".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/init \
  --header 'authorization: ' \
  --header 'content-type: application/json' \
  --header 'x-hip-id: ' \
  --data '{
  "patient": {
    "id": "hinapatel79@ndhm",
    "referenceNumber": "TMH-PUID-001"
  }
}'
echo '{
  "patient": {
    "id": "hinapatel79@ndhm",
    "referenceNumber": "TMH-PUID-001"
  }
}' |  \
  http POST {{baseUrl}}/v0.5/links/link/init \
  authorization:'' \
  content-type:application/json \
  x-hip-id:''
wget --quiet \
  --method POST \
  --header 'authorization: ' \
  --header 'x-hip-id: ' \
  --header 'content-type: application/json' \
  --body-data '{\n  "patient": {\n    "id": "hinapatel79@ndhm",\n    "referenceNumber": "TMH-PUID-001"\n  }\n}' \
  --output-document \
  - {{baseUrl}}/v0.5/links/link/init
import Foundation

let headers = [
  "authorization": "",
  "x-hip-id": "",
  "content-type": "application/json"
]
let parameters = ["patient": [
    "id": "hinapatel79@ndhm",
    "referenceNumber": "TMH-PUID-001"
  ]] as [String : Any]

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

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

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: ");
headers = curl_slist_append(headers, "x-cm-id: ");
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 ""
                                                                              :x-cm-id ""}
                                                                    :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" => ""
  "x-cm-id" => ""
  "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", "" },
        { "x-cm-id", "" },
    },
    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("x-cm-id", "");
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("x-cm-id", "")
	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: 
X-Cm-Id: 
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("x-cm-id", "")
  .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("x-cm-id", "")
    .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("x-cm-id", "")
  .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("x-cm-id", "")
  .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('x-cm-id', '');
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: '', 'x-cm-id': '', '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: '', 'x-cm-id': '', '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: '',
    'x-cm-id': '',
    '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("x-cm-id", "")
  .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: '',
    'x-cm-id': '',
    '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: '', 'x-cm-id': '', '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: '',
  'x-cm-id': '',
  '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: '', 'x-cm-id': '', '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: '', 'x-cm-id': '', '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": @"",
                           @"x-cm-id": @"",
                           @"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", "");
  ("x-cm-id", "");
  ("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",
    "x-cm-id: "
  ],
]);

$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',
    'x-cm-id' => '',
  ],
]);

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

$request->setHeaders([
  'authorization' => '',
  'x-cm-id' => '',
  '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' => '',
  'x-cm-id' => '',
  'content-type' => 'application/json'
]);

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

echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "")
$headers.Add("x-cm-id", "")
$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("x-cm-id", "")
$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': "",
    'x-cm-id': "",
    '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": "",
    "x-cm-id": "",
    "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' = '', 'x-cm-id' = ''), 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["x-cm-id"] = ''
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.headers['x-cm-id'] = ''
  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("x-cm-id", "".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' \
  --header 'x-cm-id: ' \
  --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 \
  x-cm-id:''
wget --quiet \
  --method POST \
  --header 'authorization: ' \
  --header 'x-cm-id: ' \
  --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": "",
  "x-cm-id": "",
  "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, "x-cm-id: ");
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 ""
                                                                                 :x-cm-id ""}
                                                                       :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" => ""
  "x-cm-id" => ""
  "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", "" },
        { "x-cm-id", "" },
    },
    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("x-cm-id", "");
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("x-cm-id", "")
	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: 
X-Cm-Id: 
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("x-cm-id", "")
  .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("x-cm-id", "")
    .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("x-cm-id", "")
  .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("x-cm-id", "")
  .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('x-cm-id', '');
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: '', 'x-cm-id': '', '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: '', 'x-cm-id': '', '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: '',
    'x-cm-id': '',
    '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("x-cm-id", "")
  .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: '',
    'x-cm-id': '',
    '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: '', 'x-cm-id': '', '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: '',
  'x-cm-id': '',
  '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: '', 'x-cm-id': '', '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: '', 'x-cm-id': '', '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": @"",
                           @"x-cm-id": @"",
                           @"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", "");
  ("x-cm-id", "");
  ("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",
    "x-cm-id: "
  ],
]);

$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',
    'x-cm-id' => '',
  ],
]);

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

$request->setHeaders([
  'authorization' => '',
  'x-cm-id' => '',
  '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' => '',
  'x-cm-id' => '',
  'content-type' => 'application/json'
]);

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

echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "")
$headers.Add("x-cm-id", "")
$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("x-cm-id", "")
$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': "",
    'x-cm-id': "",
    '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": "",
    "x-cm-id": "",
    "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' = '', 'x-cm-id' = ''), 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["x-cm-id"] = ''
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.headers['x-cm-id'] = ''
  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("x-cm-id", "".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' \
  --header 'x-cm-id: ' \
  --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 \
  x-cm-id:''
wget --quiet \
  --method POST \
  --header 'authorization: ' \
  --header 'x-cm-id: ' \
  --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": "",
  "x-cm-id": "",
  "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, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v0.5/links/link/confirm");

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

curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n  \"confirmation\": {\n    \"linkRefNumber\": \"\",\n    \"token\": \"\"\n  },\n  \"requestId\": \"\",\n  \"timestamp\": \"\"\n}");

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

(client/post "{{baseUrl}}/v0.5/links/link/confirm" {:headers {:authorization ""
                                                                              :x-hip-id ""}
                                                                    :content-type :json
                                                                    :form-params {:confirmation {:linkRefNumber ""
                                                                                                 :token ""}
                                                                                  :requestId ""
                                                                                  :timestamp ""}})
require "http/client"

url = "{{baseUrl}}/v0.5/links/link/confirm"
headers = HTTP::Headers{
  "authorization" => ""
  "x-hip-id" => ""
  "content-type" => "application/json"
}
reqBody = "{\n  \"confirmation\": {\n    \"linkRefNumber\": \"\",\n    \"token\": \"\"\n  },\n  \"requestId\": \"\",\n  \"timestamp\": \"\"\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/confirm"),
    Headers =
    {
        { "authorization", "" },
        { "x-hip-id", "" },
    },
    Content = new StringContent("{\n  \"confirmation\": {\n    \"linkRefNumber\": \"\",\n    \"token\": \"\"\n  },\n  \"requestId\": \"\",\n  \"timestamp\": \"\"\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/confirm");
var request = new RestRequest("", Method.Post);
request.AddHeader("authorization", "");
request.AddHeader("x-hip-id", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n  \"confirmation\": {\n    \"linkRefNumber\": \"\",\n    \"token\": \"\"\n  },\n  \"requestId\": \"\",\n  \"timestamp\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main

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

func main() {

	url := "{{baseUrl}}/v0.5/links/link/confirm"

	payload := strings.NewReader("{\n  \"confirmation\": {\n    \"linkRefNumber\": \"\",\n    \"token\": \"\"\n  },\n  \"requestId\": \"\",\n  \"timestamp\": \"\"\n}")

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

	req.Header.Add("authorization", "")
	req.Header.Add("x-hip-id", "")
	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/confirm HTTP/1.1
Authorization: 
X-Hip-Id: 
Content-Type: application/json
Host: example.com
Content-Length: 106

{
  "confirmation": {
    "linkRefNumber": "",
    "token": ""
  },
  "requestId": "",
  "timestamp": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v0.5/links/link/confirm")
  .setHeader("authorization", "")
  .setHeader("x-hip-id", "")
  .setHeader("content-type", "application/json")
  .setBody("{\n  \"confirmation\": {\n    \"linkRefNumber\": \"\",\n    \"token\": \"\"\n  },\n  \"requestId\": \"\",\n  \"timestamp\": \"\"\n}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/v0.5/links/link/confirm"))
    .header("authorization", "")
    .header("x-hip-id", "")
    .header("content-type", "application/json")
    .method("POST", HttpRequest.BodyPublishers.ofString("{\n  \"confirmation\": {\n    \"linkRefNumber\": \"\",\n    \"token\": \"\"\n  },\n  \"requestId\": \"\",\n  \"timestamp\": \"\"\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  \"confirmation\": {\n    \"linkRefNumber\": \"\",\n    \"token\": \"\"\n  },\n  \"requestId\": \"\",\n  \"timestamp\": \"\"\n}");
Request request = new Request.Builder()
  .url("{{baseUrl}}/v0.5/links/link/confirm")
  .post(body)
  .addHeader("authorization", "")
  .addHeader("x-hip-id", "")
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v0.5/links/link/confirm")
  .header("authorization", "")
  .header("x-hip-id", "")
  .header("content-type", "application/json")
  .body("{\n  \"confirmation\": {\n    \"linkRefNumber\": \"\",\n    \"token\": \"\"\n  },\n  \"requestId\": \"\",\n  \"timestamp\": \"\"\n}")
  .asString();
const data = JSON.stringify({
  confirmation: {
    linkRefNumber: '',
    token: ''
  },
  requestId: '',
  timestamp: ''
});

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/confirm');
xhr.setRequestHeader('authorization', '');
xhr.setRequestHeader('x-hip-id', '');
xhr.setRequestHeader('content-type', 'application/json');

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

const options = {
  method: 'POST',
  url: '{{baseUrl}}/v0.5/links/link/confirm',
  headers: {authorization: '', 'x-hip-id': '', 'content-type': 'application/json'},
  data: {confirmation: {linkRefNumber: '', token: ''}, requestId: '', timestamp: ''}
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/v0.5/links/link/confirm';
const options = {
  method: 'POST',
  headers: {authorization: '', 'x-hip-id': '', 'content-type': 'application/json'},
  body: '{"confirmation":{"linkRefNumber":"","token":""},"requestId":"","timestamp":""}'
};

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/confirm',
  method: 'POST',
  headers: {
    authorization: '',
    'x-hip-id': '',
    'content-type': 'application/json'
  },
  processData: false,
  data: '{\n  "confirmation": {\n    "linkRefNumber": "",\n    "token": ""\n  },\n  "requestId": "",\n  "timestamp": ""\n}'
};

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

val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n  \"confirmation\": {\n    \"linkRefNumber\": \"\",\n    \"token\": \"\"\n  },\n  \"requestId\": \"\",\n  \"timestamp\": \"\"\n}")
val request = Request.Builder()
  .url("{{baseUrl}}/v0.5/links/link/confirm")
  .post(body)
  .addHeader("authorization", "")
  .addHeader("x-hip-id", "")
  .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/confirm',
  headers: {
    authorization: '',
    'x-hip-id': '',
    '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({confirmation: {linkRefNumber: '', token: ''}, requestId: '', timestamp: ''}));
req.end();
const request = require('request');

const options = {
  method: 'POST',
  url: '{{baseUrl}}/v0.5/links/link/confirm',
  headers: {authorization: '', 'x-hip-id': '', 'content-type': 'application/json'},
  body: {confirmation: {linkRefNumber: '', token: ''}, requestId: '', timestamp: ''},
  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/confirm');

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

req.type('json');
req.send({
  confirmation: {
    linkRefNumber: '',
    token: ''
  },
  requestId: '',
  timestamp: ''
});

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/confirm',
  headers: {authorization: '', 'x-hip-id': '', 'content-type': 'application/json'},
  data: {confirmation: {linkRefNumber: '', token: ''}, requestId: '', timestamp: ''}
};

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/confirm';
const options = {
  method: 'POST',
  headers: {authorization: '', 'x-hip-id': '', 'content-type': 'application/json'},
  body: '{"confirmation":{"linkRefNumber":"","token":""},"requestId":"","timestamp":""}'
};

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

NSDictionary *headers = @{ @"authorization": @"",
                           @"x-hip-id": @"",
                           @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"confirmation": @{ @"linkRefNumber": @"", @"token": @"" },
                              @"requestId": @"",
                              @"timestamp": @"" };

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

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v0.5/links/link/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/confirm" in
let headers = Header.add_list (Header.init ()) [
  ("authorization", "");
  ("x-hip-id", "");
  ("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n  \"confirmation\": {\n    \"linkRefNumber\": \"\",\n    \"token\": \"\"\n  },\n  \"requestId\": \"\",\n  \"timestamp\": \"\"\n}" in

Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/v0.5/links/link/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([
    'confirmation' => [
        'linkRefNumber' => '',
        'token' => ''
    ],
    'requestId' => '',
    'timestamp' => ''
  ]),
  CURLOPT_HTTPHEADER => [
    "authorization: ",
    "content-type: application/json",
    "x-hip-id: "
  ],
]);

$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/confirm', [
  'body' => '{
  "confirmation": {
    "linkRefNumber": "",
    "token": ""
  },
  "requestId": "",
  "timestamp": ""
}',
  'headers' => [
    'authorization' => '',
    'content-type' => 'application/json',
    'x-hip-id' => '',
  ],
]);

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

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

$request->setContentType('application/json');
$request->setBody(json_encode([
  'confirmation' => [
    'linkRefNumber' => '',
    'token' => ''
  ],
  'requestId' => '',
  'timestamp' => ''
]));

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

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
append(json_encode([
  'confirmation' => [
    'linkRefNumber' => '',
    'token' => ''
  ],
  'requestId' => '',
  'timestamp' => ''
]));
$request->setRequestUrl('{{baseUrl}}/v0.5/links/link/confirm');
$request->setRequestMethod('POST');
$request->setBody($body);

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

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

echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "")
$headers.Add("x-hip-id", "")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v0.5/links/link/confirm' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "confirmation": {
    "linkRefNumber": "",
    "token": ""
  },
  "requestId": "",
  "timestamp": ""
}'
$headers=@{}
$headers.Add("authorization", "")
$headers.Add("x-hip-id", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v0.5/links/link/confirm' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "confirmation": {
    "linkRefNumber": "",
    "token": ""
  },
  "requestId": "",
  "timestamp": ""
}'
import http.client

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

payload = "{\n  \"confirmation\": {\n    \"linkRefNumber\": \"\",\n    \"token\": \"\"\n  },\n  \"requestId\": \"\",\n  \"timestamp\": \"\"\n}"

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

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

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

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

url = "{{baseUrl}}/v0.5/links/link/confirm"

payload = {
    "confirmation": {
        "linkRefNumber": "",
        "token": ""
    },
    "requestId": "",
    "timestamp": ""
}
headers = {
    "authorization": "",
    "x-hip-id": "",
    "content-type": "application/json"
}

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

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

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

payload <- "{\n  \"confirmation\": {\n    \"linkRefNumber\": \"\",\n    \"token\": \"\"\n  },\n  \"requestId\": \"\",\n  \"timestamp\": \"\"\n}"

encode <- "json"

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

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

url = URI("{{baseUrl}}/v0.5/links/link/confirm")

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

request = Net::HTTP::Post.new(url)
request["authorization"] = ''
request["x-hip-id"] = ''
request["content-type"] = 'application/json'
request.body = "{\n  \"confirmation\": {\n    \"linkRefNumber\": \"\",\n    \"token\": \"\"\n  },\n  \"requestId\": \"\",\n  \"timestamp\": \"\"\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/confirm') do |req|
  req.headers['authorization'] = ''
  req.headers['x-hip-id'] = ''
  req.body = "{\n  \"confirmation\": {\n    \"linkRefNumber\": \"\",\n    \"token\": \"\"\n  },\n  \"requestId\": \"\",\n  \"timestamp\": \"\"\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/confirm";

    let payload = json!({
        "confirmation": json!({
            "linkRefNumber": "",
            "token": ""
        }),
        "requestId": "",
        "timestamp": ""
    });

    let mut headers = reqwest::header::HeaderMap::new();
    headers.insert("authorization", "".parse().unwrap());
    headers.insert("x-hip-id", "".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/confirm \
  --header 'authorization: ' \
  --header 'content-type: application/json' \
  --header 'x-hip-id: ' \
  --data '{
  "confirmation": {
    "linkRefNumber": "",
    "token": ""
  },
  "requestId": "",
  "timestamp": ""
}'
echo '{
  "confirmation": {
    "linkRefNumber": "",
    "token": ""
  },
  "requestId": "",
  "timestamp": ""
}' |  \
  http POST {{baseUrl}}/v0.5/links/link/confirm \
  authorization:'' \
  content-type:application/json \
  x-hip-id:''
wget --quiet \
  --method POST \
  --header 'authorization: ' \
  --header 'x-hip-id: ' \
  --header 'content-type: application/json' \
  --body-data '{\n  "confirmation": {\n    "linkRefNumber": "",\n    "token": ""\n  },\n  "requestId": "",\n  "timestamp": ""\n}' \
  --output-document \
  - {{baseUrl}}/v0.5/links/link/confirm
import Foundation

let headers = [
  "authorization": "",
  "x-hip-id": "",
  "content-type": "application/json"
]
let parameters = [
  "confirmation": [
    "linkRefNumber": "",
    "token": ""
  ],
  "requestId": "",
  "timestamp": ""
] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v0.5/links/link/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, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v0.5/links/link/on-add-contexts");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: ");
headers = curl_slist_append(headers, "x-hip-id: ");
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-add-contexts" {:headers {:authorization ""
                                                                                      :x-hip-id ""}
                                                                            :content-type :json
                                                                            :form-params {:requestId "5f7a535d-a3fd-416b-b069-c97d021fbacd"}})
require "http/client"

url = "{{baseUrl}}/v0.5/links/link/on-add-contexts"
headers = HTTP::Headers{
  "authorization" => ""
  "x-hip-id" => ""
  "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-add-contexts"),
    Headers =
    {
        { "authorization", "" },
        { "x-hip-id", "" },
    },
    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-add-contexts");
var request = new RestRequest("", Method.Post);
request.AddHeader("authorization", "");
request.AddHeader("x-hip-id", "");
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-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("x-hip-id", "")
	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-add-contexts HTTP/1.1
Authorization: 
X-Hip-Id: 
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-add-contexts")
  .setHeader("authorization", "")
  .setHeader("x-hip-id", "")
  .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-add-contexts"))
    .header("authorization", "")
    .header("x-hip-id", "")
    .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-add-contexts")
  .post(body)
  .addHeader("authorization", "")
  .addHeader("x-hip-id", "")
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v0.5/links/link/on-add-contexts")
  .header("authorization", "")
  .header("x-hip-id", "")
  .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-add-contexts');
xhr.setRequestHeader('authorization', '');
xhr.setRequestHeader('x-hip-id', '');
xhr.setRequestHeader('content-type', 'application/json');

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

const options = {
  method: 'POST',
  url: '{{baseUrl}}/v0.5/links/link/on-add-contexts',
  headers: {authorization: '', 'x-hip-id': '', '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-add-contexts';
const options = {
  method: 'POST',
  headers: {authorization: '', 'x-hip-id': '', '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-add-contexts',
  method: 'POST',
  headers: {
    authorization: '',
    'x-hip-id': '',
    '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-add-contexts")
  .post(body)
  .addHeader("authorization", "")
  .addHeader("x-hip-id", "")
  .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-add-contexts',
  headers: {
    authorization: '',
    'x-hip-id': '',
    '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-add-contexts',
  headers: {authorization: '', 'x-hip-id': '', '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-add-contexts');

req.headers({
  authorization: '',
  'x-hip-id': '',
  '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-add-contexts',
  headers: {authorization: '', 'x-hip-id': '', '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-add-contexts';
const options = {
  method: 'POST',
  headers: {authorization: '', 'x-hip-id': '', '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": @"",
                           @"x-hip-id": @"",
                           @"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-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/on-add-contexts" in
let headers = Header.add_list (Header.init ()) [
  ("authorization", "");
  ("x-hip-id", "");
  ("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-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",
    "x-hip-id: "
  ],
]);

$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-add-contexts', [
  'body' => '{
  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"
}',
  'headers' => [
    'authorization' => '',
    'content-type' => 'application/json',
    'x-hip-id' => '',
  ],
]);

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

$request->setHeaders([
  'authorization' => '',
  'x-hip-id' => '',
  '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-add-contexts');
$request->setRequestMethod('POST');
$request->setBody($body);

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

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

echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "")
$headers.Add("x-hip-id", "")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v0.5/links/link/on-add-contexts' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"
}'
$headers=@{}
$headers.Add("authorization", "")
$headers.Add("x-hip-id", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v0.5/links/link/on-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': "",
    'x-hip-id': "",
    'content-type': "application/json"
}

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

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

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

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

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

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

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

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

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

encode <- "json"

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

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

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

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

request = Net::HTTP::Post.new(url)
request["authorization"] = ''
request["x-hip-id"] = ''
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-add-contexts') do |req|
  req.headers['authorization'] = ''
  req.headers['x-hip-id'] = ''
  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-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("x-hip-id", "".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-add-contexts \
  --header 'authorization: ' \
  --header 'content-type: application/json' \
  --header 'x-hip-id: ' \
  --data '{
  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"
}'
echo '{
  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"
}' |  \
  http POST {{baseUrl}}/v0.5/links/link/on-add-contexts \
  authorization:'' \
  content-type:application/json \
  x-hip-id:''
wget --quiet \
  --method POST \
  --header 'authorization: ' \
  --header 'x-hip-id: ' \
  --header 'content-type: application/json' \
  --body-data '{\n  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"\n}' \
  --output-document \
  - {{baseUrl}}/v0.5/links/link/on-add-contexts
import Foundation

let headers = [
  "authorization": "",
  "x-hip-id": "",
  "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-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, "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
X-CM-ID
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, "x-cm-id: ");
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 ""
                                                                                     :x-cm-id ""}
                                                                           :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" => ""
  "x-cm-id" => ""
  "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", "" },
        { "x-cm-id", "" },
    },
    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("x-cm-id", "");
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("x-cm-id", "")
	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: 
X-Cm-Id: 
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("x-cm-id", "")
  .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("x-cm-id", "")
    .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("x-cm-id", "")
  .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("x-cm-id", "")
  .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('x-cm-id', '');
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: '', 'x-cm-id': '', '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: '', 'x-cm-id': '', '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: '',
    'x-cm-id': '',
    '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("x-cm-id", "")
  .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: '',
    'x-cm-id': '',
    '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: '', 'x-cm-id': '', '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: '',
  'x-cm-id': '',
  '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: '', 'x-cm-id': '', '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: '', 'x-cm-id': '', '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": @"",
                           @"x-cm-id": @"",
                           @"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", "");
  ("x-cm-id", "");
  ("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",
    "x-cm-id: "
  ],
]);

$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',
    'x-cm-id' => '',
  ],
]);

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

$request->setHeaders([
  'authorization' => '',
  'x-cm-id' => '',
  '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' => '',
  'x-cm-id' => '',
  'content-type' => 'application/json'
]);

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

echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "")
$headers.Add("x-cm-id", "")
$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("x-cm-id", "")
$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': "",
    'x-cm-id': "",
    '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": "",
    "x-cm-id": "",
    "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' = '', 'x-cm-id' = ''), 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["x-cm-id"] = ''
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.headers['x-cm-id'] = ''
  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("x-cm-id", "".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' \
  --header 'x-cm-id: ' \
  --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 \
  x-cm-id:''
wget --quiet \
  --method POST \
  --header 'authorization: ' \
  --header 'x-cm-id: ' \
  --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": "",
  "x-cm-id": "",
  "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 Share patient profile details
{{baseUrl}}/v0.5/patients/profile/share
HEADERS

Authorization
X-HIP-ID
BODY json

{
  "patient": {
    "hipCode": "",
    "userDemographics": {
      "address": {
        "district": "",
        "line": "",
        "pincode": "",
        "state": ""
      },
      "dayOfBirth": 0,
      "gender": "",
      "healthId": "",
      "healthIdNumber": "",
      "identifiers": [
        {
          "type": "",
          "value": ""
        }
      ],
      "monthOfBirth": 0,
      "name": "",
      "yearOfBirth": 0
    }
  },
  "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/share");

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

curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n  \"patient\": {\n    \"hipCode\": \"12345 (CounterId)\"\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/patients/profile/share" {:headers {:authorization ""
                                                                                  :x-hip-id ""}
                                                                        :content-type :json
                                                                        :form-params {:patient {:hipCode "12345 (CounterId)"}
                                                                                      :requestId "499a5a4a-7dda-4f20-9b67-e24589627061"}})
require "http/client"

url = "{{baseUrl}}/v0.5/patients/profile/share"
headers = HTTP::Headers{
  "authorization" => ""
  "x-hip-id" => ""
  "content-type" => "application/json"
}
reqBody = "{\n  \"patient\": {\n    \"hipCode\": \"12345 (CounterId)\"\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/patients/profile/share"),
    Headers =
    {
        { "authorization", "" },
        { "x-hip-id", "" },
    },
    Content = new StringContent("{\n  \"patient\": {\n    \"hipCode\": \"12345 (CounterId)\"\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/patients/profile/share");
var request = new RestRequest("", Method.Post);
request.AddHeader("authorization", "");
request.AddHeader("x-hip-id", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n  \"patient\": {\n    \"hipCode\": \"12345 (CounterId)\"\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/patients/profile/share"

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

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

	req.Header.Add("authorization", "")
	req.Header.Add("x-hip-id", "")
	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/share HTTP/1.1
Authorization: 
X-Hip-Id: 
Content-Type: application/json
Host: example.com
Content-Length: 112

{
  "patient": {
    "hipCode": "12345 (CounterId)"
  },
  "requestId": "499a5a4a-7dda-4f20-9b67-e24589627061"
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v0.5/patients/profile/share")
  .setHeader("authorization", "")
  .setHeader("x-hip-id", "")
  .setHeader("content-type", "application/json")
  .setBody("{\n  \"patient\": {\n    \"hipCode\": \"12345 (CounterId)\"\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/patients/profile/share"))
    .header("authorization", "")
    .header("x-hip-id", "")
    .header("content-type", "application/json")
    .method("POST", HttpRequest.BodyPublishers.ofString("{\n  \"patient\": {\n    \"hipCode\": \"12345 (CounterId)\"\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  \"patient\": {\n    \"hipCode\": \"12345 (CounterId)\"\n  },\n  \"requestId\": \"499a5a4a-7dda-4f20-9b67-e24589627061\"\n}");
Request request = new Request.Builder()
  .url("{{baseUrl}}/v0.5/patients/profile/share")
  .post(body)
  .addHeader("authorization", "")
  .addHeader("x-hip-id", "")
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v0.5/patients/profile/share")
  .header("authorization", "")
  .header("x-hip-id", "")
  .header("content-type", "application/json")
  .body("{\n  \"patient\": {\n    \"hipCode\": \"12345 (CounterId)\"\n  },\n  \"requestId\": \"499a5a4a-7dda-4f20-9b67-e24589627061\"\n}")
  .asString();
const data = JSON.stringify({
  patient: {
    hipCode: '12345 (CounterId)'
  },
  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/patients/profile/share');
xhr.setRequestHeader('authorization', '');
xhr.setRequestHeader('x-hip-id', '');
xhr.setRequestHeader('content-type', 'application/json');

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

const options = {
  method: 'POST',
  url: '{{baseUrl}}/v0.5/patients/profile/share',
  headers: {authorization: '', 'x-hip-id': '', 'content-type': 'application/json'},
  data: {
    patient: {hipCode: '12345 (CounterId)'},
    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/patients/profile/share';
const options = {
  method: 'POST',
  headers: {authorization: '', 'x-hip-id': '', 'content-type': 'application/json'},
  body: '{"patient":{"hipCode":"12345 (CounterId)"},"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/patients/profile/share',
  method: 'POST',
  headers: {
    authorization: '',
    'x-hip-id': '',
    'content-type': 'application/json'
  },
  processData: false,
  data: '{\n  "patient": {\n    "hipCode": "12345 (CounterId)"\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  \"patient\": {\n    \"hipCode\": \"12345 (CounterId)\"\n  },\n  \"requestId\": \"499a5a4a-7dda-4f20-9b67-e24589627061\"\n}")
val request = Request.Builder()
  .url("{{baseUrl}}/v0.5/patients/profile/share")
  .post(body)
  .addHeader("authorization", "")
  .addHeader("x-hip-id", "")
  .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/share',
  headers: {
    authorization: '',
    'x-hip-id': '',
    '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({
  patient: {hipCode: '12345 (CounterId)'},
  requestId: '499a5a4a-7dda-4f20-9b67-e24589627061'
}));
req.end();
const request = require('request');

const options = {
  method: 'POST',
  url: '{{baseUrl}}/v0.5/patients/profile/share',
  headers: {authorization: '', 'x-hip-id': '', 'content-type': 'application/json'},
  body: {
    patient: {hipCode: '12345 (CounterId)'},
    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/patients/profile/share');

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

req.type('json');
req.send({
  patient: {
    hipCode: '12345 (CounterId)'
  },
  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/patients/profile/share',
  headers: {authorization: '', 'x-hip-id': '', 'content-type': 'application/json'},
  data: {
    patient: {hipCode: '12345 (CounterId)'},
    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/patients/profile/share';
const options = {
  method: 'POST',
  headers: {authorization: '', 'x-hip-id': '', 'content-type': 'application/json'},
  body: '{"patient":{"hipCode":"12345 (CounterId)"},"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": @"",
                           @"x-hip-id": @"",
                           @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"patient": @{ @"hipCode": @"12345 (CounterId)" },
                              @"requestId": @"499a5a4a-7dda-4f20-9b67-e24589627061" };

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

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

$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/share', [
  'body' => '{
  "patient": {
    "hipCode": "12345 (CounterId)"
  },
  "requestId": "499a5a4a-7dda-4f20-9b67-e24589627061"
}',
  'headers' => [
    'authorization' => '',
    'content-type' => 'application/json',
    'x-hip-id' => '',
  ],
]);

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

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

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

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

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
append(json_encode([
  'patient' => [
    'hipCode' => '12345 (CounterId)'
  ],
  'requestId' => '499a5a4a-7dda-4f20-9b67-e24589627061'
]));
$request->setRequestUrl('{{baseUrl}}/v0.5/patients/profile/share');
$request->setRequestMethod('POST');
$request->setBody($body);

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

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

echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "")
$headers.Add("x-hip-id", "")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v0.5/patients/profile/share' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "patient": {
    "hipCode": "12345 (CounterId)"
  },
  "requestId": "499a5a4a-7dda-4f20-9b67-e24589627061"
}'
$headers=@{}
$headers.Add("authorization", "")
$headers.Add("x-hip-id", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v0.5/patients/profile/share' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "patient": {
    "hipCode": "12345 (CounterId)"
  },
  "requestId": "499a5a4a-7dda-4f20-9b67-e24589627061"
}'
import http.client

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

payload = "{\n  \"patient\": {\n    \"hipCode\": \"12345 (CounterId)\"\n  },\n  \"requestId\": \"499a5a4a-7dda-4f20-9b67-e24589627061\"\n}"

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

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

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

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

url = "{{baseUrl}}/v0.5/patients/profile/share"

payload = {
    "patient": { "hipCode": "12345 (CounterId)" },
    "requestId": "499a5a4a-7dda-4f20-9b67-e24589627061"
}
headers = {
    "authorization": "",
    "x-hip-id": "",
    "content-type": "application/json"
}

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

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

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

payload <- "{\n  \"patient\": {\n    \"hipCode\": \"12345 (CounterId)\"\n  },\n  \"requestId\": \"499a5a4a-7dda-4f20-9b67-e24589627061\"\n}"

encode <- "json"

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

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

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

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

request = Net::HTTP::Post.new(url)
request["authorization"] = ''
request["x-hip-id"] = ''
request["content-type"] = 'application/json'
request.body = "{\n  \"patient\": {\n    \"hipCode\": \"12345 (CounterId)\"\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/patients/profile/share') do |req|
  req.headers['authorization'] = ''
  req.headers['x-hip-id'] = ''
  req.body = "{\n  \"patient\": {\n    \"hipCode\": \"12345 (CounterId)\"\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/patients/profile/share";

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

    let mut headers = reqwest::header::HeaderMap::new();
    headers.insert("authorization", "".parse().unwrap());
    headers.insert("x-hip-id", "".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/share \
  --header 'authorization: ' \
  --header 'content-type: application/json' \
  --header 'x-hip-id: ' \
  --data '{
  "patient": {
    "hipCode": "12345 (CounterId)"
  },
  "requestId": "499a5a4a-7dda-4f20-9b67-e24589627061"
}'
echo '{
  "patient": {
    "hipCode": "12345 (CounterId)"
  },
  "requestId": "499a5a4a-7dda-4f20-9b67-e24589627061"
}' |  \
  http POST {{baseUrl}}/v0.5/patients/profile/share \
  authorization:'' \
  content-type:application/json \
  x-hip-id:''
wget --quiet \
  --method POST \
  --header 'authorization: ' \
  --header 'x-hip-id: ' \
  --header 'content-type: application/json' \
  --body-data '{\n  "patient": {\n    "hipCode": "12345 (CounterId)"\n  },\n  "requestId": "499a5a4a-7dda-4f20-9b67-e24589627061"\n}' \
  --output-document \
  - {{baseUrl}}/v0.5/patients/profile/share
import Foundation

let headers = [
  "authorization": "",
  "x-hip-id": "",
  "content-type": "application/json"
]
let parameters = [
  "patient": ["hipCode": "12345 (CounterId)"],
  "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/patients/profile/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()
GET Get bridge service details-profile by the serviceId provided.
{{baseUrl}}/v0.5/hi-services/:service-id
HEADERS

Authorization
QUERY PARAMS

service-id
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v0.5/hi-services/:service-id");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: ");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

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

(client/get "{{baseUrl}}/v0.5/hi-services/:service-id" {:headers {:authorization ""}})
require "http/client"

url = "{{baseUrl}}/v0.5/hi-services/:service-id"
headers = HTTP::Headers{
  "authorization" => ""
}

response = HTTP::Client.get url, headers: headers
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/hi-services/:service-id"),
    Headers =
    {
        { "authorization", "" },
    },
};
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/hi-services/:service-id");
var request = new RestRequest("", Method.Get);
request.AddHeader("authorization", "");
var response = client.Execute(request);
package main

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

func main() {

	url := "{{baseUrl}}/v0.5/hi-services/:service-id"

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

	req.Header.Add("authorization", "")

	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/hi-services/:service-id HTTP/1.1
Authorization: 
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/v0.5/hi-services/:service-id")
  .setHeader("authorization", "")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/v0.5/hi-services/:service-id"))
    .header("authorization", "")
    .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/hi-services/:service-id")
  .get()
  .addHeader("authorization", "")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/v0.5/hi-services/:service-id")
  .header("authorization", "")
  .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/hi-services/:service-id');
xhr.setRequestHeader('authorization', '');

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

const options = {
  method: 'GET',
  url: '{{baseUrl}}/v0.5/hi-services/:service-id',
  headers: {authorization: ''}
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/v0.5/hi-services/:service-id';
const options = {method: 'GET', headers: {authorization: ''}};

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/hi-services/:service-id',
  method: 'GET',
  headers: {
    authorization: ''
  }
};

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

val request = Request.Builder()
  .url("{{baseUrl}}/v0.5/hi-services/:service-id")
  .get()
  .addHeader("authorization", "")
  .build()

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

const options = {
  method: 'GET',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/v0.5/hi-services/:service-id',
  headers: {
    authorization: ''
  }
};

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/hi-services/:service-id',
  headers: {authorization: ''}
};

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/hi-services/:service-id');

req.headers({
  authorization: ''
});

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/hi-services/:service-id',
  headers: {authorization: ''}
};

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/hi-services/:service-id';
const options = {method: 'GET', headers: {authorization: ''}};

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

NSDictionary *headers = @{ @"authorization": @"" };

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v0.5/hi-services/:service-id"]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
[request setAllHTTPHeaderFields:headers];

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/hi-services/:service-id" in
let headers = Header.add (Header.init ()) "authorization" "" in

Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/v0.5/hi-services/:service-id",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => [
    "authorization: "
  ],
]);

$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/hi-services/:service-id', [
  'headers' => [
    'authorization' => '',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/v0.5/hi-services/:service-id');
$request->setMethod(HTTP_METH_GET);

$request->setHeaders([
  'authorization' => ''
]);

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

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/v0.5/hi-services/:service-id');
$request->setRequestMethod('GET');
$request->setHeaders([
  'authorization' => ''
]);

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

echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v0.5/hi-services/:service-id' -Method GET -Headers $headers
$headers=@{}
$headers.Add("authorization", "")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v0.5/hi-services/:service-id' -Method GET -Headers $headers
import http.client

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

headers = { 'authorization': "" }

conn.request("GET", "/baseUrl/v0.5/hi-services/:service-id", headers=headers)

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

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

url = "{{baseUrl}}/v0.5/hi-services/:service-id"

headers = {"authorization": ""}

response = requests.get(url, headers=headers)

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

url <- "{{baseUrl}}/v0.5/hi-services/:service-id"

response <- VERB("GET", url, add_headers('authorization' = ''), content_type("application/octet-stream"))

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

url = URI("{{baseUrl}}/v0.5/hi-services/:service-id")

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

request = Net::HTTP::Get.new(url)
request["authorization"] = ''

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

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

response = conn.get('/baseUrl/v0.5/hi-services/:service-id') do |req|
  req.headers['authorization'] = ''
end

puts response.status
puts response.body
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/v0.5/hi-services/:service-id";

    let mut headers = reqwest::header::HeaderMap::new();
    headers.insert("authorization", "".parse().unwrap());

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

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

    dbg!(results);
}
curl --request GET \
  --url {{baseUrl}}/v0.5/hi-services/:service-id \
  --header 'authorization: '
http GET {{baseUrl}}/v0.5/hi-services/:service-id \
  authorization:''
wget --quiet \
  --method GET \
  --header 'authorization: ' \
  --output-document \
  - {{baseUrl}}/v0.5/hi-services/:service-id
import Foundation

let headers = ["authorization": ""]

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v0.5/hi-services/:service-id")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

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 access token
{{baseUrl}}/v0.5/sessions
BODY json

{
  "clientId": "",
  "clientSecret": "",
  "grantType": "",
  "refreshToken": ""
}
Examples
REQUEST

CURL *hnd = curl_easy_init();

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

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

curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n  \"clientId\": \"\",\n  \"clientSecret\": \"\",\n  \"grantType\": \"\",\n  \"refreshToken\": \"\"\n}");

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

(client/post "{{baseUrl}}/v0.5/sessions" {:content-type :json
                                                          :form-params {:clientId ""
                                                                        :clientSecret ""
                                                                        :grantType ""
                                                                        :refreshToken ""}})
require "http/client"

url = "{{baseUrl}}/v0.5/sessions"
headers = HTTP::Headers{
  "content-type" => "application/json"
}
reqBody = "{\n  \"clientId\": \"\",\n  \"clientSecret\": \"\",\n  \"grantType\": \"\",\n  \"refreshToken\": \"\"\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/sessions"),
    Content = new StringContent("{\n  \"clientId\": \"\",\n  \"clientSecret\": \"\",\n  \"grantType\": \"\",\n  \"refreshToken\": \"\"\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/sessions");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n  \"clientId\": \"\",\n  \"clientSecret\": \"\",\n  \"grantType\": \"\",\n  \"refreshToken\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main

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

func main() {

	url := "{{baseUrl}}/v0.5/sessions"

	payload := strings.NewReader("{\n  \"clientId\": \"\",\n  \"clientSecret\": \"\",\n  \"grantType\": \"\",\n  \"refreshToken\": \"\"\n}")

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

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

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

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

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

}
POST /baseUrl/v0.5/sessions HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 83

{
  "clientId": "",
  "clientSecret": "",
  "grantType": "",
  "refreshToken": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v0.5/sessions")
  .setHeader("content-type", "application/json")
  .setBody("{\n  \"clientId\": \"\",\n  \"clientSecret\": \"\",\n  \"grantType\": \"\",\n  \"refreshToken\": \"\"\n}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/v0.5/sessions"))
    .header("content-type", "application/json")
    .method("POST", HttpRequest.BodyPublishers.ofString("{\n  \"clientId\": \"\",\n  \"clientSecret\": \"\",\n  \"grantType\": \"\",\n  \"refreshToken\": \"\"\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  \"clientId\": \"\",\n  \"clientSecret\": \"\",\n  \"grantType\": \"\",\n  \"refreshToken\": \"\"\n}");
Request request = new Request.Builder()
  .url("{{baseUrl}}/v0.5/sessions")
  .post(body)
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v0.5/sessions")
  .header("content-type", "application/json")
  .body("{\n  \"clientId\": \"\",\n  \"clientSecret\": \"\",\n  \"grantType\": \"\",\n  \"refreshToken\": \"\"\n}")
  .asString();
const data = JSON.stringify({
  clientId: '',
  clientSecret: '',
  grantType: '',
  refreshToken: ''
});

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/sessions');
xhr.setRequestHeader('content-type', 'application/json');

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

const options = {
  method: 'POST',
  url: '{{baseUrl}}/v0.5/sessions',
  headers: {'content-type': 'application/json'},
  data: {clientId: '', clientSecret: '', grantType: '', refreshToken: ''}
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/v0.5/sessions';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"clientId":"","clientSecret":"","grantType":"","refreshToken":""}'
};

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/sessions',
  method: 'POST',
  headers: {
    'content-type': 'application/json'
  },
  processData: false,
  data: '{\n  "clientId": "",\n  "clientSecret": "",\n  "grantType": "",\n  "refreshToken": ""\n}'
};

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

val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n  \"clientId\": \"\",\n  \"clientSecret\": \"\",\n  \"grantType\": \"\",\n  \"refreshToken\": \"\"\n}")
val request = Request.Builder()
  .url("{{baseUrl}}/v0.5/sessions")
  .post(body)
  .addHeader("content-type", "application/json")
  .build()

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

const options = {
  method: 'POST',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/v0.5/sessions',
  headers: {
    'content-type': 'application/json'
  }
};

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

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

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

req.write(JSON.stringify({clientId: '', clientSecret: '', grantType: '', refreshToken: ''}));
req.end();
const request = require('request');

const options = {
  method: 'POST',
  url: '{{baseUrl}}/v0.5/sessions',
  headers: {'content-type': 'application/json'},
  body: {clientId: '', clientSecret: '', grantType: '', refreshToken: ''},
  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/sessions');

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

req.type('json');
req.send({
  clientId: '',
  clientSecret: '',
  grantType: '',
  refreshToken: ''
});

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/sessions',
  headers: {'content-type': 'application/json'},
  data: {clientId: '', clientSecret: '', grantType: '', refreshToken: ''}
};

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/sessions';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"clientId":"","clientSecret":"","grantType":"","refreshToken":""}'
};

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

NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"clientId": @"",
                              @"clientSecret": @"",
                              @"grantType": @"",
                              @"refreshToken": @"" };

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

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v0.5/sessions"]
                                                       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/sessions" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n  \"clientId\": \"\",\n  \"clientSecret\": \"\",\n  \"grantType\": \"\",\n  \"refreshToken\": \"\"\n}" in

Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/v0.5/sessions",
  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([
    'clientId' => '',
    'clientSecret' => '',
    'grantType' => '',
    'refreshToken' => ''
  ]),
  CURLOPT_HTTPHEADER => [
    "content-type: application/json"
  ],
]);

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

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('POST', '{{baseUrl}}/v0.5/sessions', [
  'body' => '{
  "clientId": "",
  "clientSecret": "",
  "grantType": "",
  "refreshToken": ""
}',
  'headers' => [
    'content-type' => 'application/json',
  ],
]);

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

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

$request->setContentType('application/json');
$request->setBody(json_encode([
  'clientId' => '',
  'clientSecret' => '',
  'grantType' => '',
  'refreshToken' => ''
]));

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

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
append(json_encode([
  'clientId' => '',
  'clientSecret' => '',
  'grantType' => '',
  'refreshToken' => ''
]));
$request->setRequestUrl('{{baseUrl}}/v0.5/sessions');
$request->setRequestMethod('POST');
$request->setBody($body);

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

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

echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v0.5/sessions' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "clientId": "",
  "clientSecret": "",
  "grantType": "",
  "refreshToken": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v0.5/sessions' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "clientId": "",
  "clientSecret": "",
  "grantType": "",
  "refreshToken": ""
}'
import http.client

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

payload = "{\n  \"clientId\": \"\",\n  \"clientSecret\": \"\",\n  \"grantType\": \"\",\n  \"refreshToken\": \"\"\n}"

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

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

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

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

url = "{{baseUrl}}/v0.5/sessions"

payload = {
    "clientId": "",
    "clientSecret": "",
    "grantType": "",
    "refreshToken": ""
}
headers = {"content-type": "application/json"}

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

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

url <- "{{baseUrl}}/v0.5/sessions"

payload <- "{\n  \"clientId\": \"\",\n  \"clientSecret\": \"\",\n  \"grantType\": \"\",\n  \"refreshToken\": \"\"\n}"

encode <- "json"

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

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

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

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

request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n  \"clientId\": \"\",\n  \"clientSecret\": \"\",\n  \"grantType\": \"\",\n  \"refreshToken\": \"\"\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/sessions') do |req|
  req.body = "{\n  \"clientId\": \"\",\n  \"clientSecret\": \"\",\n  \"grantType\": \"\",\n  \"refreshToken\": \"\"\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/sessions";

    let payload = json!({
        "clientId": "",
        "clientSecret": "",
        "grantType": "",
        "refreshToken": ""
    });

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

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

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

    dbg!(results);
}
curl --request POST \
  --url {{baseUrl}}/v0.5/sessions \
  --header 'content-type: application/json' \
  --data '{
  "clientId": "",
  "clientSecret": "",
  "grantType": "",
  "refreshToken": ""
}'
echo '{
  "clientId": "",
  "clientSecret": "",
  "grantType": "",
  "refreshToken": ""
}' |  \
  http POST {{baseUrl}}/v0.5/sessions \
  content-type:application/json
wget --quiet \
  --method POST \
  --header 'content-type: application/json' \
  --body-data '{\n  "clientId": "",\n  "clientSecret": "",\n  "grantType": "",\n  "refreshToken": ""\n}' \
  --output-document \
  - {{baseUrl}}/v0.5/sessions
import Foundation

let headers = ["content-type": "application/json"]
let parameters = [
  "clientId": "",
  "clientSecret": "",
  "grantType": "",
  "refreshToken": ""
] as [String : Any]

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

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

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

dataTask.resume()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "accessToken": "eyJhbGciOiJSUzI1Ni.IsInR5cCIgOiAiSldUIiwia2lkIiA6ICJrVVp.2MXJQMjRyYXN1UW9wU2lWbkdZQUZIVFowYVZGVWpYNXFLMnNibTk0In0",
  "expiresIn": 1800,
  "refreshExpiresIn": 1800,
  "refreshToken": "eyJhbGciOiJSUzI1Ni.IsInR5cCIgOiAiSldUIiwia2lkIiA6ICJrVVp.2MXJQMjRyYXN1UW9wU2lWbkdZQUZIVFowYVZGVWpYNXFLMnNibTk0In0",
  "tokenType": "bearer"
}
RESPONSE HEADERS

Content-Type
application/xml
RESPONSE BODY xml

{
  "accessToken": "eyJhbGciOiJSUzI1Ni.IsInR5cCIgOiAiSldUIiwia2lkIiA6ICJrVVp.2MXJQMjRyYXN1UW9wU2lWbkdZQUZIVFowYVZGVWpYNXFLMnNibTk0In0",
  "expiresIn": 1800,
  "refreshExpiresIn": 1800,
  "refreshToken": "eyJhbGciOiJSUzI1Ni.IsInR5cCIgOiAiSldUIiwia2lkIiA6ICJrVVp.2MXJQMjRyYXN1UW9wU2lWbkdZQUZIVFowYVZGVWpYNXFLMnNibTk0In0",
  "tokenType": "bearer"
}
GET Get certs for JWT verification
{{baseUrl}}/v0.5/certs
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v0.5/certs");

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

(client/get "{{baseUrl}}/v0.5/certs")
require "http/client"

url = "{{baseUrl}}/v0.5/certs"

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/certs"),
};
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/certs");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main

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

func main() {

	url := "{{baseUrl}}/v0.5/certs"

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

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

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

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

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

const options = {method: 'GET', url: '{{baseUrl}}/v0.5/certs'};

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

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

val request = Request.Builder()
  .url("{{baseUrl}}/v0.5/certs")
  .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/certs',
  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/certs'};

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/certs');

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

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

const options = {method: 'GET', url: '{{baseUrl}}/v0.5/certs'};

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/certs';
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/certs"]
                                                       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/certs" in

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

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

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

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

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

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

conn.request("GET", "/baseUrl/v0.5/certs")

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

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

url = "{{baseUrl}}/v0.5/certs"

response = requests.get(url)

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

url <- "{{baseUrl}}/v0.5/certs"

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

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

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

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

puts response.status
puts response.body
use reqwest;

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

    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/certs
http GET {{baseUrl}}/v0.5/certs
wget --quiet \
  --method GET \
  --output-document \
  - {{baseUrl}}/v0.5/certs
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v0.5/certs")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"

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

dataTask.resume()
GET Get openid configuration
{{baseUrl}}/v0.5/.well-known/openid-configuration
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v0.5/.well-known/openid-configuration");

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

(client/get "{{baseUrl}}/v0.5/.well-known/openid-configuration")
require "http/client"

url = "{{baseUrl}}/v0.5/.well-known/openid-configuration"

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/.well-known/openid-configuration"),
};
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/.well-known/openid-configuration");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main

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

func main() {

	url := "{{baseUrl}}/v0.5/.well-known/openid-configuration"

	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/.well-known/openid-configuration HTTP/1.1
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/v0.5/.well-known/openid-configuration")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/v0.5/.well-known/openid-configuration"))
    .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/.well-known/openid-configuration")
  .get()
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/v0.5/.well-known/openid-configuration")
  .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/.well-known/openid-configuration');

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

const options = {
  method: 'GET',
  url: '{{baseUrl}}/v0.5/.well-known/openid-configuration'
};

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

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

val request = Request.Builder()
  .url("{{baseUrl}}/v0.5/.well-known/openid-configuration")
  .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/.well-known/openid-configuration',
  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/.well-known/openid-configuration'
};

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/.well-known/openid-configuration');

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/.well-known/openid-configuration'
};

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/.well-known/openid-configuration';
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/.well-known/openid-configuration"]
                                                       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/.well-known/openid-configuration" in

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

echo $response->getBody();
setUrl('{{baseUrl}}/v0.5/.well-known/openid-configuration');
$request->setMethod(HTTP_METH_GET);

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

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/v0.5/.well-known/openid-configuration');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v0.5/.well-known/openid-configuration' -Method GET 
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v0.5/.well-known/openid-configuration' -Method GET 
import http.client

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

conn.request("GET", "/baseUrl/v0.5/.well-known/openid-configuration")

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

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

url = "{{baseUrl}}/v0.5/.well-known/openid-configuration"

response = requests.get(url)

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

url <- "{{baseUrl}}/v0.5/.well-known/openid-configuration"

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

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

url = URI("{{baseUrl}}/v0.5/.well-known/openid-configuration")

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/.well-known/openid-configuration') do |req|
end

puts response.status
puts response.body
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/v0.5/.well-known/openid-configuration";

    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/.well-known/openid-configuration
http GET {{baseUrl}}/v0.5/.well-known/openid-configuration
wget --quiet \
  --method GET \
  --output-document \
  - {{baseUrl}}/v0.5/.well-known/openid-configuration
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v0.5/.well-known/openid-configuration")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"

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

dataTask.resume()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "jwks_uri": "https://ndhm-gateway/certs"
}
RESPONSE HEADERS

Content-Type
application/xml
RESPONSE BODY xml

{
  "jwks_uri": "https://ndhm-gateway/certs"
}
POST Callback API for -subscription-requests-hiu-notify to acknowledge receipt of notification.
{{baseUrl}}/v0.5/subscription-requests/hiu/on-notify
HEADERS

Authorization
X-CM-ID
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, "x-cm-id: ");
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 ""
                                                                                               :x-cm-id ""}
                                                                                     :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" => ""
  "x-cm-id" => ""
  "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", "" },
        { "x-cm-id", "" },
    },
    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("x-cm-id", "");
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("x-cm-id", "")
	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: 
X-Cm-Id: 
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("x-cm-id", "")
  .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("x-cm-id", "")
    .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("x-cm-id", "")
  .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("x-cm-id", "")
  .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('x-cm-id', '');
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: '', 'x-cm-id': '', '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: '', 'x-cm-id': '', '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: '',
    'x-cm-id': '',
    '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("x-cm-id", "")
  .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: '',
    'x-cm-id': '',
    '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: '', 'x-cm-id': '', '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: '',
  'x-cm-id': '',
  '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: '', 'x-cm-id': '', '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: '', 'x-cm-id': '', '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": @"",
                           @"x-cm-id": @"",
                           @"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", "");
  ("x-cm-id", "");
  ("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",
    "x-cm-id: "
  ],
]);

$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',
    'x-cm-id' => '',
  ],
]);

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

$request->setHeaders([
  'authorization' => '',
  'x-cm-id' => '',
  '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' => '',
  'x-cm-id' => '',
  'content-type' => 'application/json'
]);

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

echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "")
$headers.Add("x-cm-id", "")
$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("x-cm-id", "")
$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': "",
    'x-cm-id': "",
    '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": "",
    "x-cm-id": "",
    "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' = '', 'x-cm-id' = ''), 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["x-cm-id"] = ''
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.headers['x-cm-id'] = ''
  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("x-cm-id", "".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' \
  --header 'x-cm-id: ' \
  --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 \
  x-cm-id:''
wget --quiet \
  --method POST \
  --header 'authorization: ' \
  --header 'x-cm-id: ' \
  --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": "",
  "x-cm-id": "",
  "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
X-CM-ID
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, "x-cm-id: ");
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 ""
                                                                                       :x-cm-id ""}
                                                                             :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" => ""
  "x-cm-id" => ""
  "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", "" },
        { "x-cm-id", "" },
    },
    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("x-cm-id", "");
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("x-cm-id", "")
	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: 
X-Cm-Id: 
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("x-cm-id", "")
  .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("x-cm-id", "")
    .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("x-cm-id", "")
  .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("x-cm-id", "")
  .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('x-cm-id', '');
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: '', 'x-cm-id': '', '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: '', 'x-cm-id': '', '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: '',
    'x-cm-id': '',
    '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("x-cm-id", "")
  .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: '',
    'x-cm-id': '',
    '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: '', 'x-cm-id': '', '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: '',
  'x-cm-id': '',
  '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: '', 'x-cm-id': '', '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: '', 'x-cm-id': '', '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": @"",
                           @"x-cm-id": @"",
                           @"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", "");
  ("x-cm-id", "");
  ("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",
    "x-cm-id: "
  ],
]);

$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',
    'x-cm-id' => '',
  ],
]);

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

$request->setHeaders([
  'authorization' => '',
  'x-cm-id' => '',
  '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' => '',
  'x-cm-id' => '',
  'content-type' => 'application/json'
]);

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

echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "")
$headers.Add("x-cm-id", "")
$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("x-cm-id", "")
$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': "",
    'x-cm-id': "",
    '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": "",
    "x-cm-id": "",
    "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' = '', 'x-cm-id' = ''), 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["x-cm-id"] = ''
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.headers['x-cm-id'] = ''
  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("x-cm-id", "".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' \
  --header 'x-cm-id: ' \
  --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 \
  x-cm-id:''
wget --quiet \
  --method POST \
  --header 'authorization: ' \
  --header 'x-cm-id: ' \
  --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": "",
  "x-cm-id": "",
  "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 Notification for subscription grant-deny-revoke
{{baseUrl}}/v0.5/subscription-requests/hiu/notify
HEADERS

Authorization
X-HIU-ID
BODY json

{
  "notification": {
    "status": "",
    "subscription": {
      "hiu": {
        "id": ""
      },
      "id": "",
      "patient": {
        "id": ""
      },
      "sources": [
        {
          "categories": [],
          "hip": {},
          "period": {
            "from": "",
            "to": ""
          }
        }
      ]
    },
    "subscriptionRequestId": ""
  },
  "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/notify");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: ");
headers = curl_slist_append(headers, "x-hiu-id: ");
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    \"subscriptionRequestId\": \"request id of the subscription\"\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/notify" {:headers {:authorization ""
                                                                                            :x-hiu-id ""}
                                                                                  :content-type :json
                                                                                  :form-params {:notification {:subscriptionRequestId "request id of the subscription"}
                                                                                                :requestId "5f7a535d-a3fd-416b-b069-c97d021fbacd"}})
require "http/client"

url = "{{baseUrl}}/v0.5/subscription-requests/hiu/notify"
headers = HTTP::Headers{
  "authorization" => ""
  "x-hiu-id" => ""
  "content-type" => "application/json"
}
reqBody = "{\n  \"notification\": {\n    \"subscriptionRequestId\": \"request id of the subscription\"\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/notify"),
    Headers =
    {
        { "authorization", "" },
        { "x-hiu-id", "" },
    },
    Content = new StringContent("{\n  \"notification\": {\n    \"subscriptionRequestId\": \"request id of the subscription\"\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/notify");
var request = new RestRequest("", Method.Post);
request.AddHeader("authorization", "");
request.AddHeader("x-hiu-id", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n  \"notification\": {\n    \"subscriptionRequestId\": \"request id of the subscription\"\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/notify"

	payload := strings.NewReader("{\n  \"notification\": {\n    \"subscriptionRequestId\": \"request id of the subscription\"\n  },\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\n}")

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

	req.Header.Add("authorization", "")
	req.Header.Add("x-hiu-id", "")
	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/notify HTTP/1.1
Authorization: 
X-Hiu-Id: 
Content-Type: application/json
Host: example.com
Content-Length: 144

{
  "notification": {
    "subscriptionRequestId": "request id of the subscription"
  },
  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v0.5/subscription-requests/hiu/notify")
  .setHeader("authorization", "")
  .setHeader("x-hiu-id", "")
  .setHeader("content-type", "application/json")
  .setBody("{\n  \"notification\": {\n    \"subscriptionRequestId\": \"request id of the subscription\"\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/notify"))
    .header("authorization", "")
    .header("x-hiu-id", "")
    .header("content-type", "application/json")
    .method("POST", HttpRequest.BodyPublishers.ofString("{\n  \"notification\": {\n    \"subscriptionRequestId\": \"request id of the subscription\"\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  \"notification\": {\n    \"subscriptionRequestId\": \"request id of the subscription\"\n  },\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\n}");
Request request = new Request.Builder()
  .url("{{baseUrl}}/v0.5/subscription-requests/hiu/notify")
  .post(body)
  .addHeader("authorization", "")
  .addHeader("x-hiu-id", "")
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v0.5/subscription-requests/hiu/notify")
  .header("authorization", "")
  .header("x-hiu-id", "")
  .header("content-type", "application/json")
  .body("{\n  \"notification\": {\n    \"subscriptionRequestId\": \"request id of the subscription\"\n  },\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\n}")
  .asString();
const data = JSON.stringify({
  notification: {
    subscriptionRequestId: 'request id of the subscription'
  },
  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/notify');
xhr.setRequestHeader('authorization', '');
xhr.setRequestHeader('x-hiu-id', '');
xhr.setRequestHeader('content-type', 'application/json');

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

const options = {
  method: 'POST',
  url: '{{baseUrl}}/v0.5/subscription-requests/hiu/notify',
  headers: {authorization: '', 'x-hiu-id': '', 'content-type': 'application/json'},
  data: {
    notification: {subscriptionRequestId: 'request id of the subscription'},
    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/notify';
const options = {
  method: 'POST',
  headers: {authorization: '', 'x-hiu-id': '', 'content-type': 'application/json'},
  body: '{"notification":{"subscriptionRequestId":"request id of the subscription"},"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/notify',
  method: 'POST',
  headers: {
    authorization: '',
    'x-hiu-id': '',
    'content-type': 'application/json'
  },
  processData: false,
  data: '{\n  "notification": {\n    "subscriptionRequestId": "request id of the subscription"\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  \"notification\": {\n    \"subscriptionRequestId\": \"request id of the subscription\"\n  },\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\n}")
val request = Request.Builder()
  .url("{{baseUrl}}/v0.5/subscription-requests/hiu/notify")
  .post(body)
  .addHeader("authorization", "")
  .addHeader("x-hiu-id", "")
  .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/notify',
  headers: {
    authorization: '',
    'x-hiu-id': '',
    '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: {subscriptionRequestId: 'request id of the subscription'},
  requestId: '5f7a535d-a3fd-416b-b069-c97d021fbacd'
}));
req.end();
const request = require('request');

const options = {
  method: 'POST',
  url: '{{baseUrl}}/v0.5/subscription-requests/hiu/notify',
  headers: {authorization: '', 'x-hiu-id': '', 'content-type': 'application/json'},
  body: {
    notification: {subscriptionRequestId: 'request id of the subscription'},
    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/notify');

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

req.type('json');
req.send({
  notification: {
    subscriptionRequestId: 'request id of the subscription'
  },
  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/notify',
  headers: {authorization: '', 'x-hiu-id': '', 'content-type': 'application/json'},
  data: {
    notification: {subscriptionRequestId: 'request id of the subscription'},
    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/notify';
const options = {
  method: 'POST',
  headers: {authorization: '', 'x-hiu-id': '', 'content-type': 'application/json'},
  body: '{"notification":{"subscriptionRequestId":"request id of the subscription"},"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": @"",
                           @"x-hiu-id": @"",
                           @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"notification": @{ @"subscriptionRequestId": @"request id of the subscription" },
                              @"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/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/notify" in
let headers = Header.add_list (Header.init ()) [
  ("authorization", "");
  ("x-hiu-id", "");
  ("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n  \"notification\": {\n    \"subscriptionRequestId\": \"request id of the subscription\"\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/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' => [
        'subscriptionRequestId' => 'request id of the subscription'
    ],
    'requestId' => '5f7a535d-a3fd-416b-b069-c97d021fbacd'
  ]),
  CURLOPT_HTTPHEADER => [
    "authorization: ",
    "content-type: application/json",
    "x-hiu-id: "
  ],
]);

$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/notify', [
  'body' => '{
  "notification": {
    "subscriptionRequestId": "request id of the subscription"
  },
  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"
}',
  'headers' => [
    'authorization' => '',
    'content-type' => 'application/json',
    'x-hiu-id' => '',
  ],
]);

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

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

$request->setContentType('application/json');
$request->setBody(json_encode([
  'notification' => [
    'subscriptionRequestId' => 'request id of the subscription'
  ],
  'requestId' => '5f7a535d-a3fd-416b-b069-c97d021fbacd'
]));

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

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

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

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

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

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

payload = "{\n  \"notification\": {\n    \"subscriptionRequestId\": \"request id of the subscription\"\n  },\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\n}"

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

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

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

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

url = "{{baseUrl}}/v0.5/subscription-requests/hiu/notify"

payload = {
    "notification": { "subscriptionRequestId": "request id of the subscription" },
    "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"
}
headers = {
    "authorization": "",
    "x-hiu-id": "",
    "content-type": "application/json"
}

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

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

url <- "{{baseUrl}}/v0.5/subscription-requests/hiu/notify"

payload <- "{\n  \"notification\": {\n    \"subscriptionRequestId\": \"request id of the subscription\"\n  },\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\n}"

encode <- "json"

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

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

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

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

request = Net::HTTP::Post.new(url)
request["authorization"] = ''
request["x-hiu-id"] = ''
request["content-type"] = 'application/json'
request.body = "{\n  \"notification\": {\n    \"subscriptionRequestId\": \"request id of the subscription\"\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/notify') do |req|
  req.headers['authorization'] = ''
  req.headers['x-hiu-id'] = ''
  req.body = "{\n  \"notification\": {\n    \"subscriptionRequestId\": \"request id of the subscription\"\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/notify";

    let payload = json!({
        "notification": json!({"subscriptionRequestId": "request id of the subscription"}),
        "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"
    });

    let mut headers = reqwest::header::HeaderMap::new();
    headers.insert("authorization", "".parse().unwrap());
    headers.insert("x-hiu-id", "".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/notify \
  --header 'authorization: ' \
  --header 'content-type: application/json' \
  --header 'x-hiu-id: ' \
  --data '{
  "notification": {
    "subscriptionRequestId": "request id of the subscription"
  },
  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"
}'
echo '{
  "notification": {
    "subscriptionRequestId": "request id of the subscription"
  },
  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"
}' |  \
  http POST {{baseUrl}}/v0.5/subscription-requests/hiu/notify \
  authorization:'' \
  content-type:application/json \
  x-hiu-id:''
wget --quiet \
  --method POST \
  --header 'authorization: ' \
  --header 'x-hiu-id: ' \
  --header 'content-type: application/json' \
  --body-data '{\n  "notification": {\n    "subscriptionRequestId": "request id of the subscription"\n  },\n  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"\n}' \
  --output-document \
  - {{baseUrl}}/v0.5/subscription-requests/hiu/notify
import Foundation

let headers = [
  "authorization": "",
  "x-hiu-id": "",
  "content-type": "application/json"
]
let parameters = [
  "notification": ["subscriptionRequestId": "request id of the subscription"],
  "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/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 Notification to HIU on basis of a granted subscription
{{baseUrl}}/v0.5/subscriptions/hiu/notify
HEADERS

Authorization
X-HIU-ID
BODY json

{
  "event": {
    "category": "",
    "content": {
      "context": [
        {
          "careContext": {
            "careContextReference": "",
            "patientReference": ""
          },
          "hiTypes": []
        }
      ],
      "hip": {
        "id": ""
      },
      "patient": {
        "id": ""
      }
    },
    "id": "",
    "published": "",
    "subscriptionId": ""
  },
  "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/notify");

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

curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n  \"event\": {\n    \"id\": \"a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d\",\n    \"subscriptionId\": \"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/subscriptions/hiu/notify" {:headers {:authorization ""
                                                                                    :x-hiu-id ""}
                                                                          :content-type :json
                                                                          :form-params {:event {:id "a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d"
                                                                                                :subscriptionId "subscription Id"}
                                                                                        :requestId "5f7a535d-a3fd-416b-b069-c97d021fbacd"}})
require "http/client"

url = "{{baseUrl}}/v0.5/subscriptions/hiu/notify"
headers = HTTP::Headers{
  "authorization" => ""
  "x-hiu-id" => ""
  "content-type" => "application/json"
}
reqBody = "{\n  \"event\": {\n    \"id\": \"a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d\",\n    \"subscriptionId\": \"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/subscriptions/hiu/notify"),
    Headers =
    {
        { "authorization", "" },
        { "x-hiu-id", "" },
    },
    Content = new StringContent("{\n  \"event\": {\n    \"id\": \"a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d\",\n    \"subscriptionId\": \"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/subscriptions/hiu/notify");
var request = new RestRequest("", Method.Post);
request.AddHeader("authorization", "");
request.AddHeader("x-hiu-id", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n  \"event\": {\n    \"id\": \"a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d\",\n    \"subscriptionId\": \"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/subscriptions/hiu/notify"

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

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

	req.Header.Add("authorization", "")
	req.Header.Add("x-hiu-id", "")
	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/notify HTTP/1.1
Authorization: 
X-Hiu-Id: 
Content-Type: application/json
Host: example.com
Content-Length: 166

{
  "event": {
    "id": "a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d",
    "subscriptionId": "subscription Id"
  },
  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v0.5/subscriptions/hiu/notify")
  .setHeader("authorization", "")
  .setHeader("x-hiu-id", "")
  .setHeader("content-type", "application/json")
  .setBody("{\n  \"event\": {\n    \"id\": \"a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d\",\n    \"subscriptionId\": \"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/subscriptions/hiu/notify"))
    .header("authorization", "")
    .header("x-hiu-id", "")
    .header("content-type", "application/json")
    .method("POST", HttpRequest.BodyPublishers.ofString("{\n  \"event\": {\n    \"id\": \"a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d\",\n    \"subscriptionId\": \"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  \"event\": {\n    \"id\": \"a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d\",\n    \"subscriptionId\": \"subscription Id\"\n  },\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\n}");
Request request = new Request.Builder()
  .url("{{baseUrl}}/v0.5/subscriptions/hiu/notify")
  .post(body)
  .addHeader("authorization", "")
  .addHeader("x-hiu-id", "")
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v0.5/subscriptions/hiu/notify")
  .header("authorization", "")
  .header("x-hiu-id", "")
  .header("content-type", "application/json")
  .body("{\n  \"event\": {\n    \"id\": \"a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d\",\n    \"subscriptionId\": \"subscription Id\"\n  },\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\n}")
  .asString();
const data = JSON.stringify({
  event: {
    id: 'a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d',
    subscriptionId: '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/subscriptions/hiu/notify');
xhr.setRequestHeader('authorization', '');
xhr.setRequestHeader('x-hiu-id', '');
xhr.setRequestHeader('content-type', 'application/json');

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

const options = {
  method: 'POST',
  url: '{{baseUrl}}/v0.5/subscriptions/hiu/notify',
  headers: {authorization: '', 'x-hiu-id': '', 'content-type': 'application/json'},
  data: {
    event: {id: 'a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d', subscriptionId: '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/subscriptions/hiu/notify';
const options = {
  method: 'POST',
  headers: {authorization: '', 'x-hiu-id': '', 'content-type': 'application/json'},
  body: '{"event":{"id":"a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d","subscriptionId":"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/subscriptions/hiu/notify',
  method: 'POST',
  headers: {
    authorization: '',
    'x-hiu-id': '',
    'content-type': 'application/json'
  },
  processData: false,
  data: '{\n  "event": {\n    "id": "a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d",\n    "subscriptionId": "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  \"event\": {\n    \"id\": \"a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d\",\n    \"subscriptionId\": \"subscription Id\"\n  },\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\n}")
val request = Request.Builder()
  .url("{{baseUrl}}/v0.5/subscriptions/hiu/notify")
  .post(body)
  .addHeader("authorization", "")
  .addHeader("x-hiu-id", "")
  .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/notify',
  headers: {
    authorization: '',
    'x-hiu-id': '',
    '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({
  event: {id: 'a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d', subscriptionId: 'subscription Id'},
  requestId: '5f7a535d-a3fd-416b-b069-c97d021fbacd'
}));
req.end();
const request = require('request');

const options = {
  method: 'POST',
  url: '{{baseUrl}}/v0.5/subscriptions/hiu/notify',
  headers: {authorization: '', 'x-hiu-id': '', 'content-type': 'application/json'},
  body: {
    event: {id: 'a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d', subscriptionId: '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/subscriptions/hiu/notify');

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

req.type('json');
req.send({
  event: {
    id: 'a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d',
    subscriptionId: '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/subscriptions/hiu/notify',
  headers: {authorization: '', 'x-hiu-id': '', 'content-type': 'application/json'},
  data: {
    event: {id: 'a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d', subscriptionId: '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/subscriptions/hiu/notify';
const options = {
  method: 'POST',
  headers: {authorization: '', 'x-hiu-id': '', 'content-type': 'application/json'},
  body: '{"event":{"id":"a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d","subscriptionId":"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": @"",
                           @"x-hiu-id": @"",
                           @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"event": @{ @"id": @"a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d", @"subscriptionId": @"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/subscriptions/hiu/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/notify" in
let headers = Header.add_list (Header.init ()) [
  ("authorization", "");
  ("x-hiu-id", "");
  ("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n  \"event\": {\n    \"id\": \"a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d\",\n    \"subscriptionId\": \"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/subscriptions/hiu/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([
    'event' => [
        'id' => 'a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d',
        'subscriptionId' => 'subscription Id'
    ],
    'requestId' => '5f7a535d-a3fd-416b-b069-c97d021fbacd'
  ]),
  CURLOPT_HTTPHEADER => [
    "authorization: ",
    "content-type: application/json",
    "x-hiu-id: "
  ],
]);

$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/notify', [
  'body' => '{
  "event": {
    "id": "a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d",
    "subscriptionId": "subscription Id"
  },
  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"
}',
  'headers' => [
    'authorization' => '',
    'content-type' => 'application/json',
    'x-hiu-id' => '',
  ],
]);

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

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

$request->setContentType('application/json');
$request->setBody(json_encode([
  'event' => [
    'id' => 'a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d',
    'subscriptionId' => 'subscription Id'
  ],
  'requestId' => '5f7a535d-a3fd-416b-b069-c97d021fbacd'
]));

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

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
append(json_encode([
  'event' => [
    'id' => 'a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d',
    'subscriptionId' => 'subscription Id'
  ],
  'requestId' => '5f7a535d-a3fd-416b-b069-c97d021fbacd'
]));
$request->setRequestUrl('{{baseUrl}}/v0.5/subscriptions/hiu/notify');
$request->setRequestMethod('POST');
$request->setBody($body);

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

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

echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "")
$headers.Add("x-hiu-id", "")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v0.5/subscriptions/hiu/notify' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "event": {
    "id": "a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d",
    "subscriptionId": "subscription Id"
  },
  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"
}'
$headers=@{}
$headers.Add("authorization", "")
$headers.Add("x-hiu-id", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v0.5/subscriptions/hiu/notify' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "event": {
    "id": "a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d",
    "subscriptionId": "subscription Id"
  },
  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"
}'
import http.client

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

payload = "{\n  \"event\": {\n    \"id\": \"a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d\",\n    \"subscriptionId\": \"subscription Id\"\n  },\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\n}"

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

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

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

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

url = "{{baseUrl}}/v0.5/subscriptions/hiu/notify"

payload = {
    "event": {
        "id": "a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d",
        "subscriptionId": "subscription Id"
    },
    "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"
}
headers = {
    "authorization": "",
    "x-hiu-id": "",
    "content-type": "application/json"
}

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

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

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

payload <- "{\n  \"event\": {\n    \"id\": \"a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d\",\n    \"subscriptionId\": \"subscription Id\"\n  },\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\"\n}"

encode <- "json"

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

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

url = URI("{{baseUrl}}/v0.5/subscriptions/hiu/notify")

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

request = Net::HTTP::Post.new(url)
request["authorization"] = ''
request["x-hiu-id"] = ''
request["content-type"] = 'application/json'
request.body = "{\n  \"event\": {\n    \"id\": \"a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d\",\n    \"subscriptionId\": \"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/subscriptions/hiu/notify') do |req|
  req.headers['authorization'] = ''
  req.headers['x-hiu-id'] = ''
  req.body = "{\n  \"event\": {\n    \"id\": \"a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d\",\n    \"subscriptionId\": \"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/subscriptions/hiu/notify";

    let payload = json!({
        "event": json!({
            "id": "a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d",
            "subscriptionId": "subscription Id"
        }),
        "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"
    });

    let mut headers = reqwest::header::HeaderMap::new();
    headers.insert("authorization", "".parse().unwrap());
    headers.insert("x-hiu-id", "".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/notify \
  --header 'authorization: ' \
  --header 'content-type: application/json' \
  --header 'x-hiu-id: ' \
  --data '{
  "event": {
    "id": "a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d",
    "subscriptionId": "subscription Id"
  },
  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"
}'
echo '{
  "event": {
    "id": "a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d",
    "subscriptionId": "subscription Id"
  },
  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"
}' |  \
  http POST {{baseUrl}}/v0.5/subscriptions/hiu/notify \
  authorization:'' \
  content-type:application/json \
  x-hiu-id:''
wget --quiet \
  --method POST \
  --header 'authorization: ' \
  --header 'x-hiu-id: ' \
  --header 'content-type: application/json' \
  --body-data '{\n  "event": {\n    "id": "a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d",\n    "subscriptionId": "subscription Id"\n  },\n  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"\n}' \
  --output-document \
  - {{baseUrl}}/v0.5/subscriptions/hiu/notify
import Foundation

let headers = [
  "authorization": "",
  "x-hiu-id": "",
  "content-type": "application/json"
]
let parameters = [
  "event": [
    "id": "a1s2c932-2f70-3ds3-a3b5-2sfd46b12a18d",
    "subscriptionId": "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/subscriptions/hiu/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
X-CM-ID
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, "x-cm-id: ");
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 ""
                                                                                         :x-cm-id ""}
                                                                               :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" => ""
  "x-cm-id" => ""
  "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", "" },
        { "x-cm-id", "" },
    },
    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("x-cm-id", "");
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("x-cm-id", "")
	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: 
X-Cm-Id: 
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("x-cm-id", "")
  .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("x-cm-id", "")
    .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("x-cm-id", "")
  .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("x-cm-id", "")
  .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('x-cm-id', '');
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: '', 'x-cm-id': '', '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: '', 'x-cm-id': '', '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: '',
    'x-cm-id': '',
    '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("x-cm-id", "")
  .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: '',
    'x-cm-id': '',
    '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: '', 'x-cm-id': '', '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: '',
  'x-cm-id': '',
  '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: '', 'x-cm-id': '', '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: '', 'x-cm-id': '', '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": @"",
                           @"x-cm-id": @"",
                           @"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", "");
  ("x-cm-id", "");
  ("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",
    "x-cm-id: "
  ],
]);

$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',
    'x-cm-id' => '',
  ],
]);

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

$request->setHeaders([
  'authorization' => '',
  'x-cm-id' => '',
  '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' => '',
  'x-cm-id' => '',
  'content-type' => 'application/json'
]);

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

echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "")
$headers.Add("x-cm-id", "")
$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("x-cm-id", "")
$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': "",
    'x-cm-id': "",
    '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": "",
    "x-cm-id": "",
    "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' = '', 'x-cm-id' = ''), 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["x-cm-id"] = ''
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.headers['x-cm-id'] = ''
  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("x-cm-id", "".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' \
  --header 'x-cm-id: ' \
  --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 \
  x-cm-id:''
wget --quiet \
  --method POST \
  --header 'authorization: ' \
  --header 'x-cm-id: ' \
  --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": "",
  "x-cm-id": "",
  "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 callback API for the -subscription-requests-cm-init to notify a HIU on acceptance-acknowledgement of the request for subscription.
{{baseUrl}}/v0.5/subscription-requests/cm/on-init
HEADERS

Authorization
X-HIU-ID
BODY json

{
  "error": {
    "code": 0,
    "message": ""
  },
  "requestId": "",
  "resp": {
    "requestId": ""
  },
  "subscriptionRequest": {
    "id": ""
  },
  "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/on-init");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: ");
headers = curl_slist_append(headers, "x-hiu-id: ");
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  \"subscriptionRequest\": {\n    \"id\": \"f29f0e59-8388-4698-9fe6-05db67aeac46\"\n  }\n}");

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

(client/post "{{baseUrl}}/v0.5/subscription-requests/cm/on-init" {:headers {:authorization ""
                                                                                            :x-hiu-id ""}
                                                                                  :content-type :json
                                                                                  :form-params {:requestId "5f7a535d-a3fd-416b-b069-c97d021fbacd"
                                                                                                :subscriptionRequest {:id "f29f0e59-8388-4698-9fe6-05db67aeac46"}}})
require "http/client"

url = "{{baseUrl}}/v0.5/subscription-requests/cm/on-init"
headers = HTTP::Headers{
  "authorization" => ""
  "x-hiu-id" => ""
  "content-type" => "application/json"
}
reqBody = "{\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\",\n  \"subscriptionRequest\": {\n    \"id\": \"f29f0e59-8388-4698-9fe6-05db67aeac46\"\n  }\n}"

response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
    Method = HttpMethod.Post,
    RequestUri = new Uri("{{baseUrl}}/v0.5/subscription-requests/cm/on-init"),
    Headers =
    {
        { "authorization", "" },
        { "x-hiu-id", "" },
    },
    Content = new StringContent("{\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\",\n  \"subscriptionRequest\": {\n    \"id\": \"f29f0e59-8388-4698-9fe6-05db67aeac46\"\n  }\n}")
    {
        Headers =
        {
            ContentType = new MediaTypeHeaderValue("application/json")
        }
    }
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v0.5/subscription-requests/cm/on-init");
var request = new RestRequest("", Method.Post);
request.AddHeader("authorization", "");
request.AddHeader("x-hiu-id", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\",\n  \"subscriptionRequest\": {\n    \"id\": \"f29f0e59-8388-4698-9fe6-05db67aeac46\"\n  }\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/on-init"

	payload := strings.NewReader("{\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\",\n  \"subscriptionRequest\": {\n    \"id\": \"f29f0e59-8388-4698-9fe6-05db67aeac46\"\n  }\n}")

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

	req.Header.Add("authorization", "")
	req.Header.Add("x-hiu-id", "")
	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/on-init HTTP/1.1
Authorization: 
X-Hiu-Id: 
Content-Type: application/json
Host: example.com
Content-Length: 138

{
  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd",
  "subscriptionRequest": {
    "id": "f29f0e59-8388-4698-9fe6-05db67aeac46"
  }
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v0.5/subscription-requests/cm/on-init")
  .setHeader("authorization", "")
  .setHeader("x-hiu-id", "")
  .setHeader("content-type", "application/json")
  .setBody("{\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\",\n  \"subscriptionRequest\": {\n    \"id\": \"f29f0e59-8388-4698-9fe6-05db67aeac46\"\n  }\n}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/v0.5/subscription-requests/cm/on-init"))
    .header("authorization", "")
    .header("x-hiu-id", "")
    .header("content-type", "application/json")
    .method("POST", HttpRequest.BodyPublishers.ofString("{\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\",\n  \"subscriptionRequest\": {\n    \"id\": \"f29f0e59-8388-4698-9fe6-05db67aeac46\"\n  }\n}"))
    .build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();

MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\",\n  \"subscriptionRequest\": {\n    \"id\": \"f29f0e59-8388-4698-9fe6-05db67aeac46\"\n  }\n}");
Request request = new Request.Builder()
  .url("{{baseUrl}}/v0.5/subscription-requests/cm/on-init")
  .post(body)
  .addHeader("authorization", "")
  .addHeader("x-hiu-id", "")
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v0.5/subscription-requests/cm/on-init")
  .header("authorization", "")
  .header("x-hiu-id", "")
  .header("content-type", "application/json")
  .body("{\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\",\n  \"subscriptionRequest\": {\n    \"id\": \"f29f0e59-8388-4698-9fe6-05db67aeac46\"\n  }\n}")
  .asString();
const data = JSON.stringify({
  requestId: '5f7a535d-a3fd-416b-b069-c97d021fbacd',
  subscriptionRequest: {
    id: 'f29f0e59-8388-4698-9fe6-05db67aeac46'
  }
});

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/on-init');
xhr.setRequestHeader('authorization', '');
xhr.setRequestHeader('x-hiu-id', '');
xhr.setRequestHeader('content-type', 'application/json');

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

const options = {
  method: 'POST',
  url: '{{baseUrl}}/v0.5/subscription-requests/cm/on-init',
  headers: {authorization: '', 'x-hiu-id': '', 'content-type': 'application/json'},
  data: {
    requestId: '5f7a535d-a3fd-416b-b069-c97d021fbacd',
    subscriptionRequest: {id: 'f29f0e59-8388-4698-9fe6-05db67aeac46'}
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/v0.5/subscription-requests/cm/on-init';
const options = {
  method: 'POST',
  headers: {authorization: '', 'x-hiu-id': '', 'content-type': 'application/json'},
  body: '{"requestId":"5f7a535d-a3fd-416b-b069-c97d021fbacd","subscriptionRequest":{"id":"f29f0e59-8388-4698-9fe6-05db67aeac46"}}'
};

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/on-init',
  method: 'POST',
  headers: {
    authorization: '',
    'x-hiu-id': '',
    'content-type': 'application/json'
  },
  processData: false,
  data: '{\n  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd",\n  "subscriptionRequest": {\n    "id": "f29f0e59-8388-4698-9fe6-05db67aeac46"\n  }\n}'
};

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

val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\",\n  \"subscriptionRequest\": {\n    \"id\": \"f29f0e59-8388-4698-9fe6-05db67aeac46\"\n  }\n}")
val request = Request.Builder()
  .url("{{baseUrl}}/v0.5/subscription-requests/cm/on-init")
  .post(body)
  .addHeader("authorization", "")
  .addHeader("x-hiu-id", "")
  .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/on-init',
  headers: {
    authorization: '',
    'x-hiu-id': '',
    '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',
  subscriptionRequest: {id: 'f29f0e59-8388-4698-9fe6-05db67aeac46'}
}));
req.end();
const request = require('request');

const options = {
  method: 'POST',
  url: '{{baseUrl}}/v0.5/subscription-requests/cm/on-init',
  headers: {authorization: '', 'x-hiu-id': '', 'content-type': 'application/json'},
  body: {
    requestId: '5f7a535d-a3fd-416b-b069-c97d021fbacd',
    subscriptionRequest: {id: 'f29f0e59-8388-4698-9fe6-05db67aeac46'}
  },
  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/on-init');

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

req.type('json');
req.send({
  requestId: '5f7a535d-a3fd-416b-b069-c97d021fbacd',
  subscriptionRequest: {
    id: 'f29f0e59-8388-4698-9fe6-05db67aeac46'
  }
});

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/on-init',
  headers: {authorization: '', 'x-hiu-id': '', 'content-type': 'application/json'},
  data: {
    requestId: '5f7a535d-a3fd-416b-b069-c97d021fbacd',
    subscriptionRequest: {id: 'f29f0e59-8388-4698-9fe6-05db67aeac46'}
  }
};

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/on-init';
const options = {
  method: 'POST',
  headers: {authorization: '', 'x-hiu-id': '', 'content-type': 'application/json'},
  body: '{"requestId":"5f7a535d-a3fd-416b-b069-c97d021fbacd","subscriptionRequest":{"id":"f29f0e59-8388-4698-9fe6-05db67aeac46"}}'
};

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

NSDictionary *headers = @{ @"authorization": @"",
                           @"x-hiu-id": @"",
                           @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"requestId": @"5f7a535d-a3fd-416b-b069-c97d021fbacd",
                              @"subscriptionRequest": @{ @"id": @"f29f0e59-8388-4698-9fe6-05db67aeac46" } };

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

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v0.5/subscription-requests/cm/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/subscription-requests/cm/on-init" in
let headers = Header.add_list (Header.init ()) [
  ("authorization", "");
  ("x-hiu-id", "");
  ("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\",\n  \"subscriptionRequest\": {\n    \"id\": \"f29f0e59-8388-4698-9fe6-05db67aeac46\"\n  }\n}" in

Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/v0.5/subscription-requests/cm/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',
    'subscriptionRequest' => [
        'id' => 'f29f0e59-8388-4698-9fe6-05db67aeac46'
    ]
  ]),
  CURLOPT_HTTPHEADER => [
    "authorization: ",
    "content-type: application/json",
    "x-hiu-id: "
  ],
]);

$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/on-init', [
  'body' => '{
  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd",
  "subscriptionRequest": {
    "id": "f29f0e59-8388-4698-9fe6-05db67aeac46"
  }
}',
  'headers' => [
    'authorization' => '',
    'content-type' => 'application/json',
    'x-hiu-id' => '',
  ],
]);

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

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

$request->setContentType('application/json');
$request->setBody(json_encode([
  'requestId' => '5f7a535d-a3fd-416b-b069-c97d021fbacd',
  'subscriptionRequest' => [
    'id' => 'f29f0e59-8388-4698-9fe6-05db67aeac46'
  ]
]));

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

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
append(json_encode([
  'requestId' => '5f7a535d-a3fd-416b-b069-c97d021fbacd',
  'subscriptionRequest' => [
    'id' => 'f29f0e59-8388-4698-9fe6-05db67aeac46'
  ]
]));
$request->setRequestUrl('{{baseUrl}}/v0.5/subscription-requests/cm/on-init');
$request->setRequestMethod('POST');
$request->setBody($body);

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

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

echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "")
$headers.Add("x-hiu-id", "")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v0.5/subscription-requests/cm/on-init' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd",
  "subscriptionRequest": {
    "id": "f29f0e59-8388-4698-9fe6-05db67aeac46"
  }
}'
$headers=@{}
$headers.Add("authorization", "")
$headers.Add("x-hiu-id", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v0.5/subscription-requests/cm/on-init' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd",
  "subscriptionRequest": {
    "id": "f29f0e59-8388-4698-9fe6-05db67aeac46"
  }
}'
import http.client

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

payload = "{\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\",\n  \"subscriptionRequest\": {\n    \"id\": \"f29f0e59-8388-4698-9fe6-05db67aeac46\"\n  }\n}"

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

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

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

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

url = "{{baseUrl}}/v0.5/subscription-requests/cm/on-init"

payload = {
    "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd",
    "subscriptionRequest": { "id": "f29f0e59-8388-4698-9fe6-05db67aeac46" }
}
headers = {
    "authorization": "",
    "x-hiu-id": "",
    "content-type": "application/json"
}

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

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

url <- "{{baseUrl}}/v0.5/subscription-requests/cm/on-init"

payload <- "{\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\",\n  \"subscriptionRequest\": {\n    \"id\": \"f29f0e59-8388-4698-9fe6-05db67aeac46\"\n  }\n}"

encode <- "json"

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

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

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

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

request = Net::HTTP::Post.new(url)
request["authorization"] = ''
request["x-hiu-id"] = ''
request["content-type"] = 'application/json'
request.body = "{\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\",\n  \"subscriptionRequest\": {\n    \"id\": \"f29f0e59-8388-4698-9fe6-05db67aeac46\"\n  }\n}"

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

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

response = conn.post('/baseUrl/v0.5/subscription-requests/cm/on-init') do |req|
  req.headers['authorization'] = ''
  req.headers['x-hiu-id'] = ''
  req.body = "{\n  \"requestId\": \"5f7a535d-a3fd-416b-b069-c97d021fbacd\",\n  \"subscriptionRequest\": {\n    \"id\": \"f29f0e59-8388-4698-9fe6-05db67aeac46\"\n  }\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/on-init";

    let payload = json!({
        "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd",
        "subscriptionRequest": json!({"id": "f29f0e59-8388-4698-9fe6-05db67aeac46"})
    });

    let mut headers = reqwest::header::HeaderMap::new();
    headers.insert("authorization", "".parse().unwrap());
    headers.insert("x-hiu-id", "".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/on-init \
  --header 'authorization: ' \
  --header 'content-type: application/json' \
  --header 'x-hiu-id: ' \
  --data '{
  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd",
  "subscriptionRequest": {
    "id": "f29f0e59-8388-4698-9fe6-05db67aeac46"
  }
}'
echo '{
  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd",
  "subscriptionRequest": {
    "id": "f29f0e59-8388-4698-9fe6-05db67aeac46"
  }
}' |  \
  http POST {{baseUrl}}/v0.5/subscription-requests/cm/on-init \
  authorization:'' \
  content-type:application/json \
  x-hiu-id:''
wget --quiet \
  --method POST \
  --header 'authorization: ' \
  --header 'x-hiu-id: ' \
  --header 'content-type: application/json' \
  --body-data '{\n  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd",\n  "subscriptionRequest": {\n    "id": "f29f0e59-8388-4698-9fe6-05db67aeac46"\n  }\n}' \
  --output-document \
  - {{baseUrl}}/v0.5/subscription-requests/cm/on-init
import Foundation

let headers = [
  "authorization": "",
  "x-hiu-id": "",
  "content-type": "application/json"
]
let parameters = [
  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd",
  "subscriptionRequest": ["id": "f29f0e59-8388-4698-9fe6-05db67aeac46"]
] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v0.5/subscription-requests/cm/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()
POST Confirmation request sending token, otp or other authentication details from HIP-HIU for confirmation
{{baseUrl}}/v0.5/users/auth/confirm
HEADERS

Authorization
X-CM-ID
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, "x-cm-id: ");
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 ""
                                                                              :x-cm-id ""}
                                                                    :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" => ""
  "x-cm-id" => ""
  "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", "" },
        { "x-cm-id", "" },
    },
    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("x-cm-id", "");
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("x-cm-id", "")
	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: 
X-Cm-Id: 
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("x-cm-id", "")
  .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("x-cm-id", "")
    .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("x-cm-id", "")
  .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("x-cm-id", "")
  .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('x-cm-id', '');
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: '', 'x-cm-id': '', '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: '', 'x-cm-id': '', '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: '',
    'x-cm-id': '',
    '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("x-cm-id", "")
  .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: '',
    'x-cm-id': '',
    '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: '', 'x-cm-id': '', '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: '',
  'x-cm-id': '',
  '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: '', 'x-cm-id': '', '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: '', 'x-cm-id': '', '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": @"",
                           @"x-cm-id": @"",
                           @"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", "");
  ("x-cm-id", "");
  ("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",
    "x-cm-id: "
  ],
]);

$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',
    'x-cm-id' => '',
  ],
]);

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

$request->setHeaders([
  'authorization' => '',
  'x-cm-id' => '',
  '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' => '',
  'x-cm-id' => '',
  'content-type' => 'application/json'
]);

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

echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "")
$headers.Add("x-cm-id", "")
$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("x-cm-id", "")
$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': "",
    'x-cm-id': "",
    '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": "",
    "x-cm-id": "",
    "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' = '', 'x-cm-id' = ''), 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["x-cm-id"] = ''
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.headers['x-cm-id'] = ''
  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("x-cm-id", "".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' \
  --header 'x-cm-id: ' \
  --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 \
  x-cm-id:''
wget --quiet \
  --method POST \
  --header 'authorization: ' \
  --header 'x-cm-id: ' \
  --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": "",
  "x-cm-id": "",
  "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
X-CM-ID
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, "x-cm-id: ");
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 ""
                                                                                  :x-cm-id ""}
                                                                        :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" => ""
  "x-cm-id" => ""
  "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", "" },
        { "x-cm-id", "" },
    },
    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("x-cm-id", "");
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("x-cm-id", "")
	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: 
X-Cm-Id: 
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("x-cm-id", "")
  .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("x-cm-id", "")
    .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("x-cm-id", "")
  .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("x-cm-id", "")
  .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('x-cm-id', '');
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: '', 'x-cm-id': '', '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: '', 'x-cm-id': '', '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: '',
    'x-cm-id': '',
    '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("x-cm-id", "")
  .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: '',
    'x-cm-id': '',
    '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: '', 'x-cm-id': '', '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: '',
  'x-cm-id': '',
  '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: '', 'x-cm-id': '', '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: '', 'x-cm-id': '', '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": @"",
                           @"x-cm-id": @"",
                           @"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", "");
  ("x-cm-id", "");
  ("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",
    "x-cm-id: "
  ],
]);

$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',
    'x-cm-id' => '',
  ],
]);

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

$request->setHeaders([
  'authorization' => '',
  'x-cm-id' => '',
  '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' => '',
  'x-cm-id' => '',
  'content-type' => 'application/json'
]);

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

echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "")
$headers.Add("x-cm-id", "")
$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("x-cm-id", "")
$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': "",
    'x-cm-id': "",
    '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": "",
    "x-cm-id": "",
    "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' = '', 'x-cm-id' = ''), 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["x-cm-id"] = ''
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.headers['x-cm-id'] = ''
  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("x-cm-id", "".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' \
  --header 'x-cm-id: ' \
  --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 \
  x-cm-id:''
wget --quiet \
  --method POST \
  --header 'authorization: ' \
  --header 'x-cm-id: ' \
  --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": "",
  "x-cm-id": "",
  "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 Identification result for a consent-manager user-id (POST)
{{baseUrl}}/v0.5/users/auth/on-fetch-modes
HEADERS

Authorization
X-HIP-ID
X-HIU-ID
BODY json

{
  "auth": {
    "modes": [],
    "purpose": ""
  },
  "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-fetch-modes");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: ");
headers = curl_slist_append(headers, "x-hip-id: ");
headers = curl_slist_append(headers, "x-hiu-id: ");
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-fetch-modes" {:headers {:authorization ""
                                                                                     :x-hip-id ""
                                                                                     :x-hiu-id ""}
                                                                           :content-type :json
                                                                           :form-params {:requestId "5f7a535d-a3fd-416b-b069-c97d021fbacd"}})
require "http/client"

url = "{{baseUrl}}/v0.5/users/auth/on-fetch-modes"
headers = HTTP::Headers{
  "authorization" => ""
  "x-hip-id" => ""
  "x-hiu-id" => ""
  "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-fetch-modes"),
    Headers =
    {
        { "authorization", "" },
        { "x-hip-id", "" },
        { "x-hiu-id", "" },
    },
    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-fetch-modes");
var request = new RestRequest("", Method.Post);
request.AddHeader("authorization", "");
request.AddHeader("x-hip-id", "");
request.AddHeader("x-hiu-id", "");
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-fetch-modes"

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

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

	req.Header.Add("authorization", "")
	req.Header.Add("x-hip-id", "")
	req.Header.Add("x-hiu-id", "")
	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-fetch-modes HTTP/1.1
Authorization: 
X-Hip-Id: 
X-Hiu-Id: 
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-fetch-modes")
  .setHeader("authorization", "")
  .setHeader("x-hip-id", "")
  .setHeader("x-hiu-id", "")
  .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-fetch-modes"))
    .header("authorization", "")
    .header("x-hip-id", "")
    .header("x-hiu-id", "")
    .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-fetch-modes")
  .post(body)
  .addHeader("authorization", "")
  .addHeader("x-hip-id", "")
  .addHeader("x-hiu-id", "")
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v0.5/users/auth/on-fetch-modes")
  .header("authorization", "")
  .header("x-hip-id", "")
  .header("x-hiu-id", "")
  .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-fetch-modes');
xhr.setRequestHeader('authorization', '');
xhr.setRequestHeader('x-hip-id', '');
xhr.setRequestHeader('x-hiu-id', '');
xhr.setRequestHeader('content-type', 'application/json');

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

const options = {
  method: 'POST',
  url: '{{baseUrl}}/v0.5/users/auth/on-fetch-modes',
  headers: {
    authorization: '',
    'x-hip-id': '',
    'x-hiu-id': '',
    '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-fetch-modes';
const options = {
  method: 'POST',
  headers: {
    authorization: '',
    'x-hip-id': '',
    'x-hiu-id': '',
    '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-fetch-modes',
  method: 'POST',
  headers: {
    authorization: '',
    'x-hip-id': '',
    'x-hiu-id': '',
    '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-fetch-modes")
  .post(body)
  .addHeader("authorization", "")
  .addHeader("x-hip-id", "")
  .addHeader("x-hiu-id", "")
  .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-fetch-modes',
  headers: {
    authorization: '',
    'x-hip-id': '',
    'x-hiu-id': '',
    '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-fetch-modes',
  headers: {
    authorization: '',
    'x-hip-id': '',
    'x-hiu-id': '',
    '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-fetch-modes');

req.headers({
  authorization: '',
  'x-hip-id': '',
  'x-hiu-id': '',
  '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-fetch-modes',
  headers: {
    authorization: '',
    'x-hip-id': '',
    'x-hiu-id': '',
    '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-fetch-modes';
const options = {
  method: 'POST',
  headers: {
    authorization: '',
    'x-hip-id': '',
    'x-hiu-id': '',
    '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": @"",
                           @"x-hip-id": @"",
                           @"x-hiu-id": @"",
                           @"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-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/on-fetch-modes" in
let headers = Header.add_list (Header.init ()) [
  ("authorization", "");
  ("x-hip-id", "");
  ("x-hiu-id", "");
  ("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-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([
    'requestId' => '5f7a535d-a3fd-416b-b069-c97d021fbacd'
  ]),
  CURLOPT_HTTPHEADER => [
    "authorization: ",
    "content-type: application/json",
    "x-hip-id: ",
    "x-hiu-id: "
  ],
]);

$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-fetch-modes', [
  'body' => '{
  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"
}',
  'headers' => [
    'authorization' => '',
    'content-type' => 'application/json',
    'x-hip-id' => '',
    'x-hiu-id' => '',
  ],
]);

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

$request->setHeaders([
  'authorization' => '',
  'x-hip-id' => '',
  'x-hiu-id' => '',
  '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-fetch-modes');
$request->setRequestMethod('POST');
$request->setBody($body);

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

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

echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "")
$headers.Add("x-hip-id", "")
$headers.Add("x-hiu-id", "")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v0.5/users/auth/on-fetch-modes' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"
}'
$headers=@{}
$headers.Add("authorization", "")
$headers.Add("x-hip-id", "")
$headers.Add("x-hiu-id", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v0.5/users/auth/on-fetch-modes' -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': "",
    'x-hip-id': "",
    'x-hiu-id': "",
    'content-type': "application/json"
}

conn.request("POST", "/baseUrl/v0.5/users/auth/on-fetch-modes", payload, headers)

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

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

url = "{{baseUrl}}/v0.5/users/auth/on-fetch-modes"

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

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

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

url <- "{{baseUrl}}/v0.5/users/auth/on-fetch-modes"

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

encode <- "json"

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

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

url = URI("{{baseUrl}}/v0.5/users/auth/on-fetch-modes")

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

request = Net::HTTP::Post.new(url)
request["authorization"] = ''
request["x-hip-id"] = ''
request["x-hiu-id"] = ''
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-fetch-modes') do |req|
  req.headers['authorization'] = ''
  req.headers['x-hip-id'] = ''
  req.headers['x-hiu-id'] = ''
  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-fetch-modes";

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

    let mut headers = reqwest::header::HeaderMap::new();
    headers.insert("authorization", "".parse().unwrap());
    headers.insert("x-hip-id", "".parse().unwrap());
    headers.insert("x-hiu-id", "".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-fetch-modes \
  --header 'authorization: ' \
  --header 'content-type: application/json' \
  --header 'x-hip-id: ' \
  --header 'x-hiu-id: ' \
  --data '{
  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"
}'
echo '{
  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"
}' |  \
  http POST {{baseUrl}}/v0.5/users/auth/on-fetch-modes \
  authorization:'' \
  content-type:application/json \
  x-hip-id:'' \
  x-hiu-id:''
wget --quiet \
  --method POST \
  --header 'authorization: ' \
  --header 'x-hip-id: ' \
  --header 'x-hiu-id: ' \
  --header 'content-type: application/json' \
  --body-data '{\n  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"\n}' \
  --output-document \
  - {{baseUrl}}/v0.5/users/auth/on-fetch-modes
import Foundation

let headers = [
  "authorization": "",
  "x-hip-id": "",
  "x-hiu-id": "",
  "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-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
X-CM-ID
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, "x-cm-id: ");
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 ""
                                                                           :x-cm-id ""}
                                                                 :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" => ""
  "x-cm-id" => ""
  "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", "" },
        { "x-cm-id", "" },
    },
    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("x-cm-id", "");
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("x-cm-id", "")
	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: 
X-Cm-Id: 
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("x-cm-id", "")
  .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("x-cm-id", "")
    .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("x-cm-id", "")
  .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("x-cm-id", "")
  .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('x-cm-id', '');
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: '', 'x-cm-id': '', '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: '', 'x-cm-id': '', '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: '',
    'x-cm-id': '',
    '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("x-cm-id", "")
  .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: '',
    'x-cm-id': '',
    '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: '', 'x-cm-id': '', '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: '',
  'x-cm-id': '',
  '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: '', 'x-cm-id': '', '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: '', 'x-cm-id': '', '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": @"",
                           @"x-cm-id": @"",
                           @"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", "");
  ("x-cm-id", "");
  ("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",
    "x-cm-id: "
  ],
]);

$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',
    'x-cm-id' => '',
  ],
]);

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

$request->setHeaders([
  'authorization' => '',
  'x-cm-id' => '',
  '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' => '',
  'x-cm-id' => '',
  'content-type' => 'application/json'
]);

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

echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "")
$headers.Add("x-cm-id", "")
$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("x-cm-id", "")
$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': "",
    'x-cm-id': "",
    '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": "",
    "x-cm-id": "",
    "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' = '', 'x-cm-id' = ''), 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["x-cm-id"] = ''
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.headers['x-cm-id'] = ''
  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("x-cm-id", "".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' \
  --header 'x-cm-id: ' \
  --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 \
  x-cm-id:''
wget --quiet \
  --method POST \
  --header 'authorization: ' \
  --header 'x-cm-id: ' \
  --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": "",
  "x-cm-id": "",
  "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 Response to user authentication initialization from HIP
{{baseUrl}}/v0.5/users/auth/on-init
HEADERS

Authorization
X-HIP-ID
X-HIU-ID
BODY json

{
  "auth": {
    "meta": {
      "expiry": "",
      "hint": ""
    },
    "mode": "",
    "transactionId": ""
  },
  "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-init");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: ");
headers = curl_slist_append(headers, "x-hip-id: ");
headers = curl_slist_append(headers, "x-hiu-id: ");
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-init" {:headers {:authorization ""
                                                                              :x-hip-id ""
                                                                              :x-hiu-id ""}
                                                                    :content-type :json
                                                                    :form-params {:requestId "5f7a535d-a3fd-416b-b069-c97d021fbacd"}})
require "http/client"

url = "{{baseUrl}}/v0.5/users/auth/on-init"
headers = HTTP::Headers{
  "authorization" => ""
  "x-hip-id" => ""
  "x-hiu-id" => ""
  "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-init"),
    Headers =
    {
        { "authorization", "" },
        { "x-hip-id", "" },
        { "x-hiu-id", "" },
    },
    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-init");
var request = new RestRequest("", Method.Post);
request.AddHeader("authorization", "");
request.AddHeader("x-hip-id", "");
request.AddHeader("x-hiu-id", "");
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-init"

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

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

	req.Header.Add("authorization", "")
	req.Header.Add("x-hip-id", "")
	req.Header.Add("x-hiu-id", "")
	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-init HTTP/1.1
Authorization: 
X-Hip-Id: 
X-Hiu-Id: 
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-init")
  .setHeader("authorization", "")
  .setHeader("x-hip-id", "")
  .setHeader("x-hiu-id", "")
  .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-init"))
    .header("authorization", "")
    .header("x-hip-id", "")
    .header("x-hiu-id", "")
    .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-init")
  .post(body)
  .addHeader("authorization", "")
  .addHeader("x-hip-id", "")
  .addHeader("x-hiu-id", "")
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v0.5/users/auth/on-init")
  .header("authorization", "")
  .header("x-hip-id", "")
  .header("x-hiu-id", "")
  .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-init');
xhr.setRequestHeader('authorization', '');
xhr.setRequestHeader('x-hip-id', '');
xhr.setRequestHeader('x-hiu-id', '');
xhr.setRequestHeader('content-type', 'application/json');

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

const options = {
  method: 'POST',
  url: '{{baseUrl}}/v0.5/users/auth/on-init',
  headers: {
    authorization: '',
    'x-hip-id': '',
    'x-hiu-id': '',
    '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-init';
const options = {
  method: 'POST',
  headers: {
    authorization: '',
    'x-hip-id': '',
    'x-hiu-id': '',
    '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-init',
  method: 'POST',
  headers: {
    authorization: '',
    'x-hip-id': '',
    'x-hiu-id': '',
    '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-init")
  .post(body)
  .addHeader("authorization", "")
  .addHeader("x-hip-id", "")
  .addHeader("x-hiu-id", "")
  .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-init',
  headers: {
    authorization: '',
    'x-hip-id': '',
    'x-hiu-id': '',
    '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-init',
  headers: {
    authorization: '',
    'x-hip-id': '',
    'x-hiu-id': '',
    '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-init');

req.headers({
  authorization: '',
  'x-hip-id': '',
  'x-hiu-id': '',
  '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-init',
  headers: {
    authorization: '',
    'x-hip-id': '',
    'x-hiu-id': '',
    '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-init';
const options = {
  method: 'POST',
  headers: {
    authorization: '',
    'x-hip-id': '',
    'x-hiu-id': '',
    '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": @"",
                           @"x-hip-id": @"",
                           @"x-hiu-id": @"",
                           @"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-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/on-init" in
let headers = Header.add_list (Header.init ()) [
  ("authorization", "");
  ("x-hip-id", "");
  ("x-hiu-id", "");
  ("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-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'
  ]),
  CURLOPT_HTTPHEADER => [
    "authorization: ",
    "content-type: application/json",
    "x-hip-id: ",
    "x-hiu-id: "
  ],
]);

$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-init', [
  'body' => '{
  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"
}',
  'headers' => [
    'authorization' => '',
    'content-type' => 'application/json',
    'x-hip-id' => '',
    'x-hiu-id' => '',
  ],
]);

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

$request->setHeaders([
  'authorization' => '',
  'x-hip-id' => '',
  'x-hiu-id' => '',
  '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-init');
$request->setRequestMethod('POST');
$request->setBody($body);

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

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

echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "")
$headers.Add("x-hip-id", "")
$headers.Add("x-hiu-id", "")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v0.5/users/auth/on-init' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"
}'
$headers=@{}
$headers.Add("authorization", "")
$headers.Add("x-hip-id", "")
$headers.Add("x-hiu-id", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v0.5/users/auth/on-init' -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': "",
    'x-hip-id': "",
    'x-hiu-id': "",
    'content-type': "application/json"
}

conn.request("POST", "/baseUrl/v0.5/users/auth/on-init", payload, headers)

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

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

url = "{{baseUrl}}/v0.5/users/auth/on-init"

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

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

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

url <- "{{baseUrl}}/v0.5/users/auth/on-init"

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

encode <- "json"

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

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

url = URI("{{baseUrl}}/v0.5/users/auth/on-init")

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

request = Net::HTTP::Post.new(url)
request["authorization"] = ''
request["x-hip-id"] = ''
request["x-hiu-id"] = ''
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-init') do |req|
  req.headers['authorization'] = ''
  req.headers['x-hip-id'] = ''
  req.headers['x-hiu-id'] = ''
  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-init";

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

    let mut headers = reqwest::header::HeaderMap::new();
    headers.insert("authorization", "".parse().unwrap());
    headers.insert("x-hip-id", "".parse().unwrap());
    headers.insert("x-hiu-id", "".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-init \
  --header 'authorization: ' \
  --header 'content-type: application/json' \
  --header 'x-hip-id: ' \
  --header 'x-hiu-id: ' \
  --data '{
  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"
}'
echo '{
  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"
}' |  \
  http POST {{baseUrl}}/v0.5/users/auth/on-init \
  authorization:'' \
  content-type:application/json \
  x-hip-id:'' \
  x-hiu-id:''
wget --quiet \
  --method POST \
  --header 'authorization: ' \
  --header 'x-hip-id: ' \
  --header 'x-hiu-id: ' \
  --header 'content-type: application/json' \
  --body-data '{\n  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"\n}' \
  --output-document \
  - {{baseUrl}}/v0.5/users/auth/on-init
import Foundation

let headers = [
  "authorization": "",
  "x-hip-id": "",
  "x-hiu-id": "",
  "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-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 by HIU-HIPs as acknowledgement of auth notification
{{baseUrl}}/v0.5/users/auth/on-notify
HEADERS

Authorization
X-CM-ID
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, "x-cm-id: ");
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 ""
                                                                                :x-cm-id ""}
                                                                      :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" => ""
  "x-cm-id" => ""
  "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", "" },
        { "x-cm-id", "" },
    },
    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("x-cm-id", "");
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("x-cm-id", "")
	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: 
X-Cm-Id: 
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("x-cm-id", "")
  .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("x-cm-id", "")
    .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("x-cm-id", "")
  .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("x-cm-id", "")
  .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('x-cm-id', '');
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: '', 'x-cm-id': '', '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: '', 'x-cm-id': '', '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: '',
    'x-cm-id': '',
    '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("x-cm-id", "")
  .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: '',
    'x-cm-id': '',
    '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: '', 'x-cm-id': '', '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: '',
  'x-cm-id': '',
  '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: '', 'x-cm-id': '', '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: '', 'x-cm-id': '', '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": @"",
                           @"x-cm-id": @"",
                           @"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", "");
  ("x-cm-id", "");
  ("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",
    "x-cm-id: "
  ],
]);

$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',
    'x-cm-id' => '',
  ],
]);

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

$request->setHeaders([
  'authorization' => '',
  'x-cm-id' => '',
  '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' => '',
  'x-cm-id' => '',
  'content-type' => 'application/json'
]);

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

echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "")
$headers.Add("x-cm-id", "")
$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("x-cm-id", "")
$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': "",
    'x-cm-id': "",
    '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": "",
    "x-cm-id": "",
    "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' = '', 'x-cm-id' = ''), 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["x-cm-id"] = ''
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.headers['x-cm-id'] = ''
  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("x-cm-id", "".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' \
  --header 'x-cm-id: ' \
  --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 \
  x-cm-id:''
wget --quiet \
  --method POST \
  --header 'authorization: ' \
  --header 'x-cm-id: ' \
  --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": "",
  "x-cm-id": "",
  "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()
POST callback API for -auth-confirm (in case of MEDIATED auth) to confirm user authentication or not
{{baseUrl}}/v0.5/users/auth/on-confirm
HEADERS

Authorization
X-HIP-ID
X-HIU-ID
BODY json

{
  "auth": {
    "accessToken": "",
    "patient": {
      "address": {
        "district": "",
        "line": "",
        "pincode": "",
        "state": ""
      },
      "gender": "",
      "id": "",
      "identifiers": [
        {
          "type": "",
          "value": ""
        }
      ],
      "name": "",
      "yearOfBirth": 0
    },
    "validity": {
      "expiry": "",
      "limit": 0,
      "purpose": "",
      "requester": {
        "id": "",
        "type": ""
      }
    }
  },
  "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-confirm");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: ");
headers = curl_slist_append(headers, "x-hip-id: ");
headers = curl_slist_append(headers, "x-hiu-id: ");
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-confirm" {:headers {:authorization ""
                                                                                 :x-hip-id ""
                                                                                 :x-hiu-id ""}
                                                                       :content-type :json
                                                                       :form-params {:requestId "5f7a535d-a3fd-416b-b069-c97d021fbacd"}})
require "http/client"

url = "{{baseUrl}}/v0.5/users/auth/on-confirm"
headers = HTTP::Headers{
  "authorization" => ""
  "x-hip-id" => ""
  "x-hiu-id" => ""
  "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-confirm"),
    Headers =
    {
        { "authorization", "" },
        { "x-hip-id", "" },
        { "x-hiu-id", "" },
    },
    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-confirm");
var request = new RestRequest("", Method.Post);
request.AddHeader("authorization", "");
request.AddHeader("x-hip-id", "");
request.AddHeader("x-hiu-id", "");
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-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("x-hip-id", "")
	req.Header.Add("x-hiu-id", "")
	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-confirm HTTP/1.1
Authorization: 
X-Hip-Id: 
X-Hiu-Id: 
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-confirm")
  .setHeader("authorization", "")
  .setHeader("x-hip-id", "")
  .setHeader("x-hiu-id", "")
  .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-confirm"))
    .header("authorization", "")
    .header("x-hip-id", "")
    .header("x-hiu-id", "")
    .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-confirm")
  .post(body)
  .addHeader("authorization", "")
  .addHeader("x-hip-id", "")
  .addHeader("x-hiu-id", "")
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v0.5/users/auth/on-confirm")
  .header("authorization", "")
  .header("x-hip-id", "")
  .header("x-hiu-id", "")
  .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-confirm');
xhr.setRequestHeader('authorization', '');
xhr.setRequestHeader('x-hip-id', '');
xhr.setRequestHeader('x-hiu-id', '');
xhr.setRequestHeader('content-type', 'application/json');

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

const options = {
  method: 'POST',
  url: '{{baseUrl}}/v0.5/users/auth/on-confirm',
  headers: {
    authorization: '',
    'x-hip-id': '',
    'x-hiu-id': '',
    '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-confirm';
const options = {
  method: 'POST',
  headers: {
    authorization: '',
    'x-hip-id': '',
    'x-hiu-id': '',
    '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-confirm',
  method: 'POST',
  headers: {
    authorization: '',
    'x-hip-id': '',
    'x-hiu-id': '',
    '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-confirm")
  .post(body)
  .addHeader("authorization", "")
  .addHeader("x-hip-id", "")
  .addHeader("x-hiu-id", "")
  .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-confirm',
  headers: {
    authorization: '',
    'x-hip-id': '',
    'x-hiu-id': '',
    '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-confirm',
  headers: {
    authorization: '',
    'x-hip-id': '',
    'x-hiu-id': '',
    '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-confirm');

req.headers({
  authorization: '',
  'x-hip-id': '',
  'x-hiu-id': '',
  '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-confirm',
  headers: {
    authorization: '',
    'x-hip-id': '',
    'x-hiu-id': '',
    '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-confirm';
const options = {
  method: 'POST',
  headers: {
    authorization: '',
    'x-hip-id': '',
    'x-hiu-id': '',
    '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": @"",
                           @"x-hip-id": @"",
                           @"x-hiu-id": @"",
                           @"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-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/on-confirm" in
let headers = Header.add_list (Header.init ()) [
  ("authorization", "");
  ("x-hip-id", "");
  ("x-hiu-id", "");
  ("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-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",
    "x-hip-id: ",
    "x-hiu-id: "
  ],
]);

$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-confirm', [
  'body' => '{
  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"
}',
  'headers' => [
    'authorization' => '',
    'content-type' => 'application/json',
    'x-hip-id' => '',
    'x-hiu-id' => '',
  ],
]);

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

$request->setHeaders([
  'authorization' => '',
  'x-hip-id' => '',
  'x-hiu-id' => '',
  '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-confirm');
$request->setRequestMethod('POST');
$request->setBody($body);

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

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

echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "")
$headers.Add("x-hip-id", "")
$headers.Add("x-hiu-id", "")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v0.5/users/auth/on-confirm' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"
}'
$headers=@{}
$headers.Add("authorization", "")
$headers.Add("x-hip-id", "")
$headers.Add("x-hiu-id", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v0.5/users/auth/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': "",
    'x-hip-id': "",
    'x-hiu-id': "",
    'content-type': "application/json"
}

conn.request("POST", "/baseUrl/v0.5/users/auth/on-confirm", payload, headers)

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

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

url = "{{baseUrl}}/v0.5/users/auth/on-confirm"

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

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

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

url <- "{{baseUrl}}/v0.5/users/auth/on-confirm"

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

encode <- "json"

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

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

url = URI("{{baseUrl}}/v0.5/users/auth/on-confirm")

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

request = Net::HTTP::Post.new(url)
request["authorization"] = ''
request["x-hip-id"] = ''
request["x-hiu-id"] = ''
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-confirm') do |req|
  req.headers['authorization'] = ''
  req.headers['x-hip-id'] = ''
  req.headers['x-hiu-id'] = ''
  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-confirm";

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

    let mut headers = reqwest::header::HeaderMap::new();
    headers.insert("authorization", "".parse().unwrap());
    headers.insert("x-hip-id", "".parse().unwrap());
    headers.insert("x-hiu-id", "".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-confirm \
  --header 'authorization: ' \
  --header 'content-type: application/json' \
  --header 'x-hip-id: ' \
  --header 'x-hiu-id: ' \
  --data '{
  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"
}'
echo '{
  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"
}' |  \
  http POST {{baseUrl}}/v0.5/users/auth/on-confirm \
  authorization:'' \
  content-type:application/json \
  x-hip-id:'' \
  x-hiu-id:''
wget --quiet \
  --method POST \
  --header 'authorization: ' \
  --header 'x-hip-id: ' \
  --header 'x-hiu-id: ' \
  --header 'content-type: application/json' \
  --body-data '{\n  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"\n}' \
  --output-document \
  - {{baseUrl}}/v0.5/users/auth/on-confirm
import Foundation

let headers = [
  "authorization": "",
  "x-hip-id": "",
  "x-hiu-id": "",
  "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-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 notification API in case of DIRECT mode of authentication by the CM
{{baseUrl}}/v0.5/users/auth/notify
HEADERS

Authorization
X-HIP-ID
X-HIU-ID
BODY json

{
  "auth": {
    "accessToken": "",
    "patient": {
      "address": {
        "district": "",
        "line": "",
        "pincode": "",
        "state": ""
      },
      "gender": "",
      "id": "",
      "identifiers": [
        {
          "type": "",
          "value": ""
        }
      ],
      "name": "",
      "yearOfBirth": 0
    },
    "status": "",
    "transactionId": "",
    "validity": {
      "expiry": "",
      "limit": 0,
      "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/notify");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: ");
headers = curl_slist_append(headers, "x-hip-id: ");
headers = curl_slist_append(headers, "x-hiu-id: ");
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/notify" {:headers {:authorization ""
                                                                             :x-hip-id ""
                                                                             :x-hiu-id ""}
                                                                   :content-type :json
                                                                   :form-params {:requestId "5f7a535d-a3fd-416b-b069-c97d021fbacd"}})
require "http/client"

url = "{{baseUrl}}/v0.5/users/auth/notify"
headers = HTTP::Headers{
  "authorization" => ""
  "x-hip-id" => ""
  "x-hiu-id" => ""
  "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/notify"),
    Headers =
    {
        { "authorization", "" },
        { "x-hip-id", "" },
        { "x-hiu-id", "" },
    },
    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/notify");
var request = new RestRequest("", Method.Post);
request.AddHeader("authorization", "");
request.AddHeader("x-hip-id", "");
request.AddHeader("x-hiu-id", "");
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/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("x-hip-id", "")
	req.Header.Add("x-hiu-id", "")
	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/notify HTTP/1.1
Authorization: 
X-Hip-Id: 
X-Hiu-Id: 
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/notify")
  .setHeader("authorization", "")
  .setHeader("x-hip-id", "")
  .setHeader("x-hiu-id", "")
  .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/notify"))
    .header("authorization", "")
    .header("x-hip-id", "")
    .header("x-hiu-id", "")
    .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/notify")
  .post(body)
  .addHeader("authorization", "")
  .addHeader("x-hip-id", "")
  .addHeader("x-hiu-id", "")
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v0.5/users/auth/notify")
  .header("authorization", "")
  .header("x-hip-id", "")
  .header("x-hiu-id", "")
  .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/notify');
xhr.setRequestHeader('authorization', '');
xhr.setRequestHeader('x-hip-id', '');
xhr.setRequestHeader('x-hiu-id', '');
xhr.setRequestHeader('content-type', 'application/json');

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

const options = {
  method: 'POST',
  url: '{{baseUrl}}/v0.5/users/auth/notify',
  headers: {
    authorization: '',
    'x-hip-id': '',
    'x-hiu-id': '',
    '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/notify';
const options = {
  method: 'POST',
  headers: {
    authorization: '',
    'x-hip-id': '',
    'x-hiu-id': '',
    '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/notify',
  method: 'POST',
  headers: {
    authorization: '',
    'x-hip-id': '',
    'x-hiu-id': '',
    '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/notify")
  .post(body)
  .addHeader("authorization", "")
  .addHeader("x-hip-id", "")
  .addHeader("x-hiu-id", "")
  .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/notify',
  headers: {
    authorization: '',
    'x-hip-id': '',
    'x-hiu-id': '',
    '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/notify',
  headers: {
    authorization: '',
    'x-hip-id': '',
    'x-hiu-id': '',
    '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/notify');

req.headers({
  authorization: '',
  'x-hip-id': '',
  'x-hiu-id': '',
  '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/notify',
  headers: {
    authorization: '',
    'x-hip-id': '',
    'x-hiu-id': '',
    '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/notify';
const options = {
  method: 'POST',
  headers: {
    authorization: '',
    'x-hip-id': '',
    'x-hiu-id': '',
    '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": @"",
                           @"x-hip-id": @"",
                           @"x-hiu-id": @"",
                           @"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/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/notify" in
let headers = Header.add_list (Header.init ()) [
  ("authorization", "");
  ("x-hip-id", "");
  ("x-hiu-id", "");
  ("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/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",
    "x-hip-id: ",
    "x-hiu-id: "
  ],
]);

$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/notify', [
  'body' => '{
  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"
}',
  'headers' => [
    'authorization' => '',
    'content-type' => 'application/json',
    'x-hip-id' => '',
    'x-hiu-id' => '',
  ],
]);

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

$request->setHeaders([
  'authorization' => '',
  'x-hip-id' => '',
  'x-hiu-id' => '',
  '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/notify');
$request->setRequestMethod('POST');
$request->setBody($body);

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

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

echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "")
$headers.Add("x-hip-id", "")
$headers.Add("x-hiu-id", "")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v0.5/users/auth/notify' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"
}'
$headers=@{}
$headers.Add("authorization", "")
$headers.Add("x-hip-id", "")
$headers.Add("x-hiu-id", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v0.5/users/auth/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': "",
    'x-hip-id': "",
    'x-hiu-id': "",
    'content-type': "application/json"
}

conn.request("POST", "/baseUrl/v0.5/users/auth/notify", payload, headers)

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

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

url = "{{baseUrl}}/v0.5/users/auth/notify"

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

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

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

url <- "{{baseUrl}}/v0.5/users/auth/notify"

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

encode <- "json"

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

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

url = URI("{{baseUrl}}/v0.5/users/auth/notify")

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

request = Net::HTTP::Post.new(url)
request["authorization"] = ''
request["x-hip-id"] = ''
request["x-hiu-id"] = ''
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/notify') do |req|
  req.headers['authorization'] = ''
  req.headers['x-hip-id'] = ''
  req.headers['x-hiu-id'] = ''
  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/notify";

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

    let mut headers = reqwest::header::HeaderMap::new();
    headers.insert("authorization", "".parse().unwrap());
    headers.insert("x-hip-id", "".parse().unwrap());
    headers.insert("x-hiu-id", "".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/notify \
  --header 'authorization: ' \
  --header 'content-type: application/json' \
  --header 'x-hip-id: ' \
  --header 'x-hiu-id: ' \
  --data '{
  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"
}'
echo '{
  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"
}' |  \
  http POST {{baseUrl}}/v0.5/users/auth/notify \
  authorization:'' \
  content-type:application/json \
  x-hip-id:'' \
  x-hiu-id:''
wget --quiet \
  --method POST \
  --header 'authorization: ' \
  --header 'x-hip-id: ' \
  --header 'x-hiu-id: ' \
  --header 'content-type: application/json' \
  --body-data '{\n  "requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"\n}' \
  --output-document \
  - {{baseUrl}}/v0.5/users/auth/notify
import Foundation

let headers = [
  "authorization": "",
  "x-hip-id": "",
  "x-hiu-id": "",
  "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/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()