小编N.O*_*sen的帖子

无法找到C#,RestSharp,类型或命名空间名称"HttpBasicAuthenticator"

    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;
    using System.Net.Http;
    using System.Net.Http.Headers;
    using RestSharp;

    namespace ConsoleProgram
    {
        public class TryingOutRest {
            public resttest Execute<resttest>(RestRequest request) where resttest : new() {
            var client = new RestClient();
                client.BaseUrl = new Uri("http://www.ocrwebservice.com");
                client.Authenticator = new HttpBasicAuthenticator("apid", "apikey");
// the key and and id are put in as a string, but i removed them for the purposes of this.
            var re_quest = new RestRequest();
            re_quest.Resource = "/restservices/processDocument";
            var response = client.Execute<resttest>(request);
            } …
Run Code Online (Sandbox Code Playgroud)

api rest restsharp visual-studio-2015

4
推荐指数
1
解决办法
8102
查看次数

标签 统计

api ×1

rest ×1

restsharp ×1

visual-studio-2015 ×1