curl -X POST \\
"${BASE_URL}/api/applications/app123/files/multipart/part" \\
-H "Authorization: Bearer ${API_TOKEN}" \\
-H "Content-Type: application/json" \\
-d '{"path":"string","upload_id":"string","part_number":123,"content_length":123,"content_type":"string"}'
const payload = {"path":"string","upload_id":"string","part_number":123,"content_length":123,"content_type":"string"};
const url = "${BASE_URL}/api/applications/app123/files/multipart/part";
const response = await fetch(url, {
method: "POST",
headers: {
"Authorization": "Bearer ${API_TOKEN}",
"Content-Type": "application/json",
},
body: JSON.stringify(payload),
});
console.log(await response.json());
const payload = {"path":"string","upload_id":"string","part_number":123,"content_length":123,"content_type":"string"};
const url = "${BASE_URL}/api/applications/app123/files/multipart/part";
const response = await fetch(url, {
method: "POST",
headers: {
"Authorization": "Bearer ${API_TOKEN}",
"Content-Type": "application/json",
},
body: JSON.stringify(payload),
} as RequestInit);
console.log(await response.json());
const payload = {"path":"string","upload_id":"string","part_number":123,"content_length":123,"content_type":"string"};
const response = await axios({
method: "post",
url: "${BASE_URL}/api/applications/app123/files/multipart/part",
headers: {
Authorization: "Bearer ${API_TOKEN}",
"Content-Type": "application/json",
},
data: payload,
});
console.log(response.data);
const payload = {"path":"string","upload_id":"string","part_number":123,"content_length":123,"content_type":"string"};
const response: AxiosResponse = await axios({
method: "post",
url: "${BASE_URL}/api/applications/app123/files/multipart/part",
headers: {
Authorization: "Bearer ${API_TOKEN}",
"Content-Type": "application/json",
},
data: payload,
});
console.log(response.data);
import { request } from "undici";
const bodyData = {"path":"string","upload_id":"string","part_number":123,"content_length":123,"content_type":"string"};
const { body } = await request("${BASE_URL}/api/applications/app123/files/multipart/part", {
method: "POST",
headers: {
Authorization: "Bearer ${API_TOKEN}",
"Content-Type": "application/json",
},
body: JSON.stringify(bodyData),
});
console.log(await body.json());
import requests
payload = {"path":"string","upload_id":"string","part_number":123,"content_length":123,"content_type":"string"}
response = requests.request( \
"POST", \
"${BASE_URL}/api/applications/app123/files/multipart/part", \
headers={"Authorization": "Bearer ${API_TOKEN}"}, \
json=payload,
)
print(response.json())
import httpx
payload = {"path":"string","upload_id":"string","part_number":123,"content_length":123,"content_type":"string"}
with httpx.Client() as client:
response = client.request( \
"POST", \
"${BASE_URL}/api/applications/app123/files/multipart/part", \
headers={"Authorization": "Bearer ${API_TOKEN}"}, \
json=payload,
)
print(response.json())
payload := bytes.NewBuffer([]byte(`{"path":"string","upload_id":"string","part_number":123,"content_length":123,"content_type":"string"}`))
req, err := http.NewRequest("POST", "${BASE_URL}/api/applications/app123/files/multipart/part", payload)
if err != nil {
panic(err)
}
req.Header.Set("Authorization", "Bearer ${API_TOKEN}")
if payload != http.NoBody {
req.Header.Set("Content-Type", "application/json")
}
res, err := (&http.Client{}).Do(req)
if err != nil {
panic(err)
}
defer res.Body.Close()
require "json"
require "net/http"
payload = {"path":"string","upload_id":"string","part_number":123,"content_length":123,"content_type":"string"}
uri = URI("${BASE_URL}/api/applications/app123/files/multipart/part")
request = Net::HTTP::Post.new(uri)
request["Authorization"] = "Bearer ${API_TOKEN}"
request["Content-Type"] = "application/json"
request.body = payload.to_json
response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == "https") { |http| \
http.request(request) \
}
puts response.body
<?php
use GuzzleHttp\Client;
$payload = {"path":"string","upload_id":"string","part_number":123,"content_length":123,"content_type":"string"};
$client = new Client();
$response = $client->request("POST", "${BASE_URL}/api/applications/app123/files/multipart/part", [
'headers' => [
'Authorization' => 'Bearer ${API_TOKEN}',
],
'json' => $payload,
]);
echo $response->getBody();
using System.Net.Http;
using System.Text;
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, "${BASE_URL}/api/applications/app123/files/multipart/part");
request.Headers.Add("Authorization", "Bearer ${API_TOKEN}");
request.Content = new StringContent("{\"path\":\"string\",\"upload_id\":\"string\",\"part_number\":123,\"content_length\":123,\"content_type\":\"string\"}", Encoding.UTF8, "application/json");
var response = await client.SendAsync(request);
Console.WriteLine(await response.Content.ReadAsStringAsync());