Data integration: rest parameters in adaptive form




I'm about to build an adaptive forms application with the help of the new aem 6.3 feature "Data Integration". I use a swagger file which needs two parameters coming from the http header of the request. So i set up a servlet to read out the parameters and forward them to the form. Now my question:

What is the best way to get these parameters into my rule editor (where I want to make the ws call)?

1. Prefill hidden fields

- fill the 'data' attribute in my servlet like described in here: AEM 6.3 Forms Help | Prefill adaptive form fields

2. Get them with a sightly bean and set them in the form markup

- write a sightly use class to fetch the parameters from the request and set them into the markup

- access the variables from inside the rule editor

-> don´t know if jquery or such logic is possible i rule editor?

I feel a little uncomfortable with these solutions, because they look very complicated to me, so what is the best practice to get parameters into the webservice logic?

Any further suggestions?

Best regards