I’m working with a legacy proprietary REST API. The initial authentication token is returned in the body of one API call and I can retrieve it with no problem. For subsequent calls, an authentication token must be passed in a header variable.
Just to make things more interesting, on each call, the system may return a new token and/or a new header variable. For example:
Request 1 HeaderA : tokenZ Response 1 HeaderA : tokenY <br> Request 2 HeaderA : tokenY Response 2 HeaderB : tokenY <br> Request 3 HeaderB : tokenY Response 3 HeaderA : tokenX <br> Request 4 HeaderA : tokenX etc...
The header variable can be one of two possibilities, so identifying it is not difficult. However, I need some way to save the header variable and value from the response and set it on the next request. As far as I can tell there is no way to retrieve header variables in the model nor can I see a way to add a header variable to the data source before the request is made.
Anyone have any suggestions?