Quantcast
Channel: Web API
Viewing all articles
Browse latest Browse all 4850

System.Net.WebException: The remote server returned an error: (404) Not Found.

$
0
0

Hi Al,
Can't get pass the httpResponse.

Any idea what I could be missing

//Configure URI
            WebRequest request = WebRequest.Create(@"https://xxxx.xxxx.com/v1/operators/" + queryParameter);
            //Add Content type
            request.ContentType = "application/json";
            //Add Api key authorization
            request.Headers.Add(HttpRequestHeader.Authorization, "Basic " + apiKey);
            //Set request method
            request.Method = "GET";
            //Perform the request
            var httpResponse = (HttpWebResponse)request.GetResponse();
        if (httpResponse.StatusCode.ToString().ToLower() == "ok")
        {
            Response.Write("Y");
        }

Thanks in advance


Viewing all articles
Browse latest Browse all 4850

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>