set
fun <TEntity, TElementEndpoint : ElementEndpoint<TEntity>> GenericCollectionEndpoint<TEntity, TElementEndpoint>.set(entity: TEntity): TEntity?
Sets/replaces an existing element in the collection.
Return
The entity as returned by the server, possibly with additional fields set. null if the server does not respond with a result entity.
Parameters
entity
The entity to store. Its ID is used to identify the element to replace.
Throws
when the entity has changed since it was last retrieved. Your changes were rejected to prevent a lost update.
when the server responds with HttpStatusCode.BadRequest.
when the server responds with HttpStatusCode.Unauthorized.
when the server responds with HttpStatusCode.Forbidden.
when the server responds with HttpStatusCode.NotFound or HttpStatusCode.Gone.
for other non-success status codes.