Auto Populate a header?


Is there a way to auto populate a header in the “Try it” section with a result from a different call? i.e. I call a one function, and it returns data I need in the header of a different call, can I have it populate that automatically or am I stuck with copy-paste?


Postman is your friend with something like this. I think the try it now is more of a one off you fill in the requisites and fire off the request. One of my biggest issues with all these Try it now features is that you have to know what data to fill in, and if the request requires data, headers, etc from different previous requests (e.g. a chain of requests), you have to know which requests to call to get that data. Hence, I think a lot is lacking in the Try it now feature.

The great news is, RAML 1.0, with its annotation capabilities, can provide a solution to this. I have some ideas on this myself, but time is always our enemy when it comes to churning out lots of different projects at the same time! One day I would like to realize my thought on how an improved Try it now might work, but I can say it would work just like Postman collections with response parsing and environment variables (if you are aware of how all that works).