File tree Expand file tree Collapse file tree 1 file changed +10
-3
lines changed
packages/consumption/src/modules/openid4vc/local Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change 11/* eslint-disable no-console */
22import { AgentDependencies } from "@credo-ts/core" ;
3+ import axios from "axios" ;
34import { EventEmitter } from "events" ;
4- import { fetch as undiciFetch } from "undici" ;
55import webSocket from "ws" ;
66import { EnmeshedHolderFileSystem } from "./EnmeshedHolderFileSystem" ;
77
@@ -15,11 +15,18 @@ export const agentDependencies: AgentDependencies = {
1515 console . log ( "############### agentDependencies-fetch-init #################" , init ) ;
1616
1717 try {
18- const response = await undiciFetch ( input as any , init as any ) ;
18+ // const response = await undiciFetch(input as any, init as any);
19+ const response = await axios ( {
20+ method : init ?. method ?? "GET" ,
21+ url : input . toString ( ) ,
22+ headers : init ?. headers as Record < string , string > | undefined ,
23+ data : init ?. body
24+ } ) ;
1925
2026 console . log ( "############### agentDependencies-fetch-response #################" , response ) ;
2127
22- return response ;
28+ // return response;
29+ return new Response ( response . data , { ...response } as ResponseInit ) ;
2330 } catch ( error ) {
2431 console . error ( "############### agentDependencies-fetch-error #################" , error ) ;
2532 console . error ( "############### agentDependencies-fetch-error-stack #################" , ( error as any ) . stack ) ;
You can’t perform that action at this time.
0 commit comments