def http_request(self, path="<STR_LIT:/>", method="<STR_LIT:GET>", host=None, port=None, json=False, data=None):
host = host or self.get_IPv4s()[<NUM_LIT:0>]<EOL>port = port or self.get_ports()[<NUM_LIT:0>]<EOL>url = get_url(host=host, port=port, path=path)<EOL>return self.http_session.request(method, url, json=json, data=data)<EOL>
perform a HTTP request

:param path: str, path within the reqest, e.g. "/api/version"
:param method: str, HTTP method
:param host: str, if None, set self.get_IPv4s()[0]
:param port: str or int, if None, set to self.get_ports()[0]
:param json: bool, should we expect json?
:param data: data to send (can be dict, list, str)
:return: dict