1
0
mirror of https://github.com/Bayselonarrend/OpenIntegrations.git synced 2025-12-01 22:29:52 +02:00
Files
OpenIntegrations/docs/en/md/S3/Common-methods/Send-request-without-body.mdx

70 lines
2.3 KiB
Plaintext
Raw Normal View History

2024-11-13 09:59:01 +03:00
---
sidebar_position: 2
2025-05-05 11:15:20 +03:00
description: Send request without body and other functions to work with S3 in the Open Integration Package, a free open-source integration library for 1C:Enterprise 8, OneScript and CLI
2025-05-05 09:49:19 +03:00
keywords: [1C, 1С, 1С:Enterprise, 1С:Enterprise 8.3, API, Integration, Services, Exchange, OneScript, CLI, S3]
2024-11-13 09:59:01 +03:00
---
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
# Send request without body
Sends a simple http request without a body
2024-11-19 15:23:29 +03:00
`Function SendRequestWithoutBody(Val Method, Val BasicData, Val ExpectedBinary = False, Val Headers = Undefined) Export`
2024-11-13 09:59:01 +03:00
| Parameter | CLI option | Type | Required | Description |
|-|-|-|-|-|
| Method | --method | String | ✔ | HTTP method |
2024-12-29 17:57:09 +03:00
| BasicData | --basic | Structure Of KeyAndValue | ✔ | Basic request data (with full URL). See GetBasicDataStructure |
2024-11-19 15:23:29 +03:00
| ExpectedBinary | --binary | Boolean | ✖ | Disables an attempt to convert the response to JSON |
2024-11-13 22:48:21 +03:00
| Headers | --headers | Map Of KeyAndValue | ✖ | Additional request headers, if necessary |
2024-11-13 09:59:01 +03:00
2024-12-29 17:57:09 +03:00
Returns: Structure Of KeyAndValue - serialized JSON response from storage
2024-11-13 09:59:01 +03:00
<br/>
```bsl title="1C:Enterprise/OneScript code example"
2025-06-29 14:35:33 +03:00
URL = "storage-155.s3hoster.by" + "/opi-newbucket2";
AccessKey = "BRN5RKJE67...";
SecretKey = "NNhv+i9PrytpT8Tu0C1N...";
2024-11-15 10:05:19 +03:00
Region = "BTC";
2024-11-13 09:59:01 +03:00
2024-11-15 10:05:19 +03:00
BasicData = OPI_S3.GetBasicDataStructure(URL, AccessKey, SecretKey, Region);
2024-11-15 10:12:22 +03:00
Method = "GET";
2024-11-15 10:05:19 +03:00
Result = OPI_S3.SendRequestWithoutBody(Method, BasicData);
2024-11-13 09:59:01 +03:00
```
2024-11-17 16:09:58 +03:00
<Tabs>
<TabItem value="bash" label="Bash" default>
```bash
2025-07-05 18:56:59 +03:00
# JSON data can also be passed as a path to a .json file
2024-11-17 16:09:58 +03:00
oint s3 SendRequestWithoutBody \
--method "GET" \
2025-07-05 18:56:59 +03:00
--basic "{'URL':'storage-155.s3hoster.by/opi-newbucket2','AccessKey':'***','SecretKey':'***','Region':'BTC','Service':'s3'}"
2024-11-17 16:09:58 +03:00
```
</TabItem>
<TabItem value="bat" label="CMD/Bat" default>
```batch
2025-07-05 18:56:59 +03:00
:: JSON data can also be passed as a path to a .json file
2024-11-17 16:09:58 +03:00
oint s3 SendRequestWithoutBody ^
--method "GET" ^
2025-07-05 18:56:59 +03:00
--basic "{'URL':'storage-155.s3hoster.by/opi-newbucket2','AccessKey':'***','SecretKey':'***','Region':'BTC','Service':'s3'}"
2024-11-17 16:09:58 +03:00
```
</TabItem>
</Tabs>
2024-11-13 09:59:01 +03:00