Vision API - 502 Bad Gateway [英] Vision API - 502 Bad Gateway

查看:174
本文介绍了Vision API - 502 Bad Gateway的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经在我的应用中使用了Vision API几天但是今天我每次尝试发帖都从服务器得到这个回复请求:  https://api.projectoxford.ai/vision/v1/analyses

I've been using Vision API in my app for a couple of days but today I got this response from the server everytime I try to make a post request to: https://api.projectoxford.ai/vision/v1/analyses

回复:(502)Bad Gateway 

the response: (502) Bad Gateway 

这里我的帖子请求代码:

Here my post request code:

var queryString = HttpUtility.ParseQueryString(string.Empty);
                        queryString["visualFeatures"] = "Categories,Adult,Faces";
                        queryString["subscription-key"] = "<MY_SUBSCRIPTION_KEY>";
                        var uri = new Uri("https://api.projectoxford.ai/vision/v1/analyses?" + queryString);
                        request = (HttpWebRequest)WebRequest.Create(uri);
                        request.Method = "POST";
                        request.ContentType = "application/octet-stream";
                        request.ContentLength = img.Length;
                        var responseString = "";
                        using (var stream = request.GetRequestStream())
                        {
                            stream.Write(img, 0, img.Length);
                        }
                        var response = (HttpWebResponse)request.GetResponse();
                        responseString = new StreamReader(response.GetResponseStream()).ReadToEnd();

推荐答案

Abdelrhman。

Hi,Abdelrhman.

  &NBSP; &NBSP;你还有同样的问题吗?  这可能是由网络问题引起的吗?


这篇关于Vision API - 502 Bad Gateway的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆