I am trying to get data from salesforce API using SOQL method. Problem is that when sending ajax getting request it encodes URL that results in failure of $ajax request.
How can I send plain URL in ajax request without encoding URL?
A sample request is HERE:
$.ajax({
type: "GET",
url: "https://ap1.salesforce.com/services/data/v35.0/query?q=SELECT Id FROM Contact WHERE Email= '" + Email + "'",
headers: {
"Authorization": "OAuth " + access_token,
'Content-Type': 'text/plain'
},
crossDomain: true,
dataType: 'application/json',
success: function (responseData) {
console.log(responseData);
},
error: function (request, status, error) {
console.log(request.responseText);
}
});