http client class

This commit is contained in:
2021-01-03 15:19:29 -06:00
parent ad082eb0f9
commit 42a8e0c886
5 changed files with 99 additions and 86 deletions

View File

@ -14,6 +14,7 @@ from flask import current_app
from capsulflask import hub_model, spoke_model, cli
from capsulflask.btcpay import client as btcpay
from capsulflask.http_client import MyHTTPClient
load_dotenv(find_dotenv())
@ -81,7 +82,7 @@ stripe.api_key = app.config['STRIPE_SECRET_KEY']
stripe.api_version = app.config['STRIPE_API_VERSION']
app.config['FLASK_MAIL_INSTANCE'] = Mail(app)
app.config['HTTP_CLIENT'] = MyHTTPClient(timeout_seconds=5)
app.config['BTCPAY_CLIENT'] = btcpay.Client(api_uri=app.config['BTCPAY_URL'], pem=app.config['BTCPAY_PRIVATE_KEY'])
if app.config['HUB_MODE_ENABLED']: