I have a problem, via postman it works, but from c# code doesn’t, could you help me ?
using RestSharp;
using System.Net;
namespace Historical_sandbox
{
class Program
{
static void Main(string[] args)
{
var client = new RestClient("https://visual-crossing-weather.p.rapidapi.com/history?dayStartTime=00:00:00&contentType=json&dayEndTime=00:00:00&shortColumnNames=true&startDateTime=2019-01-01T00:00:00&aggregateHours=24&location=Washington%252CDC%252CUSA&endDateTime=2019-01-03T00:00:00&unitGroup=metric");
var request = new RestRequest(Method.GET);
request.AddHeader("x-rapidapi-host", "visual-crossing-weather.p.rapidapi.com");
request.AddHeader("x-rapidapi-key", "*********************************************");
IRestResponse response = client.Execute(request);
if (response.StatusCode==HttpStatusCode.OK)
{
}
}
}
}
Junte-se à discussão - adicione o comentário abaixo: