Skip to content
Discussion options

You must be logged in to vote

Hi,

It should work fine yeah.

I went ahead a did bit of local testing under dev mode with this option active on my next.config.js file (or .ts):

  logging: {
    fetches: {
      fullUrl: true,
    },
  },

Then I created a page with these contents:

 import ky from 'ky';

export default async function Home() {
   const json = await ky
     .get('https://pokeapi.co/api/v2/pokemon/ditto', { cache: 'force-cache' })
     .json();

  return <pre>{JSON.stringify(json, null, 2)}</pre>;
}

Run the app in dev mode, and in the console:

 ✓ Starting...
 ✓ Ready in 530ms
 ○ Compiling / ...
 ✓ Compiled / in 580ms
 GET / 200 in 754ms
 │ GET https://pokeapi.co/api/v2/pokemon/ditto 200 in 77ms (cache skip)

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
1 reply
@icyJoseph
Comment options

Answer selected by icyJoseph
Comment options

You must be logged in to vote
1 reply
@icyJoseph
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
2 participants