Web Requests - GET Flashcards

1
Q

What is the default HTTP method browsers use to obtain resources from a URL?

A

GET

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

What can be monitored in the Network tab of the browser devtools?

A

Requests sent by the browser to obtain resources

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

What type of authentication is handled directly by the webserver to protect specific pages?

A

Basic HTTP authentication

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

What credentials are used in the example for HTTP Basic Auth?

A

admin:admin

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

What command is used to view response headers in cURL?

A

-i

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

True or False: The WWW-Authenticate header confirms the use of basic HTTP auth.

A

True

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

What flag is used in cURL to provide basic HTTP auth credentials?

A

-u

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

Fill in the blank: When using basic HTTP auth, the Authorization header contains the value _______.

A

Basic YWRtaW46YWRtaW4=

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

What does the Authorization header value represent when using basic HTTP auth?

A

Base64 encoded value of username:password

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

What is an alternative method to provide basic HTTP auth credentials in a URL?

A

(username:password@URL)

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

What type of authentication do most modern web applications use?

A

Login forms with HTTP POST requests

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

What function can be accessed once authenticated in the example?

A

City Search function

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

What kind of request is sent to obtain search results in the example?

A

GET request

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

Which file is queried for search results in the example?

A

search.php

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

How can you send a GET request with cURL for a specific search?

A

Use the URL with the search parameter included

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

What shortcut opens the Network tab in browser devtools?

A

[CTRL+SHIFT+E]

17
Q

What method can be used to copy a request as a cURL command in the browser devtools?

A

Right-click > Copy > Copy as cURL

18
Q

What does the command ‘curl -H ‘Authorization: Basic YWRtaW46YWRtaW4=’ http://<SERVER_IP>:<PORT>/' do?</PORT></SERVER_IP>

A

Authenticates and accesses the page using basic HTTP auth

19
Q

What are the expected results when executing a GET request to search.php with a valid search term?

A

A list of matching cities

20
Q

What is the purpose of the ‘network_clear_requests’ action mentioned in the text?

A

To clear previous requests and monitor only new requests

21
Q

What does the copied cURL command from the Network tab include?

A

All headers used in the HTTP request

22
Q

What command can be used to repeat a request in the browser devtools using the Fetch API?

A

Copy > Copy as Fetch

23
Q

What happens when you manually set the Authorization header without supplying credentials?

A

You may still access the page if the header is correct