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
- The console isnt showing documents
In console ui saved documents are being shown on frontend but i can see its showing 4 or number of docs available but in rows its only showing single doc and th...
- Create a project via REST API or SDK, mi...
I am currently self-hosting Appwrite in my local machine, deployed using docker script in the website. I also installed `appwrite-cli` through npm. I am trying...
- 1.8.1 - Databases - inline updating a ro...
When updating a database field via the inline edit method, the `$updatedAt` column does not get updated. Only if the row is updated by the "Update" interface (t...