copies entire Header class in chained_requests test script

This commit is contained in:
2026-02-09 16:53:16 +01:00
parent 1d0bc6668c
commit 352a223d95

View File

@@ -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"):
'''