Great, it helped me partially. I've added the setting in /opt/SecureSpan/Gateway/node/default/etc/conf/system.properties: com.l7tech.common.mime.allowLaxInitialBareCrOrLf=true and
set the cluster wide property contentType.otherTextualTypes = application/http.
Now I have in request.mainpart the first part of the request as a string (before it was null).
My request looks like:
Request URL: http://url/Z_AUFTRAGSUEBERSICHT_SRV/$batch?sap-client=100
Request Method: POST
Referrer Policy: no-referrer-when-downgrade
Accept: multipart/mixed
Accept-Encoding: gzip, deflate
Accept-Language: en-US
Connection: keep-alive
Content-Length: 733
Content-Type: multipart/mixed;boundary=batch_e6bf-ce6f-0802
Cookie: MYSAPSSO2=AjQxMD.....
DataServiceVersion: 2.0
MaxDataServiceVersion: 2.0
sap-cancel-on-close: true
sap-contextid-accept: header
sap-client: 100
--batch_e6bf-ce6f-0802
Content-Type: application/http
Content-Transfer-Encoding: binary
GET UEBERSICHTSet/$count?sap-client=100&$filter=Kunnr%20eq%20%270000014036%27 HTTP/1.1
sap-contextid-accept: header
Accept: text/plain, */*;q=0.5
Accept-Language: en-US
DataServiceVersion: 2.0
MaxDataServiceVersion: 2.0
sap-cancel-on-close: true
--batch_e6bf-ce6f-0802
Content-Type: application/http
Content-Transfer-Encoding: binary
GET UEBERSICHTSet?sap-client=100&$skip=0&$top=100&$filter=Kunnr%20eq%20%270000014036%27 HTTP/1.1
sap-contextid-accept: header
Accept: application/json
Accept-Language: en-US
DataServiceVersion: 2.0
MaxDataServiceVersion: 2.0
sap-cancel-on-close: true
--batch_e6bf-ce6f-0802--
And here is the the first part of the request as a string in the main part, which is shown in the GW:
request.mainpart = {String} "GET UEBERSICHTSet/$count?sap-client=100&$filter=Kunnr%20eq%20%270000014036%27 HTTP/1.1
sap-contextid-accept: header
Accept: text/plain, */*;q=0.5
Accept-Language: en-US
DataServiceVersion: 2.0
MaxDataServiceVersion: 2.0
sap-cancel-on-close: true
"
My question is how can I get the second part of the request? Means how can I access the "GET UEBERSICHTSet?sap-client=100&$skip=0&$top=100&$filter=Kunnr%20eq%20%270000014036%27 HTTP/1.1" ?
Another question is if it is this way only to access the single parts in the multipart requests? I need to select each element like "Accept: text/plain' and "GET UEBERSICHTSet?sap-client=100..." in every part and now I have to parse it from the string. That's why I thought maybe there is a way to get it into an object. It would facilitate the accessing of each element in every part.
best regards,
Oleks