I am facing an issue where Angular is sending a GET request instead of a POST request when I want to send a post request. The code for my Angular request is as follows:
$http({
method: 'POST',
url: pages_url,
params: {
'page': $scope.current_page_id,
'news': JSON.stringify(news),
'method': 'POST'
}
}).then(function (response) {
alert(JSON.stringify(response));
});
Upon debugging the request using the network tab in the browser, I notice that the parameters are being sent in the server URL. How can I resolve this issue?