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
- Having issues with login via CLI
``` ~/appwrite appwrite login --endpoint https://localhost/v1 --verbose ? Enter your email myvalidemai...
- How to Avoid Double Requests in function...
I'm currently using Appwrite's `functions.createExecution` in my project. I want to avoid double requests when multiple actions (like searching or pagination) a...
- Send Email Verification With REST
I am using REST to create a user on the server side after receiving form data from the client. After the account is successfully created i wanted to send the v...