AFTER HOURS SOLUTION:
The Firefox extension uBlock was blocking the request, possibly due to containing adverts. Lesson learned: always check in a private tab!
Running out of ideas and seeking advice :)
UPDATE:
For clarity:
I am sending two POST requests:
/api/adverts/search which is not appearing in the Firefox network tab
and
/api/marketplacecategories/get which returns successfully with 200 status code.
UPDATE2:
The same request from a new Angular app is functioning.
Sending the request:
let options = {
'headers' : {
'accept': 'application/json'
}
}
let data = new FormData()
this.http.post("/api/adverts/search",data, options)
.subscribe(
data => {
console.log("success")
console.log(data)
}
);
Angular is failing to send the request:
https://i.sstatic.net/dys05.png
Instead, it's throwing an error in the JavaScript console:
https://i.sstatic.net/JklPl.png
Meanwhile, the other POST request to the same API is working without any issues.
Postman can successfully make requests to the same URL:
https://i.sstatic.net/SJJtv.png
The server has CORS headers set globally and they are functioning correctly for the other successful request:
https://i.sstatic.net/UWa1t.png
Any insights would be greatly appreciated as I am feeling quite desperate! :D