コード例 #1
0
        public Entities.Payday GetPayday(int id)
        {
            string location = string.Format("{0}{1}", baseURI, "api");

            using (HttpClient client = new HttpClient())
            {
                client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));
                response = client.GetAsync(string.Format("{0}/getpayday/{1}", location, id)).Result;
            }
            Entities.Payday returnedItem = new Entities.Payday();

            if (response.StatusCode == HttpStatusCode.OK)
            {
                returnedItem = response.Content.ReadAsAsync <Entities.Payday>().Result;
            }

            return(returnedItem);
        }
コード例 #2
0
 public void Delete(Entities.Payday payday)
 {
     throw new NotImplementedException();
 }
コード例 #3
0
 public System.Net.Http.HttpResponseMessage Put(Entities.Payday payday)
 {
     throw new NotImplementedException();
 }