curl -X GET \
'https://www.beehexa.com/_mock/api/microsoft-dynamics-365-business-central-api/default-built-by-microsoft/companies(e942a270-62d2-4aef-aa48-6fe3ef9e53e1)/salesInvoices(e942a270-62d2-4aef-aa48-6fe3ef9e53e1)/pdfDocument' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>'
const url = 'https://www.beehexa.com/_mock/api/microsoft-dynamics-365-business-central-api/default-built-by-microsoft/companies(e942a270-62d2-4aef-aa48-6fe3ef9e53e1)/salesInvoices(e942a270-62d2-4aef-aa48-6fe3ef9e53e1)/pdfDocument';
const options = {method: 'GET', headers: {Authorization: 'Bearer <YOUR_TOKEN_HERE>'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = 'https://www.beehexa.com/_mock/api/microsoft-dynamics-365-business-central-api/default-built-by-microsoft/companies(e942a270-62d2-4aef-aa48-6fe3ef9e53e1)/salesInvoices(e942a270-62d2-4aef-aa48-6fe3ef9e53e1)/pdfDocument';
const options = {method: 'GET', headers: {Authorization: 'Bearer <YOUR_TOKEN_HERE>'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
import requests
url = "https://www.beehexa.com/_mock/api/microsoft-dynamics-365-business-central-api/default-built-by-microsoft/companies(e942a270-62d2-4aef-aa48-6fe3ef9e53e1)/salesInvoices(e942a270-62d2-4aef-aa48-6fe3ef9e53e1)/pdfDocument"
headers = {"Authorization": "Bearer <YOUR_TOKEN_HERE>"}
response = requests.get(url, headers=headers)
print(response.json())
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("https://www.beehexa.com/_mock/api/microsoft-dynamics-365-business-central-api/default-built-by-microsoft/companies(e942a270-62d2-4aef-aa48-6fe3ef9e53e1)/salesInvoices(e942a270-62d2-4aef-aa48-6fe3ef9e53e1)/pdfDocument")
.get()
.addHeader("Authorization", "Bearer <YOUR_TOKEN_HERE>")
.build();
Response response = client.newCall(request).execute();
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("https://www.beehexa.com/_mock/api/microsoft-dynamics-365-business-central-api/default-built-by-microsoft/companies(e942a270-62d2-4aef-aa48-6fe3ef9e53e1)/salesInvoices(e942a270-62d2-4aef-aa48-6fe3ef9e53e1)/pdfDocument"),
Headers =
{
{ "Authorization", "Bearer <YOUR_TOKEN_HERE>" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://www.beehexa.com/_mock/api/microsoft-dynamics-365-business-central-api/default-built-by-microsoft/companies(e942a270-62d2-4aef-aa48-6fe3ef9e53e1)/salesInvoices(e942a270-62d2-4aef-aa48-6fe3ef9e53e1)/pdfDocument",
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: Bearer <YOUR_TOKEN_HERE>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://www.beehexa.com/_mock/api/microsoft-dynamics-365-business-central-api/default-built-by-microsoft/companies(e942a270-62d2-4aef-aa48-6fe3ef9e53e1)/salesInvoices(e942a270-62d2-4aef-aa48-6fe3ef9e53e1)/pdfDocument"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <YOUR_TOKEN_HERE>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}