Files
pierpaolo.mammi 6c7ebcd3a5 elixForms API v2
- reorg Proposta CCT requests
- update requests from Production of Proposta CCT
- update templates EFTL code
2026-08-25 15:19:31 +02:00

56 lines
1.6 KiB
YAML

info:
name: Mostra ritenute
type: http
seq: 2
http:
method: POST
url: "{{elixFormsApiUrl}}/eftl/process/v1"
headers:
- name: x-requested-with
value: XMLHttpRequest
- name: x-api-key
value: "{{elixFormsWsAuthenticationToken}}"
- name: x-ef-request-id
value: "8463"
body:
type: json
data: |-
{
"userDocument": "{{elixBase64EftlDocument}}", // see the pre-request script
"userContext": {
"lang": "IT"
}
}
auth: inherit
runtime:
scripts:
- type: before-request
code: |-
const { prepareEftlDocument } = require("./elixFormsJs.js")
// Copy-pasta your EFTL document below inside the template literals (`)
prepareEftlDocument(String.raw`
[EFTL][HEADER name="trimDocument" value="true" type="boolean" /]
[VAR name="tipologiaCodice" type="string"][TAG]GETVALUEBYTAG,TIPOLOGIA_CODICE,REQUEST,IUQOID[/TAG][/VAR]
[VAR name="showEconomico" type="string"][% showEconomico = "S"; %][/VAR]
[VAR name="tipologieNonEconomico" type="iterable"][SPLIT regex=";"][TAG]GETVALUEBYTAG,TIPOLOGIE_NON_ECONOMICO,REQUEST,IUQOID[/TAG][/SPLIT][/VAR]
[IF]
[CONDITION]
[CONTAINS varname="tipologieNonEconomico"][VALUE_OF varname="tipologiaCodice" /][/CONTAINS]
[/CONDITION]
[THEN][% showEconomico = "N"; %][/THEN]
[/IF]
[%= showEconomico %]
[/EFTL]
`);
settings:
encodeUrl: true
timeout: 0
followRedirects: true
maxRedirects: 5
forwardAuthorizationHeader: true