File tree Expand file tree Collapse file tree 3 files changed +13
-1
lines changed
packages/network-debugger/src/fork Expand file tree Collapse file tree 3 files changed +13
-1
lines changed Original file line number Diff line number Diff line change 2727 "vitest" : " ^1.5.0"
2828 },
2929 "dependencies" : {
30- "axios" : " ^1.6.8 " ,
30+ "axios" : " ^0.27.2 " ,
3131 "cross-env" : " ^7.0.3" ,
3232 "koa" : " ^2.15.3" ,
3333 "koa-body" : " ^6.0.1" ,
Original file line number Diff line number Diff line change @@ -90,6 +90,12 @@ const run = () => {
9090 const res = await axios . get ( 'http://www.baidu.com' )
9191 ctx . body = res . data
9292 } )
93+ router . get ( '/headerWithNumber' , async ( ctx ) => {
94+ const res = await axios . get ( 'http://www.baidu.com' , {
95+ headers : { 'test-timestamp' : Date . now ( ) }
96+ } )
97+ ctx . body = res . data
98+ } )
9399
94100 router . get ( '/fetch' , async ( ctx ) => {
95101 const res = await fetch ( 'https://jsonplaceholder.typicode.com/posts' )
Original file line number Diff line number Diff line change @@ -159,6 +159,12 @@ export class DevtoolServer {
159159 const headerPipe = new RequestHeaderPipe ( request . requestHeaders )
160160 const contentType = headerPipe . getHeader ( 'content-type' )
161161
162+ for ( let key in request . requestHeaders ) {
163+ if ( typeof request . requestHeaders [ key ] === 'number' ) {
164+ request . requestHeaders [ key ] = String ( request . requestHeaders [ key ] )
165+ }
166+ }
167+
162168 return this . send ( {
163169 method : 'Network.requestWillBeSent' ,
164170 params : {
You can’t perform that action at this time.
0 commit comments