const GET = 'GET';
const POST = 'POST';
const LOCATION_REQUEST = 'LOCATION_REQUEST';

const send = (request) => {
  return {
    type: LOCATION_REQUEST,
    payload: request,
  };
};

export const get = location => send({
  location,
  method: GET,
});

export const post = (location, body) => send({
  location,
  body,
  method: POST,
});
