@@ -67,14 +67,11 @@ export class Blobs {
67
67
}
68
68
69
69
private async getFinalRequest ( key : string , method : string ) {
70
- const finalMethod = method
71
-
72
70
if ( 'contextURL' in this . authentication ) {
73
71
return {
74
72
headers : {
75
73
authorization : `Bearer ${ this . authentication . token } ` ,
76
74
} ,
77
- method : finalMethod ,
78
75
url : `${ this . authentication . contextURL } /${ this . siteID } /${ this . context } /${ key } ` ,
79
76
}
80
77
}
@@ -90,7 +87,6 @@ export class Blobs {
90
87
const { url } = await res . json ( )
91
88
92
89
return {
93
- method : finalMethod ,
94
90
url,
95
91
}
96
92
}
@@ -129,7 +125,7 @@ export class Blobs {
129
125
throw new Error ( "The blob store is unavailable because it's missing required configuration properties" )
130
126
}
131
127
132
- const { headers : baseHeaders = { } , method : finalMethod , url } = await this . getFinalRequest ( key , method )
128
+ const { headers : baseHeaders = { } , url } = await this . getFinalRequest ( key , method )
133
129
const headers : Record < string , string > = {
134
130
...baseHeaders ,
135
131
...extraHeaders ,
@@ -139,9 +135,9 @@ export class Blobs {
139
135
headers [ 'cache-control' ] = 'max-age=0, stale-while-revalidate=60'
140
136
}
141
137
142
- const res = await this . fetcher ( url , { body, headers, method : finalMethod } )
138
+ const res = await this . fetcher ( url , { body, headers, method } )
143
139
144
- if ( res . status === 404 && finalMethod === HTTPMethod . Get ) {
140
+ if ( res . status === 404 && method === HTTPMethod . Get ) {
145
141
return null
146
142
}
147
143
0 commit comments