Timeline for How send method POST with JSON? Arduino UNO R3 + SIM900
Current License: CC BY-SA 4.0
15 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Oct 9, 2020 at 21:01 | history | bumped | CommunityBot | This question has answers that may be good or bad; the system has marked it active so that they can be reviewed. | |
| Jun 11, 2020 at 20:05 | history | bumped | CommunityBot | This question has answers that may be good or bad; the system has marked it active so that they can be reviewed. | |
| May 12, 2020 at 19:35 | answer | added | wgerro | timeline score: 1 | |
| May 12, 2020 at 19:30 | comment | added | wgerro | @hcheung however you were right, it was wrong in the php file, instead of $ _POST you had to use file_get_contents("php://input") ! | |
| May 12, 2020 at 8:21 | comment | added | hcheung | Trust me, I use Postman on daily basis... | |
| May 12, 2020 at 8:16 | comment | added | wgerro | @hcheung maybe you haven't enabled the POST method | |
| May 12, 2020 at 8:11 | comment | added | hcheung | Good luck then if you are saying you could get the correct Postman result while I can't even test it correctly. If my Postman test get the same result as your Arduino code, what does that tell you? | |
| May 12, 2020 at 6:22 | history | edited | wgerro | CC BY-SA 4.0 |
added 171 characters in body
|
| May 12, 2020 at 6:15 | comment | added | wgerro | on the server php shows that it does not receive CONTENT-TYPE and CONTENT-LENGTH from arduino | |
| May 12, 2020 at 6:13 | comment | added | wgerro | @TisteAndii I've already edited the post. | |
| May 12, 2020 at 6:13 | history | edited | wgerro | CC BY-SA 4.0 |
add function toSerial
|
| May 12, 2020 at 6:10 | comment | added | wgerro | @hcheung as it tests with postman it all works and returns data from $ _POST. I think you tested it badly. In the php file there is var_dump ($ _ POST) and hence the result array (0) {} | |
| May 12, 2020 at 3:22 | comment | added | hcheung | Check your server first, as far as I can tell, your server return an empty array even when I test it with Postman, so it has nothing to do with your arduino code. It is your php code that doesn't handle the POST request correctly. | |
| May 12, 2020 at 1:08 | comment | added | SoreDakeNoKoto |
What exactly does toSerial() do? Post all of it.
|
|
| May 11, 2020 at 19:25 | history | asked | wgerro | CC BY-SA 4.0 |