nestjs / axios

Axios module for Nest framework (node.js) 🗂

Home Page:https://docs.nestjs.com/techniques/http-module

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error: self signed certificate in certificate chain

solinad21 opened this issue · comments

Is there an existing issue for this?

  • I have searched the existing issues

Current behavior

[Nest] 13372 - 12/10/2022 03:21:02 ERROR [ExceptionsHandler] self signed certificate in certificate chain
Error: self signed certificate in certificate chain
at TLSSocket.onConnectSecure (node:_tls_wrap:1530:34)
at TLSSocket.emit (node:events:520:28)
at TLSSocket._finishInit (node:_tls_wrap:944:8)
at TLSWrap.ssl.onhandshakedone (node:_tls_wrap:725:12)

Minimum reproduction code

none

Steps to reproduce

async getPdfBase64(fileData: string, fileJasper: string, parameters: string) {
const url = "https://localhost:3014/jasper/";
const data = JSON.stringify({ "fileData": fileData, "fileJasper": fileJasper, "parameters": parameters });
console.log(data)
var value = await lastValueFrom(
this.httpService.post(url, data).pipe(map((resp) => resp.data))
);
return value;
}

Expected behavior

i want to consume an https api using nestjs/axios

Package version

0.1.0

NestJS version

8

Node.js version

16.14.0

In which operating systems have you tested?

  • macOS
  • Windows
  • Linux

Other

No response

Have you tried using axios directly instead?

i will try, thanks