-
Notifications
You must be signed in to change notification settings - Fork 25
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
HTTP Networking Module #14
Comments
How do importing other files currently work in spiderfire? I propose a syntax like let request = http.get("https://my.dopeapi.dev/get", {"headers": {"Authorization": "my_token"}});
console.log(request.response); and we could also implement an HTTP handler for more efficient handling of multiple http requests let handler = http.newHandler();
handler.get(...);
handler.delete(...); I'd also recommend the ureq crate -- https://lib.rs/ureq |
Importing is currently along the lines of import fs from "fs";
import {get} from "./http.js"; Both of those methods (directly sending a request) and creating a request handler/agent to request without passing the options every time are planned. I was planning to use |
Looking forward for this to early try for Nitro (nitrojs/nitro#1781) and Nuxt! |
Once web streams land in spiderfire, I'd be interested in seeing fetch implemented. |
To be precise, there's already a basic implementation of |
Issue
Spiderfire currently lacks a networking module, making it impossible to use this as a serverside runtime, and serve webpages for example. It is also unable to fetch data from web APIs. Implementing a networking module will be essential for spiderfire's usage.
Possible Solution
hyper or reqwest can be used to provide HTTP networking APIs in a module.
The text was updated successfully, but these errors were encountered: