1
0
mirror of https://github.com/Bayselonarrend/OpenIntegrations.git synced 2025-11-25 22:12:29 +02:00

Main build (Jenkins)

This commit is contained in:
Vitaly the Alpaca (bot)
2025-05-04 21:43:56 +03:00
parent 499c2f84c5
commit d19df628f6
115 changed files with 11135 additions and 8114 deletions

View File

@@ -0,0 +1,51 @@
---
sidebar_position: 6
---
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
# Get log
Gets the execution log
`Function GetLog(Val AsString = False) Export`
| Parameter | CLI option | Type | Required | Description |
|-|-|-|-|-|
| AsString | - | Boolean | ✖ | Return the log as a string |
Returns: String, Array - Execution log
<br/>
:::caution
**NOCLI:** this method is not available in CLI version
:::
<br/>
```bsl title="1C:Enterprise/OneScript code example"
URL = "https://httpbin.org";
URL = URL + "/get";
ParametersStructure = New Structure("param1,param2", "text", 10);
HTTPClient = OPI_HTTPRequests
.NewRequest()
.Initialize(URL)
.SetURLParams(ParametersStructure)
.ProcessRequest("GET");
Response = HTTPClient.ReturnResponseAsJSONObject();
Log = HTTPClient.GetLog(True);
```

View File

@@ -0,0 +1,49 @@
---
sidebar_position: 1
---
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
# Initialize
Initializes a new empty request
`Function Initialize(Val URL = "") Export`
| Parameter | CLI option | Type | Required | Description |
|-|-|-|-|-|
| URL | - | String | &#x2716; | URL address for request |
Returns: DataProcessorObject.OPI_HTTPClient - This processor object
<br/>
:::tip
The function must be called first when creating a new processor object
:::
:::caution
**NOCLI:** this method is not available in CLI version
:::
<br/>
```bsl title="1C:Enterprise/OneScript code example"
URL = "https://httpbin.org";
URL = URL + "/get";
Result = OPI_HTTPRequests
.NewRequest()
.Initialize(URL) // <---
.ProcessRequest("GET")
.ReturnResponseAsJSONObject();
```

View File

@@ -0,0 +1,52 @@
---
sidebar_position: 5
---
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
# Set data type
Sets the Content-Type of the request
`Function SetDataType(Val Value) Export`
| Parameter | CLI option | Type | Required | Description |
|-|-|-|-|-|
| Value | - | String | &#x2714; | ContentType header value |
Returns: DataProcessorObject.OPI_HTTPClient - This processor object
<br/>
:::tip
If the data type is not set manually, it will be matched during the process of setting the request body
:::
:::caution
**NOCLI:** this method is not available in CLI version
:::
<br/>
```bsl title="1C:Enterprise/OneScript code example"
URL = "https://httpbin.org";
URL = URL + "/post";
MIMEType = "text/markdown";
Result = OPI_HTTPRequests.NewRequest()
.Initialize(URL)
.SetStringBody("# Hello world!")
.SetDataType(MIMEType) // <---
.ProcessRequest("POST")
.ReturnResponseAsJSONObject();
```

View File

@@ -0,0 +1,43 @@
---
sidebar_position: 4
---
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
# Set response file
Sets the file path to save the query result
`Function SetResponseFile(Val Value) Export`
| Parameter | CLI option | Type | Required | Description |
|-|-|-|-|-|
| Value | --filepath | String | &#x2714; | File path |
Returns: DataProcessorObject.OPI_HTTPClient - This processor object
<br/>
```bsl title="1C:Enterprise/OneScript code example"
URL = "https://httpbin.org";
URL = URL + "/get";
TFN = GetTempFileName();
Result = OPI_HTTPRequests.NewRequest()
.Initialize(URL)
.SetResponseFile(TFN) // <---
.ProcessRequest("GET")
.ReturnResponseFilename();
```

View File

@@ -0,0 +1,49 @@
---
sidebar_position: 3
---
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
# Set URL params
Sets a collection of URL parameters
`Function SetURLParams(Val Value) Export`
| Parameter | CLI option | Type | Required | Description |
|-|-|-|-|-|
| Value | - | Arbitrary | &#x2714; | Structure or map of URL parameters |
Returns: DataProcessorObject.OPI_HTTPClient - This processor object
<br/>
:::caution
**NOCLI:** this method is not available in CLI version
:::
<br/>
```bsl title="1C:Enterprise/OneScript code example"
URL = "https://httpbin.org";
URL = URL + "/get";
ParametersStructure = New Structure("param1,param2", "text", 10);
Result = OPI_HTTPRequests
.NewRequest()
.Initialize(URL)
.SetURLParams(ParametersStructure) // <---
.ProcessRequest("GET")
.ReturnResponseAsJSONObject();
```

View File

@@ -0,0 +1,46 @@
---
sidebar_position: 2
---
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
# Set URL
Sets the new request URL
`Function SetURL(Val URL) Export`
| Parameter | CLI option | Type | Required | Description |
|-|-|-|-|-|
| URL | - | String | &#x2714; | Request URL |
Returns: DataProcessorObject.OPI_HTTPClient - This processor object
<br/>
:::caution
**NOCLI:** this method is not available in CLI version
:::
<br/>
```bsl title="1C:Enterprise/OneScript code example"
URL = "https://httpbin.org";
URL = URL + "/get";
Result = OPI_HTTPRequests.NewRequest()
.Initialize()
.SetURL(URL) // <---
.ProcessRequest("GET")
.ReturnResponseAsJSONObject();
```

View File

@@ -0,0 +1,4 @@
{
"label": "Initialization",
"position": "2"
}