can i give an URL (in the http integration) thats runs on a localhost… like https:\192.168.1.100\abc.php…
If i do so i get 404 error… But the problem is that is if I run the same(abc.php) on my own system its working perfectly.
requestb.in is working perfectly but i want to create a page of my own… So i guess there might be some issue regarding the integration
A couple of points:
-
https:\192.168.1.100\abc.php
is not a valid URL -
192.168.1.100
is not equal tolocalhost
. If your code runs onlocalhost
, then change the url tohttp://localhost/...
orhttps://localhost/...
in case you’re using TLS - if that doesn’t work, try using
curl
from the command-line on the same machine from which LoRa App Server is running against the same URL
But i want to display the datas on an another system where i have written some PHP code that processes http post request… For testing purpose i am running on local host… In that case will the curl work?
I am getting this error handler *httphandler.Handler error: expected 2XX response, got: 404
I want to display the data in an another webpage running on a localhost… Please help me out
When you get a 404, that probably means that the HTTP Integration meganism is able to connect to your endpoint, but that the URL is invalid.
so how do i resolve it then… suppose i am running a file called abc.php … then what should my URL ? coz by giving simply http://192.168.1.100/abc.php won’t help me out… neither curl is working … please tell me a demo URL so that i can push that http request to my own webserver… means how should it look like
That all depends on your HTTP server configuration. Again please use a tool like curl for debugging. Also you could check your http access logs where abc.php
is hosted.
your webserver should be connected to a different port than lora app server so use localhost:(port use by server)/ABC.php