예제 #1
0
        public void Test_http_client_status_after_request()
        {
            var oauthProperties = new OAuthProperties();
            var client = new HttpClient(new OAuthMessageHandler(new HttpClientHandler(), oauthProperties));

            IApiService service = new ApiService(client);

            string url = "https://api.twitter.com/1/statuses/user_timeline.json?include_entities=true&screen_name=pay_by_phone";

            var result = service.GetTwitterTimelines(url);

            Assert.NotNull(result);
        }
 public OAuthMessageHandler(HttpMessageHandler innerHandler, OAuthProperties oAuthProperties)
     : base(innerHandler)
 {
     this._oauthProperties = oAuthProperties;
     this._oAuthBase = new OAuthBase();
 }
예제 #3
0
 public ApiService()
 {
     this._oauthProperties = new OAuthProperties();
     this._client = new HttpClient(new OAuthMessageHandler(new HttpClientHandler(), this._oauthProperties));
 }