Reputation: 35
I'm trying to do a GET request on an external API. The api gave me a username and password which I encoded to get the Basic Token. When I test in on Postman everything works fine but when implementing it Angular 6 I get a 404 error, which is strange since I used the exact same URL in Postman. This is my code:
this.http.get('https://api.easypost.com/v2/shipments',{
headers:{
'Authorization':'Basic '+this.token
}
}
).subscribe((res:Response)=>{
console.log(res)
})
I don't understance why I'm getting a 404. The URL works fine in Postman. This is my networks tab:
Upvotes: 0
Views: 306