yeah it works
I will review cors (maybe that is the error)
And you said you tried using the LAN IP of your machine?
And are you disabling the SSL verification?
yeah I tried to use the lan ip also
no i didn't i will review in axios docs
Did you test localhost using axios?
yeah, but localhost points to the container itself
And it was https without any extra SSL bypass?
yeah
That's kind of surprising....
What OS do you have?
now the error says "self-signed certificate"
windows 11 and WSL ubuntu 20.04
Try to set up ignore SSL verification
So that API you have...is that running in a docker container?
No, the api is running in windows, and I'm trying to call it from an appwrite function (container)
sorry i didn't explain it well
It is working now, I disabled SSL verification from axios using: httpsAgent: new https.Agent({ rejectUnauthorized: false, }),
But It only works with the LAN ip
It doesnt work with the bridge 172.17.0.1
Yes that makes sense because WSL is like a virtual machine inside windows
That bridge would be a bridge to WSL, not windows
Yes, I tried to call the endpoint with curl from WSL, it only works with lan ip not localhost
[SOLVED] call api from a function
Thank you so much @Steven
Recommended threads
- Function's Static IP
Is it possible to have static. IP Address instead of Dynamic IP for getting the IP Address whitelist
- How to use dart workspaces to deploy a f...
Hello, I'm developing a Flutter application and I would like to leverage dart pub workspaces to deploy a function with a dart runtime as advertised here : http...
- Migration from Cloud to Self-Hosted not ...
Hello Appwrite Community, I've got the problem, that when I try to migrate my Appwrite Project from the cloud to my self-hosted Appwrite, that an API Key is mi...