我是初学者 Rails 开发人员,我遇到了麻烦。
我已经做了一个监控传感器的应用程序,现在我想从 arduino 板上发送值。
我想以原子方式创建一条访问诸如“localhost/values/343#123”之类的 url 的记录,仅形成本地计算机。
有什么办法?有可能吗?
谢谢你!!!
我是初学者 Rails 开发人员,我遇到了麻烦。
我已经做了一个监控传感器的应用程序,现在我想从 arduino 板上发送值。
我想以原子方式创建一条访问诸如“localhost/values/343#123”之类的 url 的记录,仅形成本地计算机。
有什么办法?有可能吗?
谢谢你!!!
Just do a POST request via HTTP.
The Restful, Railsy way to to it would be to do a POST to the url ending in the pluralized name of the class of the record you want to create. So, "/values." As long as your values match columns in the Values table, you can use the Scaffold controllers, and you will create a new record with the values you pass.