Help

MikeSpike

Community Member
View Badges
Joined
Jan 2, 2019
Messages
79
Reaction score
52
Rating - 0%
0   0   0
Hi. Trying to get some basic CURL commands to work from terminal on my Mac

just returns 'null'

my pi hostname is 'fish' and I have left the default username and password (reef-pi)

could someone help me here? Do I need to enable something on my pi?

Thank you
 
C:
curl -X POST -c cookie.txt -d '{"user":"reef-pi", "password":"reef-pi"}' http://fishtank.local/auth/signin
 
can you ping the host with the host name... if not just use the IP address of the reef-pi

Code:
curl -X POST -c cookie.txt -d '{"user":"reef-pi", "password":"reef-pi"}' http://fish.local/auth/signin

Code:
curl -X POST -c cookie.txt -d '{"user":"reef-pi", "password":"reef-pi"}' http://192.168.1.*/auth/signin

just replace the 192.168.1.* with whatever you IP address of the reef-pi
 
can you ping the host with the host name... if not just use the IP address of the reef-pi

Code:
curl -X POST -c cookie.txt -d '{"user":"reef-pi", "password":"reef-pi"}' http://fish.local/auth/signin

Code:
curl -X POST -c cookie.txt -d '{"user":"reef-pi", "password":"reef-pi"}' http://192.168.1.*/auth/signin

just replace the 192.168.1.* with whatever you IP address of the reef-pi
Thanks. unfortunately this just returns null. I know the hostname is right as I can login using a webbrowser. Any suggestions?
 
Thanks. unfortunately this just returns null. I know the hostname is right as I can login using a webbrowser. Any suggestions?
I can SSH into the main pi os via terminal but not using curl into reef pi
 
can you ping the host with the host name... if not just use the IP address of the reef-pi

Code:
curl -X POST -c cookie.txt -d '{"user":"reef-pi", "password":"reef-pi"}' http://fish.local/auth/signin

Code:
curl -X POST -c cookie.txt -d '{"user":"reef-pi", "password":"reef-pi"}' http://192.168.1.*/auth/signin

just replace the 192.168.1.* with whatever you IP address of the reef-pi
Probably has something to do with the fact that even in a web-browser 192.169.1.96/auth/signin (192.169.1.96 is my local IP) resolves to nothing. I.e there isn't a webpage there??? Imagine plenty of people here are using CURL. could you please help @Ranjib ?
 

IF YOU HAD TO TAKE A REEFING EXAM, WOULD YOU PASS?

  • Yes!

    Votes: 32 45.7%
  • Not yet, but I have one that I want to buy in mind!

    Votes: 9 12.9%
  • No.

    Votes: 26 37.1%
  • Other (please explain).

    Votes: 3 4.3%

New Posts

Back
Top