export default {
	fetch(url) {
		return fetch(url, {
			headers: {
				accept: "application/json",
				authorization: "Basic " + btoa("nick:Nicholson")
			}
		}).then(response => response.json())
		  .then(function(data) {
			  console.log(data);
			  return data;
		  })
	}
}

export default {
	fetch(url) {
		return fetch(url, {
			credentials: "same-origin",
			headers: {
				accept: "application/json"
			}
		}).then(response => response.json())
		  .then(function(data) {
			  console.log(data);
			  return data;
		  })
	}
}

Send browser credentials with fetch instead of hard coding them
Send browser credentials with fetch instead of hard coding them
