File tree Expand file tree Collapse file tree
test/fixture/server/routes Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -90,7 +90,7 @@ export function fetch(
9090 return serverFetch ( resource , init , context ) ;
9191 }
9292 resource = ( resource as any ) . _request || resource ; // unwrap srvx request
93- return fetch ( resource , init ) ;
93+ return globalThis . fetch ( resource , init ) ;
9494}
9595
9696function createNitroApp ( ) : NitroApp {
Original file line number Diff line number Diff line change @@ -10,6 +10,9 @@ export default async () => {
1010 ) . then ( ( res ) => res . json ( ) ) ,
1111 "nitro/runtime.serverFetch" : await runtimeServerFetch ( "/api/hello" ) . then ( ( res ) => res . json ( ) ) ,
1212 "nitro/runtime.fetch" : await runtimeFetch ( "/api/hello" ) . then ( ( res ) => res . json ( ) ) ,
13+ "nitro/runtime.fetch.url" : await runtimeFetch ( new URL ( "http://localhost/api/hello" ) ) . then (
14+ ( res ) => res . json ( )
15+ ) ,
1316 "nitro/serverFetch" : await nitroServerFetch ( "/api/hello" ) . then ( ( res ) => res . json ( ) ) ,
1417 "nitro/fetch" : await nitroFetch ( "/api/hello" ) . then ( ( res ) => res . json ( ) ) ,
1518 } ;
You can’t perform that action at this time.
0 commit comments