How to use cURL with ESP32?

HansDia
Posts: 2
Joined: Tue Mar 30, 2021 8:48 pm

How to use cURL with ESP32?

Postby HansDia » Tue Mar 30, 2021 9:05 pm

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

lbernstone
Posts: 669
Joined: Mon Jul 22, 2019 3:20 pm

Re: How to use cURL with ESP32?

Postby lbernstone » Wed Mar 31, 2021 2:22 pm

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

HansDia
Posts: 2
Joined: Tue Mar 30, 2021 8:48 pm

Re: How to use cURL with ESP32?

Postby HansDia » Wed Mar 31, 2021 2:48 pm

Is there another why to do it with example PHP?

Who is online

Users browsing this forum: Bing [Bot] and 80 guests