HTTP/AJAX Flashcards

1
Q

What is a client?

A

a service requestor - requests data from somewhere else

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

What is a server?

A

provider of a resource or service – piece of software that provides data to a request

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

What three things are on the start line of a HTTP request message?

A
  • the protocall version
  • a status code
  • a status text
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Which HTTP method does a browser issue to a web server?

A

Get

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

What are HTTP headers?

A

a way to provide additional information about a request or response that’s currently being sent

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

Where would you go if you wanted to learn more about a specific HTTP Header?

A

MDN

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

Is a body required for a valid HTTP request or response message?

A

No

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

What is AJAX?

A

AJAX allows you to request data from a server and load it without having to refresh the entire page

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

What does the AJAX acronym stand for ?

A

Asynchronous JavaScript And XML

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

What object is built into the browser for making HTTP requests in JavaScript?

A

XMLHttpRequest

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

What event is fired by the XMLHttpRequest objects when they finish loading the data from the server?

A

‘load’

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

An XMLHttpRequest object has an addEventListener( ) method just like DOM Elements. How is it possible that they both share this functionality?

A

They share a prototype

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

What is a client?

A

a piece of computer software that requests/accesses a service or data made available by a server

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

What is a server?

A

a piece of software that provides functionality/data for other programs called clients

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

Which HTTP methods does a browser issue to a web server when you visit a URL?

A

GET

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

What is on the first line of an HTTP request message?

A
  • the start line - contains the HTTP method (GET, PUT, POST), the request target (URL/absolute path), and the HTTP version
17
Q

What is the first line of an HTTP response message?

A
  • the status line - contains the protocall version, a status code, and a status text
18
Q

What are HTTP headers?

A

key-value pairs of lines in a request/response message specifying more info about the request/response

19
Q

Is a body required for a valid HTTP message?

A

No