Imagine you are implementing a feature to upload a file to the server. Which HTTP method would be most appropriate to use with the Fetch API for this purpose?
- GET
- POST
- PUT
- DELETE
To upload a file to the server, you would use the POST HTTP method with the Fetch API. The POST method is used for submitting data to be processed to a specified resource, which is suitable for file uploads. GET, PUT, and DELETE have different purposes.
Loading...
Related Quiz
- A do-while loop is particularly useful when you want to ensure the loop body executes at least ________ before checking the condition.
- You need to filter out the prototype properties while using a loop to iterate over object properties. Which loop would you use, and what additional method would be needed to avoid iterating over prototype properties?
- In Internet Explorer, instead of addEventListener, the _________ method is used to attach event listeners.
- Which comparison operator performs type coercion if the operands are of different types?
- When you want to store multiple values in a single variable, you should use a(n) _________.