How to call external api from server script?

Hello,
I tried call an external api from server script.
I tried two way:

  1. response = frappe.make_get_request(“https://google.com”)
  2. send_request

but both ways return 502 bad gate way.

So, how to call external api from server script?
Thanks for your support

Did you try this solutions How to call an external web service?