good afternoon, I'm a bit new in the API's Rest, I need to consume the following api: link , reading the documentation for what I understood is to perform POST methods, I do not know how to do it to consume it through GET, I use a console application in C #, my code is as follows:
// Get method
WebRequest req = WebRequest.Create(@"https://api.tookanapp.com");
req.Method = "GET";
HttpWebResponse resp = req.GetResponse() as HttpWebResponse;
if (resp.StatusCode == HttpStatusCode.OK)
{
using (Stream respStream = resp.GetResponseStream())
{
StreamReader reader = new StreamReader(respStream, Encoding.UTF8);
Console.WriteLine(reader.ReadToEnd());
}
}
else
{
Console.WriteLine(string.Format("Status Code: {0}, Status Description: {1}", resp.StatusCode, resp.StatusDescription));
}
Console.Read();
at the end of the day it sends me an error 404, I guess because it does not reach the server ....
Thank you very much for the help!