campaignmonitor / createsend-python

A Python library for the Campaign Monitor API
http://campaignmonitor.github.io/createsend-python
MIT License
57 stars 64 forks source link

access response headers for transactional API calls #36

Open benzkji opened 7 years ago

benzkji commented 7 years ago

I use createsend-python like this:

transactional = Transactional({"api_key": conf.CAMPAIGN_MONITOR_API_KEY, })
response = transactional.classic_email_send(object.title, 'info@sender.com', recipient.email,
                                         conf.CAMPAIGN_MONITOR_API_CLIENT_ID, html=body)
print response[0]

how can I access the X-Rate-Limit headers provided by the response? I can only see the json, transformed into a python object (and list?). As seen here: https://www.campaignmonitor.com/api/getting-started/#rate_limiting