Answer the question
In order to leave comments, you need to log in
How to write an https request?
I am a client. You need to send an https request. It turns out that I do not need certificates, I just need to confirm the certificates from the server side? How to write it? I am using npm request. it is possible and on native https.
let auth = "Basic " + new Buffer("user" + ":" + "user").toString("base64");
request({
uri: `localhost:8443`,
headers : {
"Authorization" : auth,
'Accept-Charset': 'utf-8',
},
method: `POST`,
json: data
},(error, req, body)=>{
if (error) throw(error);
})
Answer the question
In order to leave comments, you need to log in
And here certificates, not
https certificates, add to the url and that's it.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question