Getting HTTP Error 502 while trying to make a GET request

Hello everyone!

I’m fairly new to RASA and I still have a lot to learn, but I’ve been trying to make an HTTP request using httplib2, but I’m getting the following errors:

image

This is the code I use to make the HTTP call:

h = httplib2.Http()

resposta, content = h.request("http://localhost:3000/list-bots", "GET")

Could anyone explain to me what I’m doing wrong?

Welcome to the community! :tada:

Are you using some sort of proxy or something which forwards requests? To be honest I have never worked with httplib2 - I think most people are using requests package .

Thank you for welcoming me to the community, Tobias!

I tried using requests, but I’ve got the same error. I’ve switched back to it, due to simplicity.

The reason behind my problem was neither a problem with rasa or httplib, it was being caused by trying to access a “localhost” that was on a different machine. Silly me.

Just out of curiosity, how would I configure a proxy using requests library? I know it has nothing to do with rasa, but it would be helpful to know how to do it when the time comes. :stuck_out_tongue: Thank you again in advance!