Web Application Technologies Flashcards

1
Q

HTTP Requests

A
  • consist of one or more headers, each on a separate line
  • followed by a mandatory blank line
  • followed by an optional message body
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

The first line of every HTTP request consists of WHAT three items, separated by spaces?

A
  1. A VERB indicating the HTTP method (i.e. GET, POST)
  2. The requested URL and option query string (params)
  3. HTTP version being used (HTTP/1.1)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

The Requested URL?

A
  • The URL typically functions as a name for the resource being requested, together with an optional query string containing parameters that the client is passing to that resource
  • The query string is indicated by the ‘?’ character in the URL
    EXAMPLE: /auth/488/page.aspx?uid=129
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What are some common HTTP Request Headers?

A
  • Referer
  • User-Agent
  • Host
  • Cookie
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Referer Header

A
  • used to indicate the URL from which the request originated

- EXAMPLE: If the user clicked on a link, the link URL is displayed

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

User-Agent Header

A
  • used to provide information about the browser or other client software that generated the request.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Host Header

A
  • specifies the hostname that appeared in the full URL being accessed
  • this is necessary when multiple websites are being hosted on the same server
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Cookie Header

A
  • used to submit additional parameters that the server has issued to the client
  • EXAMPLE: SessionId=5B70C71F3FD4963829483484
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

The first line of the HTTP Response consists of WHAT three items?

A
  • The HTTP version being used
  • A numeric status code indicating the result of the request (200 is most common)
  • A textual “reason phrase” further describing the status of the response (usually ‘OK’); not really used anymore
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

GET method

A
  • most common
  • designed to retrieve resources
  • it can be used to send parameters to the requested resource in the URL query string
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

POST method

A
  • used to perform actions

- with this method, request parameters can be sent both in the URL query string and in the body of the message

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

General HTTP Headers

A
  • Connection
  • Content-Encoding
  • Content-Length
  • Content-Type
  • Transfer-Encoding
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Connection Header

A
  • tells the other end of the communication whether it should close the TCP connection after the HTTP transmission has completed, or keep it open for further messages
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Content-Encoding Header

A
  • specifies the type of encoding being used for the content contained in the message body
  • EXAMPLE: gzip
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Content-Type Header

A
  • specifies the type of content contained in the message body, such as ‘text/html’ for HTML documents
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Transfer-Encoding Header

A
  • specifies any encoding that was performed on the message body to facilitate its transfer over HTTP.
17
Q

Request Headers

A
  • Accept
  • Accept-Encoding
  • Authorization
  • Cookie
  • Host
  • Origin
  • Referer
  • User-agent
18
Q

Accept Header

A
  • tells the server what kinds of content the client is willing to accept
19
Q

Accept-Encoding Header

A
  • tells the server what kinds of content encoding the client is willing to accept
20
Q

Authorization Header

A
  • submits credentials to the server
21
Q

User-Agent Header

A
  • provides information about the browser or the client software that generated the request
22
Q

Response Headers

A

left off here