Closed MichaelXavier closed 2 years ago
Requests defined within Babel source blocks behave the same way as normal requests definitions - so you should be able to just define your headers on a top-level Org heading, and then have your Babel requests defined below:
* Main title
template
My-Header: xyz
My-Other-Header: abc
** Sub-request 1
#+BEGIN_SRC verb :wrap src ob-verb-response
GET https://example.com
x-endpoint-specific-header: blah
#+END_SRC
** Sub-request 2
#+BEGIN_SRC verb :wrap src ob-verb-response
GET https://example.com
x-endpoint-specific-header: blah
#+END_SRC
So there, My-Header: xyz
and My-Other-Header: abc
will be shared among the two sub requests.
That works great. Thanks!
Hi! I'm using verb from babel and I was wondering if there was any way to take a table, alist, or even just a formatted string with newlines and use it to specify multiple headers. I'm building a hierarchy of org headings where the toplevel one might define a few basic headers, then lower level ones set up multiple auth headers. Ideally, I'd like to avoid having to reiterate every header name explicitly in every block, e.g.:
Where base-headers might evaluate to
Is this possible to do?