Skip to content

Commit

Permalink
example update
Browse files Browse the repository at this point in the history
  • Loading branch information
DaBigBlob committed Sep 11, 2024
1 parent b8de65c commit a0a2f93
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions examples/custom_fetch/libsql_isomorphic_fetch.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//@ts-nocheck
//USENG THE SAME TRANSPORT AS @libsql/client
//USEND THE SAME TRANSPORT AS @libsql/client
import { fetch as iso_fetch, Request as iso_Request, Headers as iso_Headers} from '@libsql/isomorphic-fetch';
import { createClient, libsqlFetchLike } from 'libsql-stateless-easy';
import { conf } from './conf';
Expand All @@ -15,8 +15,11 @@ import { conf } from './conf';
args[0], {
body: args[1]?.body,
method: args[1]?.method,
//@ts-ignore
headers: new iso_Headers(args[1]?.headers)
headers: (() => {
const h = new iso_Headers();
for (const k in args[1]?.headers) h.append(k, args[1]?.headers[k]);
return h;
})()
}
)
);
Expand Down

0 comments on commit a0a2f93

Please sign in to comment.