Curl Flashcards

1
Q

Curl

lists options and descriptions

A

curl –help

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Curl

set the user agent

A

curl -A

curl –user-agent

ex

curl –user-agent “Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)” localhost:4567

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Curl

include DATA with a POST request

A

curl -d

curl –data

ex

curl -X POST –data “username=admin&password=secret” localhost:4567/users/signin

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Curl

set a custom HTTP header

A

curl -H

curl –header

ex

curl –header “Content-Type: text/xml” localhost:4567

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Curl

include the response headers in the output

A

curl -i

curl –include

ex

curl -i localhost:4567

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Curl

redirect output from stdout to specified FILE

A

curl -o

ex

curl -o ~/Desktop/file.txt localhost:4567

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Curl

follow any redirect specified in Location header

A

curl -L

curl –location

ex

curl -L localhost:4567

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Curl

specify a method other than GET

A

curl -X

ex

curl -X POST localhost:4567/users/signin

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Curl

pass data to the server as a file

A

curl -b

curl –cookie

ex

curl -b cookie.txt localhost:4567

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Curl

write cookie to FILE after operation

A

curl -c

curl –cookie-jar

ex

curl -c cookie.txt localhost:4567

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Curl

creates necessary directory heirarchy

A

curl –create-dirs

ex

curl —create-dirs localhost:4567/some/sub/folder/index

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Curl

make the operation more “talkative”

A

curl -v

curl –verbose

ex curl -v localhost:4567

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Curl

curl –help

A

lists options and descriptions

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Curl

curl -A

curl –user-agent

ex

curl –user-agent “Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)” localhost:4567

A

set the user agent

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Curl

curl -d

curl –data

ex

curl -X POST –data “username=admin&password=secret” localhost:4567/users/signin

A

include DATA with a POST request

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Curl

curl -H

curl –header

ex

curl –header “Content-Type: text/xml” localhost:4567

A

set a custom HTTP header

17
Q

Curl

curl -i

curl –include

ex

curl -i localhost:4567

A

include the response headers in the output

18
Q

Curl

curl -o

ex

curl -o ~/Desktop/file.txt localhost:4567

A

redirect output from stdout to specified FILE

19
Q

Curl

curl -L

curl –location

ex

curl -L localhost:4567

A

follow any redirect specified in Location header

20
Q

Curl

curl -X

ex

curl -X POST localhost:4567/users/signin

A

specify a method other than GET

21
Q

Curl

curl -b

curl –cookie

ex

curl -b cookie.txt localhost:4567

A

pass data to the server as a file

22
Q

Curl

curl -c

curl –cookie-jar

ex

curl -c cookie.txt localhost:4567

A

write cookie to FILE after operation

23
Q

Curl

curl –create-dirs

ex

curl —create-dirs localhost:4567/some/sub/folder/index

A

creates necessary directory heirarchy

24
Q

Curl

curl -v

curl –verbose

ex curl -v localhost:4567

A

make the operation more “talkative”