File tree Expand file tree Collapse file tree 1 file changed +3
-6
lines changed
integration-tests/test-api/src Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -3,21 +3,18 @@ import { Hono } from "hono";
3
3
4
4
const app = new Hono ( ) ;
5
5
6
- app . get ( "/" , ( c ) => c . text ( "Hello Hono!" ) ) ;
7
-
8
6
app . all (
9
- "/:status{[0-9]{3}}/upload/bundle_analysis/v1/ :badPUT{true|false}" ,
7
+ "/test-url/ :status/ :badPUT{true|false}/upload/bundle_analysis/v1 " ,
10
8
( c ) => {
11
9
const status = parseInt ( c . req . param ( "status" ) ) ;
12
10
const badPUT = c . req . param ( "badPUT" ) === "true" ;
11
+ const url = new URL ( c . req . url ) ;
12
+ let putURL = `${ url . protocol } //${ url . host } /file-upload` ;
13
13
14
14
if ( status >= 400 && ! badPUT ) {
15
15
return c . text ( `Error code: ${ status } ` , { status } ) ;
16
16
}
17
17
18
- const url = new URL ( c . req . url ) ;
19
- let putURL = `${ url . protocol } //${ url . host } /file-upload` ;
20
-
21
18
if ( badPUT ) {
22
19
putURL = `${ putURL } /${ status } ` ;
23
20
}
You can’t perform that action at this time.
0 commit comments