Answer the question
In order to leave comments, you need to log in
How to respond with json?
Hello everyone)
There is a server in php
There is an ios application that expects a json response from the server
The server responds like this:
echo json_encode($data);
But
on ios the header comes that the answer is {text/html}
I understand that this echo is to blame
Tell me how to make it so that json comes, i.e. in the headers there should be {text/json}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question