-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support custom import headers #134
Comments
There was discussion indeed dhall-lang/dhall-lang#543, but I was overly optimistic: headers are probably not going away. |
@Nadrieril This is what my .dhall file looks like, and what's specifically erroring out is the using(...headers) portion
I was using the code below, and thought I was crazy at why
If you don't see this being addressed anytime soon, are there any potential workarounds or recommendations you might make to hack around it in the meantime? |
Well, the main issue is that I'm not really working on dhall-rust anymore. @basile-henry or @kryptn might you be motivated? serde_dhall::from_file(filename)
.add_header("api.github.com", "Accept", "application/octet-stream")
.parse(); or take a hashmap or whatever. I'm afraid the only workaround doable now would be to fork serde_dhall locally and hardcode the headers. If you want to try, the HTTP request is done there:
You'll need to tweak the reqwest request to make it send the right headers. |
I actually think I had a look at supporting 21.0 a few weeks ago, and I might come back to it at some point. But I have no timeline for it as I am pretty busy these days 😅 |
For reference I'm pretty new to both Dhall and Rust, so I appreciate both of your quick responses in helping to unblock me and find a solution. @Nadrieril Thanks for the immediate unblocking suggestion, I'll look into that. @basile-henry |
Ohh cool I didn't follow that |
There has been discussion of removing this feature from the language, so I'm not in a hurry to implement it.
The text was updated successfully, but these errors were encountered: