File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -129,10 +129,10 @@ export const httpClient = (config: ConnectionParams): HttpClient => {
129129
130130const makeUrl = ( basePath : string ) => ( path : string ) => basePath + path ;
131131
132- const makeCheckStatus = ( expectResponseBody : any ) => ( res : any ) => {
132+ const makeCheckStatus = ( expectResponseBody : boolean ) => ( res : Response ) => {
133133 if ( res . status >= 400 ) {
134- return res . text ( ) . then ( ( errText : any ) => {
135- let err ;
134+ return res . text ( ) . then ( ( errText : string ) => {
135+ let err : string ;
136136 try {
137137 // in case of invalid json response (like empty string)
138138 err = JSON . stringify ( JSON . parse ( errText ) ) ;
@@ -148,11 +148,11 @@ const makeCheckStatus = (expectResponseBody: any) => (res: any) => {
148148 }
149149} ;
150150
151- const handleHeadResponse = ( expectResponseBody : any ) => ( res : any ) => {
151+ const handleHeadResponse = ( expectResponseBody : boolean ) => ( res : Response ) => {
152152 if ( res . status == 204 || res . status == 404 ) {
153153 return res . status == 204 ;
154154 }
155- return makeCheckStatus ( expectResponseBody ) ;
155+ return makeCheckStatus ( expectResponseBody ) ( res ) ;
156156} ;
157157
158158function addAuthHeaderIfNeeded ( request : any , bearerToken : string ) {
You can’t perform that action at this time.
0 commit comments