So, i've been digging for the last two days but i have no idea why this won't work..
here's the problem, i try to make request to an api server and i have to add a token in the request, but when i add the token to header authorization, i've got response 405 from the server
this api i've tested on postman and its work, but when i implement to angular it doesn't work
this my code:
$http({
method: 'POST',
url: url,
data: data,
headers: {
"Authorization": "Bearer xxxxxxxxxxx",
"Content-Type": "application/x-www-form-urlencoded"
}
})
and this is the req header from chrome: img
so in this case, is this my code, or the server problem ??