diff --git a/tests/chained_requests.py b/tests/chained_requests.py index 4fe49bd..23fe802 100644 --- a/tests/chained_requests.py +++ b/tests/chained_requests.py @@ -1,6 +1,15 @@ import os, json, requests from getpass import getpass -from classes import Header + +class Header: + ''' + Class to standardize the format of the headers of our http requests. + ''' + def __init__(self, apikey=""): + '''Init method, apikey suggested but not required (empty by default).''' + self.auth = {"Authorization" : apikey} + self.content = {"Content-Type" : "application/json"} + self.dump = {**self.auth, **self.content} def get_entry_from_elabid(elabid, entryType="items"): '''