Skip to content

Commit

Permalink
add User Agent
Browse files Browse the repository at this point in the history
  • Loading branch information
pivnicek committed Jul 13, 2017
1 parent 5bf993c commit f7be780
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion sapiclient.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,16 @@

class HttpHelper:
server = "https://connection.keboola.com/v2/"
user_agent = "Keboola StorageApi Python Client/v2"

def __init__(self, token):
self.token = token

def tokenheader(self):
return {'X-StorageApi-Token': self.token}
return {
'User-Agent': self.user_agent,
'X-StorageApi-Token': self.token
}

def getRequest(self, url, params = None):
if params == None:
Expand Down

0 comments on commit f7be780

Please sign in to comment.