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

Fetch implementation #619

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Conversation

KaindlJulian
Copy link
Contributor

@KaindlJulian KaindlJulian commented Jul 20, 2022

Implementation of https://fetch.spec.whatwg.org/

@oracle-contributor-agreement oracle-contributor-agreement bot added the OCA Required At least one contributor does not have an approved Oracle Contributor Agreement. label Jul 20, 2022
@oracle-contributor-agreement
Copy link

Thank you for your pull request and welcome to our community! To contribute, please sign the Oracle Contributor Agreement (OCA).
The following contributors of this PR have not signed the OCA:

To sign the OCA, please create an Oracle account and sign the OCA in Oracle's Contributor Agreement Application.

When singing the OCA, please provide your GitHub username. After signing the OCA and getting an OCA approval from Oracle, this PR will be automatically updated.

@wirthi
Copy link
Member

wirthi commented Jul 20, 2022

You are missing to put the name "Response" into the global scope. Have a look at JSRealm.setupGlobals. This way, there are builtins for Response but JavaScript does not know what to do when you search for Response on the global object.

I am not sure this is the whole error, I would expect just a ReferenceError to emerge from that, but let's check.

@oracle-contributor-agreement oracle-contributor-agreement bot added OCA Verified All contributors have signed the Oracle Contributor Agreement. and removed OCA Required At least one contributor does not have an approved Oracle Contributor Agreement. labels Sep 13, 2022
@KaindlJulian KaindlJulian marked this pull request as ready for review September 13, 2022 13:57
@woess woess self-assigned this May 23, 2023
@tuzzmaniandevil
Copy link

This is a great feature.
Just some suggestions for security, in a SaaS or PaaS situation, Graal could be used to run JS code fron untrusted sources i.e. the SaaS clients.
To help with this it would be great to be able to intercept the following from Java:

  • Domain Name / IP / DNS - This is to requests to internal IP/Domains can be blocked or logged
  • Before a request is sent - So requests can be validated or modified, For example, Being able to securely add credential headers or block a requests if it's malicious
  • After a response has been received but before passed to JS - So responses can be tracked, cached or modified before being passed to JS

Some examples of useful events can be found here:
https://square.github.io/okhttp/4.x/okhttp/okhttp3/-event-listener/

This will allow platforms to better secure network access that comes from their platforms.

@woess woess self-requested a review June 28, 2023 16:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OCA Verified All contributors have signed the Oracle Contributor Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants