const params = new URLSearchParams();
params.append("client_id", clientId);
params.append("scope", scope);
params.append("client_secret", clientSecret);
params.append("grant_type", "client_credentials");
// Somehow I can't get this working with effect httpClient
const response = yield* Effect.tryPromise(() =>
fetch(tokenUrl.toString(), {
method: "POST",
body: params,
headers: {
"Content-Type": "application/x-www-form-urlencoded",
},
}),
);
const params = new URLSearchParams();
params.append("client_id", clientId);
params.append("scope", scope);
params.append("client_secret", clientSecret);
params.append("grant_type", "client_credentials");
// Somehow I can't get this working with effect httpClient
const response = yield* Effect.tryPromise(() =>
fetch(tokenUrl.toString(), {
method: "POST",
body: params,
headers: {
"Content-Type": "application/x-www-form-urlencoded",
},
}),
);