diff --git a/docs/guide/api-environment-frameworks.md b/docs/guide/api-environment-frameworks.md index 089ce3f3dca1a6..2f413092c7b7d5 100644 --- a/docs/guide/api-environment-frameworks.md +++ b/docs/guide/api-environment-frameworks.md @@ -151,7 +151,7 @@ const server = await createServer({ // Any consumer of the environment API can now call `dispatchFetch` if (isFetchableDevEnvironment(server.environments.custom)) { const response: Response = await server.environments.custom.dispatchFetch( - new Request('/request-to-handle'), + new Request('http://example.com/request-to-handle'), ) } ``` @@ -196,7 +196,7 @@ if (ssrEnvironment instanceof CustomDevEnvironment) { // virtual:entrypoint const { createHandler } = await import('./entrypoint.js') const handler = createHandler(input) -const response = handler(new Request('/')) +const response = handler(new Request('http://example.com/')) // ------------------------------------- // ./entrypoint.js @@ -266,7 +266,7 @@ if (ssrEnvironment instanceof RunnableDevEnvironment) { throw new Error(`Unsupported runtime for ${ssrEnvironment.name}`) } -const req = new Request('/') +const req = new Request('http://example.com/') const uniqueId = 'a-unique-id' ssrEnvironment.send('request', serialize({ req, uniqueId })) @@ -290,7 +290,7 @@ import.meta.hot.on('request', (data) => { import.meta.hot.send('response', serialize({ res: res, uniqueId })) }) -const response = handler(new Request('/')) +const response = handler(new Request('http://example.com/')) // ------------------------------------- // ./entrypoint.js