text: //importa o componente localizado em 'src/htttp-common.js'
  import httpClient from '../htttp-common';
  
  
  //Metodos get, post, delete, put
  const getAll = () => {
      return httpClient.get('/viagens');
  }
  
  const create = (data) => {
      return httpClient.post("/viagem", data);
  }
  
  const get = id => {
      return httpClient.get(`/viagem/${id}`);
  }
  
  const update = data => {
      return httpClient.put('/viagem', data);
  }
  
  const remove = id => {
      return httpClient.delete(`/viagem/${id}`);
  }
  
  const Service = {
      getAll,
      create,
      get,
      update,
      remove
  };
  
  
  export default Service;
  