Pārlūkot izejas kodu

Fix `responseType` for barbican secret payload API call

Signed-off-by: Mihaela Balutoiu <mbalutoiu@cloudbasesolutions.com>
Mihaela Balutoiu 1 gadu atpakaļ
vecāks
revīzija
5ce0aa7a1c
1 mainītis faili ar 2 papildinājumiem un 2 dzēšanām
  1. 2 2
      src/sources/EndpointSource.ts

+ 2 - 2
src/sources/EndpointSource.ts

@@ -90,7 +90,7 @@ class EndpointSource {
       url: `${configLoader.config.servicesUrls.barbican}/v1/secrets/${
         uuid || "undefined"
       }/payload`,
-      responseType: "text",
+      responseType: "json",
       headers: { Accept: "text/plain" },
     });
     return response.data;
@@ -142,7 +142,7 @@ class EndpointSource {
         }
         const response = await Api.send({
           url: `${configLoader.config.servicesUrls.barbican}/v1/secrets/${uuid}/payload`,
-          responseType: "text",
+          responseType: "json",
           headers: { Accept: "text/plain" },
         });
         return { ...endpoint, connection_info: response.data };