changes Header.dump from method to attribute

This commit is contained in:
2026-01-27 22:37:26 +01:00
parent da074b027b
commit b771fedf49
2 changed files with 2 additions and 6 deletions

View File

@@ -6,10 +6,7 @@ class Header:
'''Init method, apikey suggested but not required (empty by default).'''
self.auth = {"Authorization" : apikey}
self.content = {"Content-Type" : "application/json"}
def dump(self):
'''Dumps the header in form of a dictionary.'''
dump = {**self.auth, **self.content}
return dump
self.dump = {**self.auth, **self.content}
if __name__=="__main__":
head = Header("MyApiKey-123456789abcdef")