Example #1
0
 // GET: Home/GetId
 public ActionResult GetId(string id)
 {
     try
     {
         var response = GetHttpClient.GetRequest <Persona>(client, uri, "values", id);
         return(Json(response, JsonRequestBehavior.AllowGet));
     }
     catch (Exception e)
     {
         return(Content(e.Message));
     }
 }
Example #2
0
        // GET: Home/Delete
        public ActionResult Delete(string id)
        {
            var persona = new Persona {
                id = id, nombre = "nombre" + id
            };

            try
            {
                var response = GetHttpClient.PostRequest <Persona>(client, uri, "values", persona);
                return(Json(response, JsonRequestBehavior.AllowGet));
            }
            catch (Exception e)
            {
                return(Content(e.Message));
            }
        }