Sending cookies with fetch, bg color change

This commit is contained in:
MrFry 2020-04-08 18:12:20 +02:00
parent 9f576a41f6
commit cbba4cd616
10 changed files with 21 additions and 11 deletions

View file

@ -12,7 +12,9 @@ export default function AllQuestions (props) {
const [searchTerm, setSearchTerm] = useState('')
useEffect(() => {
fetch(`${constants.apiUrl}data.json`)
fetch(`${constants.apiUrl}data.json`, {
credentials: 'include'
})
.then((resp) => {
return resp.json()
})