Every time you click a button in Ice Vault, your browser sends a hidden message to our server. These messages are called HTTP requests, and each one starts with a 'verb' that tells the server what to do.
What is an HTTP Request?
HTTP (Hypertext Transfer Protocol) is the foundation of data exchange on the internet. Think of an HTTP request as an envelope. Inside, there is a letter (the data) and on the outside, there is a method (the instruction for the server).
The Big Four: CRUD Operations
Most web applications follow the CRUD model: Create, Read, Update, and Delete. Each of these actions maps to a specific HTTP method.
GET — The Reader
Used to request data from a specific resource. GET requests should only retrieve data and have no other effect.
Example: Viewing your list of archives.
POST — The Creator
Used to send data to a server to create a new resource. The data is included in the body of the request.
Example: Creating a new user account.
PUT / PATCH — The Editor
Used to update existing data. PUT usually replaces the entire resource, while PATCH makes partial updates.
Example: Changing your vault folder name.
DELETE — The Destroyer
Used to delete the specified resource.
Example: Permanently removing a zip archive from S3.
Advanced Methods: HEAD & OPTIONS
There are other methods that work behind the scenes to keep the web running smoothly:
- HEAD: Identical to GET, but it only asks for the headers, not the actual content. This is useful for checking if a file exists before downloading it.
- OPTIONS: Used to describe the communication options for the target resource. This is often used in CORS (Cross-Origin Resource Sharing) to check if a server allows a request from a different domain.
Safety and Idempotency
In web development, some methods are 'Safe' (they don't change anything) and some are 'Idempotent' (doing them twice has the same result as doing them once).
According to Wikipedia, GET and HEAD are safe methods, while PUT and DELETE are idempotent. POST is neither safe nor idempotent because calling it twice would create two different resources.
Conclusion
Understanding HTTP methods is key to understanding how Ice Vault manages your data securely. By using the right 'verb' for the right action, we ensure that your archives are handled with precision, whether we are reading metadata or destroying an old vault.