?
Solved

Could you explain this curl script?

Posted on 2014-03-29
4
Medium Priority
?
653 Views
Last Modified: 2014-03-29
Hi

I have a curl script and it works
curl -i -X POST admin:admin@localhost/auth

What is "admin:admin"? How do I know the parameter name for this?
Shouldn't it be "username=admin&password=admin"?


Thanks
Jamie
0
Comment
Question by:jamie_lynn
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 79

Accepted Solution

by:
arnold earned 2000 total points
ID: 39964309
admin:admin is username:password when you use for services such as http, FTP you use username:password@www.somesite.com
-X POST tells the method in this case you will be passing data as part of your request.
-i is include HTTP headers.

Man curl in your favorite search engine
Or locally on the system or info curl

http://linux.die.net/man/1/curl
0
 

Author Comment

by:jamie_lynn
ID: 39964313
Oh I see.  it is using http basic authentication.
0

Featured Post

Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Build an array called $myWeek which will hold the array elements Today, Yesterday and then builds up the rest of the week by the name of the day going back 1 week.   (CODE) (CODE) Then you just need to pass your date to the function. If i…
Google Drive is extremely cheap offsite storage, and it's even possible to get extra storage for free for two years.  You can use the free account 15GB, and if you have an Android device..when you install Google Drive for the first time it will give…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
Introduction to Processes
Suggested Courses

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question