Solved

Could you explain this curl script?

Posted on 2014-03-29
4
651 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 78

Accepted Solution

by:
arnold earned 500 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

Instantly Create Instructional Tutorials

Contextual Guidance at the moment of need helps your employees adopt to new software or processes instantly. Boost knowledge retention and employee engagement step-by-step with one easy solution.

Question has a verified solution.

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

Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
Although it can be difficult to imagine, someday your child will have a career of his or her own. He or she will likely start a family, buy a home and start having their own children. So, while being a kid is still extremely important, it’s also …
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…
Introduction to Processes

696 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