2022-09-08 12:32:31 +00:00
|
|
|
from urllib.request import Request, urlopen
|
2022-01-22 07:12:24 +00:00
|
|
|
|
|
|
|
from const import USER_AGENT, X_API_KEY
|
|
|
|
|
|
|
|
|
|
|
|
class HTTPRequest(Request):
|
|
|
|
def __init__(self, *args, **kwargs):
|
|
|
|
super().__init__(*args, **kwargs)
|
|
|
|
self.headers["User-Agent"] = USER_AGENT
|
|
|
|
self.headers["X-Api-Key"] = X_API_KEY
|
|
|
|
self.headers["Content-Type"] = "application/json"
|