You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* A BodyInit object or null to set request's body.
905
921
*/
906
-
body?: Null.t<BodyInit.t>,
907
-
/**
922
+
body?: Null.t<BodyInit.t>,
923
+
/**
908
924
* A string indicating how the request will interact with the browser's cache to set request's cache.
909
925
*
910
926
* Note: as of Bun v0.5.7, this is not implemented yet.
911
927
*/
912
-
cache?: requestCache,
913
-
/**
928
+
cache?: requestCache,
929
+
/**
914
930
* A string indicating whether credentials will be sent with the request always, never, or only when sent to a same-origin URL. Sets request's credentials.
915
931
*/
916
-
credentials?: requestCredentials,
917
-
/**
932
+
credentials?: requestCredentials,
933
+
/**
918
934
* A Headers object, an object literal, or an array of two-item arrays to set request's headers.
919
935
*/
920
-
headers?: HeadersInit.t,
921
-
/**
936
+
headers?: HeadersInit.t,
937
+
/**
922
938
* A cryptographic hash of the resource to be fetched by request. Sets request's integrity.
923
939
*
924
940
* Note: as of Bun v0.5.7, this is not implemented yet.
925
941
*/
926
-
integrity?: string,
927
-
/**
942
+
integrity?: string,
943
+
/**
928
944
* A boolean to set request's keepalive.
929
945
*
930
946
* Available in Bun v0.2.0 and above.
931
947
*
932
948
* This is enabled by default
933
949
*/
934
-
keepalive?: bool,
935
-
/**
950
+
keepalive?: bool,
951
+
/**
936
952
* A string to set request's method.
937
953
*/
938
-
method?: string,
939
-
/**
954
+
method?: string,
955
+
/**
940
956
* A string to indicate whether the request will use CORS, or will be restricted to same-origin URLs. Sets request's mode.
941
957
*/
942
-
mode?: requestMode,
943
-
/**
958
+
mode?: requestMode,
959
+
/**
944
960
* A string indicating whether request follows redirects, results in an error upon encountering a redirect, or returns the redirect (in an opaque fashion). Sets request's redirect.
945
961
*/
946
-
redirect?: requestRedirect,
947
-
/**
962
+
redirect?: requestRedirect,
963
+
/**
948
964
* A string whose value is a same-origin URL, "about:client", or the empty string, to set request's referrer.
949
965
*/
950
-
referrer?: string,
951
-
/**
966
+
referrer?: string,
967
+
/**
952
968
* A referrer policy to set request's referrerPolicy.
953
969
*/
954
-
referrerPolicy?: referrerPolicy,
955
-
/**
970
+
referrerPolicy?: referrerPolicy,
971
+
/**
956
972
* An AbortSignal to set request's signal.
957
973
*/
958
-
signal?: Null.t<AbortSignal.t>,
959
-
/**
974
+
signal?: Null.t<AbortSignal.t>,
975
+
/**
960
976
* Enable or disable HTTP request timeout
961
977
*/
962
-
timeout?: bool,
963
-
}
964
-
965
-
typecheckServerIdentity
966
-
967
-
typetlsConfig= {rejectUnauthorized?: bool} // Defaults to true
968
-
969
-
typefetchRequestInitTls= {
970
-
...tlsConfig,
971
-
checkServerIdentity?: checkServerIdentity, // TODO: change `any` to `checkServerIdentity`
972
-
}
973
-
974
-
typefetchRequestInit= {
975
-
...requestInit,
976
-
/**
977
-
* Log the raw HTTP request & response to stdout. This API may be
978
-
* removed in a future version of Bun without notice.
979
-
* This is a custom property that is not part of the Fetch API specification.
980
-
* It exists mostly as a debugging tool
981
-
*/
982
-
verbose?: bool,
983
-
/**
984
-
* Override http_proxy or HTTPS_PROXY
985
-
* This is a custom property that is not part of the Fetch API specification.
986
-
*/
987
-
proxy?: string,
988
-
/**
989
-
* Override the default TLS options
990
-
*/
991
-
tls?: fetchRequestInitTls,
992
-
}
993
-
994
-
/** All possible HTTP methods. */
995
-
typemethod=GET | HEAD | POST | PUT | DELETE | CONNECT | OPTIONS | TRACE | PATCH
0 commit comments