I have to send an request with an image to Microsoft Azure Custom Vision with the header "Prediciton-Key" -> myKey and the body should be an image (binary data).
First of all i tryed with postman and it works fine, but when i put it on Unity ,i get an error :401 Unauthorized.
Does anyone know why? (i put the api key as string)
WWWForm form = new WWWForm();
form.headers.Add("Prediction-Key", "xxxxxxxxxxxxxxxxxxxxxxxx");
form.AddBinaryData("fileUpload", texture.EncodeToPNG());
UnityWebRequest req = UnityWebRequest.Post(link,form);
yield return req.SendWebRequest();