uplink icon indicating copy to clipboard operation
uplink copied to clipboard

proxy call is not honoured correctly by uplink

Open deepakrgr opened this issue 6 years ago • 1 comments

I have requirement where I invoke a proxy url https:///cluster/proxy_topology/ranger/service/public/v2/api/policy, I am trying to invoke this via uplink, but it fails and returns 404, though same call works with requests module , is there any limitation with Uplink ?

my code is as follows:


class TestClient(Consumer):
    def __init__(self):
        auth_methods = MultiAuth(
            ProxyAuth("****", "****")
        )
        session = requests.Session()
        session.verify = False
        super(TestClient, self).__init__(base_url='https://host_name/cluster/proxy_topology/ranger',
                             auth=auth_methods, client=session)

    @uplink.get('/service/public/v2/api/policy')
    def get_policies(self):
        """ get all the policies """

though Direct call works fine (without proxy) eg:

        super(TestClient, self).__init__(base_url='https://host_name:6182',
                             auth=auth_methods, client=session)

    @uplink.get('/service/public/v2/api/policy')
    def get_policies(self):
        """ get all the policies """

deepakrgr avatar Dec 02 '19 20:12 deepakrgr

Hi @dsharmahortonworks. Could you paste the equivalent requests call that is working for you?

prkumar avatar Dec 06 '19 15:12 prkumar