コード例 #1
0
        public ActionResult carregarSpamReports()
        {
            var client = new SendGridClient(apiKey);

            string queryParams = @"{
              //'end_time': 1443651154, 
              'limit': 10, 
              'offset': 0 
              //'start_time': 1443651141
            }";

            var response = client.requestAsync("suppression/spam_reports", "GET", queryParams: queryParams).Result;

            var data = new {
                response.Content,
                response.IsSuccessStatusCode,
                response.ReasonPhrase,
                response.StatusCode,
                response.Version,
                body = response.Content.ReadAsStringAsync().Result
            };

            return(Json(data, JsonRequestBehavior.AllowGet));
        }