Add support for custom headers in input processing #1561
+112
−40
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Previously, we didn't pass (auth) headers to the initial set of inputs -- only to the links which were discovered in the initial input set. That's inconsistent and led to some confusion.
This PR fixes that. There is probably a nicer design for input parsing; the constructor has quite a few "dummy" params now, which tend to be set to the same values. I guess we can refactor that to, say, introduce the notion of an
InputBuilder
if it becomes to tedious to set these values. I guess we should decouple input parsing for the different input types in general because header handling is only needed for web requests and not for file inputs.For now, I just introduced a helper method
Input::from_value
.This fixes #1441.