You've already forked OpenIntegrations
mirror of
https://github.com/Bayselonarrend/OpenIntegrations.git
synced 2026-05-18 09:51:28 +02:00
73 lines
2.7 KiB
Plaintext
Vendored
73 lines
2.7 KiB
Plaintext
Vendored
---
|
|
sidebar_position: 9
|
|
sidebar_class_name: doc-no-cli
|
|
description: Get log and other functions to work with HTTP in the Open Integration Package, a free open-source integration library for 1C:Enterprise 8, OneScript and CLI
|
|
keywords: [1C, 1С, 1С:Enterprise, 1С:Enterprise 8.3, API, Integration, Services, Exchange, OneScript, CLI, HTTP]
|
|
---
|
|
|
|
import Tabs from '@theme/Tabs';
|
|
import TabItem from '@theme/TabItem';
|
|
import Admonition from '@theme/Admonition';
|
|
|
|
# Get log
|
|
Gets the execution log
|
|
|
|
|
|
|
|
<Tabs>
|
|
<TabItem value="params" label="Parameters" default>
|
|
|
|
`Function GetLog(Val AsString = False) Export`
|
|
|
|
| Parameter | CLI option | Type | Required | Description |
|
|
|-|-|-|-|-|
|
|
| AsString | - | Boolean | ✖ | Return the log as a string |
|
|
|
|
|
|
<div className="return-value-note">
|
|
<div className="return-value-note__title">Returns</div>
|
|
<div className="return-value-note__value">
|
|
String, Array - Execution log
|
|
</div>
|
|
</div>
|
|
|
|
</TabItem>
|
|
<TabItem value="extended" label={<span>Advanced call{' '}<a href="/docs/Start/Advanced-call" target="_blank" rel="noreferrer" title="About advanced call" onClick={(e) => e.stopPropagation()}>?</a></span>}>
|
|
|
|
*This method has no additional advanced call parameters.*
|
|
|
|
|
|
</TabItem>
|
|
</Tabs>
|
|
|
|
|
|
<Admonition type="caution" title="Caution" className="nocli-admonition">
|
|
<div className="addin">
|
|
<strong>NOCLI:</strong> this method is not available in CLI version
|
|
</div>
|
|
</Admonition>
|
|
|
|
|
|
```bsl title="1C:Enterprise/OneScript code example"
|
|
URL = "https://bin.openintegrations.dev";
|
|
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);
|
|
```
|
|
|
|
|
|
|
|
|
|
```json title="Result"
|
|
"Initialize: setting of default values\nSetDefaultSettings: configuration setting\nSetURL: setting the value\nSplitURL: splitting a request into component parts\nSplitURL: Secure = True\nSplitURL: Address = /get\nSplitURL: Domain = bin.openintegrations.dev\nSplitURL: Port = 443\nSplitURL: Host = https://bin.openintegrations.dev\nSetURLParams: parameter setting\nProcessRequest: creation of HTTPRequest object\nFormRequest: Adding parameters\nRequestParametersToString: Retrieve collection KeyValue\nRequestParametersToString: Adding parameters\nFormRequest: Creating a request object\nFormRequest: Creating a connection object\nProcessRequest: place the body in the HTTPRequest object\nCompleteHeaders: Content-Length setting\nCompleteHeaders: setting the gzip header\nExecuteMethod: sending request\nExecuteMethod: response received, code 200"
|
|
```
|