Answer the question
In order to leave comments, you need to log in
How to disable ssl check on ajax request?
Hello!
The question seems to be banal, but I came across a problem with which I ask for help.
There is a server on which the php file is located, we send an ajax request to this file using the POST method, and the server returns 404 to us.
If we send a request using the GET method, then the php script processes the request.
You ask: "Why the question is called 'How to disable ssl verification on ajax request?'", the fact is that when I send a POST request using Postman and disable the "SSL certificate verification" option in the settings, then the php script processes our request.
var formData = new FormData();
formData.append('message', textarea.val());
formData.append('file1', someFile);
$.ajax({
url: url,
type: "POST",
processData: false,
contentType: false,
data: formData,
error: function(err) {
console.log(err);
},
success: function(response){
console.log(response);
}
});
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question