File tree Expand file tree Collapse file tree 2 files changed +10
-1
lines changed
packages/fetch-http-handler/src Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ " @smithy/fetch-http-handler " : patch
3+ ---
4+
5+ Omit setting cache setting on request init when using default value
Original file line number Diff line number Diff line change @@ -112,8 +112,12 @@ export class FetchHttpHandler implements HttpHandler<FetchHttpHandlerConfig> {
112112 headers : new Headers ( request . headers ) ,
113113 method : method ,
114114 credentials,
115- cache : this . config ! . cache ?? "default" ,
116115 } ;
116+ // cache property is not supported in workerd runtime
117+ // TODO: can we feature detect support for cache and not set this property when not supported?
118+ if ( this . config ?. cache ) {
119+ requestOptions . cache = this . config . cache ;
120+ }
117121
118122 if ( body ) {
119123 requestOptions . duplex = "half" ;
You can’t perform that action at this time.
0 commit comments