-
Notifications
You must be signed in to change notification settings - Fork 548
Rest.li 2.0 response API
Pegasus 1.17.2 features a new set of response APIs for various batch operations. The motivation of this change is to simplify the old response APIs. This change focuses on two sets of operations: BatchGet and BatchUpdate/BatchPartialUpdate/BatchDelete.
Previously there are two variations of responses for BatchGet: BatchResponse
and BatchKVResponse
. BatchResponse
is returned when the request is built by calling BatchGetRequestBuilder.build()
.BatchKVResponse
is returned when the request is built by calling BatchGetRequestBuilder.buildKV()
. The major difference between them is that BatchResponse
provides the raw string form of key, while BatchKVResponse
provides deserialized strong-typed key.
In 1.17.2, we introduce the third variation BatchEntityResponse
, a specialized BatchKVResponse
whose value is wrapped in a EntityResponse
. EntityResponse
contains three fields:
-
entity
provides an entity record if the server resource finds a corresponding value for the key; -
status
provides an optional status code; -
error
provides the error detail from the server resource (generallyentity
anderror
are mutually exclusive, but it is ultimately up to the server resource).
Quick Access:
- Tutorials
- Dynamic Discovery
- Request Response API
-
Rest.li User Guide
- Rest.li Server
- Resources
- Resource Types
- Resource Methods
- Rest.li Client
- Projections
- Filters
- Wire Protocol
- Data Schemas
- Data
- Unstructured Data
- Tools
- FAQ