Skip to content

Troubleshooting

This document covers some common httpYac issues and how to resolve them. You should always follow these steps before opening a new issue.

Turn off verification of self-signed certificate

Self-signed certificates are not accepted by Node JS. For this reason, certificate verification must be disabled. For individual cases, the following is an option.

http
# @no-reject-unauthorized

GET https://client.badssl.com/
X-ClientCert: pfx: ../assets/badssl.com-client.p12 passphrase: badssl.com
# @no-reject-unauthorized

GET https://client.badssl.com/
X-ClientCert: pfx: ../assets/badssl.com-client.p12 passphrase: badssl.com

It is also possible to disable the check in general in the .httpyac.js configuration

js
module.exports = {
  "request": {
    "https":  {
      "rejectUnauthorized": false
     }
  }
}
module.exports = {
  "request": {
    "https":  {
      "rejectUnauthorized": false
     }
  }
}

Protocol "https:" not supported. Expected "http:" in VS Code with HTTP/2.0

The cause is the proxy configuration of VS Code. This is set to https.proxysupport=override by default. For the use of http2 a http2wrapper is used. However, this is not recognized correctly when using the VS Code Proxy Agent. To work around this behavior, proxy support must be disabled

ini
https.proxysupport=off
https.proxysupport=off