zweifisch / ob-http

make http request within org-mode babel
GNU General Public License v3.0
256 stars 30 forks source link

Export does not substitute variables #25

Closed nodo closed 6 years ago

nodo commented 7 years ago

Hello,

I have an issue when exporting a org document using ob-http. I am using variables at the beginning of the file to store common information about the requests. However, when exporting, these variables are not substituted.

For instance, given the following document:

:PROPERTIES:
:var: url="https://api.github.com/repos/zweifisch/ob-http/languages"
:END:

A simple request:
#+BEGIN_SRC http :pretty
GET ${url}
#+END_SRC

#+RESULTS:
: {
:   "Emacs Lisp": 13933,
:   "Shell": 139
: }

When exporting to ASCII produces something like:

A simple request:
,----
| GET ${url}
`----

Instead, I would expect something like:

A simple request:
,----
| GET https://api.github.com/repos/zweifisch/ob-http/languages
`----

Please, can you help me with that? If needed, I would be happy to help implementing this.

Thanks!

zweifisch commented 7 years ago

@nodo Pull requests are welcome :laughing:

nodo commented 6 years ago

Looks like this is fixed 🎉 , should we close the issue? @zweifisch