@#DENVERSON TAN JING WEI# Does your prediction endpoint respond when you try to classify directly from the custom vision portal?
I am not really an expert at using react native but the implementation mentioned here seems to work according to the author. Could you try something similar with your implementation if the prediction API works directly from the portal?
async sendToMicrosoftPrediction(img_url) {
let response = await fetch(PREDICTION_URL, {
method: "POST",
headers: {
"Prediction-Key": PREDICTION_KEY,
"Content-Type": "application/json"
},
body: JSON.stringify({
Url: img_url
})
});
let bodyText = JSON.parse(response["_bodyText"]);
let predictions = bodyText["predictions"];
this.setNewPrediction(predictions);
}