arduino-libraries / ArduinoHttpClient

Arduino HTTP Client library
282 stars 170 forks source link

How do I make a connection to a host server that has been deployed on a service such as GCP or Railway? #177

Closed AfdulRohmat closed 2 months ago

AfdulRohmat commented 2 months ago

I have used this library using a local IP address and it runs smoothly, but when I change the serverAddress to the API URL that I have hosted on Google Cloud Run, I cannot make an http connection, for example making a get request. I also don't know what the correct port is for the hosted serverAddress

char serverAddress[] = "https://safety-driving-backend-j4gottfrqa-et.a.run.app";
const int port = 8080;  // not sure its the correct port for hosted server api
HttpClient httpClient = HttpClient(wifi, serverAddress, port);
per1234 commented 2 months ago

Hi @AfdulRohmat. Thanks for your interest in this open source project. This issue tracker is only to be used to report bugs or feature requests specific to the project. This topic is more appropriate for the Arduino Forum. I'm sure we will be able to help you out over there:

https://forum.arduino.cc/


UPDATE

Forum topic:

https://forum.arduino.cc/t/how-do-i-make-a-connection-to-a-host-server-that-has-been-deployed-on-a-service-such-as-gcp-or-railway/1275705