I am developing an API using slim framework, when I test this api with postman, phostorms built in tool it works fine and returns valid json. But when I call it from angular it is not getting parsed by angular. It shows unexpected index error.
I tried monitoring the payload in the network tab, surprisingly there are some red bullet mark like dots are appended before the actual json response.
but it is not showing up in the preview tab..
I don't have a clue where are those dots are coming. I googled about it and find a way about the BOM Problem on windows. But I am not sure how to solve it. Can you please help me to understand the problem and rectify it. Is this a problem caused by code or database or something else.
For information I'm using
- Operating System : Windows 7,
- Browser : google chrome,
- front end MVC : angular (problem only happens here),
- Backend : Slim Framework (PHP),
- Database : Mysql ( tables and columns have mixed collations between utf8mb4_bin and latin1_swedish_ci)
- IDE : PHPStorm 8
EDIT : screenshot from fiddler I used fiddlr to see whats going on and here is the hexview of the response