cancel
Showing results for 
Search instead for 
Did you mean: 

Perform a http POST request with Nucleo and Wifi

carbonefabio
Associate II
Posted on November 01, 2017 at 19:12

Hi, I am trying to use my Nucleo L476RG with IDW01M1 Wifi Shild, to perform a POST request to the Firebase Database.

I am using the example providing in X-CUBE-WIFI1, in particular the HTTP_Request example project. ( 

http://www.st.com/content/st_com/en/products/embedded-software/mcus-embedded-software/stm32-embedded-software/stm32cube-embedded-software-expansion/x-cube-wifi1.html

 ).

The problem is that in the example it use the variables:

   char * post_hostname = '

https://community.st.com/external-link.jspa?url=https%3A%2F%2Fposttestserver.com%2F

';

   char * post_path = '/post.php/name=demo&email=mymail&subject=subj&body=message';

But the POST request require to insert the data not in the Url, but in the body message, with 

contentHeader, Type etc.

Firebase also require the data formatted in Json: 

https://firebase.google.com/docs/database/rest/save-data

 

So how can I perform a POST request to Firebase?

Thank you for your help.

#wifi #nucleo-l476rg
0 REPLIES 0