I am trying to send this:
curl --insecure -X POST -H "Content-Type: application/json" -d '{"UUID":"27486f-ea-11ee-bec0-fa163e4337e0","authtoken":"2748f6-e55a-11ee-b0-fa163e4337e0"}' https://<my server />/API/serveripupdate
With the route being
Route::any('/API/{method}/{jsondata}', 'API_c@apirequeststart');
The problem is that this does not seem to be recognised, returning my 'not found' html
<div class="flex-center position-ref full-height"><div class="errorframe"><div class="code"> 404 </div> <div class="message"> Not Found </div><div class="info"><a href="https://asusrog.dev.liveinfo247.com/logout">Please Retry Login</a></div></div></div>
Route Testing
When I use
wget --no-check-certificate https://<myserer />/API/serveripupdate/{"UUID":"27e7486f-e55a-11ee-bec0-fa163e4337e0","authtoken":"27e748f6-e55a-11ee-bec0-fa163e4337e0"}
This returns a response (and indeed stops at PHP breakpoint in PHPStorm where expected) however it shows that incomplete json would be processed as
$requestdata="UUID:27486f-ea-11ee-bec0-fa163e4337e0"
My question is what am I doing wrong in order to send JSON data via POST method on Ubuntu terminal, and ideally when working via crontab.The aim is for the server to send its current IP address, however this is not part of the question, I need to get UUID and authtoken first from the JSON, obviously I would parse the IP from the request.