HTTP Web Services requests GET, POST, PUT, DELETE Flashcards

1
Q

Service Class

A

Encapsulates the functionality of code that works as a unit or provides a specific business purpose.

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

Types of HTTP Methods

A
  1. Safe - GET (Not Safe - POST, PUT, DELETE).

2. Idempotent - GET, PUT, DELETE (Not Idempotent - POST).

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

Safe HTTP Method

A

A request that does not change the server.

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

Idempotent HTTP Method

A

A request that has the same result regardless of how many times it is completed.

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

HTTP Methods - GET Usage

A

Generally used to retrieve web pages to display (images, documents, stylesheets, script files, search pages).

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

GET Method Characteristics

A

GET requests are easily bookmarked because the parameters are in the URL. GET does not change the state on the server and has the same result each time it is repeated so it is Safe Idempotent.

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

Serialization

A

Transforming a Java Object to a string representation of the object, JSON. Object → JSON

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

Deserialization

A

Transforming a string representation of an object, JSON, into a Java Object. JSON → Object

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

HTTP Methods - POST Usage

A

Used when:

  1. Data must be secure (credit card number, password, etc.)
  2. Data is too large for the URL.
  3. When the request is asking to add something on the server.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

HTTP Methods - POST Usage

A
  1. HTTP POST requests cannot be bookmarked or sent with the browser directly.
  2. Post modifies the server and leaves the server in a different state each time the same request is repeated, so it is Not Safe Not Idempotent.
  3. POST transfers data in the message body instead of the URL.
  4. While HTTPS encrypts the message body, it cannot encrypt the URL.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

HTTP Methods - PUT Usage

A

Used to:

  1. Update existing data.
  2. Meant to overwrite the entire record with the new values.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

HTTP Methods - PUT Characteristics

A
  1. Cannot be bookmarked or sent with the browser directly.
  2. Indicates that the request will update existing data on the server.
  3. Put changes the state on the server but the state remains the same if the same request is repeated multiple times, so it is Not Safe Idempotent
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

HTTP Methods - DELETE Usage

A

Used to:

  1. Remove existing data from the server.
  2. Only requires the entity’s id, so parameters are sent in the query string.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

HTTP Methods - DELETE Characteristics

A
  1. Cannot be bookmarked or sent with the browser directly.
  2. This indicates that the request will remove existing data from the server.
  3. Delete changes the state of the server but the state remains the same if the request is repeated multiple times, so it is Not Safe Idempotent.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly