@@ -45,7 +45,7 @@ describe('get', () => {
45
45
test ( 'Reads from the blob store' , async ( ) => {
46
46
const mockStore = new MockFetch ( )
47
47
. get ( {
48
- headers : { authorization : `Bearer ${ apiToken } ` } ,
48
+ headers : { accept : 'application/json;type=signed-url' , authorization : `Bearer ${ apiToken } ` } ,
49
49
response : new Response ( JSON . stringify ( { url : signedURL } ) ) ,
50
50
url : `https://api.netlify.com/api/v1/blobs/${ siteID } /site:production/${ key } ` ,
51
51
} )
@@ -54,7 +54,7 @@ describe('get', () => {
54
54
url : signedURL ,
55
55
} )
56
56
. get ( {
57
- headers : { authorization : `Bearer ${ apiToken } ` } ,
57
+ headers : { accept : 'application/json;type=signed-url' , authorization : `Bearer ${ apiToken } ` } ,
58
58
response : new Response ( JSON . stringify ( { url : signedURL } ) ) ,
59
59
url : `https://api.netlify.com/api/v1/blobs/${ siteID } /site:production/${ key } ` ,
60
60
} )
@@ -63,7 +63,7 @@ describe('get', () => {
63
63
url : signedURL ,
64
64
} )
65
65
. get ( {
66
- headers : { authorization : `Bearer ${ apiToken } ` } ,
66
+ headers : { accept : 'application/json;type=signed-url' , authorization : `Bearer ${ apiToken } ` } ,
67
67
response : new Response ( JSON . stringify ( { url : signedURL } ) ) ,
68
68
url : `https://api.netlify.com/api/v1/blobs/${ siteID } /site:production/${ complexKey } ` ,
69
69
} )
@@ -95,7 +95,7 @@ describe('get', () => {
95
95
test ( 'Returns `null` when the pre-signed URL returns a 404' , async ( ) => {
96
96
const mockStore = new MockFetch ( )
97
97
. get ( {
98
- headers : { authorization : `Bearer ${ apiToken } ` } ,
98
+ headers : { accept : 'application/json;type=signed-url' , authorization : `Bearer ${ apiToken } ` } ,
99
99
response : new Response ( JSON . stringify ( { url : signedURL } ) ) ,
100
100
url : `https://api.netlify.com/api/v1/blobs/${ siteID } /site:production/${ key } ` ,
101
101
} )
@@ -118,7 +118,7 @@ describe('get', () => {
118
118
119
119
test ( 'Throws when the API returns a non-200 status code' , async ( ) => {
120
120
const mockStore = new MockFetch ( ) . get ( {
121
- headers : { authorization : `Bearer ${ apiToken } ` } ,
121
+ headers : { accept : 'application/json;type=signed-url' , authorization : `Bearer ${ apiToken } ` } ,
122
122
response : new Response ( null , { status : 401 } ) ,
123
123
url : `https://api.netlify.com/api/v1/blobs/${ siteID } /site:production/${ key } ` ,
124
124
} )
@@ -140,7 +140,7 @@ describe('get', () => {
140
140
test ( 'Throws when a pre-signed URL returns a non-200 status code' , async ( ) => {
141
141
const mockStore = new MockFetch ( )
142
142
. get ( {
143
- headers : { authorization : `Bearer ${ apiToken } ` } ,
143
+ headers : { accept : 'application/json;type=signed-url' , authorization : `Bearer ${ apiToken } ` } ,
144
144
response : new Response ( JSON . stringify ( { url : signedURL } ) ) ,
145
145
url : `https://api.netlify.com/api/v1/blobs/${ siteID } /site:production/${ key } ` ,
146
146
} )
0 commit comments