@@ -41,6 +41,7 @@ export class CubeCloudClient {
4141 restOptions . headers = restOptions . headers || { } ;
4242 // Add authorization to headers
4343 ( restOptions . headers as any ) . authorization = authorization . auth ;
44+ ( restOptions . headers as any ) [ 'Content-type' ] = 'application/json' ;
4445
4546 const response = await fetch (
4647 `${ authorization . url } /${ url ( authorization . deploymentId || '' ) } ` ,
@@ -141,6 +142,9 @@ export class CubeCloudClient {
141142 url : ( deploymentId : string ) => `build/deploy/${ deploymentId } /finish-upload${ this . extendRequestByLivePreview ( ) } ` ,
142143 method : 'POST' ,
143144 body : JSON . stringify ( { transaction, files } ) ,
145+ headers : {
146+ 'Content-type' : 'application/json'
147+ } ,
144148 auth,
145149 } ) ;
146150 }
@@ -149,7 +153,10 @@ export class CubeCloudClient {
149153 return this . request ( {
150154 url : ( deploymentId ) => `build/deploy/${ deploymentId } /set-env` ,
151155 method : 'POST' ,
152- body : JSON . stringify ( { envVariables } ) ,
156+ body : JSON . stringify ( { envVariables : JSON . stringify ( envVariables ) } ) ,
157+ headers : {
158+ 'Content-type' : 'application/json'
159+ } ,
153160 auth
154161 } ) ;
155162 }
@@ -172,6 +179,9 @@ export class CubeCloudClient {
172179 url : ( deploymentId ) => `devmode/${ deploymentId } /token` ,
173180 method : 'POST' ,
174181 body : JSON . stringify ( payload ) ,
182+ headers : {
183+ 'Content-type' : 'application/json'
184+ } ,
175185 auth
176186 } ) ;
177187 }
0 commit comments