Skip to content
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

Enable setting headers and query parameters. Also add 'fake extensions' mechanism. #35

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

laundmo
Copy link

@laundmo laundmo commented Sep 26, 2024

This PR adds 3 features:

  • Headers
  • Query params
  • ability to use URLs which don't end in a file extension, by adding a "fake" extension with 2 dots: ..png which will be stripped for the actual request

nice to have: example showcasing this. not sure how to do that, as the whole idea of this is to allow authentication in the requests

supersedes:

…s' in case a URL doesn't have a file extension
@laundmo
Copy link
Author

laundmo commented Sep 26, 2024

Forgot to mention when i posted this (it was late and i was tired): I've tested this while using all the added features at the same time on both native linux and wasm in chromium.

I've also set the request mode for wasm to CORS, not sure what the default was before.

Another consideration is adding a option to set the "credentials" flag for wasm requests, which would allow passing auth headers, cookies, etc. from the tab to the request. I have no need for this and testing it is hard, so i've omitted that

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant