this is my FasiAPI route :
@app.post("/files/")
async def create_file(file: UploadFile = Form(...)):
#some ml code
return {'detected_face': base64_return, 'feature_vector': str(embedded)}
My webapp backend is running on NodeJs + ExpressJS. I have the file store in './uploads/filename.jpeg'
FastAPI is running on : localhost:8000
Web backend server running on : localhost:3000
Thanks in advance!
You can send request directly through url: localhost:8000/ by using request module.
request('http://localhost:8000/files/<parameter>', function (error, response, body) {
if (!error && response.statusCode == 200) {
console.log(body)
}
})