@@ -45,7 +45,7 @@ describe('get', () => {
4545 test ( 'Reads from the blob store' , async ( ) => {
4646 const mockStore = new MockFetch ( )
4747 . get ( {
48- headers : { authorization : `Bearer ${ apiToken } ` } ,
48+ headers : { accept : 'application/json;type=signed-url' , authorization : `Bearer ${ apiToken } ` } ,
4949 response : new Response ( JSON . stringify ( { url : signedURL } ) ) ,
5050 url : `https://api.netlify.com/api/v1/blobs/${ siteID } /site:production/${ key } ` ,
5151 } )
@@ -54,7 +54,7 @@ describe('get', () => {
5454 url : signedURL ,
5555 } )
5656 . get ( {
57- headers : { authorization : `Bearer ${ apiToken } ` } ,
57+ headers : { accept : 'application/json;type=signed-url' , authorization : `Bearer ${ apiToken } ` } ,
5858 response : new Response ( JSON . stringify ( { url : signedURL } ) ) ,
5959 url : `https://api.netlify.com/api/v1/blobs/${ siteID } /site:production/${ key } ` ,
6060 } )
@@ -63,7 +63,7 @@ describe('get', () => {
6363 url : signedURL ,
6464 } )
6565 . get ( {
66- headers : { authorization : `Bearer ${ apiToken } ` } ,
66+ headers : { accept : 'application/json;type=signed-url' , authorization : `Bearer ${ apiToken } ` } ,
6767 response : new Response ( JSON . stringify ( { url : signedURL } ) ) ,
6868 url : `https://api.netlify.com/api/v1/blobs/${ siteID } /site:production/${ complexKey } ` ,
6969 } )
@@ -95,7 +95,7 @@ describe('get', () => {
9595 test ( 'Returns `null` when the pre-signed URL returns a 404' , async ( ) => {
9696 const mockStore = new MockFetch ( )
9797 . get ( {
98- headers : { authorization : `Bearer ${ apiToken } ` } ,
98+ headers : { accept : 'application/json;type=signed-url' , authorization : `Bearer ${ apiToken } ` } ,
9999 response : new Response ( JSON . stringify ( { url : signedURL } ) ) ,
100100 url : `https://api.netlify.com/api/v1/blobs/${ siteID } /site:production/${ key } ` ,
101101 } )
@@ -118,7 +118,7 @@ describe('get', () => {
118118
119119 test ( 'Throws when the API returns a non-200 status code' , async ( ) => {
120120 const mockStore = new MockFetch ( ) . get ( {
121- headers : { authorization : `Bearer ${ apiToken } ` } ,
121+ headers : { accept : 'application/json;type=signed-url' , authorization : `Bearer ${ apiToken } ` } ,
122122 response : new Response ( null , { status : 401 } ) ,
123123 url : `https://api.netlify.com/api/v1/blobs/${ siteID } /site:production/${ key } ` ,
124124 } )
@@ -140,7 +140,7 @@ describe('get', () => {
140140 test ( 'Throws when a pre-signed URL returns a non-200 status code' , async ( ) => {
141141 const mockStore = new MockFetch ( )
142142 . get ( {
143- headers : { authorization : `Bearer ${ apiToken } ` } ,
143+ headers : { accept : 'application/json;type=signed-url' , authorization : `Bearer ${ apiToken } ` } ,
144144 response : new Response ( JSON . stringify ( { url : signedURL } ) ) ,
145145 url : `https://api.netlify.com/api/v1/blobs/${ siteID } /site:production/${ key } ` ,
146146 } )
0 commit comments