Test Yourself: Client-side CRUD Operations

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


(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:


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


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


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


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

Question 1 of 50 attempted

Get hands-on with 1200+ tech skills courses.