Currently the prefix is an attribute in Context but this causes some problems.
In our framework you can change the ports Splunk listens to which causes our framework to update the ports of the Service
However, writing to port does not update the prefix variable so it won't be reflected when making requests.
I suggest the following code:
class Context:
....
@property
def prefix(self):
return "%s://%s:%s" % (self.scheme, self.host, self.port)
Currently the
prefixis an attribute inContextbut this causes some problems.In our framework you can change the ports Splunk listens to which causes our framework to update the ports of the
ServiceHowever, writing to
portdoes not update theprefixvariable so it won't be reflected when making requests.I suggest the following code: