You've already forked OpenIntegrations
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:
51
docs/en/md/HTTP-client/Initialization/Get-log.mdx
vendored
Normal file
51
docs/en/md/HTTP-client/Initialization/Get-log.mdx
vendored
Normal 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);
|
||||
```
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
49
docs/en/md/HTTP-client/Initialization/Initialize.mdx
vendored
Normal file
49
docs/en/md/HTTP-client/Initialization/Initialize.mdx
vendored
Normal 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 | ✖ | 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();
|
||||
```
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
52
docs/en/md/HTTP-client/Initialization/Set-data-type.mdx
vendored
Normal file
52
docs/en/md/HTTP-client/Initialization/Set-data-type.mdx
vendored
Normal 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 | ✔ | 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();
|
||||
```
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
43
docs/en/md/HTTP-client/Initialization/Set-response-file.mdx
vendored
Normal file
43
docs/en/md/HTTP-client/Initialization/Set-response-file.mdx
vendored
Normal 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 | ✔ | 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();
|
||||
```
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
49
docs/en/md/HTTP-client/Initialization/Set-url-params.mdx
vendored
Normal file
49
docs/en/md/HTTP-client/Initialization/Set-url-params.mdx
vendored
Normal 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 | ✔ | 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();
|
||||
```
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
46
docs/en/md/HTTP-client/Initialization/Set-url.mdx
vendored
Normal file
46
docs/en/md/HTTP-client/Initialization/Set-url.mdx
vendored
Normal 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 | ✔ | 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();
|
||||
```
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
4
docs/en/md/HTTP-client/Initialization/_category_.json
vendored
Normal file
4
docs/en/md/HTTP-client/Initialization/_category_.json
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"label": "Initialization",
|
||||
"position": "2"
|
||||
}
|
||||
Reference in New Issue
Block a user