Splunk Dev

Trying to return a PDF with rest endpoint

big_nuggets
Explorer

I'm doing this as a response to my GET:

        self.response.setHeader('content-type''application/pdf')
        self.response.write(open('/opt/splunk/bin/ffff.pdf','rb').read())
 
but I receive only a partial base64 of the PDF file and the following error:
 
(most recent call last): File "/opt/splunk/bin/rest_handler.py", line 79, in <module> print splunk.rest.dispatch(**params) IOError: [Errno 11] Resource temporarily unavailable </msg>
 
any help is appreciated, thank you
Labels (2)
0 Karma
Get Updates on the Splunk Community!

September Community Champions: A Shoutout to Our Contributors!

As we close the books on another fantastic month, we want to take a moment to celebrate the people who are the ...

Splunk Decoded: Service Maps vs Service Analyzer Tree View vs Flow Maps

It’s Monday morning, and your phone is buzzing with alert escalations – your customer-facing portal is running ...

What’s New in Splunk Observability – September 2025

What's NewWe are excited to announce the latest enhancements to Splunk Observability, designed to help ITOps ...