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
 
OP
OP
M

MikeSpike

Community Member
View Badges
Joined
Jan 2, 2019
Messages
79
Reaction score
52
Rating - 0%
0   0   0
C:
curl -X POST -c cookie.txt -d '{"user":"reef-pi", "password":"reef-pi"}' http://fishtank.local/auth/signin
 

ColoredRock

Well-Known Member
View Badges
Joined
Aug 9, 2021
Messages
855
Reaction score
1,032
Location
Murrieta, CA (North of San Diego)
Rating - 0%
0   0   0
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
 
OP
OP
M

MikeSpike

Community Member
View Badges
Joined
Jan 2, 2019
Messages
79
Reaction score
52
Rating - 0%
0   0   0
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?
 
OP
OP
M

MikeSpike

Community Member
View Badges
Joined
Jan 2, 2019
Messages
79
Reaction score
52
Rating - 0%
0   0   0
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
 
OP
OP
M

MikeSpike

Community Member
View Badges
Joined
Jan 2, 2019
Messages
79
Reaction score
52
Rating - 0%
0   0   0
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 ?
 

How much do you care about having a display FREE of wires, pumps and equipment?

  • Want it squeaky clean! Wires be danged!

    Votes: 71 44.4%
  • A few things are ok with me!

    Votes: 75 46.9%
  • No care at all! Bring it on!

    Votes: 14 8.8%
Back
Top