How to skip SSL certificate checking? #277
Answered
by
bernardoadc
grzegorzblaszczyk
asked this question in
Q&A
-
When I do this: import ky from 'https://unpkg.com/ky@0.23.0/index.js';
(async () => {
class HTTPError extends Error {}
const response = await ky('https://some-url-with-invalid-ssl-cert.com/file.txt', {
method: 'GET'
});
if (!response.ok) {
console.log (`Response: ${response}`)
}
})(); I get:
How to skip SSL certificate checking in ky? |
Beta Was this translation helpful? Give feedback.
Answered by
bernardoadc
Nov 5, 2020
Replies: 2 comments
-
|
Beta Was this translation helpful? Give feedback.
0 replies
-
In browsers it's not possible. However, if using it in node (for instance, in automated tests using avajs) it can be done like this:
Use only in development mode, like in tests. |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
sindresorhus
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In browsers it's not possible. However, if using it in node (for instance, in automated tests using avajs) it can be done like this:
Use only in development mode, like in tests.