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

Allow fetch unstable APIs in Deno to query a TLS certificate-protected server #208

Closed
tgdn opened this issue Sep 30, 2023 · 11 comments · Fixed by #515
Closed

Allow fetch unstable APIs in Deno to query a TLS certificate-protected server #208

tgdn opened this issue Sep 30, 2023 · 11 comments · Fixed by #515
Labels
Milestone

Comments

@tgdn
Copy link

tgdn commented Sep 30, 2023

Is your feature request related to a problem? Please describe.
I'd like to use the fetch unstable API from Deno in order to use a client certificate to make requests to a secured server.

Describe the solution you'd like
Allow basic unstable APIs from Deno. Right now Deno on supabase is very limited, it's impossible to use for even simple use cases such as this one.

Describe alternatives you've considered
Either there is a solution or I'll have to use something other than supabase.

I've tried using Deno.createHttpClient, but it's undefined once deployed on supabase.

Thanks!

@vincaslt
Copy link

vincaslt commented Nov 8, 2023

It's important to me as well. I need to be able to create proxies via Deno.createHttpClient(). I've registered an issue on edge-runtime repository: #205

@sweatybridge sweatybridge transferred this issue from supabase/cli Nov 9, 2023
@sweatybridge
Copy link

sweatybridge commented Nov 9, 2023

Transferring to edge runtime repo because it likely requires changes to the container.

@predragcvetkovski
Copy link

Hey @sweatybridge can we get an update on the resolution of this issue? If resolved, can we get some documentation on how to make it work? Without this feature, we must switch to AWS Lambda and use NodeJS.

@wouterpeere
Copy link

Any news related to this issue? I ran into it today ...

@smndtrl
Copy link

smndtrl commented Mar 14, 2025

Hej @nyannyacha, while continuing to try out develop I came across this case. Is this something that can be addressed now that it is standard and stable in deno?

@nyannyacha
Copy link
Contributor

@smndtrl Yeah, API has been stabilized in Deno 2.x.

develop branch tracks Deno 2.1.4, so the API should be available.
This issue will be closed when develop is merged into main.

@smndtrl
Copy link

smndtrl commented Mar 15, 2025

Thanks for clarifying @nyannyacha. The API isn't currently in develop. It is part of ext/fetch (https://github.com/denoland/deno/blob/v2.1.4/ext/fetch/22_http_client.js) of deno and edge runtime only has a small selection of upstream ext/.
Is this sth your still planning to include before develop gets merged?

@nyannyacha
Copy link
Contributor

For deno_fetch, it doesn't exist in the ext because there is nothing to modify separately for the edge runtime, it is being pulled as a direct dependency (see Cargo.toml in the root).

Did it not work in the develop branch? I'll check it out soon, this is a stabilized API so we should support it too.

@smndtrl
Copy link

smndtrl commented Mar 16, 2025

@nyannyacha I get [Error] TypeError: Deno.createHttpClient is not a function insupabase-edge-runtime-1.68.0-develop.8.

Code is very simple

    const httpOptions: Deno.CreateHttpClientOptions  = {

    }

    const tlsOptions: Deno.TlsCertifiedKeyPem  = {
      key: "...",
      cert: "..."
    }

    const client = Deno.createHttpClient({...httpOptions, ...tlsOptions})

@nyannyacha
Copy link
Contributor

Hello @smndtrl 😁

This appears to be simply not exposing that API from the edge runtime. A patch will be submitted soon.
Thanks for letting me know!

Copy link

🎉 This issue has been resolved in version 1.68.0-develop.9 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

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

Successfully merging a pull request may close this issue.

7 participants