Visual Crossing Weather

FREEMIUM
By Visual Crossing Corporation | Updated месяц назад | Weather
Popularity

9.9 / 10

Latency

143ms

Service Level

100%

Health Check

N/A

Back to All Discussions

Hello

Rapid account: Vit Nif
VitNif
4 года назад

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)
        {

        }
    }
}

}

Join in the discussion - add comment below:

Login / Signup to post new comments