Skip to content

Commit

Permalink
whatpulse: remove server-confusing Accept header (#6)
Browse files Browse the repository at this point in the history
  • Loading branch information
sim642 committed Aug 19, 2017
1 parent 4860be9 commit d6674e9
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion whatpulse/session.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,15 @@
import pkg_resources

class Session(object):
headers = {
'User-Agent': 'WhatPulse Client ' + config.client_version,
'Accept': None # remove because server gets confused about */*
}
parser = etree.XMLParser(recover=True)

def __init__(self):
self.s = requests.Session()
self.s.headers.update({'User-Agent': 'WhatPulse Client ' + config.client_version})
self.s.headers.update(self.headers)

def requests(self, reqs):
requests = E.requests()
Expand Down

0 comments on commit d6674e9

Please sign in to comment.