text: import "whatwg-fetch";
  import getbaseUrl from './baseUrl';
  
  const baseUrl = getbaseUrl();
  
  export function getUsers(){
      return get("users");
  }
  
  export function deleteUser(id){
      return del(`users/${id}`);
  }
  
  function del(url){
  const request = new Request(baseUrl+url,{method:'DELETE'});
    return fetch(request).then(onSuccess,onError);
  }
  
  function get(url){
      return fetch(baseUrl + url).then(onSuccess,onError);
  }
  
  function onSuccess(response){
      return response.json();
  }
  
  function onError(error){
      console.log(error);    
  }