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 ?
 

Caption This Contest OFFICIAL VOTING POLL! (make a post in this thread and you could win a prize too)

  • "What do you mean?! I am smiling!

  • "Did she really just rejoin the ReefAholics Anonymous group...AGAIN?!"

  • "Take a look at the new Sexy Shrimp!"

  • "I'm funny how, I mean funny like I'm a clownfish? I amuse you?"

  • "Looks like your living room is going through the ugly stage"

  • "Aghhh! Go put on your makeup before feeding me, please!"

  • "You try eating sand and not get constipated!"

  • "Everyone, hide! The landlord is coming!"

  • "He touched the butt!"

  • "They forgot to shut off the RO line and left for work...AGAIN"

  • "Get off my sand!"

  • "What do you mean I can't say that on a family friendly forum?"

  • "My face looking over my bank statement after a reef show..."

  • "Kids, you're grounded! Get back in my mouth!"

  • "When you see a human with a bucket and know somethings is about to go down."


Results are only viewable after voting.
Back
Top