public async Task <IEnumerable <Correo> > Get() { var json = await PETICION_HTTP.GetStringAsync(URL + DIRECTORIO_API); var Listado = JsonConvert.DeserializeObject <List <Correo> >(json); return(Listado); }
public async Task <string> Post() { RESPUESTA_HTTP = await PETICION_HTTP.PostAsync(URL + DIRECTORIO_API, ContenidoHttp(this)); if (RESPUESTA_HTTP.IsSuccessStatusCode) { return(null); } else { return(Interaccion.DevolverNotificacion( new Tuple <bool, string>(false, REQUEST_ISSUES))); } }
public async Task <string> Put() { RESPUESTA_HTTP = await PETICION_HTTP.PutAsync(URL + DIRECTORIO_API, ContenidoHttp(this)); if (RESPUESTA_HTTP.IsSuccessStatusCode) { return(Interaccion.DevolverNotificacion( new Tuple <bool, string>(true, "Oferta de trabajo Actualizada con Exito !"))); } else { return(Interaccion.DevolverNotificacion( new Tuple <bool, string>(false, REQUEST_ISSUES))); } }
public async Task <string> Delete() { RESPUESTA_HTTP = await PETICION_HTTP.DeleteAsync(URL + DIRECTORIO_API + "/" + id); if (RESPUESTA_HTTP.IsSuccessStatusCode) { return(Interaccion.DevolverNotificacion( new Tuple <bool, string>(true, "Oferta de trabajo Eliminada con Exito !"))); } else { return(Interaccion.DevolverNotificacion( new Tuple <bool, string>(false, REQUEST_ISSUES))); } }