Search
 
SCRIPT & CODE EXAMPLE
 

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);
        }
    }
}
Comment

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);
        }
    }
}
Comment

PREVIOUS NEXT
Code Example
Csharp :: csharp test for null 
Csharp :: how to find any component of gameobject itself in untiy 
Csharp :: duplicate global system runtime versioning targetframeworkattribute 
Csharp :: store file in DB 
Csharp :: c# if loop 
Csharp :: material Array setter 
Csharp :: unity diference protected and virtual 
Csharp :: c# move picturebox 
Csharp :: C# Compound Assignment Operator 
Csharp :: difference between %e/E, %f/F and %g/G in program C 
Csharp :: winforms reportviewer.print report 
Csharp :: dictionary and generic class c# 
Csharp :: shell32.dll c# example 
Csharp :: check which activity in focus in android 
Csharp :: Request ID: XPBBR4XG1UWuX6fWF08_-jzYkrommVJjO7Os50CTYuZmiw7kMsFUkw== 
Csharp :: convert physical path to virtual path in c# 
Csharp :: snakes and ladder single player c# 
Csharp :: index was out of the bound array in c# 
Csharp :: how to add serilog to your asp.net project 
Csharp :: converting alpha1 into int unity 
Csharp :: c# expression func automatically select return type 
Csharp :: player not following slide object unity 2d 
Csharp :: hahhaa i hack u 
Csharp :: if statement to check if a time is between two times c# 
Csharp :: Find Center Of Transforms, Points, Multiple Objects 
Csharp :: Wait some seconds without blocking UI execution 
Csharp :: convert web app to linux 
Csharp :: how to read reportview query string asp.net c# 
Csharp :: make wpf run in fullscreen but above windows taskbar 
Csharp :: c# show hidden window wpf 
ADD CONTENT
Topic
Content
Source link
Name
7+7 =