0

I've built a basic web platform that will log data through HTTP GET requests anytime the following URL is hit: http://desolate-spire-6651.herokuapp.com/temperature_reading/save?temperature=70.5 My original goal was to do this with a Twine, but unfortunately it's currently broken.

In the meantime, I'd like to know how to send temperature data with a Raspberry Pi to my web platform through an HTTP GET request. Please note that I do not want to store or log the data on the Pi, I simply want the PI to send data to my web platform. Any suggestions?

asked Feb 26, 2014 at 20:20
1
  • While this isn't off-topic (as it is regarding the data being set from a Pi) this might get more attention and better answers on Stack Overflow, which is a Programming-centered Stack Exchange. You can keep this question here, but I think it might be better on Stack Overflow. Commented Feb 27, 2014 at 14:11

2 Answers 2

2

wget or curl will do what you want. e.g.

temperature="70.5"
wget http://desolate-spire-6651.herokuapp.com/temperature_reading/save?temperature=${temperature}
answered Feb 26, 2014 at 21:37
1

This would also be pretty simple to do in Python, especially if you are already reading the temperature in a Python program. The Python "requests" module is perfect for this; a short quick tutorial is available at:

https://www.geeksforgeeks.org/get-post-requests-using-python/

Or thousands of other places, as a web search will show.

answered Feb 4, 2019 at 22:43

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.