I'm working on a project using a Particle device and need to send data to a web server. I know I can use the HTTPClient library to make POST requests, but I'm also aware of the Particle.publish function.
What does Particle.publish do that a POST request couldn't?
How does pricing of this work for instance if I only use post requested I would only be limited by my data limit correct?
I'm trying to understand the best use case for each method. Any insights or examples would be greatly appreciated!
We do not recommend using HTTP for several reasons:
There is no built-in https library, preventing the use of TLS/SSL for security.
Using TLS/SSL on every connection can use an additional 5K of data per connection. The Particle cloud connection uses DTLS which is able to resume the connection with much less overhead.
The built-in event system supports queueing events when offline on the Monitor One/Tracker One.
Your billing will be based on cellular data usage, not data operations.