This is an example of a proxy to keep the API authentication token safe. Instead of hardcoding the authentication token client side (on the HTML page), the token is kept server side. All requests from your App to the EValue API, instead go via your proxy. The proxy will add the authentication token to the header, and then send the request to the EValue API server.
This code snippet takes 2 arguments, methodData and methodOptions. methodData contains the data sent so the API, methodOptions contains the URL of the specific API to call and the method type (GET or POST). Here is an example of the URL to this proxy for the State Benefit Age API call: /?methodData={"dateOfBirth":"1980-05-11","gender":"FEMALE"}&methodOptions={"pathname":"/state-benefit/1.0.0/stateBenefitAge/age", "method": "POST"}