Eai galera, estou com dificuldade em entender o porque está dando gateway timeout em um request, pois sendo que testei por cURL e foi normal, estou utilizando Basic Auth. Segue:
var authorization = "apikey:";
HttpWebRequest wbRequest = (HttpWebRequest)WebRequest.Create("https://api.konduto.com/v1/orders/0");
ServicePointManager.ServerCertificateValidationCallback += delegate { return true; };
wbRequest.Headers["Authorization"] = string.Format("Basic {0}", authorization);
wbRequest.Method = "GET";
var response = (HttpWebResponse)wbRequest.GetResponse();
var stringFinally = "";
using (var reader = new StreamReader(response.GetResponseStream()))
{
stringFinally = reader.ReadToEnd();
}
Ao dar getResponse ele me volta :
The remote server returned an error: (504) Gateway Timeout.
Gostaria de saber se alguém já passou por isso e como eu poderia resolver, pois via cURL o GET funciona normal.
wbRequest.Timeout = timeout;
deve funcionar.