On Sunday, June 12, 2016 at 5:03:13 AM UTC-4, Mamisoa Andriantafika wrote: > > Thanks for your input. > > I removed the response.view and added the xml extension in the request: > > https://localhost/testapp/api/icd10.xml?search=string > > and it worked. Is there any way to get an xml view without adding the xml > extension? >
Just return XML. In many cases, the content-type HTTP header should be set to XML as well for the client to function properly (i.e., so the client knows the content is XML). web2py sets that automatically if you include the .xml extension. Otherwise, you simply have to set that header yourself (see response.headers here <http://web2py.com/books/default/chapter/29/04/the-core#response>). Anthony -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.

