Help

MikeSpike

Community Member
View Badges
Joined
Jan 2, 2019
Messages
77
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
77
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,028
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
77
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?
 
Back
Top