HTTP Anatomy Flashcards

1
Q

Diagram the anatomy of this HTTP url => https://dope.co.uk/blog/anatomy-of-a-url

A

We have a protocol, a domain name, and lastly a path to the content.

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

Diagram the anatomy of this HTTP url => https://video.google.co.uk:80/videoplay?docid=-7233421982=en#00h02m30s

A

We have a protocol, a subdomain then a domain. A port (http uses port 80, https uses 443), a path (index is searched for by default if file name not included) and a query (often followed by query parameters and used with dynamically generated pages), parameters and a fragment (content that follows and includes the pound sign).

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

Describe what an HTTP redirect is

A

http redirect or url redirect or url forwarding refers to the technique of making a web page available under more than one uniform resource locator address. An example would be having your .wordpress.com address found using a different url address.

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

Recall at least 3 common HTTP headers

A

expires, age, language, content-type, cookie, MIME type (.js, .docx, .c).

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

Describe the difference between an HTTP POST and GET

A

The HTTP POST method is used to send information to our db server. The HTTP GET is used to retrieve info from the db server using a URI.

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

Describe an HTTP cookie

A

An http cookie is a small piece of data stored on your browser from a website. It is used to track whether you are making more than one request and so the website administrators can track your session activity and keep certain features of the site persistent such as your cart information, log-in info, etc.

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

How might you use the cURL command to make HTTP requests?

A

https://makandracards.com/makandra/1145-how-to-send-http-requests-using-curl

To use the cURL command to send data with an HTTP request do the following:
$ curl http://example.com/users -d”first_name=Bruce&last_name=Wayne”

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