File tree Expand file tree Collapse file tree 2 files changed +0
-28
lines changed
e2e_tests/typescript/src/server_clients
examples/chatbots/typescript/src/server_clients Expand file tree Collapse file tree 2 files changed +0
-28
lines changed Original file line number Diff line number Diff line change @@ -520,20 +520,6 @@ export class AutomatedOAuthClient extends Server {
520
520
const baseUrl = new URL ( this . config . serverUrl ) ;
521
521
const transport = new StreamableHTTPClientTransport ( baseUrl , {
522
522
authProvider : this . oauthProvider ,
523
- // Override fetch to handle POST-only endpoints.
524
- // This is a temporary workaround for AgentCore Gateways,
525
- // which currently return 404 on GET requests, instead of the expected 405
526
- fetch : async ( url , init ) => {
527
- logger . debug ( `Fetch request: ${ init ?. method || 'GET' } ${ url } ` ) ;
528
- if ( init ?. method === "GET" ) {
529
- logger . debug ( "Blocking GET request, returning 405" ) ;
530
- return new Response ( null , {
531
- status : 405 ,
532
- statusText : "Method Not Allowed" ,
533
- } ) ;
534
- }
535
- return fetch ( url , init ) ;
536
- } ,
537
523
} ) ;
538
524
539
525
logger . debug ( "Connecting with automated OAuth..." ) ;
Original file line number Diff line number Diff line change @@ -532,20 +532,6 @@ export class InteractiveOAuthClient extends Server {
532
532
const baseUrl = new URL ( this . config . serverUrl ) ;
533
533
const transport = new StreamableHTTPClientTransport ( baseUrl , {
534
534
authProvider : oauthProvider ,
535
- // Override fetch to handle POST-only endpoints
536
- // This is a temporary workaround for AgentCore Gateways,
537
- // which currently return 404 on GET requests, instead of the expected 405
538
- fetch : async ( url , init ) => {
539
- logger . debug ( `Fetch request: ${ init ?. method || 'GET' } ${ url } ` ) ;
540
- if ( init ?. method === "GET" ) {
541
- logger . debug ( "Blocking GET request, returning 405" ) ;
542
- return new Response ( null , {
543
- status : 405 ,
544
- statusText : "Method Not Allowed" ,
545
- } ) ;
546
- }
547
- return fetch ( url , init ) ;
548
- } ,
549
535
} ) ;
550
536
551
537
try {
You can’t perform that action at this time.
0 commit comments