mirror of
https://github.com/Bayselonarrend/OpenIntegrations.git
synced 2024-12-04 10:34:52 +02:00
Преобразование OPI -> OInt (workflow)
This commit is contained in:
parent
9e11f870f1
commit
4a0c475fa9
@ -821,7 +821,7 @@ Function GetRequestHeaders(Val Token, Val Parameters = "")
|
||||
If ValueIsFilled(Parameters) Then
|
||||
|
||||
JSON = OPI_Tools.JSONString(Parameters, "None");
|
||||
JSON = StrReplace(JSON, Chars.CR + Chars.PS, "");
|
||||
JSON = StrReplace(JSON, Chars.CR + Chars.LF, "");
|
||||
|
||||
Headers.Insert("Dropbox-API-Arg", JSON);
|
||||
|
||||
|
@ -205,7 +205,7 @@ Function ProcessTMAData(Val DataString, Val Token) Export
|
||||
For Each DataString In TValue Do
|
||||
|
||||
If DataString.Key <> "hash" Then
|
||||
DCS = DCS + DataString.Key + "=" + DataString.Value + Chars.PS;
|
||||
DCS = DCS + DataString.Key + "=" + DataString.Value + Chars.LF;
|
||||
ReturnMapping.Insert(DataString.Key, DataString.Value);
|
||||
Else
|
||||
Hash = DataString.Value;
|
||||
|
@ -363,11 +363,11 @@ Procedure WriteLog(Val Result, Val Method, Val Library = "") Export
|
||||
Data = " " + Data;
|
||||
|
||||
Message(Header);
|
||||
Message(Chars.PS);
|
||||
Message(Chars.LF);
|
||||
Message(Data);
|
||||
Message(Chars.PS);
|
||||
Message(Chars.LF);
|
||||
Message("---------------------------------");
|
||||
Message(Chars.PS);
|
||||
Message(Chars.LF);
|
||||
|
||||
If ValueIsFilled(Library) Then
|
||||
WriteLogFile(Data, Method, Library);
|
||||
|
@ -666,7 +666,7 @@ Function ExecuteMultipartRequest(Val URL
|
||||
Redirection = 300;
|
||||
Error = 400;
|
||||
Boundary = StrReplace(String(New UUID), "-", "");
|
||||
LineSeparator = Chars.CR + Chars.PS;
|
||||
LineSeparator = Chars.CR + Chars.LF;
|
||||
DataType = "multipart/form-data; boundary=" + Boundary;
|
||||
URLStructure = SplitURL(URL);
|
||||
Server = URLStructure["Server"];
|
||||
@ -730,7 +730,7 @@ Function ExecuteMultipartRelatedRequest(Val URL
|
||||
Redirection = 300;
|
||||
Error = 400;
|
||||
Boundary = StrReplace(String(New UUID), "-", "");
|
||||
LineSeparator = Chars.CR + Chars.PS;
|
||||
LineSeparator = Chars.CR + Chars.LF;
|
||||
DataType = "multipart/related; boundary=" + Boundary;
|
||||
URLStructure = SplitURL(URL);
|
||||
Server = URLStructure["Server"];
|
||||
@ -839,7 +839,7 @@ EndProcedure
|
||||
|
||||
Procedure WriteMultipartParameters(TextRecord, Val Boundary, Val Parameters)
|
||||
|
||||
LineSeparator = Chars.CR + Chars.PS;
|
||||
LineSeparator = Chars.CR + Chars.LF;
|
||||
|
||||
For Each Parameter In Parameters Do
|
||||
|
||||
@ -878,7 +878,7 @@ EndProcedure
|
||||
Procedure WriteMultipartFiles(TextRecord, Val Boundary, Val ContentType, Val Files)
|
||||
|
||||
ContentType = TrimAll(ContentType);
|
||||
LineSeparator = Chars.CR + Chars.PS;
|
||||
LineSeparator = Chars.CR + Chars.LF;
|
||||
DotReplacement = "___";
|
||||
|
||||
For Each File In Files Do
|
||||
@ -921,7 +921,7 @@ Procedure WriteRelatedFiles(TextRecord, Val Boundary, Val Files)
|
||||
Return;
|
||||
EndIf;
|
||||
|
||||
LineSeparator = Chars.CR + Chars.PS;
|
||||
LineSeparator = Chars.CR + Chars.LF;
|
||||
|
||||
If TypeOf(Files) = Type("Map") Then
|
||||
For Each File In Files Do
|
||||
@ -976,7 +976,7 @@ Procedure WriteJSONMultipart(TextRecord, Val Boundary, Val JSON)
|
||||
Return;
|
||||
EndIf;
|
||||
|
||||
LineSeparator = Chars.CR + Chars.PS;
|
||||
LineSeparator = Chars.CR + Chars.LF;
|
||||
|
||||
TextRecord.WriteLine("--" + boundary + LineSeparator);
|
||||
TextRecord.WriteLine("Content-Type: application/json; charset=UTF-8");
|
||||
|
@ -821,7 +821,7 @@ Function GetRequestHeaders(Val Token, Val Parameters = "")
|
||||
If ValueIsFilled(Parameters) Then
|
||||
|
||||
JSON = OPI_Tools.JSONString(Parameters, "None");
|
||||
JSON = StrReplace(JSON, Chars.CR + Chars.PS, "");
|
||||
JSON = StrReplace(JSON, Chars.CR + Chars.LF, "");
|
||||
|
||||
Headers.Insert("Dropbox-API-Arg", JSON);
|
||||
|
||||
|
@ -205,7 +205,7 @@ Function ProcessTMAData(Val DataString, Val Token) Export
|
||||
For Each DataString In TValue Do
|
||||
|
||||
If DataString.Key <> "hash" Then
|
||||
DCS = DCS + DataString.Key + "=" + DataString.Value + Chars.PS;
|
||||
DCS = DCS + DataString.Key + "=" + DataString.Value + Chars.LF;
|
||||
ReturnMapping.Insert(DataString.Key, DataString.Value);
|
||||
Else
|
||||
Hash = DataString.Value;
|
||||
|
@ -363,11 +363,11 @@ Procedure WriteLog(Val Result, Val Method, Val Library = "") Export
|
||||
Data = " " + Data;
|
||||
|
||||
Message(Header);
|
||||
Message(Chars.PS);
|
||||
Message(Chars.LF);
|
||||
Message(Data);
|
||||
Message(Chars.PS);
|
||||
Message(Chars.LF);
|
||||
Message("---------------------------------");
|
||||
Message(Chars.PS);
|
||||
Message(Chars.LF);
|
||||
|
||||
If ValueIsFilled(Library) Then
|
||||
WriteLogFile(Data, Method, Library);
|
||||
|
@ -666,7 +666,7 @@ Function ExecuteMultipartRequest(Val URL
|
||||
Redirection = 300;
|
||||
Error = 400;
|
||||
Boundary = StrReplace(String(New UUID), "-", "");
|
||||
LineSeparator = Chars.CR + Chars.PS;
|
||||
LineSeparator = Chars.CR + Chars.LF;
|
||||
DataType = "multipart/form-data; boundary=" + Boundary;
|
||||
URLStructure = SplitURL(URL);
|
||||
Server = URLStructure["Server"];
|
||||
@ -730,7 +730,7 @@ Function ExecuteMultipartRelatedRequest(Val URL
|
||||
Redirection = 300;
|
||||
Error = 400;
|
||||
Boundary = StrReplace(String(New UUID), "-", "");
|
||||
LineSeparator = Chars.CR + Chars.PS;
|
||||
LineSeparator = Chars.CR + Chars.LF;
|
||||
DataType = "multipart/related; boundary=" + Boundary;
|
||||
URLStructure = SplitURL(URL);
|
||||
Server = URLStructure["Server"];
|
||||
@ -839,7 +839,7 @@ EndProcedure
|
||||
|
||||
Procedure WriteMultipartParameters(TextRecord, Val Boundary, Val Parameters)
|
||||
|
||||
LineSeparator = Chars.CR + Chars.PS;
|
||||
LineSeparator = Chars.CR + Chars.LF;
|
||||
|
||||
For Each Parameter In Parameters Do
|
||||
|
||||
@ -878,7 +878,7 @@ EndProcedure
|
||||
Procedure WriteMultipartFiles(TextRecord, Val Boundary, Val ContentType, Val Files)
|
||||
|
||||
ContentType = TrimAll(ContentType);
|
||||
LineSeparator = Chars.CR + Chars.PS;
|
||||
LineSeparator = Chars.CR + Chars.LF;
|
||||
DotReplacement = "___";
|
||||
|
||||
For Each File In Files Do
|
||||
@ -921,7 +921,7 @@ Procedure WriteRelatedFiles(TextRecord, Val Boundary, Val Files)
|
||||
Return;
|
||||
EndIf;
|
||||
|
||||
LineSeparator = Chars.CR + Chars.PS;
|
||||
LineSeparator = Chars.CR + Chars.LF;
|
||||
|
||||
If TypeOf(Files) = Type("Map") Then
|
||||
For Each File In Files Do
|
||||
@ -976,7 +976,7 @@ Procedure WriteJSONMultipart(TextRecord, Val Boundary, Val JSON)
|
||||
Return;
|
||||
EndIf;
|
||||
|
||||
LineSeparator = Chars.CR + Chars.PS;
|
||||
LineSeparator = Chars.CR + Chars.LF;
|
||||
|
||||
TextRecord.WriteLine("--" + boundary + LineSeparator);
|
||||
TextRecord.WriteLine("Content-Type: application/json; charset=UTF-8");
|
||||
|
Loading…
Reference in New Issue
Block a user