Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support https #9

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions netdata/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,17 @@
class Netdata(object):
"""A class for handling connections with a Netdata instance."""

def __init__(self, host, loop, session, port=19999, path=None):
def __init__(self, host, loop, session, scheme="http", port=19999, path=None):
"""Initialize the connection to the Netdata instance."""
self._loop = loop
self._session = session
self.host = host
self.port = port
self.values = self.alarms = self.metrics = None
if path is None:
self.base_url = URL.build(scheme="http", host=host, port=port, path=f"/api/v{API_VERSION}/")
self.base_url = URL.build(scheme, host=host, port=port, path=f"/api/v{API_VERSION}/")
else:
self.base_url = URL.build(scheme="http", host=host, port=port, path=path)
self.base_url = URL.build(scheme, host=host, port=port, path=path)


async def get_data(self, resource):
Expand Down