There are a lot of things wrong with this code, but the most urgent is that you are brutally abusing REST with GET modifying state as it should not, and having little bobby tables injection issues. Immediately fire your backend developer and get somebody competent, then stop needlessly instantiating Promises.
I had an error maybe it can be the same error here, When i take photo the base64 size was too big to send with http service.I suggest to decrease the quality of picture to use http service
The ionic-related bits of the problem are relatively minor. Stop dealing with whoever wrote the backend server, and if that is you, then hire somebody competent to completely reimplement it properly. Once that’s done, then we can revisit this conversation, which will hopefully be involving POST methods and JSON.
Yes, I also think it is the server need some setting, when I put the options in a post api, it return no such method error to me, said no xxxxxController.options() this function, do you experienced before? Because I use postman to test the api it is normal and can return the correct Json. Thanks a lot.
Sujan12, I have fixed the server to accpet POST now, but when I call the api again, it is not return a json result i wanted. It return : Response {_body: “”, status: 200, ok: true, statusText: “OK”, headers: Headers, …} . Do you know how to deal with it? Thanks a lot =)