File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed
crates/spin-js-engine/src/js_sdk/modules Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -89,8 +89,7 @@ function fetch(uri: string, options?: FetchOptions) {
8989
9090declare global {
9191 const spinSdk : SpinSDK
92- function fetch ( uri : string , options ?: object ) : Promise < FetchResult >
93-
92+ function fetch ( uri : string , options ?: FetchOptions ) : Promise < FetchResult >
9493}
9594
9695/** @internal */
Original file line number Diff line number Diff line change @@ -30,6 +30,11 @@ interface SpinSDK {
3030 srem : ( address : string , key : string , values : Array < string > ) => bigint ;
3131 } ;
3232}
33+ interface FetchOptions {
34+ method ?: string ;
35+ headers ?: Record < string , string > ;
36+ body ?: ArrayBuffer ;
37+ }
3338interface FetchHeaders {
3439 entries : ( ) => Iterator < [ string , string ] > ;
3540}
@@ -44,6 +49,6 @@ interface FetchResult {
4449}
4550declare global {
4651 const spinSdk : SpinSDK ;
47- function fetch ( uri : string , options ?: object ) : Promise < FetchResult > ;
52+ function fetch ( uri : string , options ?: FetchOptions ) : Promise < FetchResult > ;
4853}
4954export { HttpRequest , HttpResponse , HandleRequest } ;
You can’t perform that action at this time.
0 commit comments