// Make the second API call using the extracted 'id'
const secondApiResponse = await fetch(`https://api.example.in/api/xxxx-xxxx-xxx-xxx/conversations/hello/chat`, {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': 'xxxxx',
},
body: JSON.stringify({
message: "this is my message to you too"
})
});
// Start the Deno server and pass the denoHandler as the server handler function.
Deno.serve(secondApiResponse);
Returns
TypeError: error sending request for url (https://api.example.in/api/xxxx-xxxx-xxx-xxx/conversations/hello/chat): error trying to connect: invalid peer certificate: UnknownIssuer
at async mainFetch (ext:deno_fetch/26_fetch.js:170:12)
at async fetch (ext:deno_fetch/26_fetch.js:391:7)
at async file:///src/main.ts:11:33
Getting this error so I tried the below approach.
I cannot use Deno.connectTls with fetch request. Tried manually entering ssl via Environment Vars and Deno.connectTls approach. But failed.
Steps to reproduce
In backend,
I'm using Ingress for api.example.in and tls is configured as secrets. For SSLs I'm using ZeroSSL ( CA certified)
Problem description
Using Deno Deploy
Returns
Getting this error so I tried the below approach. I cannot use Deno.connectTls with fetch request. Tried manually entering ssl via Environment Vars and Deno.connectTls approach. But failed.
Steps to reproduce
In backend, I'm using Ingress for api.example.in and tls is configured as secrets. For SSLs I'm using ZeroSSL ( CA certified)
Expected behavior
There shouldn't be any ssl error.
Environment
Deno Deploy (Playground)
Possible solution
No response
Additional context
No response