I would like to implement a C# app. for sending a cURL commend(following) through http. I need to take your valuable ideas that can use "-v" commend or other way to implement the following cURL commend.

curl "https://naveropenapi.apigw.ntruss.com/map-direction/v1/driving?start=127.1058342,37.359708&goal=129.075986,35.179470&option=trafast"\ -H "X-NCP-APIGW-API-KEY-ID: ID" \ -H "X-NCP-APIGW-API-KEY: Secret" -v

I implemented following codes but it is not working well because of "-v". I already tried to use https://curl.olsh.me/, but the website did not provide conversion of "-v".

    static void Main(string[] args)
    {
        MainAsync().Wait();                       
    }

    static async Task MainAsync()
    {
        using (var httpClient = new HttpClient())
        {
            using (var request = new HttpRequestMessage(new HttpMethod("GET"), "https://naveropenapi.apigw.ntruss.com/map-direction/v1/driving?start=127.1058342,37.359708&goal=129.075986,35.179470&option=trafast"))
            {
                request.Headers.TryAddWithoutValidation("X-NCP-APIGW-API-KEY-ID", "ID");
                request.Headers.TryAddWithoutValidation("X-NCP-APIGW-API-KEY", "Secret");

                var response = await httpClient.SendAsync(request);
                JObject JSON = (JObject)JToken.FromObject(response);                    
            }
        }
    }

0 Answers