How to pass value to Header dynamically by taking that value from request payload with restAssured?

Viewed 15

Manual use case from Postman: When getting "guidId" from DB and sending in Postman payload, I also need to pass "subGuidId" in the header for the correct response, because each "guidId" is associated with "subGuidId" and we currently passing it in header rather than in body along with "guidId". When i query mongoDb and getting that "guidId" for my request payload i also need to pass the "subGuidId" in the header. So, the problem here is automating such a scenario with restAssured library. I have never encountered such case before. Any suggestions are appreciated!

Sorry for not providing more support for my question, like screenshots or code.

0 Answers
Related