warvariuc
warvariuc

Reputation: 59574

Attach a custom view to spyne

I am using Spyne to provide SOAP interface to my backend, but a need one or more custom views accessible on certain URLS. For example to show some statistics in HTML.

How do i do that?

Upvotes: 0

Views: 218

Answers (1)

Burak Arslan
Burak Arslan

Reputation: 8001

Please have a look at the multiple protocols example here: https://github.com/arskom/spyne/tree/master/examples/multiple_protocols

If you want to return raw data via Http, you must set your output protocol to HttpRpc, your output type in your service to ByteArray or String and ctx.transport.mime_type to whatever type you're returning

Upvotes: 1

Related Questions