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.
This is an attempt to get @asBrettisay's PR that adds support for headers (#10) merged in. There were a few comments that were never addressed that are currently blocking #10 from merging.
Note that #13 made a number of changes to the way headers are handled by Svelte, which made this PR a little more complex than I initially anticipated. See 65b7c90 for the modifications to #10 that were required to make @asBrettisay's PR compatible with master.
Headers passed in during the request will override headers passed into configuration.
This PR transfers responsibility of request header merging from
RESTClient
toOperationBuilder
.I'm not entirely sold on one API choice made in the original PR, which is that headers are passed along to an operation in the same Hash as all other parameters. This opens up the potential for parameter name collisions, since AFAIK there is nothing in the swagger spec that prevents
headers
from sharing names withquery
,path
orform
params (https://swagger.io/docs/specification/2-0/describing-parameters/). Any suggestions or thoughts regarding this point?