curl -X PATCH \
'https://www.beehexa.com/_mock/api/microsoft-dynamics-365-business-central-api/default-built-by-microsoft/companies(e942a270-62d2-4aef-aa48-6fe3ef9e53e1)/employees(e942a270-62d2-4aef-aa48-6fe3ef9e53e1)/picture(e942a270-62d2-4aef-aa48-6fe3ef9e53e1)' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'Content-Type: application/json' \
-H 'If-Match: true' \
-d '{
"id": "2a2dfc50-f21b-4ab0-8f89-463efd0dfce4",
"width": null,
"height": null,
"contentType": null,
"content": "string"
}'
const url = 'https://www.beehexa.com/_mock/api/microsoft-dynamics-365-business-central-api/default-built-by-microsoft/companies(e942a270-62d2-4aef-aa48-6fe3ef9e53e1)/employees(e942a270-62d2-4aef-aa48-6fe3ef9e53e1)/picture(e942a270-62d2-4aef-aa48-6fe3ef9e53e1)';
const options = {
method: 'PATCH',
headers: {
'Content-Type': 'application/json',
'If-Match': 'true',
Authorization: 'Bearer <YOUR_TOKEN_HERE>'
},
body: '{"id":"2a2dfc50-f21b-4ab0-8f89-463efd0dfce4","width":null,"height":null,"contentType":null,"content":"string"}'
};
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)/employees(e942a270-62d2-4aef-aa48-6fe3ef9e53e1)/picture(e942a270-62d2-4aef-aa48-6fe3ef9e53e1)';
const options = {
method: 'PATCH',
headers: {
'Content-Type': 'application/json',
'If-Match': 'true',
Authorization: 'Bearer <YOUR_TOKEN_HERE>'
},
body: '{"id":"2a2dfc50-f21b-4ab0-8f89-463efd0dfce4","width":null,"height":null,"contentType":null,"content":"string"}'
};
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)/employees(e942a270-62d2-4aef-aa48-6fe3ef9e53e1)/picture(e942a270-62d2-4aef-aa48-6fe3ef9e53e1)"
payload = {
"id": "2a2dfc50-f21b-4ab0-8f89-463efd0dfce4",
"width": None,
"height": None,
"contentType": None,
"content": "string"
}
headers = {
"Content-Type": "application/json",
"If-Match": "true",
"Authorization": "Bearer <YOUR_TOKEN_HERE>"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.json())
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"id\": \"2a2dfc50-f21b-4ab0-8f89-463efd0dfce4\",\n \"width\": null,\n \"height\": null,\n \"contentType\": null,\n \"content\": \"string\"\n}");
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)/employees(e942a270-62d2-4aef-aa48-6fe3ef9e53e1)/picture(e942a270-62d2-4aef-aa48-6fe3ef9e53e1)")
.patch(body)
.addHeader("Content-Type", "application/json")
.addHeader("If-Match", "true")
.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.Patch,
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)/employees(e942a270-62d2-4aef-aa48-6fe3ef9e53e1)/picture(e942a270-62d2-4aef-aa48-6fe3ef9e53e1)"),
Headers =
{
{ "If-Match", "true" },
{ "Authorization", "Bearer <YOUR_TOKEN_HERE>" },
},
Content = new StringContent("{\n \"id\": \"2a2dfc50-f21b-4ab0-8f89-463efd0dfce4\",\n \"width\": null,\n \"height\": null,\n \"contentType\": null,\n \"content\": \"string\"\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);
}
<?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)/employees(e942a270-62d2-4aef-aa48-6fe3ef9e53e1)/picture(e942a270-62d2-4aef-aa48-6fe3ef9e53e1)",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'id' => '2a2dfc50-f21b-4ab0-8f89-463efd0dfce4',
'width' => null,
'height' => null,
'contentType' => null,
'content' => 'string'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <YOUR_TOKEN_HERE>",
"Content-Type: application/json",
"If-Match: true"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main
import (
"fmt"
"strings"
"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)/employees(e942a270-62d2-4aef-aa48-6fe3ef9e53e1)/picture(e942a270-62d2-4aef-aa48-6fe3ef9e53e1)"
payload := strings.NewReader("{\n \"id\": \"2a2dfc50-f21b-4ab0-8f89-463efd0dfce4\",\n \"width\": null,\n \"height\": null,\n \"contentType\": null,\n \"content\": \"string\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Content-Type", "application/json")
req.Header.Add("If-Match", "true")
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))
}