Skip to content

Commit

Permalink
Add fetches
Browse files Browse the repository at this point in the history
  • Loading branch information
adamjmcgrath committed Jun 22, 2023
1 parent 0c35462 commit 6e7c9e8
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion app/page.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
import Image from 'next/image'
import styles from './page.module.css'

export default function Home() {
export default async function Home() {
const res = await fetch('https://cat-fact.herokuapp.com/facts/');
console.log('res.url with defaults:', res.url);
const res2 = await fetch('https://dog.ceo/api/breeds/list/all', { cache: 'no-store' });
console.log('res.url with "no-store":', res2.url);

return (
<main className={styles.main}>
<div className={styles.description}>
Expand Down

0 comments on commit 6e7c9e8

Please sign in to comment.