Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

mydata api .net

using System;
using System.Net.Http.Headers;
using System.Text;
using System.Net.Http;
using System.Web;

namespace CSHttpClientSample
{//
    static class Program
    {
        static void Main()
        {
            MakeRequest();
            Console.WriteLine("Hit ENTER to exit...");
            Console.ReadLine();
        }
        
        static async void MakeRequest()
        {
            var client = new HttpClient();
            var queryString = HttpUtility.ParseQueryString(string.Empty);

            // Request headers
            client.DefaultRequestHeaders.Add("aade-user-id", "{aade-user-id}");
            client.DefaultRequestHeaders.Add("Ocp-Apim-Subscription-Key", "{subscription key}");

            // Request parameters
            queryString["mark"] = "{mark}";
            var uri = "https://mydata-dev.azure-api.net/RequestDocs?" + queryString;

            var response = await client.GetAsync(uri);
        }
    }
}
Source by mydata-dev.portal.azure-api.net #
 
PREVIOUS NEXT
Tagged: #mydata #api
ADD COMMENT
Topic
Name
9+4 =