Test Yourself: Client-side CRUD Operations

Test your understanding of the CRUD operations on the client side.

1

(Select all that apply.) Which of the following statements explains why the POST method is used in the code below?

const upload = (data) => {
  return axios.post(`/upload`, data, {
    headers: { ...authHeader(), "Content-Type": "multipart/form-data" },
  });
};

We used the POST method because:

A)

The POST method is defined as a POST in the server, but there’s no reason for that.

B)

The POST method is optional and another method, like the PUT method, can be used.

C)

The POST method is defined as POST in the server, because it’s the proper method for the create operation.

D)

We can use the PUT method, but it will be meaningless to the create operation.

Question 1 of 50 attempted

Get hands-on with 1400+ tech skills courses.