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!

Index This | What is broken 80% of the time by February?

December 2025 Edition   Hayyy Splunk Education Enthusiasts and the Eternally Curious!    We’re back with this ...

Unlock Faster Time-to-Value on Edge and Ingest Processor with New SPL2 Pipeline ...

Hello Splunk Community,   We're thrilled to share an exciting update that will help you manage your data more ...

Splunk MCP & Agentic AI: Machine Data Without Limits

Discover how the Splunk Model Context Protocol (MCP) Server can revolutionize the way your organization uses ...