Well, it's my first experience with this kind of function using Laz/FPC, and that was the way that I found to solve the problem! Probably there is an easiest way to do it...
Well, the problem lied on the client side. Angular (or the browser) first sends an OPTION request before sending the real GET or POST. That's because you added the custom headers. If you didn't, or you change the content-type, the GET or POST is sent directly. That's why it would also be an option to send an OK back to the client and wait for the actual GET or POST. It's really annoying that extra OPTION request is sent, but I don't know how to disable it easily, other than sending text/plain as content-type.
Do you know any HTTP component which I could build a webservice or anything like that? I mean "easier" to work with HTTP requests?
Synapse does not have such HTTP-server component. Indy does. But I'm not sure if Indy takes these pre-flight OPTION requests into account.
The best option would be to respons to the OPTION request with a HTTP/1.1 200 OK. After that you would get the actual GET. Then you're "server" would behave like it should.
Using text/plain will work fine too if you are sure the client always uses that.