slim framework

  

seguinte estou  usando banco mysql e usando slim framework como rest api para pegar estes dados, mas quando vou abrir no navegador me retorna o erro Failed to parse response of the method 'GetClientes' of the 'RESTAPI1' REST API: Parsing '': Unexpected character encountered while parsing value: ?. Path '', line 0, position 0


o que pode ser?

Google Translate:

The following: I am using mysql database and using slim framework as rest api to get this data, but when I open the browser returns me Failed error to parse response of the method 'GetClientes' of the 'RESTAPI1' REST API: Parsing '': Unexpected character encountered while parsing value:. Path '', line 0, 0 position

What can it be?

(Please use English; so we all can help you)

Looks like your rest serviceanswered in Xml instead of Json.

Check your service documentation on how to get a json response.

 Usually by adding a header called "accept" with the value "application/json" does the trick. You can add that at the rest api level, so it affects all methods.


Regards,

João Rosado 

Solution

Gilberto Soares wrote:

seguinte estou  usando banco mysql e usando slim framework como rest api para pegar estes dados, mas quando vou abrir no navegador me retorna o erro Failed to parse response of the method 'GetClientes' of the 'RESTAPI1' REST API: Parsing '': Unexpected character encountered while parsing value: ?. Path '', line 0, position 0


o que pode ser?

fiz outra programação no slim framework e consegui a conexão no meu banco mysql


Solution