I am currently struggling to create an AJAX request to an endpoint. I tried to fire the equivalent CURL GET command as below:
CURL-k -H "Some header" https://some API URL/Method
This works as I disabled SSL validation using -k
. I know this should not be done, but I am okay with it.
The problem is that I want to fire the same using an AJAX call. I would like to know if this is really possible, and if so, can someone help me with the syntax. Also, I am using a proxy server in my AJAX call.
$.ajax({
url: "https://proxyurl/https://some API URL/Method",
success: function(result) {
//Some code here
}
});