HTTP Post - No data at receiver

조회 수: 12 (최근 30일)
Peter Reiter
Peter Reiter 2021년 10월 16일
댓글: Peter Reiter 2021년 11월 5일
Dear all,
I have created an HTTP post with the corresponding REACT to send various measurement data of a bee hive to beep.nl. Unfortunately, the data does not arrive there although I was able to successfully transmit data with Postman which was then also written to the database (JSON an also with X-WWW-FORM).
I can't explain what content error I have in the body?
Unfortunately, my knowledge of MATHLAB is not sufficient to create a post from this.
Thanks a lot in advance
regards
Peter
--------------------------------------------------
Name:Beute 2
API Key:52G8X93X1UTSHH6K
URL:https://api.beep.nl/api/sensors?key=kptnnz7wrz3qy90c
HTTP Auth Username:
HTTP Auth Password:
Method:POST
Content Type:application/json
HTTP Version:1.1
Host:api.beep.nl
Headers:
Body:{"weight_kg"=%%channel_1293353_field_6%%, "h"=%%channel_1293353_field_3%%, "t"=%%channel_1293353_field_1%%, "p"=%%channel_1293353_field_4%%, "t"=%%channel_1293353_field_2%%, t_i=%%channel_1293353_field_5%%}
Parse String:
Created:2021-10-16 4:50 am
--------------------------------------------------------

답변 (1개)

Christopher Stapels
Christopher Stapels 2021년 10월 27일
Instead of thingHTTP, I would reccomend you use a MATLAB analysis. You can use the webwrite command to create a POST. There is a specific ThingSpeak example on the doc page I linked.
Start your analysis by reading the channel with the values you want to send to the BEEP service. Then you can write those valeus in the POST to ThingSpeak using webwrite. You can use the react to trigger the MATLAB analysis, or timecontrol to trigger it at regular intervals.
  댓글 수: 1
Peter Reiter
Peter Reiter 2021년 11월 5일
Thank you for your answer. I tried it, but unfortunately my knowledge is not sufficient enough (despite the good explanation).
Then I hope that the HttpPost will work again soon.

댓글을 달려면 로그인하십시오.

커뮤니티

더 많은 답변 보기:  ThingSpeak 커뮤니티

카테고리

Help CenterFile Exchange에서 ThingSpeak에 대해 자세히 알아보기

제품

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by