Meaning
GET /resource issues an HTTP GET request to retrieve the current representation of a named resource from a server. It addresses the need for idempotent, cacheable data retrieval without modifying server state. Use it whenever a client needs to read existing data from a REST endpoint without side effects.
Primary Function
HTTP request
Communicative Purpose
Retrieves the current state of a named resource from a server without modifying it.
Pattern
GET /resource
Core Structure
GET /...
Função primária
HTTP request
Propósito comunicativo
Retrieves the current state of a named resource from a server without modifying it.
Situações de gatilho
Web APIs: fetching user profile data from a REST endpoint
Contextos
REST APIs, HTTP clients, web services, microservices, CRUD operations
Padrão
GET /resource
Estrutura central
GET /...
Slots de substituição
resource: URL path string identifying the target endpoint
Colocados típicos
- HTTP headers
- status codes
- query parameters
- response body
- JSON parsing
- Authorization header
Substituições comuns
- POST /resource (creates a new resource)
- PUT /resource (replaces the resource)
- DELETE /resource (removes the resource)
- PATCH /resource (partial update)
Erros comuns
Using GET for state-changing operations: violates HTTP semantics and exposes data in URLs and server logs
Similar / contraste
POST /resource: creates a new resource instead of retrieving one
Interferências
Coming from RPC/SOAP: may expect a single endpoint with method names in the body — REST uses resource-oriented URLs with HTTP methods as verbs
Família do chunk
- HTTP methods
- REST verbs
- CRUD operations
- API endpoints
Nuance
When NOT to use: for operations that modify server state, for sensitive credentials in URLs (use POST), or for very large payloads that exceed URL length limits
Efeito pragmático
Enables stateless, cacheable data retrieval that scales across CDNs and load balancers, forming the backbone of read-heavy web applications.
Dica de memória
GET /resource is like asking a librarian for a book by its catalog number — you read what's already on the shelf without rearranging anything.
Log in to save chunks.