Page 1 of 1

How to use cURL with ESP32?

Posted: Tue Mar 30, 2021 9:05 pm
by HansDia
Hi!

Is there any way to use cURL with the ESP32? I'm making a project where I want to use the Nexmo SMS service to send out messages. They offer many ways to do it, like .net, Node, Java, PHP, and cURL. There I think cURL is the best option for ESP32. Their cURL setup looks something like this:

Code: Select all

curl -X "POST" "https://rest.nexmo.com/sms/json" \
  -d "from=Vonage APIs" \
  -d "text=A text message sent using the Vonage SMS API" \
  -d "to=474****350" \
  -d "api_key=4****ccb" \
  -d "api_secret=bc****ff"
Hope someone can send me an example code on how to do this, I'm using Arduino IDE for coding.

Thanks a lot! :D
-HansDia

Re: How to use cURL with ESP32?

Posted: Wed Mar 31, 2021 2:22 pm
by lbernstone
cURL is c(ommand line) URL. Since there is no command line to run cURL, you have to write code to make the http connection. https://github.com/espressif/arduino-es ... t/examples

Re: How to use cURL with ESP32?

Posted: Wed Mar 31, 2021 2:48 pm
by HansDia
Is there another why to do it with example PHP?