You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 15, 2024. It is now read-only.
When I use the python-consul package and connect to the consul service with ACL added, I can register the service through the token, but I cannot get the registered service through the token
Registration code:
`
class RegisterService(object):
def init(self, service_name, service_ip, service_port):
self.service_name = service_name
self.service_ip = service_ip
self.service_port = service_port
When I use the python-consul package and connect to the consul service with ACL added, I can register the service through the token, but I cannot get the registered service through the token
Registration code:
`
class RegisterService(object):
def init(self, service_name, service_ip, service_port):
self.service_name = service_name
self.service_ip = service_ip
self.service_port = service_port
`
This can register the service normally
Get service code:
`
class DiscoveryService(object):
def init(self, service_name):
self.service_name = service_name
`
This return None
When I can get the service through http:
def discovery_service_request_mode(self): host = ConnectConsul().connect_consul().host port = ConnectConsul().connect_consul().port token = ConnectConsul().connect_consul().token url = "http://%s:%s/v1/agent/services" % (host, str(port)) payload = {} headers = { 'Authorization': 'Bearer %s' % token } response = requests.request("GET", url, headers=headers, data=payload) print(json.loads(response.text))
The text was updated successfully, but these errors were encountered: