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!

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics GA in US-AWS!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...