-
Notifications
You must be signed in to change notification settings - Fork 366
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
feat: allow fetch
to be initialized with user-provided client
#656
feat: allow fetch
to be initialized with user-provided client
#656
Conversation
39e6fef
to
50d4b6a
Compare
We really need to work on a better settings system for modules. |
I would prefer not having to deal with the static, it's very spooky-action-at-a-distance when the static can change underneath, which would necessitate the As well for our use-case, we'd like to re-use the existing hyper client in the rest of our program as it's properly set up for FIPS use-cases when running under FIPS mode. Having the static there makes the boot-up process a bit of a dance to ensure quickjs is using the right hyper client. Eventually we'd be looking at plugging in different
Leaving |
@RonnyChan-okta Thanks for your PR. Me and @Sytten have been discussing a better settings system for module for a while now. We need to be able to provide modules that have user defined settings when building the module. The entire global/init/module builder is kind of wonky right now. The latest changes in rquickjs allows for custom user data which I think would be great for this. I'll merge this now and we can think about better options later. |
50d4b6a
to
86e40e0
Compare
@richarddavison Looks like formatting didn't make it in for some reason. Should be fixed now. |
cf8c22a
to
3eb6d8a
Compare
Now it's just clippy complainng about complex type. Run |
3eb6d8a
to
9d0442c
Compare
Refactored the type as of 9d0442c |
9d0442c
to
b201fa0
Compare
Apologies for the back-and-forth. The Makefile does not seem to be working on my machine so I just used I ran |
No worries, almost there! I think the last issue now is to run cargo build with |
Should be fixed in Not to derail this thread but I'm getting this error on my local machine when building
|
1ec0582
to
cdc511c
Compare
This is because you haven't built the javascript library yet. We should really give a better error for this! |
Cool, ran |
Description of changes
Allow consumers to supply their own
hyper
client when intializingfetch
.Combined with #655 this will allow people to add
fetch
with their own configured hyper clients. This is particularly important for FIPS compliance.Checklist
tests/unit
and/or in Rust for my feature if neededmake fix
to format JS and apply Clippy auto fixesmake check
types/
directoryBy submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.