Definindo contentTypeApplicationJson

This commit is contained in:
Leandro Costa 2023-01-26 22:54:01 -03:00
parent 10a3dad640
commit 402374f767

View file

@ -12,6 +12,7 @@ const clientId = "testClientdId";
const clientSecret = "testClientSecret"; const clientSecret = "testClientSecret";
const baseClientParams = { apiUrl, authUrl, clientId, clientSecret }; const baseClientParams = { apiUrl, authUrl, clientId, clientSecret };
const basicAuth = `Basic ${Buffer.from(`${clientId}:${clientSecret}`).toString('base64')}`; const basicAuth = `Basic ${Buffer.from(`${clientId}:${clientSecret}`).toString('base64')}`;
const contentTypeApplicationJson = "application/json";
describe("lhisp-oauth-client", ()=>{ describe("lhisp-oauth-client", ()=>{
it("Shout Get Access Token with Standard Config", async ()=>{ it("Shout Get Access Token with Standard Config", async ()=>{
@ -34,7 +35,7 @@ describe("lhisp-oauth-client", ()=>{
method: "POST", method: "POST",
headers: { headers: {
Authorization: basicAuth, Authorization: basicAuth,
'Content-Type': "application/json", 'Content-Type': contentTypeApplicationJson,
} }
})); }));
}); });
@ -62,7 +63,7 @@ describe("lhisp-oauth-client", ()=>{
method: "POST", method: "POST",
headers: { headers: {
CustomAuthorizationHeader: basicAuth, CustomAuthorizationHeader: basicAuth,
'Content-Type': "application/json", 'Content-Type': contentTypeApplicationJson,
} }
})); }));
}); });