1
I have studied about developing Apis with Laravel, a quick question, it is possible to return an XML instead of a json?
instead of doing:
return response()->json($json);
do something like:
return response()->xml($xml);
I searched for XML in the documentation and did not find...
is not the answer to your question but... why do you want to return XML? JSON is much better in many ways, mainly because it is much easier to serialize or deserialize...
– Leonardo Bonetti
the answer is your kkkk question, XML is already more complicated and to complete mine is signed, if I serialize or deserializar, the signature will become invalid. I need to get past him without making any modifications.
– JeffersonCarlosBD
What I’m doing at the moment is taking this XML via FTP, but for an API this is complicated because I have to create an FTP account for each application that consumes the API...
– JeffersonCarlosBD
this XML comes from some directory on the machine that is running or it is in memory?
– Leonardo Bonetti
it gets in memory soon after it is saved on machine, I would like to send before being saved.
– JeffersonCarlosBD